:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-2: #111827;
    --panel-soft: rgba(15, 23, 42, 0.74);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --amber: #f59e0b;
    --amber-2: #fbbf24;
    --amber-dark: #d97706;
    --radius: 1.25rem;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
    width: 100%;
    height: auto;
}

a {
    color: inherit;
}

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

.header-inner {
    width: min(1280px, calc(100% - 2rem));
    min-height: 4.5rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, var(--amber), var(--amber-2));
    color: #111827;
    box-shadow: 0 10px 32px rgba(245, 158, 11, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    color: var(--muted-2);
    font-weight: 700;
    transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: #fff;
    background: rgba(245, 158, 11, 0.16);
}

.header-search {
    display: flex;
    align-items: center;
    width: min(28vw, 22rem);
    min-width: 17rem;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
}

.header-search input {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.8rem;
    background: transparent;
    color: #fff;
    outline: none;
}

.header-search button,
.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.header-search button,
.primary-button {
    border: 0;
    background: linear-gradient(135deg, var(--amber), var(--amber-dark));
    color: #111827;
    box-shadow: 0 14px 36px rgba(245, 158, 11, 0.25);
}

.header-search button {
    padding: 0.52rem 0.95rem;
}

.primary-button {
    min-height: 3rem;
    padding: 0 1.4rem;
}

.ghost-button {
    min-height: 3rem;
    padding: 0 1.35rem;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
}

.text-link {
    color: var(--amber-2);
    gap: 0.3rem;
}

.primary-button:hover,
.header-search button:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.ghost-button:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.12);
}

.menu-toggle {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.8);
}

.menu-toggle span {
    width: 1.15rem;
    height: 2px;
    border-radius: 99px;
    background: #fff;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto 1rem;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
}

.hero-slider {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    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;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.12)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.06) 55%);
}

.hero-content {
    position: absolute;
    left: max(1rem, calc((100% - 1280px) / 2 + 1rem));
    bottom: 13vh;
    width: min(42rem, calc(100% - 2rem));
}

.hero-meta,
.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.hero-meta span,
.movie-meta-line span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0 0.7rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--muted-2);
    font-size: 0.8rem;
    font-weight: 800;
}

.hero-meta span:first-child,
.tag-row span:first-child {
    background: rgba(245, 158, 11, 0.92);
    color: #111827;
}

.hero-content h1,
.hero-content h2 {
    margin-top: 1.1rem;
    max-width: 48rem;
    font-size: clamp(2.45rem, 6vw, 5.8rem);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.065em;
    text-shadow: 0 16px 50px rgba(0, 0, 0, 0.65);
}

.hero-content p {
    max-width: 40rem;
    margin-top: 1.1rem;
    color: #dbeafe;
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.5);
    color: #fff;
    font-size: 2.25rem;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 1.2rem;
}

.hero-next {
    right: 1.2rem;
}

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

.hero-dot {
    width: 0.55rem;
    height: 0.55rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: 0.2s ease;
}

.hero-dot.is-active {
    width: 2.15rem;
    background: var(--amber);
}

.content-section {
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 4.5rem 0 0;
}

.section-overlap {
    position: relative;
    z-index: 6;
    margin-top: -3rem;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.6rem;
}

.section-kicker,
.compact-kicker {
    display: inline-block;
    margin-bottom: 0.35rem;
    color: var(--amber-2);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(1.7rem, 3vw, 2.45rem);
}

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

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

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

.movie-card,
.compact-card,
.rank-item,
.category-card-large,
.filter-panel,
.detail-hero,
.detail-content,
.player-shell,
.rank-panel {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72));
    box-shadow: var(--shadow);
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 30px 80px rgba(245, 158, 11, 0.12);
    transform: translateY(-4px);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

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

.movie-poster img,
.compact-cover img,
.rank-cover img,
.detail-cover img,
.category-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .movie-poster img,
.compact-card:hover img,
.category-tile:hover img {
    transform: scale(1.07);
}

.poster-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.74);
    color: #fff;
    font-weight: 900;
    font-size: 0.8rem;
    backdrop-filter: blur(8px);
}

.poster-play {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    width: 2.45rem;
    height: 2.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--amber);
    color: #111827;
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.35);
}

.movie-card-body {
    padding: 1rem;
}

.movie-card h3,
.compact-card h3,
.rank-item h3 {
    margin-top: 0.55rem;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.compact-card h3 a:hover,
.rank-item h3 a:hover {
    color: var(--amber-2);
}

.movie-card p,
.compact-card p,
.rank-item p,
.category-card-large p,
.page-hero p,
.site-footer p {
    margin-top: 0.65rem;
    color: var(--muted);
    line-height: 1.72;
}

.movie-meta-line {
    gap: 0.4rem;
}

.movie-meta-line span {
    min-height: 1.55rem;
    padding: 0 0.5rem;
    font-size: 0.72rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.9rem;
}

.tag-row span {
    min-height: 1.55rem;
    padding: 0 0.55rem;
    font-size: 0.72rem;
}

.category-band {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 1.6rem;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 23rem),
        rgba(15, 23, 42, 0.48);
}

