:root {
    color-scheme: dark;
    --page: #020617;
    --page-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(34, 211, 238, 0.45);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --pink: #f472b6;
    --green: #34d399;
    --shadow: 0 24px 70px rgba(2, 8, 23, 0.48);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.16), transparent 28rem),
        radial-gradient(circle at 86% 18%, rgba(37, 99, 235, 0.18), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 13px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 38px rgba(34, 211, 238, 0.22);
}

.brand-text,
.footer-brand {
    font-size: 22px;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #cbd5e1;
    font-size: 15px;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
    color: var(--cyan);
}

.menu-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    display: none;
    background: rgba(15, 23, 42, 0.82);
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    padding: 8px 24px 18px;
    background: rgba(2, 6, 23, 0.96);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.mobile-panel.is-open {
    display: block;
}

main {
    min-height: 100vh;
}

.hero-carousel {
    position: relative;
    height: 76vh;
    min-height: 600px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.12) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 52%, rgba(2, 6, 23, 0.68) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: 24px;
    bottom: 104px;
    max-width: 760px;
}

.hero-kicker,
.page-hero p {
    margin: 0 0 12px;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 54px rgba(2, 6, 23, 0.45);
}

.hero-summary,
.detail-one-line {
    margin: 22px 0 0;
    max-width: 680px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.tag-row,
.detail-tags,
.genre-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a,
.genre-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid rgba(34, 211, 238, 0.4);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.15);
    backdrop-filter: blur(8px);
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 13px;
    font-weight: 800;
}

.primary-btn {
    color: white;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.28);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 46px rgba(34, 211, 238, 0.34);
}

.ghost-btn,
.section-more {
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.66);
}

.ghost-btn:hover,
.section-more:hover {
    border-color: rgba(34, 211, 238, 0.5);
    color: var(--cyan);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.58);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-arrow:hover {
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(15, 23, 42, 0.78);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.62);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--cyan);
}

.channel-strip {
    margin-top: -44px;
    position: relative;
    z-index: 4;
    padding: 0 24px;
}

.channel-shell {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.channel-pill,
.category-card,
.year-card,
.story-panel,
.split-left,
.split-right,
.filter-panel {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.channel-pill {
    min-height: 112px;
    padding: 18px;
    border-radius: var(--radius);
    overflow: hidden;
}

.channel-pill strong {
    display: block;
    color: #f8fafc;
    font-size: 18px;
    margin-bottom: 8px;
}

.channel-pill span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.content-section,
.split-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 76px 24px 0;
}

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

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.section-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #031923;
    background: linear-gradient(135deg, #67e8f9, #60a5fa);
    font-weight: 900;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 16px 42px rgba(2, 8, 23, 0.25);
    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.42);
    box-shadow: 0 28px 58px rgba(2, 8, 23, 0.42);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(37, 99, 235, 0.12));
}

.poster-link img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.38s ease, filter 0.38s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 50%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

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

.movie-title {
    display: -webkit-box;
    min-height: 46px;
    overflow: hidden;
    color: #f8fafc;
    font-weight: 900;
    font-size: 16px;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--cyan);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 62px;
    margin: 12px 0 0;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 12px;
    gap: 7px;
}

.tag-row span {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 11px;
}

.category-link {
    display: inline-flex;
    margin-top: 12px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
}

.split-section {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    gap: 22px;
}

.split-left,
.split-right {
    padding: 24px;
    border-radius: var(--radius);
}

.compact-heading {
    margin-bottom: 18px;
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 13px;
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.36);
}

.rank-row:hover {
    color: white;
    background: rgba(8, 145, 178, 0.18);
}

.rank-row span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: white;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    font-weight: 900;
}

.rank-row strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.year-grid,
.category-grid {
    display: grid;
    gap: 16px;
}

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

.year-card {
    padding: 18px;
    border-radius: var(--radius);
}

.year-card h3 {
    margin: 0 0 12px;
    color: #f8fafc;
}

.year-card a {
    display: block;
    overflow: hidden;
    margin: 8px 0;
    color: #cbd5e1;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.year-card a:hover {
    color: var(--cyan);
}

.page-main {
    padding-top: 88px;
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 84px 24px 42px;
    border-radius: 0 0 34px 34px;
    background:
        radial-gradient(circle at 12% 20%, rgba(34, 211, 238, 0.18), transparent 26rem),
        radial-gradient(circle at 82% 10%, rgba(37, 99, 235, 0.24), transparent 24rem),
        rgba(15, 23, 42, 0.35);
}

.small-hero,
.search-hero,
.rank-hero {
    min-height: 320px;
}

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

.category-card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: var(--radius);
}

.category-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.74;
    transition: transform 0.34s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-card span {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.18));
}

.category-card div {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    min-height: 64px;
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
}

.category-card strong {
    display: inline-flex;
    margin-top: 16px;
    color: var(--cyan);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 0.6fr));
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: var(--radius);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 13px;
    outline: 0;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.56);
    padding: 0 13px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.58);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

[data-card].is-hidden {
    display: none;
}

.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 34px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.56);
    box-shadow: var(--shadow);
}

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

.detail-info {
    align-self: center;
}

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

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

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.detail-meta-grid span {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 15px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.56);
}

.detail-meta-grid b {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

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

.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 28px;
    background: black;
    box-shadow: 0 32px 90px rgba(2, 8, 23, 0.52);
    aspect-ratio: 16 / 9;
}

.video-player {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    display: grid;
    place-content: center;
    gap: 14px;
    color: white;
    background:
        radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.18), transparent 18rem),
        rgba(2, 6, 23, 0.26);
    cursor: pointer;
}

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

.play-symbol {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.36);
    font-size: 30px;
}

.player-cover span:last-child {
    font-size: 18px;
    font-weight: 900;
}

.detail-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.story-panel {
    padding: 28px;
    border-radius: var(--radius);
}

.story-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.story-panel p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.95;
    font-size: 16px;
}

.genre-cloud {
    margin-top: 18px;
}

.detail-related {
    padding-top: 56px;
}

.movie-card-compact .movie-card-body p {
    min-height: 42px;
    -webkit-line-clamp: 2;
}

.rank-grid .movie-card:nth-child(-n + 3) {
    border-color: rgba(249, 115, 22, 0.44);
}

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

.footer-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 34px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
    color: #cbd5e1;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        height: 72vh;
        min-height: 560px;
    }

    .hero-content {
        bottom: 86px;
    }

    .hero-arrow {
        display: none;
    }

    .channel-shell,
    .movie-grid,
    .category-grid,
    .split-section,
    .detail-hero,
    .detail-content,
    .footer-shell {
        grid-template-columns: 1fr 1fr;
    }

    .detail-hero {
        gap: 22px;
    }

    .detail-meta-grid,
    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .filter-keyword {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .nav-shell {
        padding: 0 16px;
    }

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

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

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 76px;
    }

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

    .channel-strip,
    .content-section,
    .split-section,
    .page-hero,
    .detail-hero,
    .player-section,
    .detail-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .channel-shell,
    .movie-grid,
    .category-grid,
    .split-section,
    .detail-hero,
    .detail-content,
    .footer-shell,
    .filter-panel,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .channel-strip {
        margin-top: -24px;
    }

    .movie-grid {
        gap: 16px;
    }

    .detail-cover {
        max-width: 280px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}
