:root {
    --site-bg: #fff7ed;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --line: #e5e7eb;
    --accent: #dc2626;
    --accent-dark: #b91c1c;
    --soft-accent: #fee2e2;
    --shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 247, 237, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.72);
}

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #374151;
}

.site-nav a {
    padding: 8px 12px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.72);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--text-main);
    border-radius: 999px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: #111827;
}

.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-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(1180px, calc(100% - 48px));
    transform: translate(-50%, -50%);
    color: #ffffff;
}

.hero-content h1 {
    max-width: 760px;
    margin: 14px 0 18px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 24px;
    font-size: clamp(17px, 2vw, 22px);
    color: rgba(255, 255, 255, 0.86);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    background: var(--accent);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.86);
}

.hero-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.hero-actions,
.detail-info .primary-btn {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.primary-btn,
.search-panel button {
    color: #ffffff;
    background: var(--accent);
    box-shadow: 0 16px 34px rgba(220, 38, 38, 0.26);
}

.primary-btn:hover,
.search-panel button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.section-block {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 64px 0;
}

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

.section-head.centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-head.compact {
    margin-bottom: 18px;
}

.section-head h2,
.page-hero h1,
.detail-info h1 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p {
    max-width: 700px;
    margin: 12px 0 0;
    color: var(--text-muted);
}

.section-more {
    color: var(--accent);
    font-weight: 800;
}

.home-search {
    padding-top: 54px;
    padding-bottom: 28px;
}

.search-panel,
.filter-bar {
    display: flex;
    gap: 12px;
    width: min(780px, 100%);
    margin: 28px auto 0;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    outline: none;
    background: #ffffff;
}

.filter-bar {
    width: 100%;
    margin: 0 0 28px;
    box-shadow: none;
    border: 1px solid var(--line);
}

.filter-bar select {
    max-width: 190px;
}

.category-grid,
.category-overview-grid,
.movie-grid,
.related-grid {
    display: grid;
    gap: 22px;
}

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

.category-card,
.category-overview-card,
.rank-panel,
.movie-card,
.detail-text article,
.related-card a {
    background: var(--card-bg);
    border: 1px solid rgba(229, 231, 235, 0.76);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.category-card {
    min-height: 150px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span,
.category-overview-main span {
    display: block;
    font-size: 22px;
    font-weight: 850;
    color: var(--accent);
}

.category-card p,
.category-overview-main p {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

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

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

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

.movie-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    height: 260px;
    overflow: hidden;
    background: #111827;
}

.movie-card-large .poster-link {
    height: 320px;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.year-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

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

.movie-card-body h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover {
    color: var(--accent);
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

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

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 220px;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-snap-type: x mandatory;
}

.movie-rail .movie-card {
    scroll-snap-align: start;
}

.movie-rail .poster-link {
    height: 280px;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
}

.rank-panel.wide {
    position: static;
}

.rank-panel-head {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.rank-panel-head h2 {
    margin: 0;
    font-size: 26px;
}

.rank-panel-head a {
    color: var(--accent);
    font-weight: 800;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 54px;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
    border-bottom: 0;
}

.rank-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: #111827;
    font-weight: 850;
    font-size: 13px;
}

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

.rank-row:hover .rank-title {
    color: var(--accent);
}

.rank-year {
    color: var(--text-muted);
    text-align: right;
    font-size: 13px;
}

.page-hero {
    position: relative;
    width: min(1280px, calc(100% - 48px));
    margin: 38px auto 0;
    padding: 74px;
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7f1d1d 55%, #f97316);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -90px;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.page-hero > div {
    position: relative;
    z-index: 2;
    max-width: 780px;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.82);
}

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

.category-overview-card {
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-samples a {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
}

.two-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #111827;
    color: #ffffff;
}

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

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(6px);
    transform: scale(1.04);
    opacity: 0.54;
}

.detail-bg span {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.32));
}

.detail-shell {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 86px 0 66px;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-poster {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.72);
}

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

.detail-info h1 {
    max-width: 840px;
    margin: 0;
    font-size: clamp(42px, 6vw, 82px);
    color: #ffffff;
}

.detail-one-line {
    max-width: 820px;
    margin: 20px 0;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.86);
}

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

.detail-meta span,
.tag-list span {
    padding: 7px 11px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-size: 13px;
}

.tag-list span {
    background: rgba(220, 38, 38, 0.32);
}

.detail-section {
    padding-bottom: 32px;
}

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

.player-box video,
.player-cover,
.player-cover img {
    width: 100%;
    height: 100%;
}

.player-box video {
    display: block;
    object-fit: contain;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #000000;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.74;
}

.player-cover.is-hidden {
    display: none;
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--accent);
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.38);
    font-size: 34px;
    transform: translate(-50%, -50%);
}

.detail-text {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 24px;
}

.detail-text article {
    padding: 30px;
}

.detail-text h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-text p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

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

.related-card a {
    display: block;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.related-card strong,
.related-card span {
    display: block;
    padding: 0 14px;
}

.related-card strong {
    margin-top: 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.related-card span {
    padding-bottom: 14px;
    color: var(--text-muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 48px;
    background: #111827;
    color: rgba(255, 255, 255, 0.78);
}

.footer-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    color: #ffffff;
    font-size: 20px;
}

.footer-shell p {
    margin: 8px 0 0;
}

.footer-links {
    display: flex;
    gap: 18px;
}

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

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

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

    .split-section,
    .two-lists,
    .detail-text {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

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

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

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

    .hero {
        height: 72vh;
        min-height: 560px;
    }

    .hero-content {
        width: min(100% - 34px, 680px);
    }

    .hero-arrow {
        display: none;
    }

    .section-block,
    .page-hero,
    .footer-shell {
        width: min(100% - 32px, 1280px);
    }

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

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

    .search-panel,
    .filter-bar {
        flex-direction: column;
    }

    .filter-bar select {
        max-width: none;
    }

    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .movie-grid.dense,
    .related-grid,
    .rank-list.multi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-hero {
        padding: 48px 28px;
        border-radius: 24px;
    }

    .detail-shell {
        width: min(100% - 32px, 680px);
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .detail-poster {
        max-width: 320px;
    }

    .footer-shell {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 540px) {
    .nav-shell {
        padding: 0 16px;
    }

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

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        max-width: 260px;
    }

    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .movie-grid.dense,
    .related-grid,
    .rank-list.multi {
        grid-template-columns: 1fr;
    }

    .poster-link {
        height: 320px;
    }

    .detail-poster img {
        height: 420px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
