:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-light: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --indigo: #6366f1;
    --pink: #ec4899;
    --gold: #f59e0b;
    --radius: 18px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
    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 30%),
        radial-gradient(circle at 80% 6%, rgba(99, 102, 241, 0.18), transparent 35%),
        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;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--indigo));
    color: white;
    box-shadow: 0 10px 28px rgba(34, 211, 238, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.desktop-nav a {
    padding: 9px 14px;
    color: #cbd5e1;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: white;
    background: rgba(34, 211, 238, 0.14);
}

.header-search {
    display: flex;
    align-items: center;
    width: 310px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--line);
}

.header-search input,
.mobile-panel input,
.filter-input,
.filter-select {
    width: 100%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--line);
    outline: none;
}

.header-search input {
    height: 40px;
    padding: 0 14px;
    border: 0;
}

.header-search button,
.mobile-panel button,
.primary-btn,
.ghost-btn {
    border: 0;
    color: white;
    cursor: pointer;
    background: linear-gradient(135deg, var(--cyan-strong), var(--indigo));
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.header-search button {
    height: 40px;
    padding: 0 16px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
}

.ghost-btn {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-btn:hover,
.ghost-btn:hover,
.header-search button:hover,
.mobile-panel button:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.92);
    color: white;
}

.mobile-panel {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 0 0 20px 20px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-panel form {
    display: flex;
    gap: 10px;
}

.mobile-panel input {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
}

.mobile-panel button {
    padding: 0 18px;
    border-radius: 999px;
}

.mobile-panel nav {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.mobile-panel a {
    padding: 10px 12px;
    color: #cbd5e1;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.65);
}

.hero-carousel {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.3)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1240px, calc(100% - 32px));
    min-height: 660px;
    margin: 0 auto;
    padding-top: 96px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) 360px;
    align-items: center;
    gap: 56px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 12px;
    color: #a5f3fc;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.13);
}

.hero-content h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(44px, 7vw, 84px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

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

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

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #cffafe;
    font-size: 13px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-score {
    position: absolute;
    right: 16px;
    top: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.76);
    color: #fef3c7;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.hero-arrows {
    position: absolute;
    z-index: 4;
    right: max(24px, calc((100vw - 1240px) / 2));
    bottom: 42px;
    display: flex;
    gap: 12px;
}

.hero-arrows button {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.72);
    color: white;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
}

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

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

.section {
    padding: 64px 0 0;
}

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

.section-head h2,
.page-head h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.page-head p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.38);
    background: rgba(30, 41, 59, 0.92);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.92);
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.play-dot,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.play-dot {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: white;
    background: rgba(6, 182, 212, 0.86);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 34px;
    padding: 0 10px;
    color: #fff7ed;
    font-style: normal;
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #eab308);
}

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

.movie-card h3 {
    margin: 0 0 7px;
    color: white;
    font-size: 18px;
    line-height: 1.34;
}

.movie-card-small h3 {
    font-size: 15px;
}

.movie-meta,
.movie-brief {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-brief {
    margin-top: 8px;
    min-height: 44px;
}

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

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

.category-card {
    position: relative;
    min-height: 170px;
    padding: 22px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.2), transparent 38%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.88));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.36);
}

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

.category-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
}

.page-shell {
    padding-top: 54px;
}

.page-head {
    align-items: start;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.18), transparent 34%),
        rgba(15, 23, 42, 0.82);
}

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

.filter-input,
.filter-select {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #67e8f9;
}

.detail-shell {
    padding-top: 36px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    align-items: start;
}

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

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: white;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
}

.player-overlay span {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    font-size: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan-strong), var(--indigo));
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.36);
}

.player-overlay.is-hidden {
    display: none;
}

.detail-title {
    padding: 26px 0 8px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    margin-top: 30px;
}

.prose-card,
.side-card {
    padding: 26px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
}

.prose-card + .prose-card,
.side-card + .side-card {
    margin-top: 18px;
}

.prose-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.prose-card p,
.side-card p {
    margin: 0;
    color: #d1d5db;
    white-space: pre-line;
}

.info-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    color: #cbd5e1;
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    text-align: right;
}

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

.related-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.58);
    transition: background 0.2s ease;
}

.related-item:hover {
    background: rgba(30, 41, 59, 0.92);
}

.related-item img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.related-item strong {
    display: block;
    line-height: 1.35;
}

.related-item span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.empty-tip {
    display: none;
    padding: 28px;
    color: #cbd5e1;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.86);
}

.site-footer {
    width: min(1240px, calc(100% - 32px));
    margin: 80px auto 0;
    padding: 36px 0 24px;
    border-top: 1px solid var(--line);
}

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

.site-footer p {
    color: var(--muted);
}

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

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

.footer-links a {
    padding: 7px 10px;
    color: #cbd5e1;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.72);
}

.copyright {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    text-align: center;
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero-poster,
    .detail-poster {
        max-width: 320px;
    }

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

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

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

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

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

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

    .hero-content {
        padding-top: 72px;
        gap: 24px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-poster {
        display: none;
    }

    .hero-arrows {
        right: 16px;
        bottom: 22px;
    }

    .hero-dots {
        bottom: 28px;
        left: 24px;
        transform: none;
    }

    .section {
        padding-top: 46px;
    }

    .section-head,
    .page-head {
        display: block;
    }

    .page-head {
        padding: 24px;
    }

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

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

    .movie-brief,
    .tag-row {
        display: none;
    }

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

    .detail-title {
        padding-top: 18px;
    }

    .prose-card,
    .side-card {
        padding: 20px;
    }
}
