:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-strong: rgba(15, 23, 42, 0.95);
    --line: rgba(34, 211, 238, 0.2);
    --line-strong: rgba(34, 211, 238, 0.4);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --blue: #38bdf8;
    --pink: #f472b6;
    --green: #34d399;
    --shadow: 0 24px 80px rgba(8, 47, 73, 0.46);
    --radius: 24px;
    --radius-small: 16px;
    --max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(34, 211, 238, 0.12), transparent 28rem),
        radial-gradient(circle at 90% 0%, rgba(56, 189, 248, 0.11), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent 70%);
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 40px rgba(34, 211, 238, 0.08);
}

.header-inner {
    width: min(var(--max), calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #04111d;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 14px;
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

.brand-copy {
    display: grid;
    line-height: 1.1;
}

.brand-copy strong,
.footer-brand {
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, #67e8f9, #60a5fa, #a5f3fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-copy em {
    margin-top: 3px;
    font-size: 0.78rem;
    color: rgba(34, 211, 238, 0.74);
    font-style: normal;
}

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

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    border-radius: 12px;
    color: #cbd5e1;
    transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.desktop-nav a {
    padding: 10px 13px;
    font-size: 0.92rem;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #cffafe;
    background: rgba(34, 211, 238, 0.13);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.16), 0 12px 28px rgba(8, 145, 178, 0.13);
}

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

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--cyan);
    border-radius: 999px;
}

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

.mobile-nav a {
    display: block;
    padding: 12px 14px;
}

.mobile-nav.open {
    display: block;
}

main {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.hero-slider {
    position: relative;
    min-height: 680px;
    margin: 34px 0 56px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.6));
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    align-items: center;
    gap: 36px;
    padding: clamp(28px, 6vw, 70px);
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 600ms ease, transform 800ms ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 30%, rgba(34, 211, 238, 0.18), transparent 32rem);
    pointer-events: none;
}

.hero-content,
.hero-art {
    position: relative;
    z-index: 1;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    padding: 8px 12px;
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.11);
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    font-size: 0.9rem;
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.08);
}

.hero-content h1,
.page-hero h1,
.detail-title h1 {
    margin: 18px 0 18px;
    max-width: 820px;
    font-size: clamp(2.2rem, 6vw, 5.25rem);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hero-content h1 span,
.page-hero h1 span {
    background: linear-gradient(90deg, #67e8f9, #93c5fd, #f0abfc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p,
.page-hero p,
.detail-title p {
    max-width: 760px;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 1.05rem;
}

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

.btn-primary,
.btn-ghost,
.section-link,
.category-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border 180ms ease;
}

.btn-primary {
    color: #04111d;
    background: linear-gradient(135deg, #67e8f9, #38bdf8);
    box-shadow: 0 18px 34px rgba(34, 211, 238, 0.26);
}

.btn-ghost,
.section-link,
.category-link {
    color: #cffafe;
    border: 1px solid var(--line-strong);
    background: rgba(15, 23, 42, 0.66);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-link:hover,
.category-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
}

.hero-art {
    justify-self: end;
    width: min(100%, 420px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4.08;
    border-radius: 30px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: #0f172a;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45), 0 0 60px rgba(34, 211, 238, 0.22);
}

.hero-poster img,
.movie-poster img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster::after,
.movie-poster::after,
.detail-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.75), transparent 45%);
    pointer-events: none;
}

.hero-caption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 1;
    display: grid;
    gap: 7px;
}

.hero-caption strong {
    font-size: 1.1rem;
}

.hero-caption span {
    color: #bae6fd;
    font-size: 0.9rem;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(15, 23, 42, 0.72);
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 6;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 30px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.42);
}

.hero-dots button.active {
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.7);
}

.quick-cats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: -22px 0 58px;
}

.quick-cat,
.category-card,
.info-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(8, 47, 73, 0.52));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.quick-cat {
    padding: 18px;
}

.quick-cat strong,
.category-card h2,
.info-card h3 {
    display: block;
    color: #e0f2fe;
    font-size: 1.08rem;
}

.quick-cat span,
.category-card p,
.info-card p {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.95rem;
}

.content-section {
    margin: 54px 0;
}

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

.section-heading h2 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    letter-spacing: -0.04em;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: var(--radius-small);
    background: var(--bg-card);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
    transition: transform 180ms ease, border 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.46);
    box-shadow: 0 24px 55px rgba(8, 145, 178, 0.18);
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 2.85;
    overflow: hidden;
    background: #0f172a;
}

