:root {
    color-scheme: dark;
    --bg: #070a16;
    --panel: rgba(15, 20, 42, .78);
    --panel-strong: rgba(23, 30, 60, .92);
    --text: #f7f8ff;
    --muted: #aeb7d8;
    --line: rgba(255, 255, 255, .1);
    --brand: #7c5cff;
    --brand-2: #00d4ff;
    --brand-3: #ff4ecd;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 0%, rgba(124, 92, 255, .25), transparent 34rem),
        radial-gradient(circle at 86% 10%, rgba(0, 212, 255, .18), transparent 32rem),
        linear-gradient(180deg, #070a16 0%, #0c1022 54%, #070a16 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 10, 22, .72);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1220px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    font-size: 20px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 32px rgba(124, 92, 255, .35);
}

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

.main-nav a {
    padding: 10px 16px;
    color: var(--muted);
    border-radius: 999px;
    transition: .22s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, .08);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    color: var(--text);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
}

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

.hero {
    padding: 34px 0 26px;
}

.hero-stage {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #11162c;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .7s ease, transform .7s ease;
    transform: scale(1.02);
}

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

.hero-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 68% 28%, rgba(255, 78, 205, .24), transparent 24rem),
        linear-gradient(180deg, transparent 0%, rgba(7, 10, 22, .9) 100%);
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(680px, 88%);
    padding: 86px 64px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    color: #ccefff;
    background: rgba(0, 212, 255, .1);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 78px);
    line-height: 1.04;
    letter-spacing: -.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 780px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span,
.meta-line span {
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: #dce4ff;
    padding: 6px 10px;
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn,
.search-form button {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 34px rgba(124, 92, 255, .26);
}

.ghost-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .08);
}

.ghost-btn.small {
    min-height: 40px;
    padding: 0 16px;
}

.primary-btn:hover,
.ghost-btn:hover,
.search-form button:hover {
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    left: 64px;
    bottom: 42px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .26);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: #fff;
}

.panel,
.quick-search,
.toolbar-panel,
.article-panel,
.movie-info {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 50px rgba(0, 0, 0, .2);
    backdrop-filter: blur(14px);
}

.quick-search,
.toolbar-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 24px;
}

.quick-search h2,
.section-head h2,
.article-panel h2,
.movie-info h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -.03em;
}

.quick-search p {
    margin: 6px 0 0;
    color: var(--muted);
}

.search-form,
.inline-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-form input,
.inline-search input {
    width: min(390px, 58vw);
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    padding: 0 18px;
    background: rgba(255, 255, 255, .08);
    color: var(--text);
}

.inline-search {
    color: var(--muted);
}

.inline-search.wide input {
    width: min(620px, 68vw);
}

.section-wrap {
    margin: 34px 0;
}

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

.section-head a {
    color: #d7e8ff;
    font-weight: 700;
}

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

.category-pill,
.category-card {
    min-height: 132px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(124, 92, 255, .16), rgba(0, 212, 255, .06)),
        rgba(255, 255, 255, .05);
    transition: transform .2s ease, border-color .2s ease;
}

.category-pill:hover,
.category-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, .22);
}

.category-pill strong,
.category-card-title {
    display: block;
    margin-bottom: 8px;
    font-size: 19px;
    font-weight: 900;
}

.category-pill span,
.category-card p {
    color: var(--muted);
    font-size: 14px;
}

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

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mini-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #dce4ff;
    background: rgba(255, 255, 255, .07);
    font-size: 13px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, .055);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.poster-link,
.poster {
    display: block;
}

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
    background-color: #151b36;
    background-size: cover;
    background-position: center;
}

.poster em {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .48);
    color: #fff;
    font-size: 12px;
    font-style: normal;
}

.rank-num {
    position: absolute;
    left: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-3), var(--brand));
    box-shadow: 0 12px 26px rgba(255, 78, 205, .26);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 8px 0 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.meta-line {
    margin-bottom: 10px;
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    font-size: 12px;
    padding: 4px 8px;
}

.page-hero {
    margin: 34px 0;
    padding: 48px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 10%, rgba(0, 212, 255, .16), transparent 22rem),
        linear-gradient(135deg, rgba(124, 92, 255, .18), rgba(255, 255, 255, .045));
    box-shadow: var(--shadow);
}

.page-hero.slim {
    min-height: 260px;
    display: flex;
    align-items: center;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    margin: 34px 0;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(124, 92, 255, .16), rgba(0, 212, 255, .06));
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    background-color: #151b36;
    background-size: cover;
    background-position: center;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .34);
}

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

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    align-items: stretch;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #02040a;
    box-shadow: var(--shadow);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 50% 45%, rgba(124, 92, 255, .24), transparent 18rem),
        #050710;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(2, 4, 10, .34);
    color: #fff;
    cursor: pointer;
}

.play-cover span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 42px rgba(0, 212, 255, .28);
    font-size: 30px;
    transform: translateX(3px);
}

.play-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}

.movie-info {
    padding: 22px;
}

.movie-info dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 10px 12px;
    margin: 18px 0;
}

.movie-info dt {
    color: var(--muted);
}

.movie-info dd {
    margin: 0;
}

.article-panel {
    padding: 28px;
}

.article-panel p {
    color: #d8def6;
    font-size: 17px;
}

.empty-state {
    display: none;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .06);
    color: var(--muted);
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    width: min(1220px, calc(100% - 32px));
    margin: 56px auto 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, .055);
    color: var(--muted);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

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

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

.footer-links a {
    color: #dce4ff;
}

.copyright {
    margin: 18px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

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

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

    .detail-hero,
    .player-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(320px, 100%);
    }
}

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

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 78px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(7, 10, 22, .96);
    }

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

    .hero-stage {
        min-height: 560px;
        border-radius: 24px;
    }

    .hero-copy {
        width: 100%;
        padding: 54px 24px;
    }

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

    .quick-search,
    .toolbar-panel,
    .footer-grid,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form,
    .inline-search {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form input,
    .inline-search input,
    .inline-search.wide input {
        width: 100%;
    }

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

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

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

    .card-body {
        padding: 12px;
    }
}
