:root {
    color-scheme: light;
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #7c3aed;
    --orange: #f97316;
    --green: #16a34a;
    --danger: #ef4444;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

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

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(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: var(--text);
}

.logo-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.32);
}

.logo-text {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.desktop-nav,
.mobile-nav {
    align-items: center;
    gap: 8px;
}

.desktop-nav {
    display: flex;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #475569;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: #eff6ff;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #eff6ff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--primary);
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    flex-direction: column;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 22%, rgba(124, 58, 237, 0.34), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.78) 46%, rgba(2, 6, 23, 0.42) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: 680px;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 60px;
    color: #ffffff;
}

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

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.18);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 640px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 20px;
}

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

.hero-tags {
    margin: 28px 0;
}

.hero-tags span,
.movie-tags span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 700;
}

.hero-tags span {
    padding: 8px 13px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.hero-actions,
.detail-title-row,
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.28);
}

.btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.btn-ghost.dark {
    color: var(--primary);
    border-color: #bfdbfe;
    background: #eff6ff;
}

.hero-poster {
    display: block;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    right: 50%;
    bottom: 38px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(50%);
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 30px;
    background: #ffffff;
}

.search-panel,
.filter-panel {
    position: relative;
    z-index: 5;
    margin-top: -42px;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.global-search label,
.filter-grid label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 800;
}

.global-search > div,
.filter-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.filter-grid {
    grid-template-columns: 1.4fr 0.7fr 0.8fr;
}

.search-filter-grid {
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
}

input,
select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.section-block,
.category-strip {
    padding: 64px 0 0;
}

.section-head {
    margin-bottom: 26px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-head p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    color: var(--primary);
    font-weight: 900;
}

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

.dense-grid,
.mini-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: #bfdbfe;
    box-shadow: var(--shadow);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent);
}

.score-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.movie-info {
    padding: 16px;
}

.movie-tags {
    margin-bottom: 10px;
}

.movie-tags span {
    padding: 4px 8px;
    color: var(--primary);
    background: #eff6ff;
    font-size: 12px;
}

.movie-card h3 {
    margin: 0 0 8px;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.32;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile,
.category-overview-card a {
    display: grid;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile {
    gap: 8px;
    padding: 22px;
}

.category-tile:hover,
.category-overview-card a:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-tile strong {
    color: var(--text);
    font-size: 20px;
}

.category-tile span {
    color: var(--primary);
    font-weight: 900;
}

.category-tile em {
    color: var(--muted);
    font-style: normal;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 46px 58px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: #bfdbfe;
}

.rank-row img {
    width: 58px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-number {
    color: var(--orange);
    font-size: 20px;
    font-weight: 900;
}

.rank-body {
    display: grid;
    min-width: 0;
}

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

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

.rank-score {
    color: var(--primary);
    font-weight: 900;
    text-align: right;
}

.page-hero {
    padding: 86px 0 96px;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.45), transparent 32%),
        radial-gradient(circle at 85% 0%, rgba(124, 58, 237, 0.45), transparent 28%),
        linear-gradient(135deg, #020617, #1e3a8a 55%, #111827);
}

.compact-hero {
    padding-bottom: 120px;
}

.category-hero,
.ranking-hero {
    position: relative;
    overflow: hidden;
}

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

.category-overview-card {
    overflow: hidden;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 10px;
    background: #0f172a;
}

.category-cover-stack img {
    aspect-ratio: 2 / 3;
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.category-overview-body {
    padding: 20px;
}

.category-overview-body span {
    color: var(--primary);
    font-weight: 900;
}

.category-overview-body h2 {
    margin: 8px 0;
}

.category-overview-body p {
    margin: 0;
    color: var(--muted);
}

.detail-wrap {
    padding: 26px 0 0;
}

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

.breadcrumb a {
    color: var(--primary);
    font-weight: 800;
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
}

.player-card,
.detail-card,
.side-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

.video-shell {
    position: relative;
    background: #000000;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(0, 0, 0, 0.52));
    cursor: pointer;
}

.play-layer.is-hidden {
    display: none;
}

.play-layer span {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.9);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
    font-size: 34px;
}

.detail-card,
.side-card {
    padding: 24px;
}

.detail-card h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

.detail-card p {
    color: #334155;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #1e40af;
    background: #eff6ff;
    font-weight: 800;
}

.one-line {
    padding: 18px;
    border-left: 4px solid var(--primary);
    border-radius: 16px;
    background: #f8fafc;
    font-weight: 700;
}

.tag-cloud {
    margin-top: 18px;
}

.tag-cloud span {
    padding: 7px 11px;
    color: #475569;
    background: #f1f5f9;
}

.poster-side img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    margin-bottom: 18px;
}

.compact-rank .rank-row {
    grid-template-columns: 34px 44px minmax(0, 1fr);
}

.compact-rank .rank-row img {
    width: 44px;
    height: 58px;
}

.compact-rank .rank-score {
    display: none;
}

.result-count,
.empty-state {
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 800;
}

.empty-state {
    padding: 32px;
    border: 1px dashed #bfdbfe;
    border-radius: var(--radius);
    background: #eff6ff;
    color: var(--primary);
    text-align: center;
}

.site-footer {
    margin-top: 74px;
    padding: 46px 0;
    color: #cbd5e1;
    background: #020617;
}

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

.footer-logo {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

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

@media (max-width: 1080px) {
    .movie-grid,
    .dense-grid,
    .mini-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

    .menu-toggle {
        display: block;
    }

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

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 48px;
        padding-bottom: 96px;
    }

    .hero-poster {
        width: min(260px, 76vw);
        transform: none;
    }

    .global-search > div,
    .filter-grid,
    .search-filter-grid,
    .two-column,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-head,
    .detail-title-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

    .movie-info {
        padding: 12px;
    }

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

    .movie-card p {
        display: none;
    }

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

    .rank-score {
        display: none;
    }

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