:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --bg-soft: #1c1917;
    --bg-card: #292524;
    --bg-card-strong: #44403c;
    --line: #44403c;
    --text: #fafaf9;
    --muted: #a8a29e;
    --muted-strong: #d6d3d1;
    --accent: #f59e0b;
    --accent-strong: #d97706;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.11), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(120, 113, 108, 0.18), transparent 34%),
        linear-gradient(180deg, #0c0a09 0%, #1c1917 52%, #0c0a09 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

main {
    min-height: 70vh;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 60;
    background: rgba(28, 25, 23, 0.92);
    border-bottom: 1px solid rgba(68, 64, 60, 0.78);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1200px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-text {
    font-size: 21px;
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1c1917;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    font-size: 13px;
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    position: relative;
    color: var(--muted-strong);
    font-size: 15px;
    font-weight: 650;
    transition: color 0.22s ease;
}

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    border-radius: 999px;
    background: var(--accent);
    transition: transform 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--accent);
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: rgba(68, 64, 60, 0.55);
    cursor: pointer;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 12px;
}

.hero-carousel {
    position: relative;
    height: 640px;
    overflow: hidden;
    background: #111;
}

.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,
.detail-hero > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #1c1917;
}

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 10, 9, 0.95) 0%, rgba(12, 10, 9, 0.58) 45%, rgba(12, 10, 9, 0.2) 100%),
        linear-gradient(0deg, #0c0a09 0%, rgba(12, 10, 9, 0.15) 48%, rgba(12, 10, 9, 0.42) 100%);
}

.hero-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 86px;
}

.hero-content h1,
.detail-content h1,
.page-hero h1 {
    max-width: 760px;
    margin: 12px 0 18px;
    color: #fff;
    font-size: clamp(36px, 7vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p,
.detail-content p,
.page-hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 20px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 12px;
    border-radius: 999px;
    color: #1c1917;
    background: var(--accent);
    font-size: 14px;
    font-weight: 800;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 28px;
    color: var(--muted-strong);
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 12px;
    border: 1px solid rgba(214, 211, 209, 0.16);
    border-radius: 999px;
    background: rgba(28, 25, 23, 0.58);
}

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

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    color: #1c1917;
    background: var(--accent);
    box-shadow: 0 16px 35px rgba(245, 158, 11, 0.22);
}

.primary-button:hover {
    background: #fbbf24;
    transform: translateY(-2px);
}

.primary-button.small {
    min-height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.ghost-button,
.section-link {
    color: var(--text);
    border: 1px solid rgba(245, 158, 11, 0.32);
    background: rgba(28, 25, 23, 0.66);
}

.ghost-button:hover,
.section-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: max(16px, calc((100% - 1200px) / 2));
}

.hero-next {
    right: max(16px, calc((100% - 1200px) / 2));
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

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

.home-shell {
    padding-top: 36px;
}

.intro-strip,
.warm-panel,
.category-overview-card {
    border: 1px solid rgba(68, 64, 60, 0.85);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.94), rgba(28, 25, 23, 0.94));
    box-shadow: var(--shadow);
}

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 48px;
    padding: 24px;
}

.intro-strip h2 {
    margin: 0 0 6px;
    font-size: clamp(24px, 4vw, 34px);
}

.intro-strip p,
.section-heading p,
.category-overview-card p {
    margin: 0;
    color: var(--muted);
}

.content-section {
    margin-bottom: 60px;
}

.warm-panel {
    padding: 28px;
}

.section-heading,
.category-overview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.section-heading h2,
.category-overview-card h2,
.detail-article h2,
.site-footer h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 26px;
    line-height: 1.2;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 22px;
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    color: #fff;
    border: 1px solid rgba(68, 64, 60, 0.95);
    border-radius: 12px;
    outline: 0;
    background: rgba(28, 25, 23, 0.88);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.11);
}

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

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

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

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(68, 64, 60, 0.76);
    border-radius: var(--radius);
    background: rgba(41, 37, 36, 0.78);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
    transform: translateY(-6px);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #1c1917;
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.score-badge {
    right: 10px;
    bottom: 10px;
    color: #1c1917;
    background: var(--accent);
}

