:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --line: rgba(127, 29, 29, 0.38);
    --line-soft: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --red: #dc2626;
    --radius: 18px;
    --shadow: 0 22px 65px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(220, 38, 38, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    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;
    color: #fde68a;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.22);
}

.brand-text {
    font-size: 1.08rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link,
.mobile-link {
    color: #e2e8f0;
    padding: 10px 13px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
}

.nav-link-soft {
    color: #cbd5e1;
    font-size: 0.94rem;
}

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

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

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

.hero {
    min-height: 70vh;
    background: #020617;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
}

.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%;
    min-height: 70vh;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay,
.detail-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.36) 56%, transparent 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    right: 24px;
    bottom: 12%;
    max-width: 760px;
    z-index: 2;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--amber-light);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.35rem, 6vw, 5rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.hero-content p:not(.eyebrow),
.page-hero p:not(.eyebrow),
.detail-one-line {
    color: #e2e8f0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 720px;
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 18px 35px rgba(220, 38, 38, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 22px 45px rgba(245, 158, 11, 0.32);
}

.btn-ghost {
    color: #fde68a;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(245, 158, 11, 0.34);
}

.btn.small {
    min-height: 38px;
    padding: 8px 15px;
    font-size: 0.92rem;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.46);
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    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: 18px;
    transform: translateY(-50%);
}

.hero-next {
    right: 18px;
    transform: translateY(-50%);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 4;
    display: flex;
    gap: 8px;
    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.2s ease, background 0.2s ease;
}

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

.section,
.page-hero,
.detail-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 64px 0 0;
}

.section-wide {
    width: min(1180px, calc(100% - 32px));
}

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

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    line-height: 1.1;
}

.section-link {
    color: var(--amber-light);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

.movie-card-large .poster-wrap {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.horizontal-card:hover img {
    transform: scale(1.07);
}

.poster-gradient {
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.score-badge,
.type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.score-badge {
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    color: #111827;
    background: #fbbf24;
}

.type-badge {
    left: 10px;
    bottom: 10px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
}

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

.movie-card-body h3,
.horizontal-card h3 {
    margin: 0 0 8px;
    color: #f8fafc;
    line-height: 1.32;
    font-size: 1.03rem;
}

.movie-card-body p,
.horizontal-card p,
.category-overview-card p,
.content-panel p,
.site-footer p {
    color: var(--muted);
}

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

.movie-meta,
.detail-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--subtle);
    font-size: 0.84rem;
}

.movie-meta span,
.detail-meta-row span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.11);
}

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

.category-tile {
    position: relative;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0f172a;
    border: 1px solid var(--line-soft);
    padding: 16px;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-tile span {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.18));
}

.category-tile strong,
.category-tile small {
    position: relative;
    z-index: 2;
}

.category-tile strong {
    font-size: 1.08rem;
}

.category-tile small {
    color: #fcd34d;
}

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

.horizontal-list,
.rank-mini-list,
.rank-long-list {
    display: grid;
    gap: 14px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: auto 140px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line-soft);
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.horizontal-card:hover {
    transform: translateY(-3px);
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(245, 158, 11, 0.34);
}

.horizontal-rank {
    min-width: 34px;
    color: var(--amber-light);
    font-weight: 900;
}

.horizontal-card img {
    width: 140px;
    height: 82px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.25s ease;
}

.horizontal-card p {
    margin: 0 0 8px;
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ranking-panel,
.content-panel,
.filter-bar,
.category-overview-card {
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.ranking-panel {
    padding: 20px;
    position: sticky;
    top: 92px;
}

.page-hero {
    padding: 84px 0 22px;
}

.page-hero.slim {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.5rem);
}

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

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

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

.category-cover-stack img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.category-overview-card h2 {
    margin: 0 0 10px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    margin-bottom: 24px;
}

.filter-input,
.filter-select {
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.76);
    outline: none;
    padding: 0 15px;
}

.filter-input {
    flex: 1 1 240px;
}

.filter-input.wide {
    flex-basis: 340px;
}

.filter-select {
    flex: 0 1 150px;
}

.filter-count {
    margin-left: auto;
    color: var(--amber-light);
    font-weight: 900;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 40px 0 48px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.36;
    filter: blur(2px);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-content {
    position: relative;
    z-index: 2;
    padding-top: 34px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    color: #cbd5e1;
    font-size: 0.94rem;
}

.breadcrumb a {
    color: #fbbf24;
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-score {
    top: 14px;
    right: 14px;
}

.detail-info h1 {
    margin-bottom: 16px;
}

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

.detail-meta-row a {
    color: var(--amber-light);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tag-list span {
    padding: 7px 11px;
    color: #fed7aa;
    border-radius: 999px;
    background: rgba(154, 52, 18, 0.32);
    border: 1px solid rgba(251, 146, 60, 0.22);
    font-size: 0.88rem;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: var(--shadow);
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.4), rgba(2, 6, 23, 0.82));
    border: 0;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-left: 5px;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 18px 42px rgba(220, 38, 38, 0.34);
}

.player-overlay strong {
    font-size: 1.35rem;
}

.player-overlay small,
.player-message {
    color: #cbd5e1;
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 14px;
    pointer-events: none;
}

.detail-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 24px;
}

.content-panel {
    padding: 24px;
}

.content-panel h2 {
    margin: 0 0 14px;
    color: #fde68a;
}

.content-panel p {
    margin: 0 0 24px;
    font-size: 1.02rem;
}

.facts-panel dl {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
}

.facts-panel dt {
    color: var(--subtle);
}

.facts-panel dd {
    margin: 0;
    color: #f8fafc;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(2, 6, 23, 0.98));
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 30px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 1rem;
    color: #fde68a;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin: 8px 0;
}

.site-footer a {
    color: #cbd5e1;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 32px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.13);
    text-align: center;
}

.is-hidden-card {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
    }

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

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

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

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

    .ranking-panel {
        position: static;
    }
}

@media (max-width: 780px) {
    .hero-slider,
    .hero-slide img {
        min-height: 76vh;
    }

    .hero-content {
        left: 20px;
        bottom: 12%;
    }

    .hero-arrow {
        display: none;
    }

    .grid-5,
    .grid-4,
    .grid-3,
    .grid-2,
    .category-overview-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

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

    .horizontal-card {
        grid-template-columns: auto 104px minmax(0, 1fr);
    }

    .horizontal-card img {
        width: 104px;
        height: 70px;
    }

    .filter-count {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 520px) {
    .header-inner {
        min-height: 64px;
    }

    .brand-text {
        font-size: 0.98rem;
    }

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

    .grid-5,
    .grid-4,
    .grid-3,
    .grid-2,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-body p {
        min-height: auto;
    }

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

    .horizontal-rank {
        display: none;
    }

    .horizontal-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .filter-input,
    .filter-select {
        flex-basis: 100%;
        width: 100%;
    }

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