:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --orange: #f97316;
    --red: #ef4444;
    --radius-xl: 28px;
    --radius-lg: 18px;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at 84% 10%, rgba(59, 130, 246, 0.12), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72), transparent);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-nav.is-scrolled,
.site-nav.is-open {
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.35);
}

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

.desktop-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #cbd5e1;
    font-size: 14px;
    white-space: nowrap;
}

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

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

.nav-search {
    padding: 8px 14px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
}

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

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

.mobile-links {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    color: #cbd5e1;
}

.site-nav.is-open .mobile-links {
    display: grid;
}

.hero {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    background-size: cover;
    background-position: center;
    transition: opacity 0.8s ease, transform 1.2s ease;
    display: flex;
    align-items: flex-end;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, #020617, transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 130px 0 96px;
    max-width: 820px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 16px 0 18px;
    font-size: clamp(38px, 8vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 26px;
    color: #d1d5db;
    font-size: clamp(16px, 2vw, 20px);
}

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

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

.hero-tags a,
.tag-row span:first-child {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.28);
    background: rgba(34, 211, 238, 0.08);
}

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

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

.primary-btn,
.home-search button,
.search-form button {
    border: 0;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    box-shadow: 0 15px 35px rgba(34, 211, 238, 0.28);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.home-search button:hover,
.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(34, 211, 238, 0.34);
}

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

.hero-dots button {
    width: 34px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.34);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 56px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.quick-search-panel {
    width: min(1100px, calc(100% - 32px));
    margin: -44px auto 70px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search,
.search-form,
.filter-box {
    display: flex;
    gap: 12px;
}

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

.quick-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-links a,
.text-link {
    color: var(--cyan);
    font-weight: 700;
}

.content-section,
.detail-content,
.search-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 84px;
}

.section-panel,
.article-panel,
.search-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.90), rgba(30, 41, 59, 0.68));
    box-shadow: var(--shadow);
}

.section-panel {
    padding: 34px;
}

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

.section-heading h2,
.article-panel h2 {
    margin: 8px 0 8px;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
}

.section-heading p,
.category-preview p,
.page-hero p,
.article-panel p {
    margin: 0;
    color: var(--muted);
}

.small-heading h2 {
    font-size: 26px;
}

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

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

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

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

.movie-card:hover,
.list-card:hover,
.category-card:hover,
.category-spotlight:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(15, 23, 42, 0.94);
}

.poster-shell {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.26), rgba(59, 130, 246, 0.08)),
        #111827;
}

.poster-shell img,
.list-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

.poster-shell img.is-hidden,
.list-poster img.is-hidden {
    opacity: 0;
}

.movie-card:hover .poster-shell img,
.category-spotlight:hover .spotlight-cover {
    transform: scale(1.06);
}

.poster-shell::after,
.list-poster::after,
.spotlight-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.88));
    pointer-events: none;
}

.poster-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%) scale(0.86);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 211, 238, 0.88);
    color: #fff;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
    position: absolute;
    z-index: 3;
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(239, 68, 68, 0.28);
}

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

.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta-line a {
    color: var(--cyan);
}

.movie-card h2,
.list-card h2,
.category-spotlight h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.list-card h2 a:hover,
.category-spotlight h2 a:hover {
    color: var(--cyan);
}

.movie-card p,
.list-card p,
.category-spotlight p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-compact h2 {
    font-size: 16px;
}

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

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

.category-card {
    min-height: 150px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 45%),
        rgba(15, 23, 42, 0.78);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-card span {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

.subpage {
    padding-top: 72px;
}

.page-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 58px;
    min-height: 340px;
    padding: 76px 44px 46px;
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    background:
        radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.22), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.62));
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    align-items: end;
    gap: 34px;
}

.compact-hero {
    min-height: 280px;
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 66px);
}

.filter-box {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.54);
    align-self: end;
}

.list-section {
    display: grid;
    gap: 16px;
}

.list-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.list-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(59, 130, 246, 0.08)),
        #111827;
}