.movie-poster img {
    transition: transform 360ms ease, filter 360ms ease;
}

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

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #04111d;
    background: linear-gradient(135deg, #67e8f9, #38bdf8);
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(34, 211, 238, 0.32);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #04111d;
    font-weight: 900;
    background: linear-gradient(135deg, #fef08a, #fb7185);
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.movie-title {
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
}

.movie-title:hover {
    color: #67e8f9;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #7dd3fc;
    font-size: 0.82rem;
}

.movie-meta span {
    padding: 4px 8px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.08);
}

.movie-desc {
    margin: 0;
    min-height: 3.2em;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.62;
}

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

.movie-tags span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(34, 211, 238, 0.1);
    font-size: 0.78rem;
}

.page-hero {
    margin: 34px 0 36px;
    padding: clamp(28px, 5vw, 58px);
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 78% 22%, rgba(34, 211, 238, 0.15), transparent 34rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.55));
    box-shadow: var(--shadow);
}

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

.category-card {
    padding: 22px;
}

.category-card .category-link {
    margin-top: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(130px, 0.65fr));
    gap: 14px;
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted-strong);
    font-size: 0.86rem;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 14px;
    outline: none;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.58);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.7);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.no-results {
    display: none;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.72);
}

.no-results.show {
    display: block;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 52px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    transition: transform 180ms ease, border 180ms ease;
}

.ranking-row:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.46);
}

.ranking-number {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #04111d;
    font-weight: 900;
    background: linear-gradient(135deg, #67e8f9, #38bdf8);
}

.ranking-thumb {
    aspect-ratio: 2 / 2.7;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
}

.ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-info h2 {
    margin: 0 0 7px;
    font-size: 1.1rem;
}

.ranking-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    margin: 34px 0 58px;
}

.detail-main,
.detail-side,
.player-panel,
.story-panel {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.detail-main {
    overflow: hidden;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 26px 26px 0 0;
    background: #020617;
}

.player-panel video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.66));
    cursor: pointer;
    transition: opacity 220ms ease;
}

.player-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-large {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    padding-left: 5px;
    color: #04111d;
    border-radius: 999px;
    background: linear-gradient(135deg, #67e8f9, #38bdf8);
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.45);
    font-size: 2rem;
}

.detail-title {
    padding: clamp(24px, 4vw, 40px);
}

.detail-title h1 {
    font-size: clamp(2rem, 4vw, 3.8rem);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #67e8f9;
}

.detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 18px;
}

.detail-facts span {
    padding: 8px 11px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(34, 211, 238, 0.08);
}

.story-panel {
    margin-top: 22px;
    padding: clamp(22px, 4vw, 34px);
}

.story-panel h2,
.detail-side h2 {
    margin: 0 0 14px;
    color: #e0f2fe;
    font-size: 1.35rem;
}

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

.detail-side {
    align-self: start;
    padding: 18px;
    position: sticky;
    top: 96px;
}

.detail-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 2.85;
    border-radius: 20px;
    background: #0f172a;
}

.side-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.side-link {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(34, 211, 238, 0.14);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.36);
}

.side-link img {
    width: 68px;
    aspect-ratio: 2 / 2.7;
    object-fit: cover;
    border-radius: 12px;
}

.side-link strong {
    display: block;
    color: #f8fafc;
    line-height: 1.35;
}

.side-link span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.86rem;
}

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

.footer-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-inner p {
    max-width: 700px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.footer-links a {
    padding: 9px 12px;
    background: rgba(15, 23, 42, 0.72);
}

.footer-bottom {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #64748b;
    font-size: 0.9rem;
}

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

    .nav-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .hero-art {
        justify-self: start;
        width: min(58vw, 360px);
    }

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

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

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 720px) {
    main,
    .header-inner,
    .mobile-nav,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, var(--max));
    }

    .header-inner {
        height: 66px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-copy strong {
        font-size: 1.1rem;
    }

    .brand-copy em {
        font-size: 0.7rem;
    }

    .hero-slider {
        min-height: 760px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 28px 18px 58px;
        gap: 22px;
    }

    .hero-control {
        display: none;
    }

    .quick-cats,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

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

    .movie-desc {
        min-height: auto;
        font-size: 0.88rem;
    }

    .section-heading,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .ranking-row {
        grid-template-columns: 42px 68px minmax(0, 1fr);
    }

    .ranking-row .btn-ghost {
        grid-column: 1 / -1;
    }

    .detail-title,
    .story-panel {
        padding: 22px;
    }
}
