:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-light: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --brand: #f59e0b;
    --brand-strong: #d97706;
    --line: rgba(148, 163, 184, 0.18);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.max-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.84);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1200px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand), #f97316);
    color: #fff;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

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

.desktop-nav a,
.mobile-nav a {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fff;
    background: rgba(245, 158, 11, 0.16);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
    min-width: 0;
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
}

.header-search input {
    width: 210px;
    padding: 8px 8px 8px 12px;
}

.header-search button,
.hero-search button,
.filter-bar button {
    border: 0;
    color: #fff;
    background: var(--brand);
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.hero-search button:hover,
.filter-bar button:hover {
    background: var(--brand-strong);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #fff;
    background: rgba(15, 23, 42, 0.8);
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.94);
}

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

.hero-slider {
    position: relative;
    height: min(760px, 78vh);
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.22) 100%), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 36%, rgba(2, 6, 23, 0.36) 100%), var(--hero-cover);
    background-position: center;
    background-size: cover;
    transition: opacity 0.72s ease, visibility 0.72s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 40px;
    max-width: 720px;
}

.hero-kicker,
.page-hero span,
.section-heading span,
.category-card span,
.wide-card span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #fff;
    background: rgba(245, 158, 11, 0.92);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.7;
}

.hero-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.hero-tags span,
.tag-cloud span {
    color: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(15, 23, 42, 0.68);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.primary-btn,
.ghost-btn,
.text-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: var(--brand);
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.62);
}

.text-btn,
.section-more {
    color: var(--brand);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-panel {
    position: absolute;
    left: 50%;
    bottom: 38px;
    z-index: 3;
    width: min(1200px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.hero-search {
    width: min(520px, 100%);
    padding: 8px;
    display: flex;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
}

.hero-search input {
    flex: 1;
    padding: 12px 16px;
}

.hero-dots {
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.34);
}

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

.content-section {
    padding: 70px 0;
}

.section-heading {
    margin-bottom: 30px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.section-heading h2 {
    margin: 12px 0 0;
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 10px 0 0;
    max-width: 640px;
    color: var(--muted);
    line-height: 1.7;
}

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

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

.compact-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.38);
    box-shadow: var(--shadow);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #020617);
}

.movie-card-large .poster-wrap {
    aspect-ratio: 16 / 10;
}

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

.movie-card:hover .poster-wrap img,
.category-card:hover img,
.wide-card:hover img {
    transform: scale(1.08);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 48%);
    pointer-events: none;
}

.poster-badge,
.year-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    left: 12px;
    color: #fff;
    background: rgba(245, 158, 11, 0.95);
}

.year-badge {
    right: 12px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
}

.movie-card-body {
    padding: 18px;
}

.movie-card-body h3,
.wide-card h3,
.ranking-item h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body p,
.wide-card p,
.ranking-item p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    color: var(--soft);
    font-size: 13px;
}

.movie-meta span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 9px;
}

.ranking-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 24px;
}

.ranking-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.ranking-item a {
    display: grid;
    grid-template-columns: 46px 76px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item a:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.36);
}

.rank-number {
    color: var(--brand);
    font-size: 22px;
    font-weight: 900;
}

.ranking-item img {
    width: 76px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--panel-light);
}

.ranking-spotlight,
.scroll-row {
    display: grid;
    gap: 14px;
}

.wide-card a {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.64);
    overflow: hidden;
}

.wide-card img {
    width: 138px;
    height: 94px;
    border-radius: 16px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-showcase,
.editor-section {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(15, 23, 42, 0.54), rgba(2, 6, 23, 0));
}

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

.category-tile {
    min-height: 146px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 36%), rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.36);
}

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile p {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.scroll-row {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 16px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0 70px;
    background: radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.18), transparent 28%), linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 1));
}

.category-hero,
.detail-hero {
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.74)), var(--hero-cover);
    background-size: cover;
    background-position: center;
}

.page-hero h1 {
    margin-bottom: 14px;
}

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

.category-card a {
    display: block;
    height: 100%;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.74);
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card a:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.36);
}

.category-cover-set {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.category-cover-set img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    background: var(--panel-light);
    transition: transform 0.45s ease;
}

.category-card h2 {
    margin: 14px 0 8px;
}

.category-card p {
    color: var(--muted);
    line-height: 1.7;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px auto;
    gap: 12px;
    margin-bottom: 26px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.64);
}

.filter-bar option {
    background: var(--panel);
}

.empty-state {
    margin: 26px 0 0;
    color: var(--muted);
    text-align: center;
}

.detail-hero {
    padding: 70px 0;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: center;
    gap: 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-poster {
    width: 300px;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--line);
    border-radius: 28px;
    object-fit: cover;
    box-shadow: var(--shadow);
    background: var(--panel-light);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 28px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.16), rgba(2, 6, 23, 0.72));
}

.player-cover[hidden],
.player-box.is-playing .player-cover {
    display: none;
}

.play-circle {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 28px;
    box-shadow: 0 18px 52px rgba(245, 158, 11, 0.36);
}

.story-card,
.side-card {
    margin-top: 24px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.story-card h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.story-card p {
    margin: 0 0 18px;
    color: var(--soft);
    line-height: 1.9;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px 14px;
    margin: 0;
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    margin: 0;
    color: var(--soft);
}

.ranking-page-grid {
    max-width: 920px;
    margin: 0 auto;
}

.tall-list .ranking-item a {
    grid-template-columns: 58px 92px minmax(0, 1fr);
}

.tall-list .ranking-item img {
    width: 92px;
    height: 116px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.footer-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 34px;
}

.footer-brand {
    margin-bottom: 16px;
}

.site-footer p {
    max-width: 640px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-links a {
    color: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
}

.footer-links a:hover {
    color: #fff;
    border-color: rgba(245, 158, 11, 0.36);
}

[hidden] {
    display: none !important;
}

@media (max-width: 1080px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

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

    .category-grid,
    .category-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ranking-grid,
    .detail-layout,
    .detail-hero-grid,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(320px, 100%);
    }
}

@media (max-width: 720px) {
    .nav-shell {
        height: 64px;
    }

    .brand {
        font-size: 18px;
    }

    .hero-slider {
        min-height: 680px;
        height: auto;
    }

    .hero-content {
        padding-top: 86px;
    }

    .hero-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-search {
        border-radius: 22px;
        flex-direction: column;
    }

    .hero-search button {
        min-height: 46px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .feature-grid,
    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-card-body {
        padding: 14px;
    }

    .movie-card-body h3 {
        font-size: 16px;
    }

    .ranking-item a,
    .tall-list .ranking-item a {
        grid-template-columns: 42px 72px minmax(0, 1fr);
    }

    .ranking-item img,
    .tall-list .ranking-item img {
        width: 72px;
        height: 92px;
    }

    .wide-card a {
        grid-template-columns: 1fr;
    }

    .wide-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-hero {
        padding: 58px 0;
    }

    .detail-poster {
        display: none;
    }

    .story-card,
    .side-card {
        padding: 20px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 460px) {
    .feature-grid,
    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-card-grid {
        grid-template-columns: 1fr;
    }

    .scroll-row .movie-card {
        flex-basis: 82vw;
    }
}
