:root {
    color-scheme: dark;
    --page-bg: #0c0a09;
    --panel-bg: rgba(28, 25, 23, 0.84);
    --panel-strong: #1c1917;
    --line-soft: rgba(245, 158, 11, 0.16);
    --line-cold: rgba(255, 255, 255, 0.08);
    --text-main: #fff7ed;
    --text-muted: #d6d3d1;
    --text-subtle: #a8a29e;
    --brand: #f59e0b;
    --brand-light: #fbbf24;
    --brand-deep: #92400e;
    --danger: #ef4444;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-card: 0 22px 55px rgba(0, 0, 0, 0.38);
    --container: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 12%, rgba(245, 158, 11, 0.16), transparent 32rem),
        radial-gradient(circle at 85% 8%, rgba(180, 83, 9, 0.13), transparent 28rem),
        linear-gradient(180deg, #0c0a09 0%, #1c1917 48%, #0c0a09 100%);
    color: var(--text-main);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    max-width: 100%;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    color: #1c1917;
    box-shadow: 0 10px 32px rgba(245, 158, 11, 0.32);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-links a,
.mobile-panel a {
    color: #fde68a;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
}

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

.hero-carousel {
    position: relative;
    min-height: 68vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line-soft);
    background: #0c0a09;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 10, 9, 0.96) 0%, rgba(12, 10, 9, 0.72) 42%, rgba(12, 10, 9, 0.18) 100%),
        linear-gradient(0deg, #0c0a09 0%, rgba(12, 10, 9, 0.12) 42%, rgba(12, 10, 9, 0.24) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(650px, 92%);
    padding-top: 60px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.32);
    background: rgba(245, 158, 11, 0.16);
    color: #fde68a;
    font-weight: 800;
    font-size: 14px;
}

.hero-title {
    margin: 0;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.07em;
    font-weight: 950;
    color: #fff7ed;
    text-shadow: 0 12px 42px rgba(0, 0, 0, 0.45);
}

.hero-desc {
    margin: 22px 0 0;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
    color: #e7e5e4;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-meta {
    margin-top: 18px;
}

.meta-pill,
.tag-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.07);
    color: #fde68a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 10px;
}

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

.btn-primary,
.btn-secondary,
.card-button,
.player-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    min-height: 52px;
    padding: 0 24px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1c1917;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.btn-secondary {
    min-height: 52px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.42);
    color: #fff7ed;
}

.btn-primary:hover,
.btn-secondary:hover,
.card-button:hover,
.player-button:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 8;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.48);
    color: #fff7ed;
    font-size: 26px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

.hero-dot {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.36);
}

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

.main-content {
    padding: 54px 0 72px;
}

.section-block {
    margin-bottom: 64px;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: #fbbf24;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-title {
    margin: 0;
    color: #fffbeb;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 950;
    letter-spacing: -0.05em;
}

.section-desc {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.8;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    background: rgba(28, 25, 23, 0.72);
    box-shadow: var(--shadow-card);
}

.search-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(12, 10, 9, 0.78);
    color: #fff7ed;
    outline: none;
    padding: 0 16px;
}

.search-input:focus {
    border-color: rgba(245, 158, 11, 0.72);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a,
.quick-links button {
    min-height: 38px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.06);
    color: #fde68a;
    font-weight: 800;
    padding: 0 14px;
}

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

.movie-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 196px;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 22px;
    scroll-snap-type: x proximity;
}

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line-cold);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(41, 37, 36, 0.94), rgba(28, 25, 23, 0.92));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.46);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.36);
    transform: translateY(-6px);
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #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);
}

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    border-radius: 999px;
    background: rgba(12, 10, 9, 0.78);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 9px;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    margin: 9px 0 8px;
    overflow: hidden;
    color: #fff7ed;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title a:hover {
    color: #fbbf24;
}

.card-desc {
    display: -webkit-box;
    min-height: 64px;
    margin: 0;
    overflow: hidden;
    color: var(--text-subtle);
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.card-button {
    width: 100%;
    min-height: 40px;
    margin-top: 14px;
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.28);
}

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

.category-card {
    display: block;
    min-height: 180px;
    padding: 24px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 16rem),
        linear-gradient(145deg, rgba(41, 37, 36, 0.94), rgba(12, 10, 9, 0.9));
    box-shadow: var(--shadow-card);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0;
    color: #fffbeb;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    margin: 12px 0 0;
    color: var(--text-muted);
    line-height: 1.75;
}

.rank-list {
    display: grid;
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 54px 108px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line-cold);
    border-radius: var(--radius-lg);
    background: rgba(28, 25, 23, 0.78);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #1c1917;
    font-size: 20px;
    font-weight: 950;
}

.rank-thumb {
    width: 108px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: #1c1917;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    margin: 0 0 10px;
    color: #fff7ed;
    font-size: 20px;
    font-weight: 950;
}

.rank-desc {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--text-muted);
    line-height: 1.68;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.breadcrumb a {
    color: #fbbf24;
}

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

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.52));
    color: #1c1917;
}

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

.player-button {
    min-width: 128px;
    min-height: 58px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1c1917;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.36);
}

.detail-card {
    padding: 22px;
    border: 1px solid var(--line-cold);
    border-radius: var(--radius-xl);
    background: rgba(28, 25, 23, 0.82);
    box-shadow: var(--shadow-card);
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 2 / 3;
    background: #1c1917;
}

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

.detail-title {
    margin: 20px 0 14px;
    color: #fffbeb;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 1.1;
}

.detail-one-line {
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.8;
}

.prose-panel {
    margin-top: 28px;
    padding: 28px;
    border: 1px solid var(--line-cold);
    border-radius: var(--radius-xl);
    background: rgba(28, 25, 23, 0.72);
}

.prose-panel h2 {
    margin: 0 0 16px;
    color: #fef3c7;
    font-size: 26px;
    font-weight: 950;
}

.prose-panel p {
    margin: 0 0 24px;
    color: #d6d3d1;
    font-size: 16px;
    line-height: 1.9;
}

.site-footer {
    border-top: 1px solid var(--line-soft);
    background: rgba(12, 10, 9, 0.76);
    color: var(--text-subtle);
    padding: 34px 0;
}

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

.footer-brand {
    color: #fef3c7;
    font-size: 20px;
    font-weight: 950;
}

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

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

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .hero-carousel {
        min-height: 76vh;
    }

    .hero-copy {
        padding-top: 36px;
    }

    .hero-control {
        display: none;
    }

    .section-head,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

    .rank-item {
        grid-template-columns: 42px 88px minmax(0, 1fr);
    }

    .rank-item .btn-secondary {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .rank-thumb {
        width: 88px;
    }

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

@media (max-width: 520px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

    .header-inner {
        min-height: 64px;
    }

    .logo {
        font-size: 19px;
    }

    .logo-mark {
        width: 38px;
        height: 38px;
    }

    .main-content {
        padding-top: 36px;
    }

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

    .movie-scroll {
        grid-auto-columns: 74%;
    }

    .card-title {
        min-height: auto;
    }

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

    .prose-panel {
        padding: 20px;
    }
}
