:root {
    --color-bg: #f8fafc;
    --color-panel: #ffffff;
    --color-ink: #0f172a;
    --color-muted: #64748b;
    --color-soft: #e2e8f0;
    --color-dark: #0f172a;
    --color-dark-2: #1e293b;
    --color-accent: #dc2626;
    --color-accent-2: #ef4444;
    --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 24px 60px rgba(15, 23, 42, 0.16);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--color-ink);
    background: var(--color-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    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: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(16px);
}

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

.site-logo,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-accent), #fb7185);
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(220, 38, 38, 0.35);
}

.logo-text {
    font-size: 22px;
}

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

.nav-link {
    position: relative;
    padding: 10px 12px;
    border-radius: 999px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.22);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 2px;
}

.hero-section {
    min-height: 680px;
    background: radial-gradient(circle at 20% 10%, rgba(239, 68, 68, 0.4), transparent 34%), linear-gradient(135deg, #020617, #111827 45%, #450a0a);
    overflow: hidden;
}

.hero-stage {
    position: relative;
    min-height: 680px;
}

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

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

.hero-image-layer {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    filter: blur(2px) saturate(1.25);
}

.hero-image-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.68), rgba(127, 29, 29, 0.6));
}

.hero-image-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 56px;
    align-items: center;
    color: #ffffff;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fca5a5;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 16px 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 690px;
    margin: 0 0 28px;
    color: #e2e8f0;
    font-size: clamp(18px, 2vw, 23px);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
}

.tag-row span {
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.18);
    background: #fff1f2;
}

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

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

.primary-button {
    background: var(--color-accent);
    color: #ffffff;
    box-shadow: 0 18px 35px rgba(220, 38, 38, 0.35);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 32px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    color: #ffffff;
    font-weight: 800;
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
}

.hero-poster:hover img {
    transform: scale(1.08);
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.search-band {
    margin-top: -70px;
    position: relative;
    z-index: 4;
}

.search-panel-large {
    display: grid;
    grid-template-columns: 280px minmax(220px, 1fr);
    gap: 20px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
}

.search-panel-large h2,
.section-heading h2,
.compact-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.global-search-box input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--color-soft);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
    background: #ffffff;
    color: var(--color-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.global-search-box input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(220, 38, 38, 0.55);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.global-search-results {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.search-result-item img {
    width: 48px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: #e2e8f0;
}

.search-result-item strong {
    display: block;
    font-size: 14px;
}

.search-result-item span {
    display: block;
    color: var(--color-muted);
    font-size: 12px;
}

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

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

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

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

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

.category-card {
    min-height: 180px;
    padding: 22px;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, #ffffff, #fff7f7);
    border: 1px solid rgba(220, 38, 38, 0.08);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.category-card h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.04em;
}

.category-card-top span {
    display: inline-flex;
    height: 30px;
    align-items: center;
    border-radius: 999px;
    padding: 0 10px;
    color: #ffffff;
    background: var(--color-accent);
    font-size: 12px;
    font-weight: 800;
}

.category-card p {
    margin: 12px 0 18px;
    color: var(--color-muted);
    font-size: 14px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-samples span {
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

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

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-panel);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.84);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-box {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.28);
}

.play-chip {
    right: 10px;
    bottom: 10px;
    padding: 5px 10px;
    background: var(--color-accent);
    font-size: 12px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.78);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
}

.card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--color-muted);
    font-size: 12px;
}

.card-meta-row span:not(:last-child)::after {
    content: "·";
    margin-left: 6px;
}

.movie-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.movie-card p {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.heat-pill {
    align-self: flex-start;
    margin-top: auto;
    border-radius: 999px;
    padding: 4px 9px;
    color: #991b1b;
    background: #fee2e2;
    font-size: 12px;
    font-weight: 800;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--color-panel);
    box-shadow: var(--shadow-sm);
}

.compact-heading {
    margin-bottom: 16px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 34px 50px minmax(0, 1fr) auto;
    grid-template-areas:
        "number cover title heat"
        "number cover meta heat";
    gap: 4px 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: #fff1f2;
    transform: translateX(3px);
}

.rank-number {
    grid-area: number;
    font-weight: 900;
    color: var(--color-accent);
    text-align: center;
}

