:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --gold: #facc15;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --radius: 22px;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #0f172a, #1e293b 45%, #0f172a);
    color: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.26);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.38);
}

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

.main-nav a {
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #93c5fd;
}

.nav-search {
    display: flex;
    align-items: center;
    min-width: 300px;
}

.nav-search input {
    width: 100%;
    border: 0;
    color: #fff;
    background: rgba(51, 65, 85, 0.86);
    padding: 10px 15px;
    border-radius: 999px 0 0 999px;
    outline: none;
}

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

.nav-search button {
    border: 0;
    color: #fff;
    background: var(--brand);
    padding: 10px 17px;
    border-radius: 0 999px 999px 0;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.52), transparent 35%), linear-gradient(135deg, #0f172a, #1e3a8a 52%, #0f172a);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg,
.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
}

.image-fail {
    opacity: 0 !important;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.48) 52%, rgba(15, 23, 42, 0.25));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--gold);
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 14px;
    margin-bottom: 12px;
}

.eyebrow.dark {
    color: var(--brand);
}

.hero-content h1 {
    max-width: 860px;
    margin: 0 0 20px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: 20px;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    font-size: 14px;
}

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

.primary-btn,
.glass-btn,
.outline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
}

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

.glass-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.outline-btn {
    color: var(--brand);
    background: #fff;
    border: 1px solid var(--line);
}

.outline-btn:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
}

.hero-dot.active {
    background: #fff;
}

.section {
    padding: 64px 0;
}

.intro-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: -36px;
    position: relative;
    z-index: 6;
    background: #fff;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.intro-band h2,
.section-head h2,
.page-hero h1,
.content-card h2 {
    margin: 0;
}

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

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

.section-head h2 {
    font-size: 32px;
    line-height: 1.15;
}

.section-head a,
.text-link {
    color: var(--brand);
    font-weight: 800;
}

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

.category-panel,
.category-card {
    color: #fff;
    min-height: 168px;
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.category-panel::after,
.category-card::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    right: -40px;
    bottom: -70px;
    background: rgba(255, 255, 255, 0.15);
}

.tone-0 { background: linear-gradient(135deg, #ef4444, #e11d48); }
.tone-1 { background: linear-gradient(135deg, #f97316, #dc2626); }
.tone-2 { background: linear-gradient(135deg, #2563eb, #0891b2); }
.tone-3 { background: linear-gradient(135deg, #7c3aed, #2563eb); }
.tone-4 { background: linear-gradient(135deg, #db2777, #9333ea); }

.category-icon {
    display: block;
    font-size: 36px;
    margin-bottom: 8px;
}

.category-panel strong,
.category-card-title strong {
    display: block;
    font-size: 22px;
    margin-bottom: 8px;
}

.category-panel em,
.category-card p {
    display: block;
    color: rgba(255, 255, 255, 0.86);
    font-style: normal;
    margin: 0 0 18px;
}

.category-panel b {
    color: #fff;
    font-size: 14px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: radial-gradient(circle at top, #334155, #0f172a);
}

.poster-wrap img,
.mini-card img,
.rank-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), transparent 48%);
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(37, 99, 235, 0.86);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
}

.year-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    color: #fff;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.72);
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

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

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

.movie-card .tag-row span,
.detail-tags span {
    color: #2563eb;
    background: #dbeafe;
    backdrop-filter: none;
}

.rank-box,
.content-card,
.player-card,
.category-card {
    background: #fff;
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.rank-box {
    padding: 22px;
    position: sticky;
    top: 92px;
}

.rank-box ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-box li + li {
    border-top: 1px solid var(--line);
}

.rank-box a {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    padding: 14px 0;
}

.rank-no {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--brand);
    font-weight: 900;
}

.rank-box strong,
.rank-box em {
    display: block;
}

.rank-box em,
.mini-card em,
.rank-card span {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-main {
    padding: 36px 0 70px;
}

.page-hero {
    padding: 56px;
    border-radius: 30px;
    color: #fff;
    background: radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.55), transparent 36%), linear-gradient(135deg, #0f172a, #1e3a8a 58%, #0f172a);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 740px;
    color: #dbeafe;
    font-size: 18px;
}

.crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin: 0 0 18px;
}

.crumb.dark {
    color: rgba(255, 255, 255, 0.76);
}

.crumb a {
    color: var(--brand);
    font-weight: 800;
}

.crumb.dark a {
    color: #bfdbfe;
}

.filter-bar {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    background: #fff;
    outline: none;
}

.filter-bar input {
    flex: 1;
}

.filter-hidden {
    display: none !important;
}

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

.category-card {
    min-height: auto;
}

.category-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.mini-list {
    display: grid;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.mini-card {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    align-items: center;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 8px;
}

.mini-card img {
    height: 76px;
    border-radius: 12px;
    background: #0f172a;
}

.mini-card strong {
    display: block;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
    align-items: center;
    background: #fff;
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.rank-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

.rank-cover b {
    position: absolute;
    left: 8px;
    top: 8px;
    color: #fff;
    background: var(--brand);
    border-radius: 10px;
    padding: 5px 8px;
}

.rank-card h2 {
    margin: 0 0 8px;
}

.rank-card p {
    color: var(--muted);
    margin: 0 0 10px;
}

.detail-main {
    background: #f8fafc;
}

.detail-hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: radial-gradient(circle at top left, #1d4ed8, #0f172a 60%);
    color: #fff;
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.35));
}

.detail-inner {
    position: relative;
    z-index: 2;
    padding: 42px 0 72px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.04;
}

.detail-copy .lead {
    max-width: 760px;
    color: #dbeafe;
    font-size: 20px;
}

.player-section {
    margin-top: -86px;
    position: relative;
    z-index: 5;
}

.player-card {
    position: relative;
    overflow: hidden;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.video-player {
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-mask {
    position: absolute;
    inset: 0;
    z-index: 4;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25), rgba(2, 6, 23, 0.82));
    display: grid;
    place-items: center;
    gap: 12px;
    align-content: center;
}

.play-mask span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.45);
    font-size: 30px;
}

.play-mask strong {
    font-size: 22px;
}

.player-card.playing .play-mask {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    padding: 36px 0 74px;
}

.content-card {
    padding: 28px;
}

.content-card p {
    color: #334155;
    margin-bottom: 0;
}

.related-box {
    grid-row: span 2;
}

.site-footer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 42px 0 28px;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-grid p {
    color: #94a3b8;
    max-width: 520px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    color: #64748b;
}

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

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

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

    .rank-box {
        position: static;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
    }

    .main-nav.open {
        display: flex;
    }

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

    .intro-band,
    .section-head,
    .filter-bar,
    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
    }

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

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

    .detail-poster {
        width: min(280px, 100%);
    }
}

@media (max-width: 560px) {
    .brand-text {
        font-size: 18px;
    }

    .hero-content h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .hero-content p,
    .detail-copy .lead {
        font-size: 17px;
    }

    .page-hero {
        padding: 34px 22px;
    }

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

    .rank-card {
        grid-template-columns: 92px 1fr;
    }

    .detail-content,
    .content-card {
        padding-left: 18px;
        padding-right: 18px;
    }
}
