:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --line: #cbd5e1;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --dark: #0f172a;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img {
    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: 100;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(203, 213, 225, 0.8);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 21px;
    color: #0f172a;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.32);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    color: #475569;
    border-radius: 12px;
    font-weight: 600;
    transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: #ffffff;
    background: var(--primary);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #eff6ff;
    padding: 10px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #1e293b;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--soft);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

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

.hero-section {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.35), transparent 32%),
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.30), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #0f172a 100%);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    background-size: 42px 42px;
}

.hero-shell {
    position: relative;
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 38px;
    align-items: center;
    min-height: 620px;
    padding: 76px 0;
}

.hero-title-block h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    background: linear-gradient(90deg, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-title-block p {
    max-width: 620px;
    margin: 0 0 28px;
    color: #cbd5e1;
    font-size: 19px;
}

.hero-search {
    display: flex;
    max-width: 580px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.hero-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 12px 14px;
}

.hero-search input::placeholder {
    color: #cbd5e1;
}

.hero-search button {
    border: 0;
    cursor: pointer;
    padding: 12px 22px;
    color: #ffffff;
    background: var(--primary);
    border-radius: 13px;
    font-weight: 700;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-pills a {
    padding: 8px 12px;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-pills a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.hero-carousel {
    position: relative;
    min-height: 430px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.42);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 24px;
    align-items: center;
    padding: 34px;
    opacity: 0;
    transform: translateX(18px);
    pointer-events: none;
    transition: 0.45s ease;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 10px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(147, 197, 253, 0.28);
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}

.hero-copy h2 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.12;
}

.hero-copy p {
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 17px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-glass {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.20);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.18);
}

.btn.full {
    width: 100%;
    margin-top: 18px;
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.hero-poster img,
.movie-card img,
.ranking-cover img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    left: 34px;
    bottom: 24px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

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

.feature-strip {
    padding: 34px 0;
    background: #ffffff;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-grid article {
    padding: 24px;
    border: 1px solid var(--soft);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

.feature-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-weight: 800;
    font-size: 19px;
}

.feature-grid p {
    margin: 0;
    color: var(--muted);
}

.section-block {
    padding: 72px 0;
}

.section-muted {
    background: #f1f5f9;
}

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

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

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

.inline-head {
    margin-bottom: 18px;
}

.text-link {
    color: var(--primary);
    font-weight: 800;
}

.text-link:hover {
    color: var(--primary-dark);
}

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

.category-card,
.category-overview {
    display: block;
    padding: 24px;
    border: 1px solid var(--soft);
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
    transition: 0.2s ease;
}

.category-card:hover,
.category-overview:hover {
    border-color: #93c5fd;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    transform: translateY(-3px);
}

.category-card span,
.category-overview span {
    display: block;
    font-size: 20px;
    font-weight: 800;
}

.category-card strong,
.category-overview strong {
    display: block;
    margin: 8px 0;
    color: var(--primary);
    font-size: 30px;
}

.category-card em,
.category-overview p {
    color: var(--muted);
    font-style: normal;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--soft);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

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

.poster-link img {
    transition: transform 0.28s ease;
}

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

.poster-play {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.rank-mark {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.70);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

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

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta span,
.detail-meta span {
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: 999px;
}

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

.movie-card h3 a:hover,
.ranking-body h2 a:hover {
    color: var(--primary);
}

.movie-card p {
    margin: 0 0 12px;
    min-height: 58px;
    color: var(--muted);
    font-size: 14px;
}

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

.tag-row span {
    padding: 5px 9px;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.tag-row.large span {
    font-size: 13px;
}

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

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
    border: 1px solid var(--soft);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
    transition: 0.2s ease;
}

.rank-row:hover {
    background: #eff6ff;
}

.rank-row span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: var(--primary);
    border-radius: 12px;
    font-weight: 900;
}

.rank-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.page-hero {
    color: #ffffff;
    padding: 84px 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.30), transparent 30%),
        linear-gradient(135deg, #0f172a, #1e3a8a);
}

