:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #07111f;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --cyan: #22d3ee;
    --cyan-2: #06b6d4;
    --blue: #2563eb;
    --pink: #f472b6;
    --amber: #fbbf24;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 8rem, rgba(59, 130, 246, 0.16), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #07111f 46%, #020617 100%);
    color: var(--text);
}

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: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 70%);
    z-index: -1;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.site-header.scrolled,
.site-header.open {
    background: rgba(2, 6, 23, 0.92);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 60px rgba(6, 182, 212, 0.12);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    height: 80px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
    font-size: 18px;
    transform: translateZ(0);
}

.brand:hover .brand-mark {
    transform: rotate(8deg) scale(1.04);
}

.brand-text {
    display: grid;
    line-height: 1.08;
}

.brand-text span {
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.brand-text small {
    margin-top: 4px;
    color: var(--cyan);
    font-size: 12px;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 700;
    font-size: 15px;
    transition: color 0.2s ease;
}

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

.header-search {
    width: min(290px, 24vw);
    display: flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    overflow: hidden;
}

.header-search input {
    min-width: 0;
    flex: 1;
    padding: 11px 12px 11px 16px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search button {
    border: 0;
    cursor: pointer;
    padding: 10px 16px;
    color: #001018;
    font-weight: 800;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
}

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

.mobile-panel {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

.mobile-panel a,
.mobile-panel form {
    display: block;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    color: #dbeafe;
    font-weight: 700;
}

.mobile-panel form {
    display: flex;
    gap: 8px;
}

.mobile-panel input {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.8);
    padding: 10px 12px;
}

.mobile-panel button {
    border: 0;
    border-radius: 14px;
    color: #001018;
    background: var(--cyan);
    padding: 10px 14px;
    font-weight: 800;
}

.site-header.open .mobile-panel {
    display: block;
}

main {
    overflow: hidden;
}

.hero {
    max-width: 1280px;
    min-height: 720px;
    margin: 0 auto;
    padding: 112px 24px 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: stretch;
}

.hero-carousel {
    position: relative;
    min-height: 580px;
    border-radius: 34px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.02);
    z-index: -2;
}

.hero-overlay {
    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.26) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, transparent 58%),
        radial-gradient(circle at 28% 22%, rgba(34, 211, 238, 0.18), transparent 30rem);
    z-index: -1;
}

.hero-content {
    width: min(680px, 100%);
    padding: 52px;
}

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

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-desc {
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

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

.tag-row.large span {
    min-height: 32px;
    padding: 7px 12px;
}

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

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

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

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

.btn.ghost {
    color: #e0f2fe;
    border: 1px solid rgba(226, 232, 240, 0.24);
    background: rgba(15, 23, 42, 0.56);
}

.hero-controls {
    position: absolute;
    left: 48px;
    right: 48px;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2;
}

.hero-controls button {
    border: 0;
    cursor: pointer;
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(226, 232, 240, 0.18);
    font-size: 28px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.35);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-panel {
    border: 1px solid var(--line);
    border-radius: 34px;
    padding: 22px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.62));
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.panel-title {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 900;
}

.hero-mini {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.36);
    transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.hero-mini + .hero-mini {
    margin-top: 12px;
}

.hero-mini:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.26);
    background: rgba(8, 145, 178, 0.12);
}

.hero-mini img {
    width: 84px;
    height: 104px;
    object-fit: cover;
    border-radius: 16px;
}

.hero-mini strong,
.hero-mini small {
    display: block;
}

.hero-mini strong {
    line-height: 1.35;
}

.hero-mini small {
    margin-top: 8px;
    color: var(--muted);
}

.panel-link,
.text-link {
    display: inline-flex;
    align-items: center;
    margin-top: 18px;
    color: var(--cyan);
    font-weight: 900;
}

.section-block {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
}

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

.section-head h2,
.story-block h2 {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.58);
}

.filter-bar input {
    flex: 1 1 260px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    outline: none;
    padding: 13px 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.6);
}

.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 10px 14px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.62);
    cursor: pointer;
    font-weight: 800;
    transition: color 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
    color: #001018;
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.56));
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: 0 22px 70px rgba(6, 182, 212, 0.14);
}

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

.poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.rank-num {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #001018;
    background: linear-gradient(135deg, var(--amber), var(--cyan));
    font-weight: 950;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.card-body {
    padding: 17px;
}

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

.card-body h2,
.card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.32;
}

.card-body h2 a,
.card-body h3 a {
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: color 0.2s ease, background-size 0.2s ease;
}

.card-body h2 a:hover,
.card-body h3 a:hover {
    color: var(--cyan);
    background-size: 100% 1px;
}

.card-desc {
    margin: 10px 0 0;
    min-height: 60px;
    color: #cbd5e1;
    line-height: 1.68;
    font-size: 14px;
}

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

.category-tile {
    min-height: 170px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 26px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 60%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.45));
    transition: transform 0.22s ease, border 0.22s ease;
}

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

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

.category-tile small,
.category-card p {
    color: #cbd5e1;
    line-height: 1.72;
}

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

.rank-grid .movie-card.compact,
.rank-list .movie-card.compact {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
}

.movie-card.compact .poster {
    aspect-ratio: auto;
    height: 100%;
    min-height: 160px;
}

.movie-card.compact .card-desc {
    min-height: auto;
}

.page-main {
    padding-top: 112px;
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px;
}

.page-hero.slim {
    min-height: 250px;
    border-radius: 0 0 34px 34px;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 18px;
}

.breadcrumb {
    max-width: 1280px;
    margin: 0 auto 10px;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

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

.category-list {
    display: grid;
    gap: 22px;
}

.category-card {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.62);
}

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

.category-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    object-fit: cover;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.detail-top {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 48px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

.detail-info .lead {
    max-width: 860px;
    color: #dbeafe;
    font-size: 20px;
    line-height: 1.75;
}

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

.detail-meta span {
    padding: 10px 14px;
    border-radius: 16px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    font-weight: 800;
}

.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 50px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    border: 1px solid rgba(34, 211, 238, 0.22);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    background: #000;
}

.player-cover {
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
    z-index: 3;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.56;
    filter: blur(1px) saturate(1.08);
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 32%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.18));
}

.player-cover.is-hidden {
    display: none;
}

.play-badge {
    position: relative;
    z-index: 4;
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 0 0 18px rgba(34, 211, 238, 0.16), 0 24px 60px rgba(0, 0, 0, 0.45);
    font-size: 38px;
}

.story-block {
    color: #dbeafe;
}

.story-block p {
    margin: 16px 0 28px;
    line-height: 1.92;
    font-size: 17px;
}

.related-grid .movie-card.compact {
    min-height: 190px;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: #cbd5e1;
}

.footer-inner strong {
    color: var(--text);
    font-size: 20px;
}

.footer-inner p {
    max-width: 620px;
    margin: 8px 0 0;
    line-height: 1.7;
}

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

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

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

@media (max-width: 1120px) {
    .main-nav,
    .header-search {
        display: none;
    }

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

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

    .hero-panel {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .panel-title,
    .panel-link {
        grid-column: 1 / -1;
    }

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

@media (max-width: 860px) {
    .header-inner {
        height: 72px;
        padding: 0 16px;
    }

    .brand-text span {
        font-size: 19px;
    }

    .hero,
    .section-block,
    .page-hero,
    .detail-top,
    .player-section,
    .breadcrumb {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero {
        padding-top: 92px;
        min-height: auto;
    }

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

    .hero-content {
        padding: 34px 24px 86px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: clamp(34px, 11vw, 58px);
    }

    .hero-controls {
        left: 24px;
        right: 24px;
    }

    .hero-panel,
    .movie-grid,
    .movie-grid.wide,
    .rank-grid,
    .rank-list,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-card,
    .detail-top {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 320px;
    }

    .rank-grid .movie-card.compact,
    .rank-list .movie-card.compact {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 14px;
    }

    .brand-text small {
        display: none;
    }

    .hero-carousel {
        min-height: 560px;
    }

    .hero-desc,
    .detail-info .lead,
    .page-hero p:not(.eyebrow) {
        font-size: 16px;
    }

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

    .category-cover {
        grid-template-columns: repeat(2, 1fr);
    }

    .play-badge {
        width: 78px;
        height: 78px;
        font-size: 30px;
    }
}
