:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.95);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-deep: #2563eb;
    --gold: #fbbf24;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.58);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(56, 189, 248, 0.18), transparent 34rem),
        radial-gradient(circle at 82% 8%, rgba(37, 99, 235, 0.18), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 36px rgba(2, 6, 23, 0.4);
}

.header-inner,
.footer-inner,
.section-block,
.detail-hero-inner,
.page-hero,
.hero-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

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

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #e0f2fe;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.45);
}

.brand-text,
.footer-brand {
    font-size: 1.2rem;
    background: linear-gradient(90deg, #7dd3fc, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    position: relative;
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: center;
    background: var(--accent);
    transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.68);
    padding: 10px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #e2e8f0;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

.mobile-nav a {
    display: block;
    padding: 12px 4px;
    color: #cbd5e1;
}

.mobile-nav.open {
    display: block;
}

.hero-section {
    min-height: calc(100vh - 68px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    padding: 28px 0 42px;
}

.hero-stage {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.56) 48%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.35) 58%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 72px);
    right: clamp(24px, 12vw, 100px);
    bottom: clamp(34px, 8vh, 86px);
    max-width: 760px;
}

.hero-kicker,
.section-heading span,
.page-hero span,
.detail-channel,
.category-label {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 7px 12px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.28);
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 14px;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    margin: 0;
    max-width: 720px;
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.9;
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta,
.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags,
.strong-tags {
    margin-top: 18px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span,
.footer-tags span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 0.78rem;
}

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

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #eff6ff;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34);
}

.ghost-button {
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.52);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.movie-card:hover,
.compact-card:hover,
.category-overview-card:hover,
.ranking-item:hover {
    transform: translateY(-2px);
}

.wide {
    width: 100%;
}

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

.hero-dot {
    width: 28px;
    height: 6px;
    border: none;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.35);
    cursor: pointer;
}

.hero-dot.active {
    width: 44px;
    background: #38bdf8;
}

.hero-panel {
    display: grid;
    align-content: start;
    gap: 18px;
}

.glass-card,
.rank-panel,
.detail-side-card,
.detail-article,
.player-shell,
.category-overview-card,
.ranking-item {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: var(--panel);
    backdrop-filter: blur(18px);
    border-radius: 26px;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
}

.glass-card,
.rank-panel,
.detail-side-card,
.detail-article {
    padding: 22px;
}

.glass-card h2,
.rank-panel h2,
.detail-side-card h2 {
    margin: 0 0 10px;
}

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

.search-box input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 0 14px;
    color: #e2e8f0;
    background: rgba(2, 6, 23, 0.58);
    outline: none;
}

.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(56, 189, 248, 0.75);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.search-results {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.search-result-item,
.compact-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.search-result-item img,
.compact-card img {
    width: 54px;
    height: 74px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.9);
}

.search-result-item strong,
.compact-card strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.search-result-item em,
.compact-card em {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.78rem;
    font-style: normal;
}

.section-block {
    padding: 52px 0;
}

.section-heading {
    margin-bottom: 24px;
    text-align: center;
}

.section-heading.align-left {
    text-align: left;
}

.section-heading h2,
.page-hero h1 {
    margin: 12px 0 10px;
}

.section-heading h2 {
    font-size: clamp(1.7rem, 4vw, 2.7rem);
}

.section-heading p {
    margin: 0 auto;
    max-width: 680px;
    color: var(--muted);
    line-height: 1.8;
}

.align-left p {
    margin-left: 0;
}

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

.channel-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    border-radius: 24px;
    color: #e0f2fe;
    font-weight: 800;
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(37, 99, 235, 0.12)),
        rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(56, 189, 248, 0.24);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: start;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover,
.compact-card:hover,
.ranking-item:hover {
    border-color: rgba(56, 189, 248, 0.38);
}

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

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

.movie-card:hover .movie-cover img {
    transform: scale(1.04);
}

