:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.76);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at 85% 12%, rgba(37, 99, 235, 0.18), transparent 35rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button,
input {
    font: inherit;
}

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

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

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #03131a;
    background: linear-gradient(135deg, var(--cyan), #a5f3fc);
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.38);
}

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

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

.nav-link,
.mobile-link {
    color: var(--soft);
    border-radius: 999px;
    transition: 0.22s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #ecfeff;
    background: rgba(34, 211, 238, 0.12);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.7);
}

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

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel-inner {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 16px;
}

.mobile-link {
    padding: 12px 14px;
}

.hero {
    position: relative;
    min-height: 690px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-backdrop,
.category-hero,
.detail-hero {
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.42) 100%),
        var(--hero-image);
    background-position: center;
    background-size: cover;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    filter: saturate(1.05);
}

.hero-backdrop::after,
.detail-hero::after,
.category-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 26%, rgba(34, 211, 238, 0.22), transparent 24rem),
        linear-gradient(180deg, transparent 62%, #020617 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 690px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.52fr);
    align-items: center;
    gap: 60px;
    padding: 86px 0 70px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.09);
    font-size: 0.84rem;
    font-weight: 700;
}

.hero-copy h1,
.page-title-block h1,
.detail-copy h1,
.category-hero h1 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 5.6rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-title-block p,
.category-hero p,
.detail-copy p {
    max-width: 720px;
    color: var(--soft);
    font-size: 1.08rem;
    line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span,
.mini-tags span {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    color: #dffbff;
    background: rgba(15, 23, 42, 0.58);
    font-size: 0.78rem;
}

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
}

.mini-tags span {
    padding: 5px 8px;
}

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

.primary-btn,
.ghost-btn,
.search-box a,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn,
.search-box a {
    color: #03131a;
    background: linear-gradient(135deg, var(--cyan), #a5f3fc);
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.24);
}

.primary-btn {
    padding: 13px 24px;
}

.ghost-btn,
.section-more {
    color: #ecfeff;
    background: rgba(15, 23, 42, 0.64);
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.ghost-btn {
    padding: 12px 22px;
}

.primary-btn:hover,
.ghost-btn:hover,
.search-box a:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(145deg, #0f172a, #111827);
    box-shadow: var(--shadow);
}

.hero-poster span,
.poster-bg,
.detail-poster,
.category-covers span,
.ranking-poster,
.side-related span {
    display: block;
    background-image: linear-gradient(145deg, rgba(8, 145, 178, 0.24), rgba(15, 23, 42, 0.8)), var(--poster-image);
    background-position: center;
    background-size: cover;
}

.hero-poster span {
    width: 100%;
    height: 100%;
    transition: transform 0.35s ease;
}

.hero-poster:hover span {
    transform: scale(1.04);
}

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

.hero-controls button {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.36);
}

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

.search-band {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 480px);
    gap: 24px;
    align-items: center;
    margin-top: -34px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 5;
}

.search-band h2,
.section-head h2,
.rank-panel h2,
.detail-panel h2,
.side-card h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
}

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

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

.search-box input {
    padding: 0 12px;
}

.search-box a {
    padding: 10px 16px;
    white-space: nowrap;
}

.page-section {
    padding: 56px 0;
}

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

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    padding: 10px 16px;
    color: var(--cyan);
}

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

.category-chip {
    min-height: 116px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.18), transparent 7rem),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-chip:hover,
.movie-card:hover,
.category-card:hover,
.ranking-item:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-chip strong,
.category-chip span {
    display: block;
}

.category-chip strong {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.category-chip span {
    color: var(--muted);
    line-height: 1.6;
}

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

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

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

.movie-card {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.12);
}

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

.poster-bg {
    width: 100%;
    height: 100%;
    transition: transform 0.35s ease;
}

.poster-link:hover .poster-bg {
    transform: scale(1.08);
}

.poster-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.84) 100%);
}

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #ecfeff;
    background: rgba(2, 6, 23, 0.72);
    font-size: 0.75rem;
    font-weight: 800;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    color: #04111a;
    background: rgba(236, 254, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: 0.22s ease;
}

.poster-link:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h3 {
    margin: 0;
    min-height: 2.8em;
    font-size: 0.98rem;
    line-height: 1.4;
}

