:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(34, 211, 238, 0.18);
    --line-strong: rgba(34, 211, 238, 0.42);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --green: #4ade80;
    --orange: #fb923c;
    --yellow: #facc15;
    --shadow: 0 24px 60px rgba(8, 145, 178, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

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

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

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 19px;
    letter-spacing: 0.04em;
}

.brand-copy em {
    margin-top: 4px;
    color: rgba(34, 211, 238, 0.78);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
    transform: translateY(-1px);
}

.live-dot {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(34, 211, 238, 0.78);
    font-size: 12px;
}

.live-dot span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 0 7px rgba(34, 211, 238, 0.10);
    animation: pulse 1.8s ease-in-out infinite;
}

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

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--cyan);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

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

.mobile-nav a {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.70);
    color: #cbd5e1;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #020617;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(34, 211, 238, 0.06) 2px, rgba(34, 211, 238, 0.06) 4px),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 42%, #020617 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 48px;
    align-items: center;
    padding: 64px 0;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.8);
}

.hero-copy h1 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(44px, 7vw, 88px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.06em;
    background: linear-gradient(90deg, #67e8f9, #60a5fa 48%, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 60px rgba(34, 211, 238, 0.10);
}

.hero-copy p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 23px);
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags a {
    padding: 5px 10px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.12);
    font-size: 12px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
    box-shadow: 0 14px 35px rgba(34, 211, 238, 0.24);
}

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

.btn.text {
    color: #67e8f9;
}

.hero-poster {
    position: relative;
    display: block;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    transform: rotate(1.5deg);
}

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

.hero-poster span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #111827;
    background: var(--yellow);
    font-weight: 900;
}

.hero-grid-glow {
    position: absolute;
    inset: auto 0 0;
    height: 140px;
    background: linear-gradient(0deg, #020617, transparent);
    pointer-events: none;
}

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

.hero-dot {
    width: 34px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.36);
}

.hero-dot.active {
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.66);
}

.main-stack,
.page-shell {
    padding: 48px 0 24px;
}

.main-stack > section,
.category-section,
.related-section {
    margin-bottom: 64px;
}

.search-section,
.filter-panel,
.page-hero,
.detail-card,
.side-card,
.category-section,
.rank-list {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.search-section {
    display: grid;
    grid-template-columns: 0.9fr 1.5fr;
    gap: 24px;
    align-items: center;
    padding: 24px;
}

.search-section h2,
.page-hero h1,
.section-head h2,
.category-section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 14px;
    padding: 14px;
}

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

.search-box span {
    color: var(--cyan);
    font-size: 20px;
}

.search-box input,
.select-row select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.select-row {
    display: flex;
    gap: 10px;
}

.select-row label {
    min-width: 128px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 12px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.50);
}

.select-row label span {
    color: var(--muted);
    font-size: 11px;
}

.select-row select option {
    color: #0f172a;
}

.section-head,
.category-section-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.section-head span {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.5), transparent);
}

.section-head.orange span {
    background: linear-gradient(90deg, rgba(251, 146, 60, 0.55), transparent);
}

.section-head.green span {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.45), transparent);
}

.section-head.blue span {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.55), transparent);
}

.section-more {
    color: var(--cyan);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.12);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: var(--shadow);
}

.card-link {
    display: block;
    height: 100%;
}

.poster-frame {
    position: relative;
    margin: 0;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(37, 99, 235, 0.12)),
        #0f172a;
}

.poster-frame img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.large-card .poster-frame img {
    aspect-ratio: 21 / 9;
}

.movie-card:hover img,
.category-tile:hover img,
.rank-row:hover img {
    transform: scale(1.05);
    filter: saturate(1.12);
}

.poster-frame figcaption {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.poster-frame figcaption span,
.rank-badge {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.76);
    color: #cffafe;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.rank-badge {
    color: #111827;
    background: linear-gradient(135deg, #facc15, #fb923c);
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 700;
}

.card-body h3 {
    margin: 10px 0 8px;
    color: #fff;
    font-size: 18px;
    line-height: 1.3;
}

.card-body p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    padding: 3px 8px;
    font-size: 11px;
}

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

