:root {
    --bg: #fff7ed;
    --panel: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(146, 64, 14, 0.18);
    --brand: #dc2626;
    --brand-dark: #7f1d1d;
    --accent: #d97706;
    --accent-soft: #fef3c7;
    --shadow: 0 20px 60px rgba(127, 29, 29, 0.14);
    --radius: 24px;
}

* {
    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(--ink);
    background:
        radial-gradient(circle at top left, rgba(254, 226, 226, 0.95), transparent 36rem),
        linear-gradient(180deg, #fffbeb 0%, #fef2f2 48%, #fff7ed 100%);
}

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

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

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

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

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

.logo-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #92400e;
    font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--brand);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--brand-dark);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 0 24px 20px;
    color: #92400e;
    font-weight: 800;
}

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

.hero-section {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #7f1d1d, #92400e 52%, #7f1d1d);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 44px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
    position: absolute;
    inset: -80px calc(50% - 50vw);
    z-index: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(127, 29, 29, 0.94), rgba(146, 64, 14, 0.62)),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.1);
}

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

.hero-backdrop {
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: 1;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(251, 191, 36, 0.25), transparent 24rem),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.62));
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    max-width: 760px;
    margin: 10px 0 18px;
    color: #fff;
    font-size: clamp(2.6rem, 7vw, 5.7rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-desc {
    max-width: 720px;
    margin: 0 0 26px;
    color: #fef3c7;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    line-height: 1.85;
}

.eyebrow {
    margin: 0;
    color: #d97706;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-tags,
.tag-row,
.detail-meta,
.hero-actions,
.movie-meta,
.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-tags span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(8px);
}

.hero-actions {
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 16px 36px rgba(220, 38, 38, 0.32);
}

.ghost-btn {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.32);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hero-poster {
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 8px solid rgba(255, 255, 255, 0.22);
    border-radius: 34px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #7f1d1d, #d97706);
}

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

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

.hero-dot.is-active {
    background: #fbbf24;
}

.quick-search-section {
    padding: 24px 0 0;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(120px, 180px));
    gap: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #92400e;
    font-size: 0.8rem;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    color: var(--ink);
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

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

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

.section-heading h2,
.rank-card h2,
.side-card h2,
.detail-text h2 {
    margin: 6px 0;
    color: #7f1d1d;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.1;
}

.section-heading span {
    color: var(--muted);
}

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

.category-tile,
.category-card-large,
.rank-card,
.side-card,
.detail-text,
.player-card,
.movie-card,
.podium-card,
.ranking-row a,
.compact-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.category-tile {
    display: grid;
    gap: 10px;
    padding: 24px;
    border-radius: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: #f59e0b;
}

.category-tile strong {
    color: #7f1d1d;
    font-size: 1.2rem;
}

.category-tile span,
.movie-card p,
.detail-text p,
.category-card-large p,
.sub-hero p,
.detail-intro p,
.footer-shell p,
.ranking-row small {
    color: var(--muted);
    line-height: 1.75;
}

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

.page-grid {
    margin-top: 24px;
}

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(127, 29, 29, 0.2);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #7f1d1d, #d97706);
}

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

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

.poster-badge,
.poster-type {
    position: absolute;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.poster-badge {
    left: 12px;
    background: rgba(220, 38, 38, 0.88);
}

.poster-type {
    right: 12px;
    background: rgba(0, 0, 0, 0.58);
}

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

.movie-title {
    display: -webkit-box;
    min-height: 3.1em;
    overflow: hidden;
    color: #7f1d1d;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--brand);
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.5em;
    margin: 10px 0 14px;
    overflow: hidden;
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    justify-content: space-between;
    color: #92400e;
    font-size: 0.82rem;
    font-weight: 800;
}

.tag-row {
    margin-top: 14px;
}

.tag-row span {
    min-height: 24px;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

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

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

.rank-card {
    position: sticky;
    top: 96px;
    padding: 24px;
    border-radius: 26px;
}

.rank-card ol,
.ranking-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 18px 0 0;
    list-style: none;
}

.rank-card li a {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #fffbeb;
}

.rank-card li span,
.rank-number {
    color: var(--brand);
    font-weight: 900;
}

.rank-card li strong {
    color: #7f1d1d;
}

.rank-card li small {
    grid-column: 2;
    color: var(--muted);
}

.sub-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0;
    color: #fff;
    background: linear-gradient(135deg, #7f1d1d, #92400e 55%, #7f1d1d);
}

.sub-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.22), transparent 28rem),
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.12), transparent 22rem);
}

