:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --soft: #64748b;
    --primary: #22d3ee;
    --primary-strong: #06b6d4;
    --accent: #818cf8;
    --danger: #fb7185;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at 80% 0, rgba(129, 140, 248, 0.13), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #001018;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.26);
}

.brand-text {
    font-size: 19px;
    color: #f8fafc;
}

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

.nav-link,
.mobile-link {
    color: var(--muted);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.mobile-link {
    display: block;
    padding: 14px 18px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ecfeff;
    background: rgba(34, 211, 238, 0.12);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.94);
}

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

.hero-shell {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg,
.detail-bg,
.channel-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-overlay,
.detail-mask,
.channel-hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.22)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 96px 0 88px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.12);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-content h1,
.detail-info h1,
.sub-hero h1,
.channel-hero-content h1 {
    margin: 18px 0 14px;
    max-width: 760px;
    color: #f8fafc;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.hero-content p,
.sub-hero p,
.channel-hero-content p {
    max-width: 680px;
    color: #cbd5e1;
    font-size: clamp(16px, 2.2vw, 20px);
    line-height: 1.75;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span,
.meta-line span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 12px;
}

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

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

.primary-btn,
.quick-search-form button {
    color: #001018;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.25);
}

.ghost-btn {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid var(--line);
}

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

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

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

.hero-dot.active {
    background: var(--primary);
}

.quick-search-section,
.section-block,
.sub-hero,
.channel-hero-content,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-section {
    margin-top: -44px;
    position: relative;
    z-index: 5;
}

.quick-search-card {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 460px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.quick-search-card h2,
.section-head h2,
.article-block h2,
.player-copy h2,
.category-preview h2 {
    margin: 10px 0 0;
    color: #f8fafc;
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

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

.quick-search-form input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.64);
    outline: none;
    padding: 0 16px;
}

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

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

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

.section-head p {
    max-width: 720px;
    color: var(--muted);
    line-height: 1.8;
}

.text-link {
    color: #67e8f9;
    font-weight: 800;
}

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

.category-tile {
    min-height: 210px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 100% 0, rgba(34, 211, 238, 0.13), transparent 55%),
        rgba(15, 23, 42, 0.76);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.ranking-row:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-tile > a {
    display: block;
    padding: 22px;
}

.category-tile span {
    color: #67e8f9;
    font-size: 13px;
    font-weight: 800;
}

.category-tile strong {
    display: block;
    margin: 12px 0;
    color: #f8fafc;
    font-size: 20px;
}

.category-tile em {
    display: block;
    color: var(--muted);
    font-style: normal;
    line-height: 1.7;
    font-size: 14px;
}

.mini-link-list {
    display: grid;
    gap: 8px;
    padding: 0 22px 22px;
}

.mini-link-list a {
    color: #cbd5e1;
    font-size: 13px;
}

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

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

.movie-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.64);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

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

.movie-card:hover img,
.ranking-row:hover img {
    transform: scale(1.05);
}

.play-dot,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #001018;
    background: rgba(34, 211, 238, 0.94);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #001018;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 900;
    font-size: 13px;
}

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

.movie-card h3 {
    margin: 10px 0 8px;
    color: #f8fafc;
    font-size: 16px;
    line-height: 1.38;
}

.movie-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-line {
    color: var(--soft);
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 56px 78px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.66);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-index {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #001018;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 900;
}

.ranking-thumb {
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    overflow: hidden;
}

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

.ranking-main h3 {
    margin: 0 0 8px;
    color: #f8fafc;
    font-size: 18px;
}

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

.heat-pill {
    min-width: 92px;
    padding: 10px 14px;
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.11);
    border: 1px solid rgba(34, 211, 238, 0.22);
    font-weight: 800;
    text-align: center;
}

.sub-hero {
    padding: 92px 0 34px;
}

.sub-hero > div {
    max-width: 820px;
}

.category-preview {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 0;
}

.channel-hero,
.detail-hero {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    background: #020617;
}

.channel-hero-content {
    position: relative;
    z-index: 2;
    padding: 112px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #67e8f9;
}

.filter-bar {
    align-items: end;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.66);
}

.filter-bar label {
    flex: 1;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

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

.detail-hero {
    min-height: 620px;
}

.detail-shell {
    position: relative;
    z-index: 2;
    padding: 96px 0 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    align-items: end;
}

.detail-poster {
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

.detail-info h1 {
    font-size: clamp(34px, 6vw, 62px);
}

.detail-one-line {
    max-width: 780px;
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.75;
}

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

.player-block {
    margin-top: -28px;
    position: relative;
    z-index: 4;
}

.player-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.video-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #001018;
    background: rgba(2, 6, 23, 0.18);
    cursor: pointer;
}

.video-cover.hidden {
    display: none;
}

.play-ring {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.52);
    font-size: 30px;
}

.player-copy {
    padding: 12px 10px;
}

.player-copy p,
.article-block p {
    color: #cbd5e1;
    line-height: 1.9;
}

.article-block {
    max-width: 900px;
}

.hidden-by-filter {
    display: none !important;
}

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

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.footer-grid p {
    color: var(--muted);
    line-height: 1.8;
    max-width: 460px;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: #f8fafc;
}

.footer-links {
    display: grid;
    gap: 10px;
}

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

.footer-links a:hover {
    color: #67e8f9;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 34px;
    color: var(--soft);
    border-top: 1px solid var(--line);
    font-size: 14px;
}

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

    .movie-grid,
    .preview-grid,
    .featured-grid,
    .related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .player-card {
        grid-template-columns: 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-content {
        padding: 84px 0 86px;
    }

    .quick-search-card,
    .section-head,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .quick-search-card,
    .quick-search-form,
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .ranking-row {
        grid-template-columns: 44px 64px 1fr;
    }

    .heat-pill {
        grid-column: 2 / -1;
        width: fit-content;
    }

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

@media (max-width: 480px) {
    .category-grid,
    .movie-grid,
    .preview-grid,
    .featured-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .detail-actions {
        width: 100%;
    }

    .primary-btn,
    .ghost-btn {
        flex: 1;
    }
}
