:root {
    --bg: #f9fafb;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --orange: #ea580c;
    --orange-dark: #c2410c;
    --orange-soft: #fff7ed;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #111827;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--orange), #dc2626);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.28);
}

.logo-text {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    color: #374151;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--orange);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: #111827;
}

.mobile-nav {
    display: none;
    padding: 10px 16px 18px;
    border-top: 1px solid var(--border);
    background: #ffffff;
}

.mobile-nav.open {
    display: grid;
    gap: 10px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 710px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--orange);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 22px 0 16px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 0;
    max-width: 640px;
    font-size: clamp(18px, 2vw, 24px);
    color: #e5e7eb;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0;
    color: #ffffff;
    font-weight: 600;
}

.hero-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.hero-actions,
.detail-meta,
.section-heading,
.filter-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.card-action,
.home-search button,
.section-heading a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.home-search button,
.card-action {
    border: 0;
    background: var(--orange);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(234, 88, 12, 0.24);
}

.primary-btn:hover,
.home-search button:hover,
.card-action:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--orange);
}

.quick-search-section {
    margin-top: -52px;
    position: relative;
    z-index: 4;
}

.quick-search-card {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    align-items: center;
    gap: 28px;
    padding: 30px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-card h2,
.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: #111827;
    letter-spacing: -0.04em;
}

.quick-search-card h2,
.section-heading h2 {
    font-size: clamp(26px, 3vw, 36px);
}

.quick-search-card p,
.section-heading p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--muted);
}

.home-search {
    display: flex;
    gap: 12px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
}

.home-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: none;
    padding: 0 12px;
}

.section-block,
.stacked-sections {
    padding: 70px 0;
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-heading a {
    background: var(--orange-soft);
    color: var(--orange);
}

.section-heading a:hover {
    background: var(--orange);
    color: #ffffff;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.featured-grid,
.catalogue-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.latest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    min-width: 42px;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), #dc2626);
    color: #ffffff;
    text-align: center;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(234, 88, 12, 0.26);
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.card-body h2 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h2 a:hover {
    color: var(--orange);
}

.card-desc {
    min-height: 54px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tag-list span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
}

.card-action {
    width: 100%;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 132px 1fr;
}

.horizontal-card .poster-link {
    aspect-ratio: 2 / 3;
    height: 100%;
}

.horizontal-card .card-desc {
    min-height: 46px;
}

.category-band {
    padding: 70px 0;
    background: linear-gradient(135deg, #111827, #1f2937 55%, #7c2d12);
}

.light-heading h2,
.light-heading p,
.light-heading a {
    color: #ffffff;
}

.light-heading a {
    background: rgba(255, 255, 255, 0.12);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 26px;
    color: #ffffff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.category-tile img,
.category-tile span {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-tile img {
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-tile span {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
}

.category-tile strong,
.category-tile em {
    position: relative;
    z-index: 2;
}

.category-tile strong {
    font-size: 22px;
    font-style: normal;
}

.category-tile em {
    margin-top: 8px;
    color: #f3f4f6;
    font-size: 14px;
    font-style: normal;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.page-main {
    min-height: 60vh;
}

.page-hero {
    padding: 78px 0 64px;
    background: radial-gradient(circle at 20% 10%, rgba(234, 88, 12, 0.16), transparent 30%), linear-gradient(135deg, #ffffff, #f3f4f6);
    border-bottom: 1px solid var(--border);
}

.page-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(38px, 5vw, 60px);
}

.page-hero p {
    max-width: 780px;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--orange);
}

.filter-panel {
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
    flex: 1 1 210px;
    display: grid;
    gap: 8px;
    color: #374151;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #f9fafb;
    color: var(--text);
    padding: 0 14px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.detail-top {
    background: #020617;
    padding: 28px 0 48px;
}

.detail-top .breadcrumb,
.detail-top .breadcrumb a {
    color: #e5e7eb;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.movie-player,
.player-cover,
.player-cover img {
    width: 100%;
    height: 100%;
}

.movie-player {
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: #000000;
    cursor: pointer;
}

.player-cover.hidden {
    display: none;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.78;
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), #dc2626);
    color: #ffffff;
    font-size: 34px;
    box-shadow: 0 20px 45px rgba(234, 88, 12, 0.32);
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    padding: 56px 0 18px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
}

.detail-meta span,
.detail-meta a {
    padding: 8px 12px;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.detail-meta a {
    color: var(--orange);
}

.lead-text {
    margin: 24px 0;
    font-size: 19px;
    color: #374151;
}

.detail-tags {
    margin-bottom: 24px;
}

.text-panel {
    margin-top: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: #374151;
}

.site-footer {
    margin-top: 40px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #d1d5db;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-logo {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    max-width: 420px;
    margin: 12px 0 0;
    color: #9ca3af;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a:hover {
    color: #fb923c;
}

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    text-align: center;
    color: #9ca3af;
}

.hidden-card {
    display: none !important;
}

@media (max-width: 1024px) {
    .movie-grid,
    .featured-grid,
    .catalogue-grid,
    .compact-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .latest-grid,
    .rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-search-card,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 280px;
    }
}

@media (max-width: 760px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero-carousel {
        height: 76vh;
        min-height: 560px;
    }

    .hero-gradient {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.36));
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 90px;
    }

    .hero-actions,
    .home-search,
    .section-heading,
    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .quick-search-section {
        margin-top: 0;
    }

    .quick-search-card {
        width: 100%;
        border-radius: 0;
    }

    .home-search {
        border-radius: 22px;
    }

    .home-search input {
        min-height: 48px;
    }

    .movie-grid,
    .featured-grid,
    .catalogue-grid,
    .compact-grid,
    .latest-grid,
    .category-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

    .horizontal-card {
        grid-template-columns: 112px 1fr;
    }

    .card-body {
        padding: 14px;
    }

    .detail-layout {
        padding-top: 36px;
    }

    .detail-poster {
        display: none;
    }

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