.rank-row img {
    grid-area: cover;
    width: 50px;
    height: 66px;
    border-radius: 10px;
    object-fit: cover;
    background: #e2e8f0;
}

.rank-title {
    grid-area: title;
    min-width: 0;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-meta {
    grid-area: meta;
    min-width: 0;
    color: var(--color-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-heat {
    grid-area: heat;
    border-radius: 999px;
    padding: 5px 8px;
    color: #991b1b;
    background: #fee2e2;
    font-size: 12px;
    font-weight: 900;
}

.full-rank-list .rank-row {
    grid-template-columns: 48px 64px minmax(0, 1fr) 86px;
    padding: 12px;
}

.full-rank-list .rank-row img {
    width: 64px;
    height: 86px;
}

.page-hero {
    padding: 78px 0;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.34), transparent 28%), linear-gradient(135deg, #111827, #1e293b 52%, #7f1d1d);
}

.page-hero h1 {
    margin: 12px 0;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #fecaca;
    font-size: 14px;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px 160px;
    gap: 14px;
    align-items: end;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--color-panel);
    box-shadow: var(--shadow-sm);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.no-results {
    display: none;
    margin: 24px 0;
    padding: 22px;
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--color-muted);
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.no-results.is-visible {
    display: block;
}

.detail-main {
    background: #f8fafc;
}

.detail-top {
    padding: 40px 0 48px;
    color: #ffffff;
    background: radial-gradient(circle at 80% 10%, rgba(239, 68, 68, 0.36), transparent 26%), linear-gradient(135deg, #020617, #111827 48%, #450a0a);
}

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

.player-card,
.detail-info-card,
.detail-article,
.related-panel {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-md);
}

.video-shell {
    position: relative;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.32), rgba(127, 29, 29, 0.58));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 18px 50px rgba(220, 38, 38, 0.46);
}

.play-circle span {
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 22px solid #ffffff;
}

.detail-info-card {
    display: grid;
    grid-template-rows: auto 1fr;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-info-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #1e293b;
}

.detail-info-card div {
    padding: 22px;
}

.detail-info-card h1 {
    margin: 10px 0;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.detail-info-card p {
    color: #e2e8f0;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding-top: 38px;
}

.detail-article,
.related-panel {
    padding: 28px;
    background: #ffffff;
}

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

.detail-article p {
    margin: 0 0 26px;
    color: #334155;
    font-size: 16px;
}

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

.info-table div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.info-table span {
    color: var(--color-muted);
    font-size: 12px;
}

.info-table strong {
    font-size: 15px;
}

.related-panel {
    align-self: start;
}

.related-grid {
    display: grid;
    gap: 14px;
}

.related-grid .compact-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
}

.related-grid .poster-box img {
    height: 132px;
    aspect-ratio: auto;
}

.related-grid .movie-card-body {
    padding: 12px;
}

.related-grid .tag-row {
    display: none;
}

.related-grid .movie-card p {
    -webkit-line-clamp: 2;
}

@media (max-width: 1120px) {
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .rank-panel,
    .related-panel {
        position: static;
    }

    .detail-info-card {
        grid-template-columns: 180px minmax(0, 1fr);
        grid-template-rows: auto;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        min-height: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .site-nav {
        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-md);
    }

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

    .nav-link {
        border-radius: 12px;
    }

    .hero-section,
    .hero-stage,
    .hero-inner {
        min-height: 760px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        align-content: center;
        padding: 56px 0 88px;
    }

    .hero-poster {
        max-width: 240px;
        margin: 0 auto;
        transform: none;
    }

    .search-panel-large,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .global-search-results {
        grid-template-columns: 1fr;
    }

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

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

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

    .detail-info-card img {
        max-height: 420px;
    }
}

@media (max-width: 560px) {
    .container,
    .nav-shell,
    .hero-inner {
        width: min(100% - 24px, 1180px);
    }

    .logo-text {
        font-size: 18px;
    }

    .hero-copy h1 {
        font-size: 40px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

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

    .rank-row,
    .full-rank-list .rank-row {
        grid-template-columns: 36px 54px minmax(0, 1fr);
        grid-template-areas:
            "number cover title"
            "number cover meta"
            "number cover heat";
    }

    .rank-heat {
        justify-self: start;
    }

    .info-table {
        grid-template-columns: 1fr;
    }

    .related-grid .compact-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }
}
