:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.16);
    --text: #e5edf8;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --green: #34d399;
    --gold: #fbbf24;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #08111f 45%, #020617 100%);
    color: var(--text);
    font-family:
        Inter,
        "PingFang SC",
        "Microsoft YaHei",
        "Noto Sans CJK SC",
        Arial,
        sans-serif;
    line-height: 1.68;
}

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

img {
    display: block;
    width: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

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

.nav-wrap {
    max-width: 1260px;
    height: 70px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #001018;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.42);
}

.brand-text {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #67e8f9, #60a5fa 64%, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--soft);
    font-size: 15px;
}

.nav-link {
    position: relative;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

.nav-link.active::after,
.nav-link:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    padding: 10px 22px 18px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.94);
}

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-link {
    padding: 11px 13px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--soft);
}

.hero-shell {
    width: min(1260px, calc(100% - 44px));
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
}

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

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

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

.hero-slide img {
    height: 100%;
    min-height: 620px;
    filter: saturate(1.08) contrast(1.02);
}

.hero-overlay,
.detail-mask,
.channel-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.16) 58%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 76px);
    bottom: clamp(28px, 8vw, 86px);
    width: min(680px, calc(100% - 48px));
    z-index: 2;
}

.eyebrow,
.section-heading span,
.page-hero span,
.channel-content span,
.showcase-head span,
.detail-hero-content .breadcrumb,
.detail-hero-content .breadcrumb a {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.channel-content h1,
.detail-hero-content h1 {
    margin: 12px 0 16px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.channel-content p,
.detail-hero-content p {
    width: min(640px, 100%);
    margin: 0;
    color: #dbeafe;
    font-size: clamp(16px, 1.8vw, 20px);
}

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

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

.hero-tags span,
.tag-row span,
.meta-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: #dbeafe;
    font-size: 12px;
}

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

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

.primary-button {
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.32);
}

.ghost-button {
    border: 1px solid rgba(226, 232, 240, 0.28);
    background: rgba(15, 23, 42, 0.58);
    color: #ffffff;
}

.ghost-button.compact {
    min-height: 40px;
    padding: 0 18px;
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 48px rgba(14, 165, 233, 0.24);
}

.hero-dots {
    position: absolute;
    left: clamp(24px, 6vw, 76px);
    bottom: 28px;
    z-index: 4;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 26px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.28);
    cursor: pointer;
}

.hero-dot.active {
    width: 46px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-side {
    display: grid;
    gap: 16px;
}

.hero-search-card,
.hero-mini-card,
.category-card,
.movie-card,
.content-card,
.side-card,
.category-showcase,
.filter-panel {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}

.hero-search-card {
    min-height: 202px;
    padding: 24px;
    border-radius: 28px;
}

.hero-search-card h2 {
    margin: 10px 0 22px;
    font-size: 26px;
    line-height: 1.18;
}

.search-box {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.55);
    padding: 0 14px;
}

.search-box span {
    color: var(--cyan);
    font-weight: 900;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
}

.search-box input::placeholder {
    color: #64748b;
}

.hero-mini-card {
    position: relative;
    overflow: hidden;
    min-height: 94px;
    border-radius: 22px;
    display: grid;
    grid-template-columns: 92px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px 14px 10px 10px;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.hero-mini-card:hover {
    transform: translateX(-3px);
    border-color: rgba(34, 211, 238, 0.36);
}

.hero-mini-card img {
    height: 74px;
    border-radius: 16px;
}

.hero-mini-card span {
    font-weight: 800;
    color: #ffffff;
}

.hero-mini-card b {
    color: var(--cyan);
}

.section-wrap,
.category-showcase {
    width: min(1260px, calc(100% - 44px));
    margin: 58px auto 0;
}

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

.section-heading h2,
.showcase-head h2,
.content-card h2 {
    margin: 4px 0 0;
    font-size: clamp(26px, 3.4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-heading a,
.showcase-head a {
    color: var(--cyan);
    font-weight: 800;
}

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 250px;
    border-radius: 26px;
    padding: 18px;
    display: flex;
    align-items: flex-end;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.38);
}

.category-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    opacity: 0.38;
    filter: saturate(1.06);
}

.category-glow {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.9)),
        radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.36), transparent 45%);
}

.category-card div {
    position: relative;
    z-index: 2;
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--soft);
    font-size: 14px;
}

.category-card b {
    color: var(--cyan);
}

