:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --bg-soft: #1c1917;
    --bg-card: #211c19;
    --line: rgba(255, 255, 255, 0.10);
    --text: #fff7ed;
    --muted: #d6d3d1;
    --muted-2: #a8a29e;
    --amber: #f59e0b;
    --amber-2: #d97706;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.12), transparent 28rem),
        radial-gradient(circle at 85% 5%, rgba(120, 53, 15, 0.18), transparent 26rem),
        var(--bg);
    color: var(--text);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 10, 9, 0.78);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #1c1917;
    background: linear-gradient(135deg, #fbbf24, #f59e0b 52%, #fb923c);
    box-shadow: 0 10px 35px rgba(245, 158, 11, 0.35);
}

.brand-name {
    font-size: 1.15rem;
}

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

.site-nav a {
    padding: 10px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.94rem;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.site-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

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

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

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

.hero-bg,
.hero-bg::after {
    position: absolute;
    inset: 0;
}

.hero-bg::after {
    content: "";
    background:
        radial-gradient(circle at 75% 20%, rgba(245, 158, 11, 0.18), transparent 22rem),
        linear-gradient(90deg, rgba(12, 10, 9, 0.92), rgba(12, 10, 9, 0.55), rgba(12, 10, 9, 0.22));
}

.hero-img,
.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #292524, #451a03 45%, #0c0a09);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg) 0%, rgba(12, 10, 9, 0.56) 48%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 78px;
    max-width: min(1240px, calc(100% - 32px));
}

.hero-content h1 {
    max-width: 760px;
    margin: 16px 0 16px;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 1;
    font-weight: 900;
    text-wrap: balance;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-meta,
.detail-facts,
.movie-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted-2);
}

.hero-meta span:first-child,
.detail-facts span:first-child {
    color: #fbbf24;
    font-weight: 800;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 13px;
    font-weight: 800;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

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

.btn-primary {
    color: #1c1917;
    background: var(--amber);
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.30);
}

.btn-primary:hover {
    background: #fbbf24;
}

.btn-ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text);
    background: rgba(0, 0, 0, 0.45);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 180ms ease, background 180ms ease;
}

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

.quick-search-wrap,
.page-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-wrap {
    margin-top: -38px;
    position: relative;
    z-index: 8;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 460px);
    gap: 22px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(28, 25, 23, 0.90);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.home-search {
    display: flex;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
}

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    outline: none;
}

.home-search input {
    min-height: 52px;
    padding: 0 16px;
    border: 0;
    background: transparent;
}

.home-search button {
    padding: 0 22px;
    color: #1c1917;
    background: var(--amber);
    border: 0;
    font-weight: 900;
    cursor: pointer;
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.category-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.92), rgba(28, 25, 23, 0.88));
    transition: transform 180ms ease, border 180ms ease;
}

.category-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.55);
}

.category-chip span {
    color: var(--amber);
    font-size: 0.9rem;
}

.content-section {
    padding: 64px 0 0;
}

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

.section-heading h2 {
    font-size: clamp(1.5rem, 2.6vw, 2.2rem);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--amber);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(28, 25, 23, 0.78);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    transition: transform 180ms ease, border 180ms ease, background 180ms ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.48);
    background: rgba(41, 37, 36, 0.88);
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 150px 1fr;
}

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

.movie-card-horizontal .movie-poster {
    height: 100%;
    min-height: 210px;
    aspect-ratio: auto;
}

.movie-poster,
.category-cover-wrap,
.detail-poster {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.28), transparent 45%),
        linear-gradient(160deg, #292524, #0c0a09);
}

.movie-poster {
    display: block;
    aspect-ratio: 2 / 3;
}

.poster-img,
.category-cover,
.detail-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease, opacity 180ms ease;
}

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

.image-error {
    opacity: 0;
}

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

.rank-number {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #1c1917;
    background: var(--amber);
    font-weight: 900;
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 10px 0 8px;
    font-size: 1.04rem;
    line-height: 1.3;
}

