:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --dim: #94a3b8;
    --orange: #f97316;
    --red: #dc2626;
    --teal: #14b8a6;
    --blue: #2563eb;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(249, 115, 22, 0.18), transparent 34rem),
        radial-gradient(circle at 86% 8%, rgba(20, 184, 166, 0.16), transparent 28rem),
        linear-gradient(135deg, #020617 0%, #111827 48%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.26);
}

.logo-text {
    background: linear-gradient(90deg, #ffffff, #fed7aa 52%, #5eead4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.header-search {
    display: flex;
    align-items: center;
    width: min(310px, 30vw);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
}

.header-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    color: #ffffff;
    border: 0;
    outline: 0;
    background: transparent;
}

.header-search button {
    padding: 10px 16px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

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

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

.mobile-panel .nav-link,
.mobile-panel .header-search {
    width: 100%;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-carousel {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    min-height: 640px;
    padding: 92px 0 88px;
    opacity: 0;
    visibility: hidden;
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
    transition: opacity 0.8s ease, visibility 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-content {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-title {
    margin: 0;
    font-weight: 950;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 820px;
    font-size: clamp(38px, 7vw, 78px);
}

.hero h2 {
    margin-top: 16px;
    font-size: clamp(28px, 5vw, 56px);
}

.hero-description {
    max-width: 710px;
    margin-top: 20px;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-meta,
.meta-row,
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.pill,
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.62);
}

.tag {
    color: #fed7aa;
    border-color: rgba(251, 146, 60, 0.28);
    background: rgba(154, 52, 18, 0.22);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.26);
}

.btn-soft {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.52;
    transition: width 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 32px;
    opacity: 1;
    background: linear-gradient(90deg, var(--orange), var(--red));
}

.section {
    padding: 72px 0;
}

.section-tight {
    padding: 44px 0;
}

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

.section-kicker {
    margin-bottom: 10px;
    color: #fdba74;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title,
.page-hero h1,
.detail-section h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    line-height: 1.16;
}

.section-desc,
.page-hero p,
.detail-lead,
.body-text {
    color: var(--muted);
    line-height: 1.85;
}

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

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

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

.movie-card,
.category-card,
.panel,
.player-card,
.detail-box {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--bg-card);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.movie-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(251, 146, 60, 0.42);
    box-shadow: 0 22px 58px rgba(249, 115, 22, 0.18);
    transform: translateY(-5px);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

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

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

.card-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.rank-badge {
    right: 12px;
    left: auto;
    background: linear-gradient(135deg, var(--teal), var(--blue));
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.card-title {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

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

.card-text {
    display: -webkit-box;
    overflow: hidden;
    min-height: 50px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-link {
    margin-top: auto;
    color: #fdba74;
    font-weight: 900;
}

.page-hero {
    padding: 82px 0 48px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
    background:
        radial-gradient(circle at 18% 12%, rgba(249, 115, 22, 0.18), transparent 26rem),
        radial-gradient(circle at 88% 0%, rgba(20, 184, 166, 0.12), transparent 28rem);
}

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

.breadcrumb a:hover {
    color: #fdba74;
}

.search-panel {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
}

.page-search {
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.6);
}

.page-search input {
    width: 100%;
    padding: 14px 16px;
    color: #ffffff;
    border: 0;
    outline: 0;
    background: transparent;
}

.page-search button {
    padding: 14px 18px;
    color: #ffffff;
    border: 0;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #ffffff;
    border-color: rgba(251, 146, 60, 0.38);
    background: rgba(249, 115, 22, 0.24);
}

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 250px;
    padding: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(94, 234, 212, 0.38);
}

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    color: var(--muted);
    line-height: 1.75;
}

.preview-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: auto;
}

.preview-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.72);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0 58px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.34;
    background-position: center;
    background-size: cover;
    filter: blur(6px) saturate(1.05);
    transform: scale(1.04);
}

.detail-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.95));
}

.detail-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: rgba(2, 6, 23, 0.88);
    box-shadow: var(--shadow);
}

.detail-title {
    font-size: clamp(34px, 6vw, 64px);
}

.detail-lead {
    max-width: 760px;
    margin: 20px 0 22px;
    font-size: 18px;
}

.detail-section {
    padding: 56px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    align-items: start;
}

.player-card,
.detail-box {
    padding: 22px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    margin-top: 18px;
    border-radius: 22px;
    background: #000000;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
}

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

.play-button {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 20px 46px rgba(249, 115, 22, 0.32);
}

.body-text p {
    margin: 16px 0 0;
}

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

.side-item {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
}

.side-thumb {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.72);
}

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

.side-title {
    margin: 0 0 6px;
    color: #ffffff;
    font-weight: 900;
    line-height: 1.35;
}

.side-meta {
    color: var(--dim);
    font-size: 13px;
}

.empty-state {
    display: none;
    padding: 28px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 48px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: 26px;
    padding: 44px 0;
}

.footer-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 900;
}

.footer-text,
.footer-links a {
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: #fdba74;
}

.copyright {
    padding: 18px 0 28px;
    color: var(--dim);
    font-size: 14px;
}

@media (max-width: 980px) {
    .desktop-nav,
    .site-header > .container > .header-inner > .header-search {
        display: none;
    }

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

    .hero,
    .hero-carousel,
    .hero-slide {
        min-height: 600px;
    }

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

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

    .detail-cover {
        width: min(280px, 76vw);
    }
}

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

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

    .logo {
        font-size: 18px;
    }

    .hero,
    .hero-carousel,
    .hero-slide {
        min-height: 620px;
    }

    .hero-slide {
        padding: 74px 0 100px;
    }

    .hero-controls {
        right: 16px;
        left: 16px;
        justify-content: center;
    }

    .section {
        padding: 52px 0;
    }

    .section-head {
        display: block;
    }

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

    .page-search {
        display: grid;
    }

    .page-search button {
        border-radius: 0;
    }
}