.rank-badge {
    top: 10px;
    left: 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.card-body {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.card-body strong {
    overflow: hidden;
    color: #fff;
    font-size: 16px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.22s ease;
}

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

.card-meta,
.card-body p {
    color: var(--muted);
    font-size: 13px;
}

.card-body p {
    display: -webkit-box;
    min-height: 42px;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.tag-row span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 8px;
    border-radius: 999px;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    min-height: 150px;
    padding: 20px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 0%, rgba(245, 158, 11, 0.18), transparent 36%),
        rgba(41, 37, 36, 0.85);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile span {
    display: block;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 20px;
    font-weight: 900;
}

.category-tile strong {
    display: block;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 500;
}

.category-tile:hover {
    border-color: var(--accent);
    background:
        radial-gradient(circle at 88% 0%, rgba(245, 158, 11, 0.3), transparent 40%),
        rgba(68, 64, 60, 0.86);
    transform: translateY(-5px);
}

.page-hero {
    position: relative;
    min-height: 380px;
    padding: 126px max(16px, calc((100% - 1200px) / 2)) 72px;
    overflow: hidden;
    background:
        radial-gradient(circle at 25% 10%, rgba(245, 158, 11, 0.23), transparent 30%),
        linear-gradient(135deg, #1c1917, #0c0a09);
}

.compact-hero h1 {
    font-size: clamp(34px, 5vw, 54px);
}

.category-overview-list {
    display: grid;
    gap: 26px;
}

.category-overview-card {
    padding: 24px;
}

.mini-card-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.mini-card .card-body p,
.mini-card .tag-row {
    display: none;
}

.detail-hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111;
}

.detail-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 68px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted-strong);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.player-section {
    margin-bottom: 46px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    border: 0;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.68)),
        rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-ring {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 999px;
    color: #1c1917;
    background: var(--accent);
    font-size: 38px;
    box-shadow: 0 0 0 12px rgba(245, 158, 11, 0.12), 0 24px 60px rgba(0, 0, 0, 0.45);
}

.overlay-title {
    max-width: min(760px, calc(100% - 48px));
    color: #fff;
    font-size: clamp(20px, 3vw, 34px);
    font-weight: 900;
    text-align: center;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    margin-bottom: 60px;
}

.poster-panel,
.detail-article {
    border: 1px solid rgba(68, 64, 60, 0.85);
    border-radius: 24px;
    background: rgba(41, 37, 36, 0.74);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.2);
}

.poster-panel {
    overflow: hidden;
    align-self: start;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #1c1917;
}

.poster-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(68, 64, 60, 0.85);
}

.poster-meta span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    color: var(--muted-strong);
    background: rgba(28, 25, 23, 0.95);
    font-size: 13px;
}

.detail-article {
    padding: 30px;
}

.detail-article p {
    margin: 0 0 24px;
    color: var(--muted-strong);
    font-size: 17px;
    line-height: 1.9;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-footer {
    margin-top: 78px;
    padding: 48px 0 28px;
    border-top: 1px solid rgba(68, 64, 60, 0.85);
    background: rgba(28, 25, 23, 0.78);
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

.site-footer p {
    max-width: 460px;
    color: var(--muted);
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: var(--muted);
    transition: color 0.2s ease;
}

.site-footer a:not(.footer-brand):hover {
    color: var(--accent);
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 22px;
    color: var(--muted);
    border-top: 1px solid rgba(68, 64, 60, 0.72);
    font-size: 14px;
}

[data-card].is-filter-hidden {
    display: none;
}

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

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

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

    .nav-toggle {
        display: inline-flex;
    }

    .hero-carousel,
    .detail-hero {
        height: 560px;
    }

    .hero-content,
    .detail-content {
        padding-bottom: 72px;
    }

    .hero-arrow {
        display: none;
    }

    .intro-strip,
    .section-heading,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

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

    .poster-panel {
        max-width: 360px;
    }

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

@media (max-width: 560px) {
    .header-inner {
        width: min(100% - 24px, 1200px);
    }

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

    .hero-carousel,
    .detail-hero {
        height: 520px;
    }

    .hero-content,
    .detail-content {
        width: min(100% - 28px, 1200px);
        padding-bottom: 62px;
    }

    .hero-content h1,
    .detail-content h1,
    .page-hero h1 {
        font-size: 34px;
    }

    .page-shell {
        width: min(100% - 24px, 1200px);
        padding-top: 34px;
    }

    .page-hero {
        min-height: 340px;
        padding: 110px 14px 56px;
    }

    .movie-grid,
    .feature-grid,
    .four-grid,
    .rank-grid,
    .full-rank-grid,
    .category-grid,
    .mini-card-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body strong {
        font-size: 15px;
    }

    .warm-panel,
    .category-overview-card,
    .detail-article {
        padding: 20px;
    }

    .player-shell {
        border-radius: 18px;
    }

    .play-ring {
        width: 64px;
        height: 64px;
        font-size: 30px;
    }
}
