:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #0f172a;
    --muted: #94a3b8;
    --text: #e2e8f0;
    --white: #ffffff;
    --line: rgba(148, 163, 184, 0.22);
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --violet: #8b5cf6;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.44);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at 92% 10%, rgba(59, 130, 246, 0.18), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

button,
input {
    font: inherit;
}

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

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.22);
}

.brand-name,
.footer-logo {
    font-size: 20px;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.main-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #cbd5e1;
    transition: 0.22s ease;
}

.main-nav a:hover {
    color: white;
    background: rgba(148, 163, 184, 0.12);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    color: white;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 12px;
    padding: 8px 12px;
}

main {
    position: relative;
    z-index: 1;
}

.hero,
.page-hero,
.content-section,
.search-strip,
.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.hero {
    padding-top: 42px;
}

.hero-stage {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-radius: 34px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
    gap: 32px;
    align-items: center;
    padding: 72px;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.8s ease, visibility 0.6s ease;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78) 42%, rgba(2, 6, 23, 0.34)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: white;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.detail-line {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.movie-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(34, 211, 238, 0.28);
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.12);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.global-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    color: white;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
    transition: 0.22s ease;
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.66);
    box-shadow: none;
}

.primary-btn:hover,
.ghost-btn:hover,
.global-search button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.hero-poster {
    width: min(360px, 100%);
    aspect-ratio: 2 / 3;
    justify-self: end;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.48);
}

.hero-controls {
    margin-top: -72px;
    padding: 0 36px 26px;
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.hero-controls button,
.hero-dots button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: white;
    background: rgba(2, 6, 23, 0.72);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-active {
    width: 28px;
    background: var(--cyan);
}

.search-strip {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding-top: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.search-strip h2,
.section-head h2,
.prose-card h2 {
    margin: 0;
    color: white;
    font-size: clamp(24px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.global-search,
.inline-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.global-search input,
.inline-filter input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
    padding: 0 14px;
}

.inline-filter {
    max-width: 620px;
    margin-top: 24px;
}

.inline-filter input {
    min-height: 44px;
}

.content-section {
    padding-top: 58px;
    padding-bottom: 10px;
}

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

.compact-head {
    align-items: center;
}

.text-link {
    color: #67e8f9;
    font-weight: 700;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.48);
    box-shadow: 0 28px 68px rgba(2, 6, 23, 0.42);
}

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

.poster-link img {
    transition: transform 0.4s ease;
}

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

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

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 1;
    border-radius: 999px;
    padding: 8px 12px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

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

.movie-title {
    display: block;
    margin-top: 10px;
    color: white;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.movie-meta {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.movie-line {
    margin: 12px 0 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.65;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 24px;
}

.category-panel,
.ranking-panel,
.prose-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.76);
    padding: 26px;
    box-shadow: var(--shadow);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 12px;
}

.category-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(30, 41, 59, 0.68);
    transition: 0.2s ease;
}

.category-pill:hover {
    border-color: rgba(34, 211, 238, 0.48);
    background: rgba(8, 145, 178, 0.16);
}

.category-pill span {
    color: white;
    font-weight: 800;
}

.category-pill em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.rank-list,
.ranking-list-large {
    display: grid;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding: 12px 0;
}

.rank-row span,
.ranking-number {
    color: var(--cyan);
    font-size: 22px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.rank-row strong {
    color: white;
    grid-column: 2;
}

.rank-row em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    grid-column: 2;
}

.page-hero {
    padding-top: 58px;
    padding-bottom: 18px;
}

.small-hero {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pager {
    margin: 34px 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.pager a {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 15px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.74);
}

.pager a.is-current,
.pager a:hover {
    color: white;
    border-color: rgba(34, 211, 238, 0.52);
    background: rgba(8, 145, 178, 0.22);
}

.ranking-card {
    display: grid;
    grid-template-columns: 58px 84px 1fr;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.72);
}

.ranking-card img {
    width: 84px;
    height: 118px;
    border-radius: 14px;
}

.ranking-card strong {
    display: block;
    color: white;
    font-size: 20px;
}

.ranking-card p,
.ranking-card em {
    display: block;
    margin: 8px 0 0;
    color: var(--muted);
    font-style: normal;
    line-height: 1.55;
}

.detail-hero {
    position: relative;
    max-width: none;
    padding: 56px 24px 36px;
    overflow: hidden;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(180deg, rgba(2, 6, 23, 0.7), #020617 92%),
        var(--detail-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
}

.detail-layout {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 32px;
    align-items: center;
}

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

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-trigger {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 50%;
    color: white;
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 24px 70px rgba(34, 211, 238, 0.38);
}

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

.detail-info {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    padding: 30px;
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(18px);
}

.detail-meta {
    list-style: none;
    padding: 0;
    margin: 26px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-meta li {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.66);
}

.detail-meta span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.detail-meta strong {
    display: block;
    margin-top: 4px;
    color: white;
    font-size: 14px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
    gap: 24px;
}

.prose-card p {
    color: #cbd5e1;
    line-height: 1.95;
    font-size: 16px;
}

.accent-card {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.16), rgba(30, 41, 59, 0.74));
}

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.movie-card-compact .movie-title {
    font-size: 15px;
}

.movie-card-compact .movie-card-body {
    padding: 12px;
}

.empty-state {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.74);
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

.footer-inner p {
    margin: 10px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
    color: #cbd5e1;
}

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

[hidden] {
    display: none !important;
}

@media (max-width: 980px) {
    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.96);
    }

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

    .hero-slide,
    .detail-layout,
    .split-section,
    .detail-content,
    .search-strip,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: 760px;
    }

    .hero-slide {
        padding: 36px;
    }

    .hero-poster {
        justify-self: start;
        width: min(260px, 80vw);
    }

    .ranking-panel {
        order: -1;
    }
}

@media (max-width: 640px) {
    .nav-wrap,
    .hero,
    .page-hero,
    .content-section,
    .search-strip {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand-name {
        font-size: 17px;
    }

    .hero-stage {
        min-height: 720px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 28px 20px;
    }

    .hero-controls {
        justify-content: center;
        margin-top: 14px;
        padding: 0;
    }

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

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

    .movie-line {
        display: none;
    }

    .category-panel,
    .ranking-panel,
    .prose-card,
    .detail-info {
        padding: 18px;
        border-radius: 20px;
    }

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

    .ranking-card {
        grid-template-columns: 44px 64px 1fr;
        gap: 10px;
    }

    .ranking-card img {
        width: 64px;
        height: 92px;
    }

    .play-trigger {
        width: 74px;
        height: 74px;
    }
}
