:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #fbbf24;
    --amber-dark: #d97706;
    --slate: #1e293b;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32rem),
        var(--bg);
    color: var(--text);
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(30, 41, 59, 0.92);
    background: rgba(2, 6, 23, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
}

.top-nav {
    position: relative;
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--amber);
}

.brand {
    font-size: 22px;
    white-space: nowrap;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), #f97316);
    color: #111827;
    font-size: 13px;
    box-shadow: 0 10px 28px rgba(251, 191, 36, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}

.nav-link,
.mobile-link {
    color: var(--muted-strong);
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover {
    color: var(--amber);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background: var(--text);
}

.mobile-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.98);
    box-shadow: var(--shadow);
}

.mobile-panel.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

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

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

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
}

.hero-bg::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 28%, rgba(251, 191, 36, 0.22), transparent 24rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.94));
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1380px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: center;
    gap: 56px;
    padding: 62px 0 90px;
}

.hero-copy {
    max-width: 820px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border: 1px solid rgba(251, 191, 36, 0.34);
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.12);
    color: #fde68a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 8vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    color: var(--muted-strong);
    font-size: 19px;
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 700;
}

.tag-row.large span {
    font-size: 13px;
    padding: 6px 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.search-box button {
    background: linear-gradient(135deg, var(--amber), #f97316);
    color: #111827;
    box-shadow: 0 18px 38px rgba(251, 191, 36, 0.24);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-box button:hover {
    transform: translateY(-2px);
}

.ghost-btn {
    border: 1px solid rgba(226, 232, 240, 0.16);
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
}

.hero-poster {
    position: relative;
    width: min(100%, 380px);
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.82));
}

.hero-poster span {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: var(--amber);
    color: #111827;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
}

.hero-controls button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    color: var(--text);
    cursor: pointer;
}

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

.hero-dot {
    width: 10px !important;
    height: 10px !important;
    padding: 0;
    background: rgba(226, 232, 240, 0.32) !important;
}

.hero-dot.is-active {
    width: 28px !important;
    background: var(--amber) !important;
}

.page-shell {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 72px;
}

.search-panel,
.filter-bar,
.prose-card {
    display: grid;
    gap: 24px;
    align-items: center;
    margin-bottom: 42px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.62));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.search-panel {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 560px);
}

.search-panel h2,
.content-section h2,
.filter-bar h2,
.prose-card h2,
.detail-content h2 {
    margin: 10px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.search-box {
    display: flex;
    gap: 12px;
}

.search-box input,
.filter-bar input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    outline: none;
    background: rgba(2, 6, 23, 0.72);
    color: var(--text);
    padding: 0 18px;
}

.search-results {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.search-results.is-open {
    display: grid;
}

.search-result-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.58);
}

.search-result-item img {
    width: 52px;
    height: 76px;
    border-radius: 10px;
}

.search-result-item strong {
    display: block;
    margin-bottom: 5px;
}

.search-result-item span {
    color: var(--muted);
    font-size: 13px;
}

.content-section {
    margin-bottom: 56px;
}

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

.section-link,
.detail-pager a {
    color: var(--amber);
    font-weight: 800;
}

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

.category-grid.large {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.category-tile {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.tile-thumbs {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    opacity: 0.38;
}

.tile-thumbs::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.96));
}

.tile-body {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 22px;
}

.tile-body span,
.card-meta,
.mini-meta,
.breadcrumb,
.detail-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.tile-body h2 {
    margin: 8px 0;
    font-size: 28px;
}

.tile-body p {
    color: var(--muted-strong);
    line-height: 1.7;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.movie-grid.dense {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.42);
    box-shadow: 0 28px 66px rgba(0, 0, 0, 0.26);
}

.movie-card.is-filtered {
    display: none;
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--slate);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 52%, rgba(2, 6, 23, 0.86));
    opacity: 0.9;
}

.poster-wrap img {
    transition: transform 0.35s ease;
}

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

.play-dot,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 900;
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    background: var(--amber);
    color: #111827;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    background: rgba(2, 6, 23, 0.82);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.card-content {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.card-meta a {
    color: #fde68a;
}

.card-content h2 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.card-content h2 a:hover {
    color: var(--amber);
}

