:root {
    color-scheme: dark;
    --bg: #1c1917;
    --bg-soft: #292524;
    --panel: rgba(41, 37, 36, 0.86);
    --panel-solid: #292524;
    --line: rgba(245, 158, 11, 0.25);
    --text: #fff7ed;
    --muted: #d6d3d1;
    --amber: #f59e0b;
    --amber-soft: #fbbf24;
    --amber-deep: #92400e;
    --red: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
    --max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(239, 68, 68, 0.14), transparent 30rem),
        linear-gradient(135deg, #1c1917 0%, #451a03 52%, #1c1917 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

img {
    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: linear-gradient(90deg, rgba(41, 37, 36, 0.94), rgba(120, 53, 15, 0.94), rgba(41, 37, 36, 0.94));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(16px);
}

.nav-shell {
    width: min(var(--max), 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.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #1c1917;
    background: linear-gradient(135deg, var(--amber-soft), #fb923c);
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 15px;
    border-radius: 999px;
    color: #fed7aa;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #1c1917;
    background: linear-gradient(135deg, var(--amber-soft), #fb923c);
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.24);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 8px 12px;
}

main {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.hero-wrap,
.page-hero,
.detail-hero {
    margin-top: 28px;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(68, 64, 60, 0.75), rgba(120, 53, 15, 0.8));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
    align-items: stretch;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

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

.hero-image {
    position: relative;
    min-height: 620px;
    background:
        linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(124, 45, 18, 0.5)),
        #292524;
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(28, 25, 23, 0.08), rgba(28, 25, 23, 0.66) 78%, rgba(28, 25, 23, 0.92)),
        linear-gradient(0deg, rgba(28, 25, 23, 0.68), transparent 58%);
}

.hero-image img {
    width: 100%;
    height: 100%;
    min-height: 620px;
    object-fit: cover;
}

.hero-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 54px;
    background: linear-gradient(90deg, rgba(28, 25, 23, 0.52), rgba(28, 25, 23, 0.9));
}

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

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    margin: 0;
    color: #fde68a;
    font-size: clamp(1.4rem, 3vw, 2.5rem);
}

.hero-copy p,
.page-hero p,
.detail-one-line,
.detail-panel p,
.category-overview-head p,
.site-footer p {
    margin: 0;
    color: var(--muted);
    line-height: 1.85;
}

.hero-tags,
.tag-row,
.hero-actions,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.24);
    font-size: 0.82rem;
}

.large-tags span {
    min-height: 34px;
    padding: 7px 12px;
}

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    min-height: 44px;
    padding: 0 18px;
    font-weight: 800;
    transition: 0.25s ease;
}

.primary-btn {
    color: #1c1917;
    background: linear-gradient(135deg, var(--amber-soft), #fb923c);
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.primary-btn.small {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.92rem;
}

.ghost-btn {
    color: #fed7aa;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.text-link {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    background: rgba(28, 25, 23, 0.64);
    transform: translateY(-50%);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.active {
    width: 28px;
    border-radius: 999px;
    background: var(--amber-soft);
}

.hero-search-card {
    display: grid;
    grid-template-columns: auto minmax(240px, 1fr);
    align-items: center;
    gap: 18px;
    margin: -38px auto 0;
    position: relative;
    z-index: 8;
    width: min(920px, calc(100% - 32px));
    padding: 18px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(41, 37, 36, 0.88);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(16px);
}

.hero-search-card strong {
    color: #fde68a;
}

.hero-search-form,
.filter-bar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 10px;
}

.hero-search-form input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    padding: 0 16px;
    color: var(--text);
    background: rgba(28, 25, 23, 0.8);
    outline: none;
}

.filter-bar select {
    min-width: 150px;
}

.hero-search-form button {
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    color: #1c1917;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-soft), #fb923c);
}

.content-section,
.category-overview-card,
.detail-panel,
.player-section {
    margin: 48px 0;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(41, 37, 36, 0.72);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

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

.section-head h2,
.category-overview-head h2,
.detail-panel h2 {
    margin: 6px 0 0;
    font-size: clamp(1.5rem, 3vw, 2.35rem);
    line-height: 1.1;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 20px;
    background: rgba(28, 25, 23, 0.76);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 15%, rgba(251, 191, 36, 0.28), transparent 42%),
        linear-gradient(135deg, #44403c, #1c1917);
}

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

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

.rank-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #1c1917;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-soft), #fb923c);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.card-meta,
.card-desc {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.65;
}

.card-desc {
    display: -webkit-box;
    min-height: 2.9em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body .tag-row {
    margin-top: 12px;
}

.card-body .tag-row span {
    font-size: 0.74rem;
}

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

.category-tile {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 50%),
        rgba(28, 25, 23, 0.72);
    transition: 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.5);
}

.category-tile span {
    color: var(--amber-soft);
    font-weight: 900;
    font-size: 1.25rem;
}

.category-tile strong {
    line-height: 1.7;
}

.category-tile em {
    color: var(--muted);
    font-size: 0.85rem;
    font-style: normal;
}

.page-hero {
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(120, 53, 15, 0.22)),
        rgba(41, 37, 36, 0.78);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 10px 0 14px;
}