.page-hero h1 {
    max-width: 900px;
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

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

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    max-width: 760px;
    margin-top: 28px;
}

.filter-bar.wide {
    max-width: 980px;
}

.filter-bar input,
.filter-bar select {
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    padding: 0 16px;
    outline: 0;
}

.filter-bar input {
    flex: 1;
    min-width: 240px;
}

.filter-bar select {
    min-width: 180px;
    color: #0f172a;
    background: #ffffff;
}

.filter-bar input::placeholder {
    color: #cbd5e1;
}

[data-result-count] {
    color: #dbeafe;
    font-weight: 700;
}

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

.category-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ranking-list {
    display: grid;
    gap: 18px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 112px 58px 1fr;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--soft);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.ranking-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: #e2e8f0;
}

.ranking-number {
    color: var(--primary);
    font-size: 34px;
    font-weight: 900;
    text-align: center;
}

.ranking-body h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.ranking-body p {
    margin: 0 0 12px;
    color: var(--muted);
}

.detail-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.32), transparent 32%),
        linear-gradient(135deg, #0f172a, #172554 70%, #0f172a);
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 36px;
    align-items: center;
    padding: 72px 0;
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

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

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-copy h1 {
    max-width: 860px;
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.lead-text {
    max-width: 760px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 19px;
}

.detail-meta span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.10);
}

.detail-copy .btn {
    margin-top: 24px;
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.player-box video {
    width: 100%;
    height: 100%;
    background: #000000;
    cursor: pointer;
}

.player-trigger {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.60));
    cursor: pointer;
    transition: 0.2s ease;
}

.player-trigger span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.42);
    font-size: 32px;
}

.player-trigger:hover span {
    transform: scale(1.06);
}

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

.player-state {
    position: absolute;
    left: 18px;
    bottom: 16px;
    padding: 7px 11px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.62);
    border-radius: 999px;
    font-size: 13px;
    pointer-events: none;
}

.player-info {
    padding: 24px;
    border: 1px solid var(--soft);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-info h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.player-info p {
    margin: 0;
    color: var(--muted);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.detail-panel {
    padding: 28px;
    border: 1px solid var(--soft);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.detail-panel h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.detail-panel p {
    margin: 0;
    color: #334155;
    font-size: 17px;
}

.empty-state {
    display: none;
    width: min(680px, calc(100% - 32px));
    margin: 24px auto 0;
    padding: 28px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 20px;
    background: #ffffff;
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.footer-brand {
    color: #ffffff;
}

.site-footer p {
    max-width: 420px;
    color: #94a3b8;
}

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

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    padding: 18px;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 1080px) {
    .hero-shell,
    .split-layout,
    .player-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

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

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

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

    .nav-toggle {
        display: block;
    }

    .hero-shell {
        min-height: auto;
        padding: 54px 0;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        position: relative;
        display: none;
        padding: 24px;
    }

    .hero-slide.is-active {
        display: grid;
    }

    .hero-carousel {
        min-height: auto;
    }

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

    .hero-dots {
        position: static;
        padding: 0 24px 22px;
    }

    .feature-grid,
    .category-overview-grid,
    .footer-grid,
    .detail-content-grid,
    .detail-hero-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-card {
        grid-template-columns: 86px 42px 1fr;
        gap: 12px;
    }

    .ranking-number {
        font-size: 26px;
    }

    .detail-cover {
        max-width: 240px;
    }
}

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

    .hero-search,
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search button,
    .filter-bar input,
    .filter-bar select {
        width: 100%;
    }

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

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

    .ranking-card {
        grid-template-columns: 78px 1fr;
    }

    .ranking-number {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        align-self: start;
        color: #ffffff;
        background: var(--primary);
        border-radius: 12px;
        font-size: 18px;
    }

    .ranking-body {
        grid-column: 1 / -1;
    }

    .player-trigger span {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