.year-badge,
.play-badge {
    position: absolute;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.year-badge {
    left: 12px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
}

.play-badge {
    right: 12px;
    color: #082f49;
    background: #7dd3fc;
}

.movie-card-body {
    padding: 15px;
}

.movie-title {
    display: block;
    color: #f8fafc;
    font-weight: 800;
    line-height: 1.35;
}

.movie-title:hover,
.ranking-body a:hover,
.text-link {
    color: #7dd3fc;
}

.movie-meta {
    margin: 9px 0 10px;
}

.movie-card-body p {
    margin: 0 0 12px;
    min-height: 3.1em;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.65;
}

.rank-list,
.hero-list {
    display: grid;
    gap: 12px;
}

.section-more {
    margin-top: 28px;
    text-align: center;
}

.page-hero {
    margin-top: 28px;
    min-height: 270px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 26px;
    align-items: center;
    padding: 44px;
    border-radius: 32px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(circle at 88% 18%, rgba(56, 189, 248, 0.22), transparent 22rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.9));
    box-shadow: var(--shadow);
}

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

.hero-mini-grid {
    display: grid;
    gap: 12px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.category-cover-stack img {
    aspect-ratio: 2 / 3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

.category-overview-card h2 {
    margin: 12px 0 10px;
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.75;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
    margin-bottom: 24px;
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 56px 88px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-index {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #082f49;
    background: #7dd3fc;
    font-weight: 900;
}

.ranking-thumb img {
    width: 88px;
    height: 124px;
    border-radius: 16px;
    object-fit: cover;
    background: #0f172a;
}

.ranking-body h2 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

.ranking-body p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.6;
}

.hot-score {
    padding: 8px 12px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.24);
    white-space: nowrap;
    font-weight: 800;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.15);
    transform: scale(1.04);
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.58) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.42));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 32px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    color: #cbd5e1;
}

.breadcrumb a {
    color: #7dd3fc;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(226, 232, 240, 0.18);
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

.detail-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #eff6ff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

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

.player-section {
    padding-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: none;
    color: #f8fafc;
    cursor: pointer;
    background:
        radial-gradient(circle, rgba(56, 189, 248, 0.24), transparent 18rem),
        rgba(2, 6, 23, 0.42);
    transition: opacity 0.2s ease;
}

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

.play-icon {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #082f49;
    background: #7dd3fc;
    font-size: 2rem;
    box-shadow: 0 22px 58px rgba(56, 189, 248, 0.34);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 24px;
    align-items: start;
}

.detail-article p {
    color: #cbd5e1;
    line-height: 2;
    font-size: 1.02rem;
}

.inner-heading {
    margin-top: 32px;
}

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

.detail-side-card dl {
    margin: 0;
}

.detail-side-card dt {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.82rem;
}

.detail-side-card dd {
    margin: 5px 0 0;
    color: #f8fafc;
    line-height: 1.5;
}

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

.site-footer {
    margin-top: 54px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.58);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 0;
}

.footer-inner p {
    margin: 10px 0 0;
    color: var(--muted);
}

.is-filtered-out {
    display: none !important;
}

@media (max-width: 1120px) {
    .hero-section,
    .split-layout,
    .page-hero,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: 68vh;
    }

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-section {
        width: min(100% - 24px, 1180px);
        padding-top: 16px;
    }

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

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 58px;
    }

    .channel-grid,
    .movie-grid,
    .home-grid,
    .category-overview-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-overview-card,
    .ranking-item,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        align-items: start;
    }

    .hot-score {
        width: max-content;
    }

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

    .detail-poster {
        width: min(260px, 72vw);
    }

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

@media (max-width: 520px) {
    .header-inner,
    .footer-inner,
    .section-block,
    .detail-hero-inner,
    .page-hero,
    .hero-section {
        width: min(100% - 20px, 1180px);
    }

    .hero-stage {
        min-height: 520px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.35rem;
    }

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

    .channel-grid,
    .movie-grid,
    .home-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .ranking-thumb img {
        width: 100%;
        height: auto;
        aspect-ratio: 2 / 3;
    }

    .play-icon {
        width: 66px;
        height: 66px;
    }
}