.filter-bar {
    grid-template-columns: minmax(200px, 1fr) 150px 150px;
    margin-bottom: 20px;
}

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

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

.movie-card.compact {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 138px;
}

.movie-card.compact .poster-link {
    aspect-ratio: auto;
    min-height: 138px;
}

.movie-card.compact .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.movie-card.is-hidden {
    display: none;
}

.overview-stack {
    display: grid;
    gap: 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
    color: #fed7aa;
}

.breadcrumb strong {
    color: var(--text);
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    align-items: stretch;
    padding: 30px;
    border-radius: 30px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 42%),
        rgba(41, 37, 36, 0.78);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    min-height: 440px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 30% 15%, rgba(251, 191, 36, 0.28), transparent 42%),
        linear-gradient(135deg, #44403c, #1c1917);
}

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

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.detail-info h1 {
    font-size: clamp(2rem, 5vw, 4.8rem);
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #0c0a09;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(245, 158, 11, 0.18);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #1c1917;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.18), rgba(28, 25, 23, 0.42));
}

.play-cover span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    padding-left: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-soft), #fb923c);
    box-shadow: 0 18px 50px rgba(245, 158, 11, 0.32);
    font-size: 2rem;
}

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

.site-footer {
    width: min(var(--max), calc(100% - 32px));
    margin: 60px auto 0;
    padding: 34px 0 42px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-grid strong {
    color: #fde68a;
    font-size: 1.2rem;
}

.footer-links a {
    color: #fed7aa;
}

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

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

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

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        position: absolute;
        inset: auto 0 0 0;
        min-height: 65%;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        min-height: 64px;
    }

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

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(41, 37, 36, 0.96);
    }

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

    .hero-carousel {
        min-height: 680px;
        border-radius: 24px;
    }

    .hero-image,
    .hero-image img {
        min-height: 680px;
    }

    .hero-copy {
        padding: 30px 24px 56px;
    }

    .hero-search-card,
    .hero-search-form,
    .filter-bar,
    .footer-grid,
    .section-head,
    .category-overview-head {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .movie-grid,
    .movie-grid.all-grid,
    .movie-grid.small-grid,
    .category-grid,
    .rank-list,
    .full-rank {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .movie-card.compact {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .page-hero,
    .content-section,
    .category-overview-card,
    .detail-panel,
    .player-section,
    .detail-hero {
        padding: 20px;
        border-radius: 22px;
    }

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

    .detail-poster {
        min-height: auto;
        aspect-ratio: 2 / 3;
    }
}

@media (max-width: 480px) {
    main,
    .nav-shell,
    .site-footer {
        width: min(100% - 20px, var(--max));
    }

    .movie-grid,
    .movie-grid.all-grid,
    .movie-grid.small-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .rank-list,
    .full-rank {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.04em;
    }
}
