:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-light: #1e293b;
    --line: #1e293b;
    --text: #ffffff;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --cyan-light: #67e8f9;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34rem), 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;
    -webkit-font-smoothing: antialiased;
}

body.is-menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.45);
    font-size: 16px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 8px;
    flex: 1;
}

.nav-link {
    color: #cbd5e1;
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
}

.nav-link.is-active {
    color: var(--cyan-light);
}

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-search input,
.filter-input {
    width: 240px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    padding: 11px 14px;
    background: rgba(30, 41, 59, 0.85);
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search input:focus,
.filter-input:focus {
    border-color: rgba(6, 182, 212, 0.7);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
    background: rgba(15, 23, 42, 0.96);
}

.site-search button,
.primary-button,
.ghost-button,
.text-button {
    border: 0;
    border-radius: 12px;
    padding: 11px 18px;
    font-weight: 700;
    color: #ffffff;
    background: var(--blue);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.site-search button:hover,
.primary-button:hover,
.text-button:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 28px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.98);
    padding: 16px;
}

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

.mobile-search {
    display: flex;
}

.mobile-search input {
    width: 100%;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 44%, rgba(0, 0, 0, 0.22) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0) 38%);
}

.hero-content {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 720px;
    padding-top: 34px;
}

.hero-kicker,
.section-label {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 5px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.section-label {
    background: rgba(37, 99, 235, 0.2);
    color: var(--cyan-light);
    border: 1px solid rgba(103, 232, 249, 0.18);
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-one-line {
    max-width: 720px;
    margin: 0 0 10px;
    color: #e5e7eb;
    font-size: 20px;
}

.hero-summary {
    max-width: 680px;
    margin: 0 0 30px;
    color: #cbd5e1;
    font-size: 16px;
}

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

.ghost-button {
    background: rgba(30, 41, 59, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.ghost-button:hover {
    background: rgba(51, 65, 85, 0.92);
    transform: translateY(-1px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 32px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 18px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.7);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 36px;
    background: var(--blue);
}

.section-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.page-main .section-wrap:first-child {
    padding-top: 38px;
}

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

.section-head h2,
.page-hero h1,
.detail-panel h1 {
    margin: 10px 0 0;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
}

.section-head.compact {
    margin-bottom: 18px;
}

.section-head.compact h2 {
    font-size: 28px;
}

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

.text-button {
    display: inline-flex;
    margin-top: 18px;
    padding: 10px 16px;
    color: #ffffff;
}

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

.category-tile {
    position: relative;
    min-height: 154px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 18px;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.category-tile::before,
.category-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.92));
}

.category-tile span,
.category-tile p {
    position: relative;
}

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: #d1d5db;
    font-size: 13px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

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

.movie-card {
    min-width: 0;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    background: var(--panel-light);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

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

.poster-link:hover img {
    transform: scale(1.1);
    filter: brightness(0.72);
}

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.84));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.poster-link:hover .poster-glow {
    opacity: 1;
}

.play-chip,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
}

.play-chip {
    left: 50%;
    bottom: 16px;
    width: 64px;
    height: 34px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    transform: translate(-50%, 16px);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-link:hover .play-chip {
    opacity: 1;
    transform: translate(-50%, 0);
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 12px 22px rgba(239, 68, 68, 0.35);
}

.card-body {
    padding: 11px 2px 0;
}

.card-body h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 800;
}

.card-body h3 a:hover {
    color: #60a5fa;
}

.card-meta,
.card-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
    -webkit-line-clamp: 1;
}

.card-desc {
    min-height: 40px;
    margin: 5px 0 0;
    color: #9ca3af;
    font-size: 13px;
    -webkit-line-clamp: 2;
}

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

.tag-row span,
.detail-tags a {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.9);
    color: #cbd5e1;
    font-size: 12px;
}

.side-panel,
.info-card,
.detail-panel,
.player-card,
.category-card-large {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow);
}

.side-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 34px 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.62);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: rgba(51, 65, 85, 0.9);
    transform: translateX(3px);
}

.rank-row img {
    width: 48px;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-number {
    color: var(--cyan-light);
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.rank-text {
    min-width: 0;
}

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.page-main {
    min-height: 68vh;
}

.page-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0 8px;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.filter-bar {
    margin-top: 24px;
}

.filter-bar.wide .filter-input,
.filter-bar .filter-input {
    width: min(100%, 620px);
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
}

.category-cover {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 16px;
    background-position: center;
    background-size: cover;
}

.category-card-large h2 {
    margin: 4px 0 8px;
    font-size: 26px;
}

.category-card-large p {
    margin: 0;
    color: #cbd5e1;
}

.sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.sample-links a {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.9);
    color: #d1d5db;
    font-size: 13px;
}

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

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

.detail-wrap {
    padding-top: 32px;
}

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

.player-card {
    overflow: hidden;
    background: #000000;
}

.player-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.46));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 24px 54px rgba(6, 182, 212, 0.38);
    font-size: 42px;
    padding-left: 6px;
    transition: transform 0.2s ease;
}

.player-overlay:hover .play-circle {
    transform: scale(1.08);
}

.detail-panel {
    margin-top: 20px;
    padding: 26px;
}

.detail-panel h1 {
    margin-top: 12px;
}

.detail-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
    color: #cbd5e1;
}

.detail-meta-line span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.95);
}

.lead-text {
    color: #f1f5f9;
    font-size: 18px;
}

.detail-panel section {
    margin-top: 24px;
}

.detail-panel h2,
.info-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.detail-panel p,
.movie-info-list dd {
    color: #cbd5e1;
}

.info-column {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.info-card {
    padding: 18px;
}

.poster-card {
    padding: 0;
    overflow: hidden;
}

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

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

.movie-info-list dt {
    color: var(--muted);
    font-size: 13px;
}

.movie-info-list dd {
    margin: 2px 0 0;
    font-weight: 700;
}

.rank-list.slim .rank-row {
    grid-template-columns: 30px minmax(0, 1fr);
}

.rank-list.slim .rank-row img {
    display: none;
}

.is-filtered-out {
    display: none !important;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.92);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
}

.footer-inner p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-content: start;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: var(--cyan-light);
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--muted);
    font-size: 14px;
}

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

    .site-search {
        margin-left: auto;
    }

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

    .split-section,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .side-panel,
    .info-column {
        position: static;
    }
}

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

    .header-inner > .site-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

    .hero-carousel {
        height: 560px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 42px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .category-cover {
        min-height: 260px;
    }

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

@media (max-width: 540px) {
    .header-inner,
    .section-wrap,
    .page-hero,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1280px);
    }

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

    .hero-carousel {
        height: 520px;
    }

    .hero-content {
        width: min(100% - 28px, 1280px);
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 34px;
    }

    .hero-one-line {
        font-size: 17px;
    }

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

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

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

    .card-desc,
    .tag-row {
        display: none;
    }

    .detail-panel,
    .info-card,
    .side-panel {
        padding: 18px;
    }

    .play-circle {
        width: 74px;
        height: 74px;
        font-size: 34px;
    }
}
