:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #dc2626;
    --brand-dark: #991b1b;
    --brand-soft: #fee2e2;
    --slate: #111827;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
    --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

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

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

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, #0f172a, #1e293b 58%, #7f1d1d);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.26);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.35);
    font-size: 15px;
}

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

.nav-links a {
    color: #e5e7eb;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(239, 68, 68, 0.92);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    color: #fff;
    font-size: 24px;
    border: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 8px 12px;
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    filter: blur(2px) saturate(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 30%, rgba(220, 38, 38, 0.35), transparent 36%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.74) 48%, rgba(127, 29, 29, 0.72));
}

.hero-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 64px;
    padding: 72px 0;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--brand);
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 13px;
    margin-bottom: 12px;
}

.hero-copy h1 {
    max-width: 820px;
    margin: 0 0 20px;
    color: #fff;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.75;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    color: #991b1b;
    background: #fee2e2;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 16px 34px rgba(220, 38, 38, 0.35);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #991b1b);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

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

.poster img.is-hidden,
.hero-poster img.is-hidden,
.detail-poster img.is-hidden {
    opacity: 0;
}

.poster::after,
.hero-poster::after,
.detail-poster::after {
    content: attr(data-title);
    position: absolute;
    inset: auto 14px 14px;
    z-index: 1;
    color: #fff;
    font-weight: 900;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.poster::before,
.hero-poster::before,
.detail-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 44%, rgba(2, 6, 23, 0.82));
    z-index: 1;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

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

.hero-dot.is-active {
    width: 34px;
    background: #ef4444;
}

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

.section.light {
    width: 100%;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: #fff;
}

.section.dark-band {
    width: 100%;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    color: #fff;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

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

.section-head h2,
.taxonomy-block h2,
.rank-panel h2,
.detail-article h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-head.inverse h2,
.section-head.inverse .section-kicker {
    color: #fff;
}

.text-link {
    color: var(--brand);
    font-weight: 900;
}

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

.quick-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82px;
    border: 1px solid var(--line);
    border-radius: 22px;
    color: #1e293b;
    background: linear-gradient(180deg, #fff, #f8fafc);
    font-weight: 900;
    box-shadow: var(--soft-shadow);
}

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

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

.movie-card {
    min-width: 0;
    border-radius: 22px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #991b1b);
}

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

.card-body {
    padding: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3 {
    min-height: 46px;
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card p {
    min-height: 60px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.card-tags span {
    padding: 4px 8px;
    font-size: 11px;
}

.rank-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 12px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}

.rank-no {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #ef4444;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 900;
}

.rank-meta {
    color: #fecaca;
    font-size: 13px;
}

.taxonomy-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.taxonomy-showcase > div {
    padding: 24px;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.taxonomy-showcase h3 {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 900;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-list a {
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 900;
}

.page-hero {
    padding: 96px max(16px, calc((100% - 1180px) / 2));
    color: #fff;
    background:
        radial-gradient(circle at 74% 22%, rgba(239, 68, 68, 0.38), transparent 32%),
        linear-gradient(135deg, #0f172a, #1e293b 58%, #7f1d1d);
}

.page-hero.slim {
    padding-top: 70px;
    padding-bottom: 70px;
}

.page-hero h1 {
    max-width: 900px;
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.75;
}

.filters {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 30px;
    padding: 18px;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.filters.single {
    grid-template-columns: minmax(260px, 560px);
}

.filters label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-weight: 900;
}

.filters input,
.filters select {
    width: 100%;
    height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0 14px;
    color: #0f172a;
    background: #fff;
    outline: none;
}

.filters input:focus,
.filters select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.catalog-grid .movie-card.is-hidden {
    display: none;
}

.taxonomy-page {
    display: grid;
    gap: 54px;
}

.taxonomy-block h2 {
    margin-bottom: 18px;
}

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

.category-chip {
    display: grid;
    gap: 8px;
    min-height: 112px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, #f8fafc);
    box-shadow: var(--soft-shadow);
}

.category-chip strong {
    color: var(--ink);
    font-size: 18px;
}

.category-chip span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

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

.rank-panel {
    padding: 24px;
    border-radius: 26px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.rank-panel h2 {
    margin-bottom: 18px;
    font-size: 26px;
}

.rank-panel .rank-item {
    grid-template-columns: 38px minmax(0, 1fr);
    margin-bottom: 10px;
    background: #f8fafc;
    color: var(--ink);
}

.rank-panel .rank-meta {
    display: none;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(8px) saturate(1.1);
    transform: scale(1.08);
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.72)),
        radial-gradient(circle at 80% 30%, rgba(220, 38, 38, 0.32), transparent 34%);
}

.detail-wrap {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    padding: 70px 0;
}

.detail-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #7f1d1d);
    box-shadow: 0 30px 80px rgba(0,0,0,0.42);
}

.breadcrumb {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    color: #fecaca;
    font-weight: 800;
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.05em;
}

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

.detail-meta span {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-weight: 800;
}

.lead {
    max-width: 860px;
    color: #e2e8f0;
    font-size: 19px;
    line-height: 1.85;
}

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

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 34px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    border: 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(220, 38, 38, 0.35), transparent 32%),
        linear-gradient(135deg, rgba(2,6,23,0.38), rgba(2,6,23,0.86));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    box-shadow: 0 18px 44px rgba(220, 38, 38, 0.42);
    font-size: 28px;
}

.player-cover strong {
    max-width: 80%;
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 900;
    text-align: center;
}

.player-cover em {
    color: #fecaca;
    font-style: normal;
    font-weight: 900;
}

.detail-article {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.detail-article h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.detail-article p {
    margin: 0 0 24px;
    color: #334155;
    font-size: 16px;
    line-height: 1.9;
}

.site-footer {
    padding: 54px max(16px, calc((100% - 1180px) / 2)) 24px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 34px;
    margin-bottom: 30px;
}

.footer-brand {
    margin-bottom: 12px;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.site-footer p {
    max-width: 460px;
    margin: 0;
    line-height: 1.75;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

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

.site-footer a:hover {
    color: #f87171;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 22px;
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .movie-grid,
    .movie-grid.compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-inner {
        grid-template-columns: 1fr 280px;
    }

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

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: #111827;
        box-shadow: var(--shadow);
    }

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

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: 720px;
        align-items: end;
        padding-bottom: 96px;
    }

    .hero-poster {
        display: none;
    }

    .quick-grid,
    .category-grid,
    .taxonomy-showcase,
    .footer-grid,
    .filters {
        grid-template-columns: 1fr;
    }

    .rank-strip {
        grid-template-columns: 1fr;
    }

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

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

    .detail-poster {
        width: min(260px, 70vw);
    }
}

@media (max-width: 520px) {
    .brand {
        font-size: 20px;
    }

    .section,
    .section.light,
    .section.dark-band {
        padding-top: 48px;
        padding-bottom: 48px;
    }

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

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

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

    .rank-meta {
        display: none;
    }
}
