:root {
    color-scheme: dark;
    --bg-main: #020617;
    --bg-panel: #0f172a;
    --bg-card: #111827;
    --bg-soft: #1e293b;
    --text-main: #ffffff;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    --accent: #0ea5e9;
    --accent-strong: #0284c7;
    --accent-soft: rgba(14, 165, 233, 0.16);
    --gold: #f59e0b;
    --border: rgba(148, 163, 184, 0.18);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 30rem),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.10), transparent 28rem),
        var(--bg-main);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.site-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;
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-name {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 650;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.mobile-nav-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.mobile-nav-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.96);
    border: 1px solid var(--border);
}

.mobile-menu.open {
    display: grid;
    gap: 8px;
}

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

.hero-stage {
    position: relative;
    height: min(74vh, 760px);
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    filter: saturate(1.08) contrast(1.02);
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.20) 100%),
        linear-gradient(0deg, var(--bg-main) 0%, transparent 34%),
        radial-gradient(circle at 24% 36%, rgba(14, 165, 233, 0.28), transparent 26rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 760px;
    padding: 72px 0 138px;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 12px;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 13px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    max-width: 860px;
}

.hero-summary {
    max-width: 680px;
    margin: 24px 0 0;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.85;
}

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

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

.hero-tags span,
.movie-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: var(--text-soft);
    font-size: 12px;
}

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

.primary-button,
.ghost-button,
.rank-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 750;
    transition: 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 12px 34px rgba(14, 165, 233, 0.28);
}

.primary-button:hover,
.rank-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 42px rgba(14, 165, 233, 0.36);
}

.ghost-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.52);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    transition: 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(14, 165, 233, 0.88);
}

.hero-prev {
    left: max(24px, calc((100vw - 1180px) / 2 - 74px));
}

.hero-next {
    right: max(24px, calc((100vw - 1180px) / 2 - 74px));
}

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

.hero-dot {
    width: 32px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    transition: 0.2s ease;
}

.hero-dot.active {
    width: 54px;
    background: var(--accent);
}

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 28px;
    width: min(900px, calc(100% - 32px));
    display: flex;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    transform: translateX(-50%);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 15px;
    padding: 0 16px;
    outline: none;
    color: #fff;
    background: rgba(2, 6, 23, 0.56);
}

.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(14, 165, 233, 0.82);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.hero-search button {
    min-width: 110px;
    min-height: 48px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    background: var(--accent);
    font-weight: 800;
}

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

.inner-page {
    padding: 46px 0 72px;
}

.space-sections {
    padding: 72px 0;
}

.space-sections > * + * {
    margin-top: 68px;
}

.section-block {
    position: relative;
}

.panel-section,
.page-hero,
.detail-content,
.related-panel,
.player-shell,
.filter-panel {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.20);
}

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

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

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-content h2,
.related-panel h2 {
    margin: 0;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.section-heading a {
    color: var(--accent);
    font-weight: 750;
}

.movie-grid {
    display: grid;
    gap: 18px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.90);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

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

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 58%);
    opacity: 0.82;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(14, 165, 233, 0.88);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: 0.2s ease;
}

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

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

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

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

.movie-meta,
.movie-desc {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 40px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-tags {
    margin-top: 12px;
}

.movie-category {
    display: inline-flex;
    margin-top: 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 750;
}

.movie-card-large {
    display: grid;
    grid-template-columns: minmax(160px, 42%) minmax(0, 1fr);
}

.movie-card-large .movie-poster {
    height: 100%;
    min-height: 280px;
}

.movie-card-large .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 210px;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.08);
}

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
}

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

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

.category-card-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.35)),
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.28), transparent 22rem);
}

.category-card-content {
    position: absolute;
    inset: auto 0 0;
    padding: 22px;
}

.category-card strong {
    display: block;
    color: #fff;
    font-size: 24px;
    font-weight: 850;
}

.category-card em {
    display: block;
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 14px;
    font-style: normal;
    line-height: 1.7;
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.13);
    transition: 0.2s ease;
}