.filter-panel {
    position: relative;
    z-index: 3;
    margin-bottom: 22px;
    padding: 14px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.filter-panel .search-box {
    flex: 1 1 420px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chip,
.sort-select {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
    color: var(--soft);
    min-height: 40px;
    padding: 0 14px;
    cursor: pointer;
}

.chip.active,
.chip:hover,
.sort-select:hover {
    color: #ffffff;
    border-color: rgba(34, 211, 238, 0.44);
    background: rgba(8, 145, 178, 0.28);
}

.sort-select {
    outline: none;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: 0 24px 66px rgba(8, 145, 178, 0.22);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(59, 130, 246, 0.16)),
        #0f172a;
}

.poster-link img {
    height: 100%;
    transition:
        transform 0.32s ease,
        filter 0.32s ease;
}

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

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

.play-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
}

.play-pill {
    right: 10px;
    bottom: 10px;
    padding: 5px 10px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-badge {
    left: 10px;
    top: 10px;
    padding: 6px 10px;
    color: #171100;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #ffffff;
    font-weight: 900;
    font-size: 16px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.meta-row {
    gap: 6px;
    margin-bottom: 10px;
}

.meta-row span {
    min-height: 24px;
    padding: 3px 8px;
    border-color: rgba(148, 163, 184, 0.18);
    color: #b6c2d3;
}

.tag-row span {
    min-height: 24px;
    border-color: rgba(34, 211, 238, 0.16);
    color: #a5f3fc;
}

.empty-state {
    display: none;
    margin: 20px 0;
    padding: 32px;
    border: 1px dashed rgba(148, 163, 184, 0.26);
    border-radius: 24px;
    color: var(--muted);
    text-align: center;
}

.empty-state.show {
    display: block;
}

.page-hero,
.channel-hero,
.detail-hero {
    position: relative;
    width: min(1260px, calc(100% - 44px));
    margin: 28px auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.page-hero {
    min-height: 310px;
    padding: clamp(30px, 6vw, 70px);
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 18% 12%, rgba(34, 211, 238, 0.28), transparent 34%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.28), transparent 32%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.74));
}

.channel-hero,
.detail-hero {
    min-height: 430px;
}

.channel-hero img,
.detail-hero img {
    position: absolute;
    inset: 0;
    height: 100%;
}

.channel-content,
.detail-hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 40px));
    padding: clamp(30px, 7vw, 72px);
}

.category-showcase {
    padding: 22px;
    border-radius: 30px;
}

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

.detail-layout {
    width: min(1260px, calc(100% - 44px));
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 22px;
}

.player-section,
.content-card,
.side-card {
    border-radius: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    object-fit: contain;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.78));
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.22s ease;
}

.play-layer.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.42);
    font-size: 30px;
    text-indent: 4px;
}

.content-card,
.side-card {
    padding: 24px;
}

.content-card p {
    margin: 12px 0 0;
    color: #d9e6f7;
    font-size: 16px;
}

.side-card {
    position: sticky;
    top: 92px;
}

.side-card img {
    border-radius: 22px;
    aspect-ratio: 2 / 3;
}

.side-card h2 {
    margin: 18px 0 10px;
    font-size: 24px;
    line-height: 1.22;
}

.side-card dl {
    margin: 0;
    display: grid;
    gap: 10px;
}

.side-card dl div {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-bottom: 9px;
}

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

.side-card dd {
    margin: 0;
    color: #ffffff;
}

.side-tags {
    margin-top: 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    letter-spacing: 0;
    text-transform: none;
}

.breadcrumb b {
    color: #ffffff;
}

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

.footer-grid {
    width: min(1260px, calc(100% - 44px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
}

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

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

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

.footer-bottom {
    width: min(1260px, calc(100% - 44px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: #64748b;
    font-size: 14px;
}

@media (max-width: 1180px) {
    .desktop-nav {
        gap: 14px;
        font-size: 14px;
    }

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

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

    .hero-search-card {
        grid-column: 1 / -1;
    }

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

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

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

    .side-card {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

    .nav-wrap {
        height: 64px;
    }

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

    .hero-shell,
    .section-wrap,
    .category-showcase,
    .page-hero,
    .channel-hero,
    .detail-hero,
    .detail-layout,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 28px, 1260px);
    }

    .hero-stage,
    .hero-slide img {
        min-height: 540px;
    }

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

    .filter-panel,
    .section-heading,
    .showcase-head {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-actions {
        width: 100%;
    }

    .chip,
    .sort-select {
        flex: 1 1 auto;
    }

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

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

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

@media (max-width: 520px) {
    .hero-stage,
    .hero-slide img {
        min-height: 500px;
    }

    .hero-content {
        left: 20px;
        bottom: 58px;
        width: calc(100% - 40px);
    }

    .hero-content h1,
    .page-hero h1,
    .channel-content h1,
    .detail-hero-content h1 {
        font-size: 36px;
    }

    .hero-tags span:nth-child(n + 5) {
        display: none;
    }

    .category-grid,
    .category-grid.full,
    .movie-grid,
    .movie-grid.compact-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 220px;
    }

    .mobile-nav.open {
        grid-template-columns: 1fr;
    }

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