.list-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.list-rank,
.list-dot {
    min-width: 34px;
    height: 28px;
    padding: 0 9px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.list-dot {
    min-width: 16px;
    width: 16px;
    height: 16px;
    padding: 0;
    color: transparent;
    background: var(--cyan);
}

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

.category-spotlight {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.70);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.spotlight-cover {
    position: relative;
    min-height: 190px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: transform 0.35s ease;
}

.spotlight-cover span {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 211, 238, 0.88);
}

.spotlight-channel {
    color: var(--cyan);
    font-weight: 800;
}

.detail-page {
    padding-top: 0;
}

.detail-hero {
    min-height: 620px;
    padding-top: 96px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--line);
}

.detail-hero-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0 56px;
}

.breadcrumb,
.breadcrumb-sep {
    display: inline-flex;
    color: #cbd5e1;
    margin-right: 9px;
    font-size: 14px;
}

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

.detail-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    align-items: end;
}

.detail-cover {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.detail-info {
    max-width: 820px;
}

.detail-one-line {
    margin: 0 0 22px;
    color: #d1d5db;
    font-size: 19px;
}

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

.player-section {
    width: min(1120px, calc(100% - 32px));
    margin: -44px auto 58px;
    position: relative;
    z-index: 3;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-start {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 50%;
    width: 94px;
    height: 94px;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 20px 50px rgba(34, 211, 238, 0.38);
}

.player-start span {
    font-size: 34px;
    margin-left: 5px;
}

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

.player-message {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 5;
    color: #fde68a;
    text-align: center;
    font-size: 14px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.article-panel {
    padding: 28px;
}

.article-panel p {
    color: #cbd5e1;
    font-size: 16px;
}

.meta-panel {
    grid-column: 1 / -1;
}

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

.meta-panel div {
    padding: 16px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.38);
}

.meta-panel dt {
    color: var(--muted);
    font-size: 13px;
}

.meta-panel dd {
    margin: 5px 0 0;
    color: #fff;
    font-weight: 800;
}

.related-section {
    margin-top: 72px;
}

.search-shell {
    padding: 28px;
}

.search-form {
    margin-bottom: 26px;
}

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

.empty-state {
    display: none;
    margin-top: 28px;
    padding: 26px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
}

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

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

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 28px;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

.footer-main p,
.footer-bottom {
    color: var(--muted);
}

.footer-main h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
    color: #cbd5e1;
}

.footer-bottom {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1180px) {
    .desktop-links {
        gap: 12px;
        font-size: 13px;
    }

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

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

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

    .nav-toggle {
        display: block;
    }

    .hero {
        min-height: 650px;
    }

    .quick-search-panel,
    .page-hero,
    .detail-grid,
    .detail-content,
    .footer-main,
    .spotlight-grid {
        grid-template-columns: 1fr;
    }

    .home-search,
    .search-form,
    .filter-box {
        flex-direction: column;
    }

    .movie-grid,
    .compact-grid,
    .full-grid,
    .category-card-grid,
    .category-card-grid.wide,
    .search-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .list-card,
    .category-spotlight {
        grid-template-columns: 130px 1fr;
    }

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

@media (max-width: 620px) {
    .nav-inner,
    .content-section,
    .detail-content,
    .search-shell,
    .footer-inner,
    .detail-hero-inner,
    .player-section,
    .category-preview,
    .page-hero {
        width: min(100% - 24px, 1240px);
    }

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

    .hero-content {
        width: min(100% - 24px, 1240px);
        padding-bottom: 82px;
    }

    .hero-actions,
    .quick-links {
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .movie-grid,
    .compact-grid,
    .full-grid,
    .category-card-grid,
    .category-card-grid.wide,
    .search-result-grid {
        grid-template-columns: 1fr;
    }

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

    .list-poster {
        aspect-ratio: 16 / 9;
    }

    .page-hero {
        padding: 72px 20px 28px;
    }

    .detail-grid {
        gap: 22px;
    }

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

    .player-start {
        width: 74px;
        height: 74px;
    }

    .article-panel,
    .section-panel,
    .search-shell {
        padding: 20px;
    }

    .meta-panel dl {
        grid-template-columns: 1fr;
    }
}
