:root {
    color-scheme: dark;
    --bg: #050608;
    --bg-soft: #0b1018;
    --panel: #111827;
    --panel-2: #1f2937;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f9fafb;
    --muted: #9ca3af;
    --muted-2: #6b7280;
    --amber: #d97706;
    --amber-2: #f59e0b;
    --amber-3: #fbbf24;
    --red: #ef4444;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(217, 119, 6, 0.18), transparent 32rem),
        radial-gradient(circle at 85% 10%, rgba(245, 158, 11, 0.12), transparent 30rem),
        linear-gradient(180deg, #030712 0%, #050608 48%, #030712 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(75, 85, 99, 0.65);
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.96));
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-2), #92400e);
    box-shadow: 0 12px 30px rgba(217, 119, 6, 0.32);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    letter-spacing: 0.02em;
    color: transparent;
    background: linear-gradient(90deg, var(--amber-3), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-text small {
    display: block;
    margin-top: -4px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #d1d5db;
    font-weight: 600;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-3);
    background: rgba(217, 119, 6, 0.13);
}

.mobile-nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.8);
    cursor: pointer;
}

.mobile-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #fff;
}

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    border-top: 1px solid rgba(75, 85, 99, 0.4);
}

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

.hero-slider {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.85s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.62) 44%, rgba(0, 0, 0, 0.28) 100%),
        linear-gradient(0deg, #050608 0%, rgba(0, 0, 0, 0.3) 35%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 650px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 110px 20px 92px;
    display: flex;
    align-items: flex-end;
}

.hero-copy {
    max-width: 700px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 13px;
    border: 1px solid rgba(251, 191, 36, 0.36);
    border-radius: 999px;
    color: var(--amber-3);
    background: rgba(146, 64, 14, 0.26);
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 650px;
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: 18px;
}

.hero-meta,
.meta-line,
.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: var(--muted);
    font-size: 14px;
}

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--amber-2), #b45309);
    box-shadow: 0 18px 42px rgba(217, 119, 6, 0.34);
}

.btn-secondary {
    border: 1px solid rgba(251, 191, 36, 0.34);
    color: var(--amber-3);
    background: rgba(17, 24, 39, 0.64);
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 55px rgba(217, 119, 6, 0.28);
}

.hero-dots {
    position: absolute;
    z-index: 5;
    right: clamp(20px, 7vw, 82px);
    bottom: 38px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(209, 213, 219, 0.52);
    cursor: pointer;
    transition: width 0.3s ease, background 0.3s ease;
}

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

.main-section,
.page-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 20px;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.view-more {
    color: var(--amber-3);
    font-weight: 800;
}

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

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

.movie-card,
.movie-list-card,
.category-card,
.filter-panel,
.detail-panel,
.player-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.94));
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    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.7);
    box-shadow: 0 28px 70px rgba(217, 119, 6, 0.16);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--panel-2);
}

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

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.year-badge,
.rank-badge,
.play-chip,
.heat-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-3), var(--amber-2));
}

.play-chip {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 3;
    padding: 6px 11px;
    color: #fff;
    background: rgba(217, 119, 6, 0.92);
}

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

.movie-card h3,
.movie-list-card h3,
.category-card h2,
.category-card h3 {
    margin: 0;
    color: #fff;
    line-height: 1.35;
}

.movie-card h3 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 17px;
}

.movie-card p,
.movie-list-card p,
.category-card p {
    color: var(--muted);
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 13px;
}

.tag-row span,
.detail-tag {
    padding: 4px 8px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    color: var(--amber-3);
    background: rgba(217, 119, 6, 0.11);
    font-size: 12px;
}

.feature-band {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.72), rgba(0, 0, 0, 0));
}

.list-stack {
    display: grid;
    gap: 16px;
}

.movie-list-card {
    overflow: hidden;
    border-radius: 18px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.movie-list-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.6);
}

.movie-list-card a {
    display: flex;
    gap: 16px;
    padding: 14px;
}

.list-poster {
    position: relative;
    width: 148px;
    min-width: 148px;
    height: 104px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--panel-2);
}

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

.list-content {
    min-width: 0;
    flex: 1;
}

.list-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.list-content p {
    margin: 7px 0 10px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.heat-pill {
    min-width: max-content;
    padding: 5px 10px;
    color: #111827;
    background: var(--amber-3);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 80px 20px 56px;
    border-bottom: 1px solid rgba(75, 85, 99, 0.45);
    background:
        radial-gradient(circle at 18% 20%, rgba(217, 119, 6, 0.24), transparent 32rem),
        linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(3, 7, 18, 1));
}

.page-hero-inner {
    max-width: 1180px;
    margin: 0 auto;
}

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

.breadcrumb a {
    color: var(--amber-3);
}

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

.category-card {
    overflow: hidden;
    position: relative;
    border-radius: 22px;
    padding: 24px;
    min-height: 230px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
    font-size: 26px;
}

.category-card p {
    max-width: 720px;
}

.category-preview {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.category-preview img {
    width: 64px;
    height: 84px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.filter-panel {
    margin-bottom: 28px;
    padding: 22px;
    border-radius: 20px;
}

.filter-panel h2 {
    margin: 0 0 14px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 14px;
}

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

.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(75, 85, 99, 0.78);
    border-radius: 13px;
    padding: 0 13px;
    outline: none;
    color: #fff;
    background: rgba(3, 7, 18, 0.72);
}

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: var(--amber-2);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.hidden-by-filter {
    display: none !important;
}

.detail-hero {
    padding: 46px 20px 34px;
    background:
        radial-gradient(circle at 15% 0%, rgba(217, 119, 6, 0.22), transparent 30rem),
        linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(5, 6, 8, 0.96));
}

.detail-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.detail-title {
    max-width: 900px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #d1d5db;
    background: rgba(31, 41, 55, 0.92);
    border: 1px solid rgba(75, 85, 99, 0.65);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.85fr);
    gap: 24px;
}

.player-card,
.detail-panel {
    border-radius: var(--radius);
    overflow: hidden;
}

.movie-player {
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle at center, rgba(217, 119, 6, 0.12), transparent 18rem),
        rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

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

.play-core {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-2), #b45309);
    box-shadow: 0 22px 70px rgba(217, 119, 6, 0.46);
    font-size: 38px;
    transition: transform 0.25s ease;
}

.play-cover:hover .play-core {
    transform: scale(1.07);
}

.player-caption {
    padding: 18px 20px 20px;
}

.player-caption h2 {
    margin: 0 0 6px;
}

.player-caption p {
    margin: 0;
    color: var(--muted);
}

.detail-panel {
    padding: 24px;
}

.detail-panel h2,
.detail-panel h3 {
    margin: 0 0 12px;
}

.detail-panel p {
    margin: 0 0 18px;
    color: #d1d5db;
}

.detail-poster {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel-2);
}

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

.detail-side {
    display: grid;
    gap: 18px;
    align-content: start;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

@media (max-width: 1024px) {
    .movie-grid,
    .movie-grid.large-grid,
    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .mobile-nav-toggle {
        display: block;
    }

    .brand-text small {
        display: none;
    }

    .hero-slider,
    .hero-inner {
        min-height: 560px;
    }

    .hero-inner {
        padding-top: 86px;
        padding-bottom: 84px;
    }

    .hero-copy p {
        font-size: 16px;
    }

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

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

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

    .movie-list-card a {
        gap: 12px;
    }

    .list-poster {
        width: 110px;
        min-width: 110px;
        height: 82px;
    }

    .list-title-row {
        flex-direction: column;
        gap: 6px;
    }

    .detail-panel {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .nav-shell {
        padding: 0 14px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

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

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