:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --violet: #8b5cf6;
    --rose: #fb7185;
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.22), transparent 32rem),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.is-locked {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #06121d;
    background: linear-gradient(135deg, var(--cyan), #a78bfa);
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.24);
}

.brand-text {
    font-size: 1.25rem;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--cyan);
}

.nav-menu {
    position: relative;
}

.nav-panel {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    width: 220px;
    padding: 10px;
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    pointer-events: none;
    transition: 0.18s ease;
}

.nav-menu:hover .nav-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-panel a,
.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
}

.nav-panel a:hover,
.mobile-nav a:hover {
    color: var(--cyan);
    background: rgba(148, 163, 184, 0.12);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #e2e8f0;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.95);
}

.mobile-nav.is-open {
    display: grid;
    gap: 4px;
}

.hero-carousel {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    min-height: 680px;
    margin: 28px auto 56px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 36px;
    background: var(--bg-soft);
    box-shadow: var(--shadow);
}

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

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

.hero-media,
.hero-media img,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-media {
    background:
        radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.22), transparent 30%),
        linear-gradient(135deg, #0f172a, #111827 55%, #020617);
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.46;
    transform: scale(1.04);
}

.hero-shade {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 48%);
}

.hero-copy {
    position: relative;
    z-index: 3;
    max-width: 660px;
    padding: clamp(48px, 8vw, 92px);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 0.83rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 16px 0;
    font-size: clamp(2.4rem, 7vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p,
.section-shell p {
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.85;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.12);
    font-size: 0.78rem;
}

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

.primary-button,
.ghost-button,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

.primary-button,
.quick-search button {
    color: #06121d;
    border: 0;
    background: linear-gradient(135deg, var(--cyan), #a78bfa);
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.2);
}

.ghost-button {
    color: #e2e8f0;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.66);
}

.hero-dots {
    position: absolute;
    left: clamp(48px, 8vw, 92px);
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 34px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.32);
    cursor: pointer;
}

.hero-dot.is-current {
    background: var(--cyan);
}

.hero-rank {
    position: absolute;
    right: 34px;
    bottom: 34px;
    z-index: 6;
    width: min(340px, calc(100% - 68px));
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(18px);
}

.rank-head {
    display: flex;
    margin-bottom: 10px;
    color: var(--cyan);
    font-weight: 850;
}

.hero-rank a:not(.rank-head) {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 9px;
    border-radius: 14px;
    color: #cbd5e1;
}

.hero-rank a:not(.rank-head):hover {
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
}

.hero-rank span,
.rank-num {
    color: var(--cyan);
    font-weight: 900;
}

.hero-rank strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hero-rank em {
    color: #fda4af;
    font-style: normal;
    font-size: 0.86rem;
}

.section-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 58px;
}

.intro-search,
.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.62);
}

.intro-search h2,
.section-title-row h2,
.content-card h2 {
    margin: 8px 0 0;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    letter-spacing: -0.04em;
}

.quick-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
}

.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    outline: 0;
    color: var(--text);
    background: rgba(2, 6, 23, 0.62);
}

.quick-search input {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    background: transparent;
}

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

.more-link {
    color: var(--cyan);
    font-weight: 750;
}

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

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

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(15, 23, 42, 0.96);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 18%, rgba(34, 211, 238, 0.26), transparent 34%),
        linear-gradient(135deg, #111827, #020617);
}

.poster img,
.rank-poster img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.score {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #06121d;
    background: linear-gradient(135deg, #67e8f9, #f0abfc);
    font-weight: 900;
    font-size: 0.78rem;
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.78rem;
}

.card-meta span + span::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.55);
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h2 a:hover,
.category-block h2 a:hover {
    color: var(--cyan);
}

.movie-card p {
    margin: 0 0 14px;
    color: #aab7c8;
    font-size: 0.92rem;
    line-height: 1.68;
}

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

.movie-card.compact h3 {
    font-size: 1rem;
}

.movie-card.compact p {
    font-size: 0.86rem;
}

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

.category-chip {
    min-height: 124px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.16), transparent 50%),
        rgba(15, 23, 42, 0.7);
}

.category-chip:hover {
    border-color: rgba(34, 211, 238, 0.45);
    transform: translateY(-3px);
}

.category-chip span {
    font-size: 1.15rem;
    font-weight: 850;
}

.category-chip small {
    color: #94a3b8;
    line-height: 1.65;
}

.page-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 28px auto 42px;
    padding: clamp(34px, 7vw, 72px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.22), transparent 30%),
        radial-gradient(circle at 80% 0%, rgba(139, 92, 246, 0.18), transparent 30%),
        rgba(15, 23, 42, 0.75);
    box-shadow: var(--shadow);
}

.small-hero h1 {
    max-width: 780px;
}

.small-hero p {
    max-width: 760px;
}

.category-block {
    margin-bottom: 42px;
    padding-bottom: 42px;
    border-bottom: 1px solid var(--line);
}

.category-block:last-child {
    border-bottom: 0;
}

.filter-shell {
    display: block;
}

.filter-panel {
    grid-template-columns: 1.5fr repeat(3, 1fr);
    margin-bottom: 24px;
}

.filter-panel.slim-filter {
    grid-template-columns: 1fr 220px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-weight: 750;
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
}

.filter-card.is-hidden {
    display: none;
}

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

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

.rank-card:hover {
    border-color: rgba(34, 211, 238, 0.45);
}

.rank-num {
    font-size: 1.5rem;
    text-align: center;
}

.rank-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #111827, #020617);
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 1.24rem;
}

.rank-info p {
    margin: 0 0 10px;
    color: #aab7c8;
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    filter: blur(4px);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.detail-panel {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(24px, 5vw, 56px);
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, #111827, #020617);
    box-shadow: var(--shadow);
}

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

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

.detail-copy h1 {
    max-width: 850px;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
}

.detail-meta,
.detail-tags {
    margin-top: 16px;
}

.watch-section {
    padding-top: 56px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 28px;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.16), transparent 38%),
        #020617;
    box-shadow: var(--shadow);
}

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

.play-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: var(--text);
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    z-index: 4;
}

.play-mask.is-hidden {
    display: none;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #06121d;
    background: linear-gradient(135deg, var(--cyan), #a78bfa);
    box-shadow: 0 22px 48px rgba(34, 211, 238, 0.28);
    font-size: 1.9rem;
}

.play-mask strong {
    font-size: 1.15rem;
}

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

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

.content-card p {
    margin: 14px 0 0;
}

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

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

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: flex-start;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.1);
}

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

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

    .hero-rank {
        display: none;
    }

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 620px;
        border-radius: 26px;
    }

    .hero-copy {
        padding: 40px 24px 84px;
    }

    .hero-dots {
        left: 24px;
        bottom: 24px;
    }

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

    .detail-panel {
        padding: 36px 0;
    }

    .detail-cover {
        width: min(260px, 80%);
    }

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

    .rank-card {
        grid-template-columns: 48px 70px minmax(0, 1fr);
        gap: 12px;
    }

    .quick-search {
        border-radius: 18px;
        flex-direction: column;
    }

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

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

    .rank-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-poster {
        display: none;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        letter-spacing: -0.04em;
    }
}