.card-content p {
    min-height: 62px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(160px, 210px);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
}

.mini-card {
    scroll-snap-align: start;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.mini-card img {
    aspect-ratio: 2 / 3;
}

.mini-title,
.mini-meta {
    display: block;
    padding-inline: 12px;
}

.mini-title {
    padding-top: 12px;
    color: var(--text);
    font-weight: 800;
    line-height: 1.35;
}

.mini-meta {
    padding-top: 4px;
    padding-bottom: 12px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.98));
}

.page-hero > div {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0 74px;
}

.small-hero > div {
    padding: 72px 0 62px;
}

.detail-hero {
    min-height: 560px;
}

.detail-wrap {
    position: relative;
    z-index: 2;
    width: min(1380px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
    padding: 62px 0;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.34);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.breadcrumb a {
    color: #fde68a;
}

.detail-copy h1 {
    max-width: 920px;
}

.detail-meta {
    justify-content: flex-start;
    gap: 10px;
    margin-top: 18px;
}

.detail-meta span {
    padding: 7px 11px;
    border: 1px solid rgba(226, 232, 240, 0.14);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-shell {
    padding-top: 32px;
}

.player-section {
    margin-bottom: 36px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
    cursor: pointer;
}

.player-trigger {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.70));
    color: var(--text);
    cursor: pointer;
}

.player-trigger.is-hidden {
    display: none;
}

.player-trigger span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: var(--amber);
    color: #111827;
    font-size: 28px;
    box-shadow: 0 20px 60px rgba(251, 191, 36, 0.32);
}

.player-trigger strong {
    font-size: 20px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    margin-bottom: 52px;
}

.detail-content article,
.detail-side,
.prose-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.detail-content article,
.detail-side {
    padding: 28px;
}

.detail-content p,
.prose-card p {
    color: var(--muted-strong);
    font-size: 17px;
    line-height: 1.9;
}

.detail-content article h2 + p {
    margin-top: 12px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 14px 16px;
    margin: 18px 0 0;
}

.detail-side dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: var(--text);
}

.detail-pager {
    display: flex;
    gap: 16px;
}

.filter-bar {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.filter-bar label {
    display: grid;
    gap: 10px;
}

.filter-bar label span {
    color: var(--muted-strong);
    font-weight: 800;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
}

.footer-grid {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
    padding: 52px 0 34px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-grid p {
    max-width: 480px;
    color: var(--muted);
    line-height: 1.8;
}

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

.footer-links a {
    color: var(--muted-strong);
}

.footer-links a:hover {
    color: var(--amber);
}

.footer-bottom {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

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

    .menu-toggle {
        display: flex;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-top: 42px;
    }

    .hero-poster {
        width: 260px;
    }

    .search-panel,
    .detail-content,
    .footer-grid,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .detail-wrap {
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .top-nav,
    .page-shell,
    .page-hero > div,
    .detail-wrap,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1380px);
    }

    .brand {
        font-size: 18px;
    }

    .hero-carousel,
    .hero-inner {
        min-height: 720px;
    }

    .hero-inner {
        padding-bottom: 110px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 42px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-actions,
    .search-box,
    .section-heading,
    .detail-pager {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn,
    .search-box button {
        width: 100%;
    }

    .movie-grid,
    .movie-grid.dense {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .card-content {
        padding: 12px;
    }

    .card-content h2 {
        font-size: 15px;
    }

    .card-content p {
        min-height: 54px;
        font-size: 12px;
    }

    .tag-row span {
        font-size: 11px;
    }

    .page-hero > div {
        padding: 56px 0 48px;
    }

    .detail-wrap {
        grid-template-columns: 1fr;
        padding-top: 38px;
    }

    .detail-poster {
        width: 180px;
    }

    .detail-hero,
    .detail-wrap {
        min-height: auto;
    }

    .detail-content article,
    .detail-side,
    .prose-card,
    .search-panel,
    .filter-bar {
        padding: 18px;
        border-radius: 18px;
    }

    .player-shell {
        border-radius: 18px;
    }

    .player-trigger span {
        width: 64px;
        height: 64px;
    }

    .mobile-panel.is-open {
        grid-template-columns: 1fr;
    }
}
