:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(30, 41, 59, 0.78);
    --panel-strong: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --amber-bright: #fbbf24;
    --red: #ef4444;
    --green: #22c55e;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.5);
    --radius: 22px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 34rem),
        radial-gradient(circle at 78% 18%, rgba(239, 68, 68, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, var(--bg) 45%, #020617 100%);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 75%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.32);
}

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

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-bright), var(--amber), #f97316);
    box-shadow: 0 12px 34px rgba(245, 158, 11, 0.28);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong {
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.75rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--soft);
    font-size: 0.95rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-bright);
    background: rgba(245, 158, 11, 0.1);
    transform: translateY(-1px);
}

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

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: currentColor;
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    transform: scale(1.05);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.83) 42%, rgba(2, 6, 23, 0.34) 100%),
        linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
    align-items: center;
    gap: 42px;
    padding: 58px 0 82px;
}

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

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0 18px;
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    color: var(--soft);
    font-size: 1.08rem;
    line-height: 1.9;
}

.hero-meta,
.meta-list,
.tag-row,
.card-topline,
.breadcrumb,
.detail-facts,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span,
.pill,
.tag-row span,
.category-pill,
.meta-list span,
.detail-facts span {
    border: 1px solid rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.1);
    color: #fde68a;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.82rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: var(--text);
    background: rgba(15, 23, 42, 0.58);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(30, 41, 59, 0.82);
}

.btn-primary {
    color: #111827;
    border-color: transparent;
    background: linear-gradient(135deg, var(--amber-bright), var(--amber));
    font-weight: 800;
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.22);
}

.hero-poster {
    position: relative;
    isolation: isolate;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow);
    transform: rotate(1deg);
}

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

.hero-poster img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.hero-poster figcaption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 2;
    display: grid;
    gap: 8px;
}

.hero-poster strong {
    font-size: 1.2rem;
}

.hero-poster span {
    color: var(--muted);
}

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

.hero-controls button {
    width: 42px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.22);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-controls button.active {
    width: 68px;
    background: var(--amber-bright);
}

.section {
    padding: 54px 0;
}

.section-tight {
    padding-top: 30px;
}

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

.section-head h2,
.page-title h1,
.detail-copy h1 {
    margin: 8px 0 0;
    font-size: clamp(1.85rem, 4vw, 3rem);
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p,
.detail-copy p,
.category-card p,
.card-body p,
.footer-inner p,
.prose p {
    color: var(--muted);
    line-height: 1.8;
}

.kicker {
    color: var(--amber-bright);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-more {
    color: var(--amber-bright);
    font-weight: 700;
    white-space: nowrap;
}

.section-more span {
    margin-left: 5px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.24);
    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.46);
    box-shadow: 0 26px 54px rgba(2, 6, 23, 0.38);
}

.movie-card[hidden] {
    display: none;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.85);
}

.poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.score,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
}

.score {
    right: 12px;
    padding: 7px 9px;
    color: #111827;
    background: var(--amber-bright);
}

.rank-badge {
    left: 12px;
    padding: 8px 10px;
    color: var(--text);
    background: rgba(239, 68, 68, 0.88);
}

.card-body {
    padding: 15px;
}

.card-topline {
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.8rem;
}

.card-topline .category-pill {
    padding: 4px 8px;
    font-size: 0.74rem;
}

.card-body h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.38;
}

.card-body h3 a:hover {
    color: var(--amber-bright);
}

.card-body p {
    min-height: 3.3em;
    margin: 10px 0 13px;
    font-size: 0.9rem;
}

.tag-row span {
    padding: 4px 8px;
    font-size: 0.73rem;
    color: var(--soft);
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(148, 163, 184, 0.08);
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    gap: 24px;
}

.feature-panel {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.feature-panel img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    opacity: 0.58;
}

.feature-panel .feature-copy {
    position: absolute;
    inset: auto 28px 28px 28px;
    z-index: 2;
}

.feature-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 28%, rgba(2, 6, 23, 0.92) 100%);
}

.feature-copy h3 {
    position: relative;
    z-index: 1;
    margin: 12px 0;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1;
}

.feature-copy p,
.feature-copy .hero-meta,
.feature-copy .hero-actions {
    position: relative;
    z-index: 1;
}

.side-stack {
    display: grid;
    gap: 16px;
}

.side-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.72);
}

.side-card img {
    width: 112px;
    height: 150px;
    object-fit: cover;
    border-radius: 14px;
}

.side-card h3 {
    margin: 4px 0 8px;
}

.side-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 178px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 46%),
        rgba(30, 41, 59, 0.76);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
}

.category-card p {
    margin: 0;
}

.page-hero {
    padding: 72px 0 34px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 36rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.64), transparent);
}

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

.breadcrumb {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.filter-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.42);
}

.search-box span {
    color: var(--amber-bright);
    font-size: 1.25rem;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.search-box input::placeholder {
    color: #64748b;
}

.filter-chip {
    cursor: pointer;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--soft);
    background: rgba(30, 41, 59, 0.62);
}

.filter-chip:hover,
.filter-chip.active {
    color: #111827;
    border-color: transparent;
    background: var(--amber-bright);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 62px 118px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
}

.rank-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-bright), var(--amber));
}

.rank-item img {
    width: 118px;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
}

.rank-item h3 {
    margin: 0 0 8px;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 44px;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--detail-image) center / cover no-repeat;
    opacity: 0.18;
    filter: blur(3px);
    transform: scale(1.05);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.88) 55%, rgba(2, 6, 23, 0.54) 100%);
}

.detail-grid {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-copy .breadcrumb {
    margin-bottom: 12px;
}

.detail-copy h1 {
    margin-top: 10px;
}

.detail-copy p {
    font-size: 1.04rem;
}

.player-section {
    padding-top: 42px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: var(--text);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.82));
    transition: opacity 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.player-cover span {
    display: inline-grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    color: #111827;
    font-size: 2rem;
    background: var(--amber-bright);
    box-shadow: 0 0 0 18px rgba(245, 158, 11, 0.16);
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

.prose {
    display: grid;
    gap: 22px;
    margin-top: 30px;
}

.prose article {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.72);
}

.prose h2 {
    margin: 0 0 12px;
}

.prose p {
    margin: 0;
}

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

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
    gap: 30px;
    padding: 34px 0;
}

.footer-brand {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.1rem;
}

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

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

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

.empty-state {
    display: none;
    padding: 26px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

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

    .hero-inner,
    .feature-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 420px;
        transform: none;
    }

    .rank-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 66px;
    }

    .brand-text small {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

    .nav-menu.is-open {
        display: flex;
    }

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

    .hero-inner {
        padding-top: 34px;
        gap: 24px;
    }

    .hero-copy p {
        font-size: 0.98rem;
    }

    .section-head,
    .footer-inner {
        display: grid;
    }

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

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 240px;
    }

    .rank-item {
        grid-template-columns: 46px 92px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
    }

    .rank-item img {
        width: 92px;
        height: 124px;
    }

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

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

    .hero-actions {
        display: grid;
    }

    .btn {
        width: 100%;
    }
}