.category-grid,
.category-list-grid {
    display: grid;
    gap: 1rem;
}

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

.category-tile {
    position: relative;
    min-height: 12rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: end;
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.58);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile span {
    font-size: 1.25rem;
    font-weight: 950;
}

.category-tile p {
    margin-top: 0.35rem;
    color: var(--muted-2);
    line-height: 1.6;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(23rem, 0.65fr);
    gap: 1.2rem;
}

.horizontal-row {
    display: grid;
    gap: 0.9rem;
}

.compact-card {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 1rem;
}

.compact-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 0.8rem;
    background: #0f172a;
}

.compact-kicker {
    margin-bottom: 0;
    letter-spacing: 0.06em;
    text-transform: none;
}

.rank-panel {
    align-self: start;
    position: sticky;
    top: 6rem;
    border-radius: 1.4rem;
    padding: 1rem;
}

.compact-heading {
    margin-bottom: 0.8rem;
}

.rank-mini-list,
.rank-list {
    display: grid;
    gap: 0.75rem;
}

.rank-item {
    display: grid;
    grid-template-columns: 3rem 4.6rem minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 1rem;
}

.full-rank-list .rank-item {
    grid-template-columns: 4rem 5.8rem minmax(0, 1fr) auto;
}

.rank-number {
    width: 2.6rem;
    height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    background: rgba(245, 158, 11, 0.14);
    color: var(--amber-2);
    font-weight: 950;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #0f172a;
}

.rank-content p {
    margin-top: 0.35rem;
}

.page-hero {
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 6rem 0 2rem;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.page-hero h1 {
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: 1;
}

.page-hero p {
    max-width: 43rem;
    font-size: 1.05rem;
}

.page-hero-compact {
    padding-top: 4rem;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 1.2rem;
    padding: 1rem;
    border-radius: 1.3rem;
}

.category-mosaic {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 1 / 1;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 14rem 12rem;
    gap: 0.9rem;
    margin-bottom: 1.4rem;
    padding: 1rem;
    border-radius: 1.2rem;
}

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

.filter-panel input,
.filter-panel select {
    min-height: 2.85rem;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    padding: 0 0.9rem;
    background: rgba(2, 6, 23, 0.55);
    color: #fff;
    outline: none;
}

.empty-state {
    display: none;
    margin-top: 2rem;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    color: var(--muted);
    text-align: center;
}

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

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

.detail-wrap {
    padding-top: 2.5rem;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.breadcrumbs a:hover {
    color: var(--amber-2);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(18rem, 25rem) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
    padding: 1.2rem;
    border-radius: 1.7rem;
}

.detail-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 1.35rem;
    background: #0f172a;
}

.detail-info h1 {
    margin-top: 1rem;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.05;
}

.detail-lead {
    margin-top: 1rem;
    color: var(--muted-2);
    font-size: 1.1rem;
    line-height: 1.9;
}

.tag-row-large span {
    min-height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.82rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1.6rem;
    background: #000;
    aspect-ratio: 16 / 9;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border: 0;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.78));
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--amber-dark));
    color: #111827;
    font-size: 2.2rem;
    box-shadow: 0 20px 55px rgba(245, 158, 11, 0.32);
}

.detail-content {
    padding: 2rem;
    border-radius: 1.4rem;
}

.detail-content h2 {
    margin-top: 1.6rem;
    font-size: 1.75rem;
}

.detail-content h2:first-child {
    margin-top: 0;
}

.detail-content p {
    margin-top: 0.85rem;
    color: var(--muted-2);
    font-size: 1.03rem;
    line-height: 2;
}

.site-footer {
    margin-top: 5rem;
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2.3rem 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.8fr);
    gap: 2rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem 1rem;
}

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

.footer-links a:hover {
    color: var(--amber-2);
}

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

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 900px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .hero-slider {
        min-height: 78vh;
    }

    .hero-content {
        bottom: 7rem;
    }

    .hero-control {
        display: none;
    }

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

    .detail-hero,
    .category-card-large,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 25rem;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .content-section,
    .page-hero,
    .footer-inner {
        width: min(100% - 1rem, 1280px);
    }

    .site-logo {
        font-size: 1rem;
    }

    .logo-mark {
        width: 2rem;
        height: 2rem;
    }

    .hero-content {
        bottom: 5.4rem;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 2.55rem;
    }

    .hero-actions,
    .section-heading,
    .page-hero {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .rank-item,
    .full-rank-list .rank-item {
        grid-template-columns: 2.8rem 4.8rem minmax(0, 1fr);
    }

    .rank-item .text-link {
        grid-column: 2 / -1;
        justify-content: flex-start;
    }

    .compact-card {
        grid-template-columns: 5rem minmax(0, 1fr);
    }

    .content-section {
        padding-top: 3.2rem;
    }
}
