:root {
    color-scheme: dark;
    --bg: #090b16;
    --bg-soft: #11162a;
    --panel: rgba(18, 24, 45, 0.78);
    --panel-strong: rgba(24, 32, 58, 0.92);
    --line: rgba(255, 255, 255, 0.12);
    --text: #f6f7fb;
    --muted: #a8afc5;
    --brand: #7c5cff;
    --brand-2: #00d4ff;
    --hot: #ff5e8a;
    --radius: 24px;
    --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 top left, rgba(124, 92, 255, 0.28), transparent 34rem),
        radial-gradient(circle at top right, rgba(0, 212, 255, 0.18), transparent 34rem),
        linear-gradient(180deg, #080a14 0%, #0e1224 50%, #070912 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(1180px, calc(100% - 32px));
    margin: 16px auto 0;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(9, 12, 24, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

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

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 10px 24px rgba(124, 92, 255, 0.42);
}

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.site-nav a,
.menu-button {
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    transition: 180ms ease;
}

.site-nav a:hover,
.menu-button:hover {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.08);
}

.menu-button {
    display: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

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

.hero {
    position: relative;
    min-height: 660px;
    margin-top: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #0d1020;
    box-shadow: var(--shadow);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 8, 18, 0.96) 0%, rgba(6, 8, 18, 0.72) 48%, rgba(6, 8, 18, 0.28) 100%),
        radial-gradient(circle at 78% 18%, rgba(0, 212, 255, 0.34), transparent 28rem),
        radial-gradient(circle at 50% 100%, rgba(124, 92, 255, 0.25), transparent 28rem);
    z-index: 2;
}

.hero-stage,
.hero-slide,
.hero-bg,
.hero-bg img {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    filter: saturate(1.18) contrast(1.04);
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 520ms ease;
}

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

.hero-copy {
    position: relative;
    z-index: 4;
    max-width: 660px;
    padding: 92px 58px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #8fe8ff;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero p,
.page-hero p,
.detail-info .lead {
    max-width: 680px;
    margin: 0;
    color: #d8ddef;
    font-size: 18px;
}

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

.button,
.hero-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
    transition: 180ms ease;
}

.button:hover,
.hero-search button:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
}

.button.primary,
.hero-search button {
    border: none;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 14px 28px rgba(124, 92, 255, 0.35);
}

.button.ghost {
    background: rgba(255, 255, 255, 0.09);
}

.hero-card {
    position: absolute;
    right: 46px;
    bottom: 118px;
    z-index: 5;
    width: min(280px, 30vw);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
}

.hero-card img {
    height: 360px;
    object-fit: cover;
}

.hero-card span {
    display: block;
    padding: 14px 16px;
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    left: 58px;
    right: 58px;
    bottom: 34px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.hero-controls button {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

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

.hero-dots button {
    width: 36px;
    height: 8px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.26);
}

.hero-dots button.is-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.hero-search {
    position: absolute;
    right: 46px;
    top: 42px;
    z-index: 7;
    width: min(360px, calc(100% - 92px));
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(9, 12, 24, 0.62);
    backdrop-filter: blur(18px);
}

.hero-search label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 14px;
}

.hero-search div {
    display: flex;
    gap: 10px;
}

input,
select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    padding: 0 14px;
    outline: none;
}

select option {
    color: #0e1224;
}

.section {
    margin: 54px 0;
}

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

.section h2,
.article-section h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 4vw, 36px);
    letter-spacing: -0.03em;
}

.section p,
.article-section p {
    margin: 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
    transition: 180ms ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.24);
    background: var(--panel-strong);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.28), rgba(0, 212, 255, 0.16));
}

.poster img {
    height: 100%;
    object-fit: cover;
    transition: 260ms ease;
}

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

.rank-no {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--hot), var(--brand));
    color: #fff;
    font-size: 14px;
}

.card-body {
    padding: 14px;
}

.meta-row,
.tag-row,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.meta-row {
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h3 {
    margin: 8px 0 7px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 44px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.tag-row span {
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cad1e7;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.tag-row.big span {
    padding: 7px 11px;
    font-size: 13px;
}

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

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

.category-tile {
    min-height: 132px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(0, 212, 255, 0.08)),
        rgba(255, 255, 255, 0.06);
    transition: 180ms ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.25);
}

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.category-tile span {
    color: var(--muted);
    font-size: 14px;
}

.page-hero,
.detail-hero {
    position: relative;
    margin-top: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.page-hero.compact {
    padding: 58px;
    background:
        radial-gradient(circle at 80% 0%, rgba(0, 212, 255, 0.2), transparent 28rem),
        linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(255, 255, 255, 0.05));
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
}

.filter-bar.large {
    grid-template-columns: 1fr 190px 190px;
}

.detail-hero {
    min-height: 560px;
    padding: 32px;
    background: #0d1020;
}

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

.detail-backdrop img {
    height: 100%;
    object-fit: cover;
    filter: blur(10px) saturate(1.2);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 10, 20, 0.98), rgba(8, 10, 20, 0.72));
}

.breadcrumbs,
.detail-layout {
    position: relative;
    z-index: 2;
}

.breadcrumbs {
    color: var(--muted);
    font-size: 14px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: end;
    min-height: 450px;
    margin-top: 18px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

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

.watch-section {
    margin: 42px 0;
}

.video-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.video-shell video {
    display: block;
    width: 100%;
    max-height: 78vh;
    aspect-ratio: 16 / 9;
    background: #000;
}

.article-section {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--panel);
}

.article-section p + h2 {
    margin-top: 28px;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(1180px, calc(100% - 32px));
    margin: 56px auto 24px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 14px;
}

[hidden] {
    display: none !important;
}

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

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

    .hero-card {
        width: 230px;
    }

    .hero-card img {
        height: 300px;
    }
}

@media (max-width: 820px) {
    .topbar {
        align-items: flex-start;
        border-radius: 24px;
    }

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

    .site-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 10px);
        display: none;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(9, 12, 24, 0.94);
        backdrop-filter: blur(18px);
    }

    .site-nav.is-open {
        display: flex;
    }

    .hero {
        min-height: 760px;
    }

    .hero-copy {
        padding: 250px 26px 120px;
    }

    .hero-search {
        left: 22px;
        right: 22px;
        width: auto;
    }

    .hero-card {
        right: 22px;
        bottom: 92px;
        width: 160px;
    }

    .hero-card img {
        height: 210px;
    }

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

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

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

    .filter-bar,
    .filter-bar.large {
        grid-template-columns: 1fr;
    }

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

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

    .page-hero.compact,
    .detail-hero,
    .article-section {
        padding: 24px;
        border-radius: 24px;
    }

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

@media (max-width: 520px) {
    main,
    .topbar,
    .footer {
        width: min(100% - 20px, 1180px);
    }

    .brand-text {
        display: none;
    }

    .hero-search div {
        flex-direction: column;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

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

    .hero-card {
        display: none;
    }
}