.sub-hero .content-shell {
    position: relative;
}

.sub-hero h1 {
    margin: 10px 0 16px;
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 1;
}

.sub-hero p {
    max-width: 760px;
    color: #fef3c7;
    font-size: 1.08rem;
}

.crumbs {
    margin-top: 18px;
    color: #fef3c7;
    font-size: 0.9rem;
    font-weight: 800;
}

.crumbs a:hover {
    color: #fff;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border-radius: 28px;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-preview img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #7f1d1d, #d97706);
}

.detail-hero {
    padding: 72px 0;
    background:
        linear-gradient(90deg, rgba(127, 29, 29, 0.96), rgba(146, 64, 14, 0.76)),
        var(--detail-image) center / cover no-repeat;
}

.detail-hero-layer {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.2), transparent 24rem);
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster-wrap {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.detail-poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #7f1d1d, #d97706);
}

.detail-intro h1 {
    margin: 16px 0;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    line-height: 1;
}

.detail-meta {
    margin: 18px 0 4px;
}

.detail-tags span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.detail-main,
.detail-side {
    min-width: 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #0f172a;
}

.video-player {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.38);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    padding-left: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 20px 46px rgba(220, 38, 38, 0.4);
    font-size: 2.6rem;
}

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

.detail-text,
.side-card {
    margin-top: 24px;
    padding: 24px;
    border-radius: 26px;
}

.detail-text p {
    white-space: pre-line;
}

.side-card {
    position: sticky;
    top: 96px;
    margin-top: 0;
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px 14px;
    margin: 18px 0 0;
}

.side-card dt {
    color: #92400e;
    font-weight: 900;
}

.side-card dd {
    margin: 0;
    color: var(--muted);
}

.prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.prev-next a {
    display: block;
    padding: 16px;
    color: #7f1d1d;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    font-weight: 900;
    box-shadow: var(--shadow);
}

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

.podium-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 26px;
}

.podium-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 20px;
    background: linear-gradient(135deg, #7f1d1d, #d97706);
}

.podium-card span,
.podium-card strong {
    color: #7f1d1d;
    font-weight: 900;
}

.podium-card small {
    color: var(--muted);
}

.ranking-row a {
    display: grid;
    grid-template-columns: 72px 80px minmax(180px, 1fr) minmax(220px, 2fr) 150px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
}

.ranking-row img {
    width: 80px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #7f1d1d, #d97706);
}

.ranking-row strong {
    color: #7f1d1d;
}

.ranking-row em {
    color: #92400e;
    font-style: normal;
    font-weight: 900;
}

.site-footer {
    margin-top: 40px;
    padding: 42px 0;
    color: #fef3c7;
    background: linear-gradient(135deg, #7f1d1d, #92400e);
}

.footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 420px);
    gap: 30px;
}

.footer-logo {
    color: #fff;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.movie-card[hidden] {
    display: none;
}

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

    .layout-two,
    .detail-layout,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .rank-card,
    .side-card {
        position: static;
    }

    .ranking-row a {
        grid-template-columns: 54px 68px minmax(0, 1fr);
    }

    .ranking-row small,
    .ranking-row em {
        grid-column: 3;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .hero-section {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 20px;
        align-content: center;
        padding: 46px 0 82px;
    }

    .hero-poster {
        width: min(260px, 80vw);
        margin: 0 auto;
    }

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

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

    .category-card-large,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

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

    .prev-next {
        grid-template-columns: 1fr;
    }
}

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

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

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

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn,
    .section-more {
        width: 100%;
    }

    .ranking-row a {
        grid-template-columns: 46px 64px minmax(0, 1fr);
        gap: 10px;
    }
}
