:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #22d3ee;
    --accent-strong: #06b6d4;
    --blue: #3b82f6;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

* {
    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 20% 0%, rgba(34, 211, 238, 0.12), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--accent), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #051923;
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.25);
    font-size: 15px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-links a {
    color: #cbd5e1;
    padding: 10px 12px;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--accent);
    background: rgba(34, 211, 238, 0.1);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.85);
    border-radius: 12px;
    padding: 8px 12px;
}

.top-search {
    display: flex;
    align-items: center;
    width: min(280px, 28vw);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    border-radius: 999px;
    overflow: hidden;
}

.top-search input,
.hero-search input,
.filter-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.top-search input {
    padding: 10px 12px 10px 16px;
}

.top-search button,
.hero-search button {
    border: 0;
    color: #06111d;
    cursor: pointer;
    font-weight: 800;
    background: var(--accent);
}

.top-search button {
    padding: 10px 14px;
}

.hero {
    position: relative;
    height: min(720px, 72vh);
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.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-image {
    position: absolute;
    inset: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-fade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.32) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.5) 38%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    padding-bottom: 72px;
}

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

.eyebrow {
    display: inline-flex;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero h1 {
    font-size: clamp(44px, 7vw, 80px);
}

.hero p,
.page-hero p,
.detail-copy .lead {
    color: #cbd5e1;
    line-height: 1.8;
}

.hero p {
    max-width: 680px;
    margin: 18px 0 22px;
    font-size: 18px;
}

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

.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.16);
    font-size: 13px;
    font-weight: 700;
}

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

.center-actions {
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #051923;
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.24);
}

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

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

.hero-dot {
    width: 28px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dot.is-active {
    background: var(--accent);
}

.search-band {
    width: min(1200px, calc(100% - 32px));
    margin: -36px auto 0;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: 1.1fr minmax(280px, 480px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-band h2 {
    margin: 0 0 6px;
    font-size: clamp(24px, 3vw, 36px);
}

.search-band p {
    margin: 0;
    color: var(--muted);
}

.hero-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.58);
}

.hero-search input {
    min-height: 54px;
    padding: 0 16px;
}

.hero-search button {
    min-height: 54px;
    padding: 0 20px;
}

.page-main,
.content-section {
    width: min(1200px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.content-section {
    padding-top: 68px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.04em;
}

.small-head h2 {
    font-size: 26px;
}

.section-link {
    color: var(--accent);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, #0f172a, #111827);
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.36s ease, filter 0.36s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.06);
    filter: brightness(1.08);
}

.movie-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #06111d;
    background: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

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

.movie-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    color: var(--text);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.4;
}

.movie-title:hover {
    color: var(--accent);
}

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

.movie-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
}

.movie-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 66px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 120px 1fr;
}

.movie-card-wide .movie-cover {
    aspect-ratio: auto;
    height: 100%;
}

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

.category-tile {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at 30% 0%, rgba(34, 211, 238, 0.18), transparent 52%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.88));
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-tile span {
    font-size: 22px;
    font-weight: 950;
}

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

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 96px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.82);
    padding: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 36px 56px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.38);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: rgba(34, 211, 238, 0.1);
}

.rank-number {
    color: var(--accent);
    font-size: 18px;
    font-weight: 950;
}

.rank-item img {
    width: 56px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text strong {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
}

.rank-text em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    margin-top: 36px;
    padding: clamp(42px, 7vw, 88px);
    border: 1px solid var(--line);
    border-radius: 34px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.2), transparent 42%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.8));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(38px, 5vw, 68px);
}

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

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel input {
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.55);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid var(--line);
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.44);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #041016;
    border-color: transparent;
    background: var(--accent);
}

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

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

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 30px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.18), transparent 38%),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.poster-panel {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
    font-size: clamp(36px, 5vw, 68px);
}

.detail-copy .lead {
    max-width: 760px;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.16);
}

.player-section {
    margin-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    cursor: pointer;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 38%, rgba(34, 211, 238, 0.25), transparent 34%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.86));
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #06111d;
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.28);
    font-size: 28px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

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

.story-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.story-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
}

.ranking-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 34px;
}

.ranking-hero-card {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 24px;
    text-align: left;
    isolation: isolate;
}

.ranking-hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.92));
}

.ranking-hero-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.ranking-crown {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #06111d;
    background: var(--accent);
    font-weight: 950;
}

.ranking-hero-card strong,
.ranking-hero-card p {
    margin-left: 18px;
    margin-right: 18px;
}

.ranking-hero-card strong {
    font-size: 24px;
    font-weight: 950;
}

.ranking-hero-card p {
    margin-bottom: 18px;
    color: #cbd5e1;
}

.ranking-list {
    display: grid;
    gap: 16px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
}

.ranking-row-cover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.ranking-row-cover span {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    color: #06111d;
    background: var(--accent);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 950;
}

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

.ranking-row-body p {
    color: var(--muted);
    line-height: 1.75;
}

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

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

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

.site-footer p,
.site-footer a {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 12px;
}

.site-footer a {
    display: block;
    margin: 6px 0;
}

.site-footer a:hover {
    color: var(--accent);
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    color: #64748b;
    border-top: 1px solid var(--line);
    text-align: center;
}

@media (max-width: 1050px) {
    .top-search {
        display: none;
    }

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

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

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 780px) {
    .nav-wrap {
        flex-wrap: wrap;
        min-height: 64px;
        padding: 12px 0;
    }

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

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        padding-top: 10px;
    }

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

    .nav-links a {
        padding: 12px;
        background: rgba(15, 23, 42, 0.7);
    }

    .hero {
        min-height: 620px;
        height: 78vh;
    }

    .hero-content {
        padding-bottom: 88px;
    }

    .hero p {
        font-size: 16px;
    }

    .search-band {
        grid-template-columns: 1fr;
        margin-top: 18px;
    }

    .home-grid,
    .full-grid,
    .compact-grid,
    .category-grid,
    .ranking-hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .poster-panel {
        max-width: 300px;
        margin: 0 auto;
    }

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

@media (max-width: 520px) {
    .brand {
        font-size: 21px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .home-grid,
    .full-grid,
    .compact-grid,
    .category-grid,
    .ranking-hero-grid {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 86px 1fr;
        gap: 12px;
    }

    .movie-card-wide {
        grid-template-columns: 96px 1fr;
    }

    .page-hero,
    .detail-hero {
        border-radius: 24px;
        padding: 24px;
    }
}
