* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-strong: #111827;
    --panel-soft: rgba(15, 23, 42, 0.78);
    --border: #1e293b;
    --text: #cbd5e1;
    --muted: #94a3b8;
    --muted-strong: #64748b;
    --white: #ffffff;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --orange: #ea580c;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    --radius-lg: 1.25rem;
    --radius-md: 0.875rem;
    --radius-sm: 0.625rem;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.12), transparent 28rem),
        radial-gradient(circle at 80% 18%, rgba(234, 88, 12, 0.1), transparent 24rem),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(100% - 2rem, 1280px);
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    gap: 1rem;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.02em;
}

.brand-mark {
    display: inline-grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border-radius: 0.7rem;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: var(--white);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.22);
}

.brand-name {
    font-size: 1.12rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.45rem;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.site-footer a:hover {
    color: var(--amber-light);
}

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

.menu-toggle span {
    width: 1.1rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(100% - 2rem, 1280px);
    margin: 0 auto;
    padding: 0.85rem 0 1rem;
    border-top: 1px solid var(--border);
}

.mobile-nav.is-open {
    display: grid;
    gap: 0.75rem;
}

.hero-section {
    padding: 2rem 0 0;
}

.hero-slider {
    position: relative;
    min-height: 500px;
    height: clamp(500px, 70vh, 760px);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1.5rem;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.75s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 45%);
}

.hero-content {
    position: absolute;
    left: clamp(1.5rem, 6vw, 5rem);
    top: 50%;
    width: min(680px, calc(100% - 3rem));
    transform: translateY(-50%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 0.8rem;
    padding: 0.32rem 0.72rem;
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    color: var(--amber-light);
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--white);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.05;
}

.hero-content h1 {
    max-width: 11em;
    font-size: clamp(2.4rem, 5.6vw, 5.7rem);
}

.hero-content p {
    max-width: 680px;
    margin: 1.15rem 0 0;
    color: #d7dee8;
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
}

.hero-tags {
    margin-top: 1.2rem;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.88);
    color: #dbeafe;
    font-size: 0.78rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.72rem 1.4rem;
    border-radius: 0.9rem;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: var(--white);
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.24);
}

.ghost-btn {
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(15, 23, 42, 0.78);
    color: var(--white);
}

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

.ghost-btn:hover {
    border-color: rgba(245, 158, 11, 0.62);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

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

.hero-dots button {
    width: 0.72rem;
    height: 0.72rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
    width: 2.1rem;
    background: var(--amber-light);
}

.intro-strip,
.page-hero,
.section-block,
.detail-hero {
    margin-top: 4rem;
}

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.7));
}

.intro-strip h2,
.section-heading h2,
.detail-text h2,
.site-footer h2 {
    margin: 0;
    color: var(--white);
}

.intro-strip h2 {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    letter-spacing: -0.04em;
}

.intro-strip p,
.page-hero p,
.category-tile p,
.category-panel p,
.movie-card p,
.wide-content p,
.detail-text p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

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

.section-heading h2 {
    font-size: clamp(1.55rem, 2.5vw, 2.35rem);
    letter-spacing: -0.04em;
}

.section-heading a {
    color: var(--amber-light);
    font-weight: 700;
}

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

.category-tile,
.category-panel {
    display: block;
    min-height: 145px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.08), transparent 38%),
        rgba(15, 23, 42, 0.86);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-panel:hover,
.movie-card:hover,
.wide-card:hover {
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    transform: translateY(-3px);
}

.category-tile span,
.category-panel-title {
    display: inline-flex;
    margin-bottom: 0.75rem;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 800;
}

.category-panel-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.category-panel-links a {
    padding: 0.35rem 0.62rem;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.85);
    color: #dbeafe;
    font-size: 0.78rem;
}

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

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

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

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

.movie-card,
.wide-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card[hidden],
.wide-card[hidden] {
    display: none;
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #0b1120;
}

.poster-wrap img,
.wide-poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-wrap img,
.wide-card:hover .wide-poster img,
.detail-poster:hover img {
    transform: scale(1.06);
}

.poster-overlay {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    height: 42%;
    place-items: end center;
    padding: 1rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 800;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-overlay {
    opacity: 1;
}

.rank-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: grid;
    min-width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: var(--white);
    font-weight: 900;
}

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

.movie-title {
    display: -webkit-box;
    min-height: 2.8em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--white);
    font-weight: 800;
    line-height: 1.4;
}

.movie-title:hover,
.wide-heading a:hover {
    color: var(--amber-light);
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.7rem;
    margin-top: 0.55rem;
    color: var(--muted-strong);
    font-size: 0.82rem;
}

