:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-2: #1e293b;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #60a5fa;
    --green: #34d399;
    --amber: #fbbf24;
    --shadow: 0 24px 80px rgba(8, 47, 73, 0.36);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 12%, rgba(34, 211, 238, 0.17), transparent 34%),
        radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.36), #020617 62%);
    z-index: -1;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #06121f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.38);
}

.brand-text,
.footer-logo {
    font-size: 22px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 600;
    transition: color 0.22s ease, transform 0.22s ease;
}

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

.nav-link:hover {
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.9);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #cbd5e1;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 16px 16px;
    background: rgba(15, 23, 42, 0.98);
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
    transform: scale(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 48%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(740px, calc(100% - 32px));
    margin-left: max(16px, calc((100vw - 1200px) / 2));
    padding-top: 136px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    color: var(--cyan);
    background: rgba(8, 47, 73, 0.45);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-content h1 {
    margin: 24px 0 12px;
    max-width: 980px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(28px, 4vw, 48px);
    color: var(--cyan);
}

.hero-content p {
    margin: 0;
    max-width: 680px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.22);
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.primary-btn {
    color: #06121f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.28);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.25);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.58);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.22s ease;
}

.hero-arrow:hover {
    background: rgba(15, 23, 42, 0.88);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    cursor: pointer;
    transition: width 0.22s ease, background 0.22s ease;
}

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

.search-band {
    margin-top: -46px;
    position: relative;
    z-index: 8;
}

.search-panel {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2 {
    margin: 0;
    font-size: 22px;
}

.quick-search,
.filter-panel {
    display: flex;
    gap: 12px;
}

.quick-search input,
.filter-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.78);
    color: var(--text);
    padding: 0 18px;
    outline: none;
}

.quick-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: rgba(34, 211, 238, 0.78);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.quick-search button {
    min-width: 110px;
    border: 0;
    border-radius: 999px;
    color: #06121f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 800;
    cursor: pointer;
}

.content-section {
    padding: 76px 0;
}

.dark-rise {
    background: linear-gradient(180deg, #020617, #0f172a);
}

.slate-block {
    background: #0f172a;
}

.category-block {
    background: linear-gradient(180deg, #0f172a, #1e293b);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
}

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

.section-more {
    color: var(--cyan);
    font-weight: 800;
}

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

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

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 190px;
    gap: 22px;
    overflow-x: auto;
    padding: 6px 2px 20px;
    scrollbar-color: rgba(34, 211, 238, 0.45) rgba(15, 23, 42, 0.8);
}

.movie-card {
    min-width: 0;
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    aspect-ratio: 3 / 4;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 46%);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.movie-card:hover .poster-wrap {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 24px 54px rgba(34, 211, 238, 0.2);
}

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

.movie-card:hover .poster-shade {
    opacity: 1;
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    padding: 5px 9px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(10px);
}

.year-badge {
    right: 10px;
    color: var(--cyan);
}

.rank-badge {
    left: 10px;
    color: #06121f;
    background: linear-gradient(135deg, var(--amber), var(--cyan));
}

.movie-card-body {
    padding-top: 13px;
}

.movie-card h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.45;
}

.movie-card h2 a {
    transition: color 0.22s ease;
}

.movie-card:hover h2 a {
    color: var(--cyan);
}

.meta-line,
.card-desc,
.detail-meta,
.detail-line {
    color: var(--muted);
    line-height: 1.65;
}

.meta-line {
    margin: 6px 0 0;
    font-size: 12px;
}

.card-desc {
    margin: 8px 0 10px;
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #111827;
    border: 1px solid var(--line);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.22));
}

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 2;
}

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

.category-tile em {
    margin-top: 8px;
    color: #cbd5e1;
    font-style: normal;
    line-height: 1.6;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.46;
}

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

.compact-card {
    display: grid;
    grid-template-columns: auto 64px 1fr;
    align-items: center;
    gap: 13px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.compact-card:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.52);
}

.compact-card img {
    width: 64px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-card strong,
.compact-card em {
    display: block;
}

.compact-card strong {
    line-height: 1.5;
}

.compact-card em {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.small-rank {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #06121f;
    background: linear-gradient(135deg, var(--amber), var(--cyan));
    font-weight: 900;
}

.page-hero {
    padding: 96px 0 70px;
    background:
        radial-gradient(circle at 20% 12%, rgba(34, 211, 238, 0.22), transparent 34%),
        linear-gradient(135deg, #020617, #0f172a 55%, #172554);
    border-bottom: 1px solid var(--line);
}

.compact-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(36px, 6vw, 64px);
}

.compact-hero p {
    max-width: 760px;
    color: #cbd5e1;
    line-height: 1.85;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    margin-top: 18px;
}

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

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

.category-panel {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.category-cover {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 11;
}

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

.category-panel h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-panel p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(2, 6, 23, 0.42);
}

.filter-select {
    max-width: 190px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0 74px;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.34;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.1);
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62)),
        linear-gradient(0deg, #020617, transparent 60%);
}

.detail-intro {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    margin: 16px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.12;
}

.detail-meta {
    margin: 0 0 16px;
}

.detail-line {
    max-width: 790px;
    font-size: 18px;
}

.detail-tags {
    margin: 22px 0 28px;
}

.watch-section {
    background: #020617;
}

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
    gap: 26px;
    align-items: stretch;
}

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

.watch-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: #06121f;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.22), rgba(2, 6, 23, 0.42));
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 34px;
    box-shadow: 0 18px 52px rgba(34, 211, 238, 0.36);
}

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

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

.watch-side h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.watch-side p,
.article-content p {
    color: #cbd5e1;
    line-height: 1.9;
}

.score-box {
    margin-top: 22px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(96, 165, 250, 0.1));
    border: 1px solid rgba(34, 211, 238, 0.28);
}

.score-box strong {
    display: block;
    color: var(--cyan);
    font-size: 40px;
}

.score-box span {
    color: var(--muted);
}

.article-content {
    max-width: 960px;
}

.article-content h2 {
    margin: 0 0 12px;
    font-size: 30px;
}

.article-content p + h2 {
    margin-top: 34px;
}

.site-footer {
    background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 50px 0;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--muted);
    line-height: 1.75;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-grid ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-grid li + li {
    margin-top: 9px;
}

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

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px;
    text-align: center;
}

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

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

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

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

    .menu-button {
        display: block;
    }

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

    .hero-content {
        padding-top: 108px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel,
    .category-panel,
    .detail-intro,
    .watch-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .quick-search,
    .filter-panel {
        flex-direction: column;
    }

    .filter-select {
        max-width: none;
    }

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

    .ranking-grid,
    .category-preview {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 520px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    .brand-text {
        font-size: 18px;
    }

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

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

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn,
    .text-btn {
        width: 100%;
    }

    .content-section {
        padding: 58px 0;
    }

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

    .category-tile {
        min-height: 150px;
        padding: 18px;
    }

    .category-tile span {
        font-size: 18px;
    }
}