.rank-row:hover {
    border-color: rgba(14, 165, 233, 0.42);
    background: rgba(30, 41, 59, 0.90);
}

.rank-number {
    min-width: 42px;
    color: var(--gold);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-thumb {
    overflow: hidden;
    height: 62px;
    border-radius: 12px;
    background: #111827;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    display: inline-flex;
    color: #fff;
    font-weight: 800;
}

.rank-title:hover {
    color: var(--accent);
}

.rank-info p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.rank-action {
    min-height: 38px;
    color: #fff;
    background: var(--accent);
}

.page-hero {
    margin-bottom: 26px;
    padding: 36px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.18), transparent 24rem),
        rgba(15, 23, 42, 0.82);
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 54px);
}

.page-hero p:last-child {
    max-width: 760px;
    margin: 14px 0 0;
    color: var(--text-soft);
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 16px;
    border-radius: 22px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 750;
}

.detail-page {
    padding-top: 34px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
    margin-bottom: 28px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid var(--border);
    background: #111827;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 440px;
    object-fit: cover;
}

.detail-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.17), transparent 28rem),
        rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border);
}

.detail-copy h1 {
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.05;
}

.detail-meta {
    margin: 18px 0 0;
    color: var(--text-muted);
}

.detail-one-line {
    margin: 18px 0 0;
    max-width: 780px;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.85;
}

.detail-tags {
    margin: 24px 0 28px;
}

.player-section {
    margin-bottom: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.player-shell video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.30));
    cursor: pointer;
}

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

.player-play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.34);
    font-size: 30px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.detail-content,
.related-panel {
    border-radius: 26px;
    padding: 28px;
}

.detail-content section + section {
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.detail-content h2,
.related-panel h2 {
    font-size: 26px;
}

.detail-content p {
    margin: 14px 0 0;
    color: var(--text-soft);
    font-size: 16px;
    line-height: 2;
    white-space: pre-line;
}

.related-panel {
    position: sticky;
    top: 98px;
}

.related-grid {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 126px;
}

.movie-card-compact .movie-poster {
    height: 100%;
    aspect-ratio: auto;
}

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

.movie-card-compact .movie-desc,
.movie-card-compact .movie-tags,
.movie-card-compact .movie-category {
    display: none;
}

.movie-card-compact .movie-title {
    min-height: 42px;
    font-size: 14px;
}

.movie-card-compact .movie-meta {
    font-size: 12px;
}

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

@media (max-width: 1180px) {
    .hero-arrow {
        display: none;
    }

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

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

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

    .hero-stage {
        height: auto;
        min-height: 650px;
    }

    .hero-content {
        padding-top: 92px;
    }

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

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

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

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

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

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

    .related-panel {
        position: static;
    }
}

@media (max-width: 680px) {
    .site-header-inner {
        width: min(100% - 24px, 1180px);
        height: 66px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-name {
        font-size: 18px;
    }

    .hero {
        min-height: 700px;
    }

    .hero-content {
        width: min(100% - 28px, 1180px);
        padding-bottom: 180px;
    }

    .hero-summary {
        font-size: 15px;
    }

    .hero-actions {
        gap: 10px;
    }

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

    .hero-search {
        flex-direction: column;
    }

    .hero-dots {
        bottom: 170px;
    }

    .space-sections {
        padding-top: 44px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .movie-card-large {
        display: block;
    }

    .movie-card-large .movie-poster {
        min-height: 0;
    }

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

    .movie-title {
        min-height: 42px;
        font-size: 14px;
    }

    .movie-desc,
    .movie-tags,
    .movie-category {
        display: none;
    }

    .rank-row {
        grid-template-columns: 38px 78px minmax(0, 1fr);
    }

    .rank-action {
        display: none;
    }

    .page-hero,
    .detail-copy,
    .detail-content,
    .related-panel {
        padding: 22px;
        border-radius: 22px;
    }

    .detail-poster img {
        min-height: 0;
    }

    .player-shell {
        border-radius: 20px;
    }
}