.movie-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
    content: "";
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0.7rem 0 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.9rem;
}

.tag-row {
    margin-top: 0.85rem;
}

.movie-card.compact .movie-card-body {
    padding: 0.82rem;
}

.movie-card.compact .movie-title {
    font-size: 0.96rem;
}

.search-panel {
    margin-bottom: 1.4rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.78);
}

.search-form {
    display: flex;
    gap: 0.75rem;
}

.search-form input {
    flex: 1;
    min-width: 0;
    height: 3rem;
    padding: 0 1rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    outline: none;
    background: #020617;
    color: var(--white);
}

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

.search-form button,
.filter-row button {
    border: 0;
    border-radius: 0.85rem;
    background: #1e293b;
    color: var(--white);
    font-weight: 800;
}

.search-form button {
    min-width: 6rem;
    padding: 0 1rem;
    background: var(--amber);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.filter-row button {
    padding: 0.52rem 0.85rem;
    color: #dbeafe;
}

.filter-row button.is-active,
.filter-row button:hover {
    background: rgba(245, 158, 11, 0.92);
    color: var(--white);
}

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

.wide-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    min-height: 176px;
}

.wide-poster {
    overflow: hidden;
    background: #0b1120;
}

.wide-content {
    padding: 1rem;
}

.wide-heading {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 900;
}

.rank-number {
    display: inline-grid;
    flex: 0 0 auto;
    min-width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 0.6rem;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: var(--white);
}

.wide-content p {
    display: -webkit-box;
    margin: 0.75rem 0 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.92rem;
}

.page-shell {
    padding-bottom: 1rem;
}

.page-hero {
    padding: clamp(2rem, 4vw, 3rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.11), transparent 34%),
        linear-gradient(120deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.74));
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

.page-hero p {
    max-width: 760px;
    margin: 1rem 0 0;
    font-size: 1.05rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: clamp(1.4rem, 4vw, 3rem);
    align-items: center;
    padding: clamp(1rem, 2.5vw, 2rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.82);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    background: #0b1120;
    box-shadow: var(--shadow);
}

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

.lead-text {
    max-width: 780px;
    margin: 1.25rem 0 0;
    color: #dbe4ef;
    font-size: 1.1rem;
    line-height: 1.85;
}

.detail-tags {
    margin-top: 1.2rem;
}

.player-section {
    margin-top: 2rem;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: var(--shadow);
}

.player-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 0.7rem;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.18));
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 900;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    display: grid;
    width: 5rem;
    height: 5rem;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 22px 44px rgba(245, 158, 11, 0.28);
    font-size: 2rem;
}

.detail-text {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.82);
}

.detail-text h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.detail-text h2 + p {
    margin-top: 0.8rem;
}

.detail-text p + h2 {
    margin-top: 1.8rem;
}

.detail-text p {
    margin-bottom: 0;
    font-size: 1.03rem;
}

.site-footer {
    margin-top: 5rem;
    border-top: 1px solid var(--border);
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) minmax(180px, 1fr);
    gap: 2rem;
    padding: 3rem 0;
}

.footer-brand {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.site-footer ul {
    display: grid;
    gap: 0.6rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

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

.footer-bottom {
    padding: 1.1rem;
    border-top: 1px solid var(--border);
    color: var(--muted-strong);
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 1180px) {
    .desktop-nav {
        gap: 1rem;
        font-size: 0.9rem;
    }

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

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

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

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

    .intro-strip,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

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

    .detail-poster {
        width: min(320px, 100%);
    }

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

@media (max-width: 640px) {
    .container {
        width: min(100% - 1rem, 1280px);
    }

    .brand-name {
        font-size: 1rem;
    }

    .hero-section {
        padding-top: 0.75rem;
    }

    .hero-slider {
        min-height: 560px;
        height: 76vh;
        border-radius: 1rem;
    }

    .hero-content {
        top: auto;
        bottom: 4rem;
        left: 1.1rem;
        width: calc(100% - 2.2rem);
        transform: none;
    }

    .hero-content h1 {
        font-size: 2.35rem;
    }

    .hero-control {
        display: none;
    }

    .intro-strip,
    .page-hero,
    .detail-hero,
    .detail-text,
    .search-panel {
        border-radius: 1rem;
    }

    .movie-grid,
    .featured-grid,
    .related-grid,
    .library-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

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

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

    .movie-title {
        font-size: 0.95rem;
    }

    .wide-card {
        grid-template-columns: 100px minmax(0, 1fr);
        min-height: 150px;
    }

    .wide-content {
        padding: 0.8rem;
    }

    .wide-content p,
    .wide-content .tag-row {
        display: none;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form button {
        min-height: 2.75rem;
    }
}