.movie-info p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted-2);
    font-size: 0.92rem;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta-row {
    gap: 8px;
    font-size: 0.82rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.pill-amber {
    color: #1c1917;
    background: var(--amber);
}

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

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.78rem;
}

.top-space {
    padding-top: 48px;
}

.page-hero,
.detail-text-card,
.player-card,
.category-panel,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(28, 25, 23, 0.80);
    box-shadow: var(--shadow);
}

.page-hero {
    padding: clamp(28px, 5vw, 54px);
    background:
        radial-gradient(circle at 82% 20%, rgba(245, 158, 11, 0.20), transparent 20rem),
        linear-gradient(135deg, rgba(41, 37, 36, 0.96), rgba(12, 10, 9, 0.95));
}

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

.page-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.05rem;
}

.rank-hero {
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.26), transparent 20rem),
        linear-gradient(135deg, rgba(69, 26, 3, 0.86), rgba(12, 10, 9, 0.96));
}

.filter-panel {
    margin-top: 22px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted-2);
    font-size: 0.86rem;
}

.filter-panel input,
.filter-panel select {
    height: 44px;
    border-radius: 12px;
    padding: 0 12px;
}

.filter-count {
    color: var(--amber);
    font-weight: 900;
    white-space: nowrap;
    padding-bottom: 11px;
}

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

.category-panel {
    display: grid;
    grid-template-columns: 210px 1fr;
    overflow: hidden;
}

.category-cover-wrap {
    min-height: 280px;
}

.category-panel-body {
    padding: 24px;
}

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

.category-panel p {
    color: var(--muted-2);
    line-height: 1.7;
}

.mini-list {
    list-style: none;
    margin: 18px 0;
    padding: 0;
}

.mini-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    color: var(--muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mini-list span,
.text-link {
    color: var(--amber);
}

.detail-page {
    padding-bottom: 80px;
}

.detail-hero {
    position: relative;
    min-height: 680px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.detail-backdrop,
.detail-mask {
    position: absolute;
    inset: 0;
}

.detail-mask {
    background:
        linear-gradient(90deg, rgba(12, 10, 9, 0.98), rgba(12, 10, 9, 0.70), rgba(12, 10, 9, 0.50)),
        linear-gradient(0deg, var(--bg), transparent 48%);
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 72px;
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 36px;
    align-items: end;
}

.detail-poster {
    height: 430px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    margin-top: 18px;
    font-size: clamp(2.2rem, 6vw, 5rem);
    line-height: 1.02;
}

.detail-one-line {
    max-width: 820px;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.75;
}

.detail-tags {
    margin: 20px 0 28px;
}

.player-shell {
    margin-top: 40px;
}

.player-card {
    padding: 18px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 12px;
    color: var(--text);
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

.player-overlay.hidden {
    display: none;
}

.play-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 999px;
    color: #1c1917;
    background: var(--amber);
    font-size: 1.7rem;
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.34);
}

.player-note {
    padding: 12px 4px 0;
    color: var(--muted-2);
    font-size: 0.92rem;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.detail-text-card {
    padding: 24px;
}

.detail-text-card h2 {
    margin: 0 0 12px;
}

.detail-text-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: rgba(12, 10, 9, 0.85);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted-2);
}

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

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

.footer-links a {
    color: var(--muted);
}

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

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

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

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

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(28, 25, 23, 0.98);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-carousel {
        height: 540px;
    }

    .hero-content {
        padding-bottom: 68px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search,
    .filter-panel,
    .detail-inner,
    .category-panel {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .detail-inner {
        padding-top: 96px;
    }

    .detail-poster {
        width: 220px;
        height: 330px;
    }

    .detail-content,
    .category-overview {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .hero-carousel {
        height: 520px;
    }

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

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

    .movie-card-horizontal .movie-poster {
        min-height: 180px;
    }

    .quick-search-wrap,
    .page-shell,
    .header-inner,
    .footer-inner,
    .detail-inner {
        width: min(100% - 22px, 1240px);
    }
}