.movie-card h3 a:hover,
.ranking-item h2 a:hover,
.side-card a:hover {
    color: var(--cyan);
}

.movie-meta,
.movie-line {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

.movie-line {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mini-tags {
    margin-top: 12px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.rank-panel,
.detail-panel,
.side-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.rank-panel {
    padding: 22px;
}

.rank-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.rank-list a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.38);
}

.rank-list a:hover {
    background: rgba(34, 211, 238, 0.1);
}

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

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

.rank-list em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.82rem;
}

.page-top {
    padding-top: 36px;
}

.page-title-block {
    padding: 58px 0 34px;
}

.page-title-block p {
    color: var(--soft);
}

.category-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding-bottom: 64px;
}

.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    height: 156px;
    background: #0f172a;
}

.category-covers span {
    height: 100%;
}

.category-card-body {
    padding: 20px;
}

.category-card-body h2 {
    margin: 0 0 8px;
}

.category-card-body p {
    color: var(--muted);
    line-height: 1.65;
}

.category-card-body span {
    color: var(--cyan);
    font-weight: 800;
}

.wide-search {
    width: min(720px, 100%);
    margin-top: 24px;
    padding: 15px 18px;
    border-radius: 20px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.filter-row button {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.68);
    padding: 9px 13px;
    cursor: pointer;
}

.filter-row button.is-active {
    color: #03131a;
    border-color: transparent;
    background: var(--cyan);
}

.category-hero {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
}

.category-hero-inner {
    position: relative;
    z-index: 2;
    padding: 74px 0 58px;
}

.category-search {
    background: rgba(2, 6, 23, 0.7);
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.ranking-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    overflow: hidden;
}

.ranking-poster span {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #03131a;
    background: var(--cyan);
    font-weight: 900;
    font-size: 0.78rem;
}

.ranking-item h2 {
    margin: 4px 0 0;
    font-size: 1.25rem;
}

.ranking-item p {
    color: var(--soft);
    line-height: 1.7;
}

.sticky-panel {
    position: sticky;
    top: 92px;
}

.detail-hero {
    position: relative;
    min-height: 560px;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 46px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.detail-hero-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
    margin-top: 52px;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

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

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    margin-top: -42px;
    position: relative;
    z-index: 4;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #03131a;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.26), transparent 12rem),
        rgba(2, 6, 23, 0.38);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: rgba(236, 254, 255, 0.94);
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.42);
    font-size: 2rem;
}

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

.detail-panel {
    padding: 24px;
    margin-top: 22px;
}

.detail-panel p {
    color: var(--soft);
    line-height: 1.9;
}

.detail-side {
    display: grid;
    gap: 20px;
    align-content: start;
}

.side-card {
    padding: 22px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px 14px;
    margin: 18px 0 0;
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    margin: 0;
    color: var(--text);
}

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

.side-related a {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.side-related span {
    width: 54px;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
}

.side-related strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.side-related em {
    color: var(--muted);
    font-size: 0.78rem;
    font-style: normal;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-brand {
    margin-bottom: 14px;
    font-size: 1.1rem;
}

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

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

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

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

@media (max-width: 1060px) {
    .movie-grid,
    .catalog-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .sticky-panel {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
    }

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

    .search-band {
        grid-template-columns: 1fr;
    }

    .category-chip-grid,
    .category-card-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .detail-hero-grid {
        grid-template-columns: 150px minmax(0, 1fr);
        align-items: center;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .nav-wrap {
        min-height: 64px;
    }

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

    .hero,
    .hero-content {
        min-height: 720px;
    }

    .hero-copy h1,
    .page-title-block h1,
    .detail-copy h1,
    .category-hero h1 {
        font-size: clamp(2.2rem, 13vw, 3.8rem);
    }

    .hero-poster {
        display: none;
    }

    .hero-controls {
        bottom: 16px;
    }

    .search-box {
        flex-direction: column;
        border-radius: 20px;
    }

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

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-chip-grid,
    .category-card-grid,
    .footer-grid,
    .movie-grid,
    .catalog-grid,
    .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ranking-item {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .detail-hero-grid {
        grid-template-columns: 1fr;
        margin-top: 34px;
    }

    .detail-poster {
        width: 160px;
    }

    .detail-content {
        margin-top: -22px;
    }

    .side-card dl {
        grid-template-columns: 60px minmax(0, 1fr);
    }
}