.category-tile {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
}

.category-image {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

.category-image img {
    width: 100%;
    height: 100%;
    min-height: 130px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-image span {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #cffafe;
    font-size: 12px;
    font-weight: 900;
}

.category-tile h3 {
    margin: 2px 0 8px;
    font-size: 24px;
}

.category-tile p {
    margin: 0 0 14px;
    color: #cbd5e1;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-links a {
    color: var(--cyan);
    font-size: 13px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 36px;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.13), transparent 22rem);
    pointer-events: none;
}

.page-hero p {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 14px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.category-section {
    padding: 24px;
}

.category-section-head {
    justify-content: space-between;
}

.rank-list {
    display: grid;
    gap: 0;
    padding: 8px;
}

.rank-row a {
    display: grid;
    grid-template-columns: 56px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(34, 211, 238, 0.08);
    border-radius: 16px;
    transition: background 0.2s ease;
}

.rank-row:last-child a {
    border-bottom: 0;
}

.rank-row a:hover {
    background: rgba(34, 211, 238, 0.08);
}

.rank-row b {
    color: var(--yellow);
    font-size: 22px;
    text-align: center;
}

.rank-row img {
    width: 96px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    object-fit: cover;
    background: #0f172a;
    transition: transform 0.25s ease;
}

.rank-row h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.rank-row p {
    margin: 0 0 5px;
    color: #cbd5e1;
}

.rank-row span,
.rank-row em {
    color: #93c5fd;
    font-size: 13px;
    font-style: normal;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
    color: #cbd5e1;
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-trigger.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-trigger span {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.48);
    font-size: 30px;
}

.play-trigger strong {
    margin-top: 104px;
    position: absolute;
    font-size: 18px;
}

.detail-card {
    margin-top: 24px;
    padding: 28px;
}

.detail-card h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.12;
}

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

.lead-text {
    color: #e0f2fe;
    font-size: 20px;
    font-weight: 700;
}

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

.detail-card p {
    color: #cbd5e1;
    font-size: 16px;
}

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

.detail-side {
    display: grid;
    align-content: start;
    gap: 18px;
}

.side-card {
    padding: 18px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    background: #0f172a;
    margin-bottom: 14px;
}

.side-card h3 {
    margin: 0 0 12px;
    font-size: 20px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px 12px;
    margin: 0;
}

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

.side-card dd {
    margin: 0;
    color: #fff;
    font-weight: 800;
}

.link-card {
    display: grid;
    gap: 10px;
}

.link-card a {
    padding: 9px 11px;
    border: 1px solid rgba(34, 211, 238, 0.16);
    border-radius: 12px;
    color: #cffafe;
    background: rgba(2, 6, 23, 0.42);
}

.empty-state {
    display: none;
    margin: 18px 0 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: #cbd5e1;
    background: var(--panel);
}

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

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

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

.footer-grid h3 {
    margin: 0 0 12px;
    color: var(--cyan);
}

.footer-grid p {
    color: #94a3b8;
}

.footer-grid a {
    display: block;
    margin: 7px 0;
    color: #cbd5e1;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #64748b;
    border-top: 1px solid rgba(34, 211, 238, 0.09);
    font-size: 13px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.45;
    }
}

@media (max-width: 1024px) {
    .desktop-nav,
    .live-dot {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content,
    .detail-layout,
    .search-section {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 360px;
    }

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

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

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

@media (max-width: 640px) {
    .header-inner {
        height: 64px;
    }

    .brand-copy em {
        display: none;
    }

    .hero-content {
        gap: 28px;
        padding: 42px 0 84px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .filter-panel,
    .select-row {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .movie-grid,
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .category-tile {
        grid-template-columns: 1fr;
    }

    .rank-row a {
        grid-template-columns: 42px 74px minmax(0, 1fr);
    }

    .rank-row em {
        display: none;
    }

    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}
