:root {
    color-scheme: dark;
    --bg: #030712;
    --panel: rgba(31, 41, 55, 0.42);
    --panel-strong: rgba(31, 41, 55, 0.78);
    --panel-soft: rgba(17, 24, 39, 0.62);
    --line: rgba(75, 85, 99, 0.42);
    --text: #f3f4f6;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --white: #ffffff;
    --black: #000000;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow: 0 25px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% 0%, rgba(156, 163, 175, 0.12), transparent 34%),
        linear-gradient(180deg, #030712 0%, #111827 44%, #030712 100%);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(17, 24, 39, 0.92);
    border-bottom: 1px solid rgba(55, 65, 81, 0.72);
    backdrop-filter: blur(14px);
}

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

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #f9fafb;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(75, 85, 99, 0.18)),
        rgba(31, 41, 55, 0.86);
    box-shadow: 0 0 32px rgba(156, 163, 175, 0.2);
    font-weight: 300;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-name {
    font-size: 1.32rem;
    letter-spacing: 0.08em;
    font-weight: 300;
}

.brand-subtitle {
    margin-top: 4px;
    color: #6b7280;
    font-size: 0.74rem;
}

.main-nav,
.mobile-nav-inner,
.category-strip-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.nav-chip {
    border-radius: 12px;
    color: var(--muted);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
}

.nav-link {
    padding: 10px 16px;
}

.nav-chip {
    padding: 7px 12px;
    font-size: 0.86rem;
}

.nav-link:hover,
.nav-link.active,
.nav-chip:hover,
.nav-chip.active {
    color: var(--white);
    background: rgba(31, 41, 55, 0.84);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--text);
    background: rgba(31, 41, 55, 0.84);
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
}

.category-strip {
    border-top: 1px solid rgba(55, 65, 81, 0.36);
    background: rgba(3, 7, 18, 0.24);
}

.category-strip-inner {
    padding: 10px 0;
    overflow-x: auto;
}

.hero-slider {
    position: relative;
    height: 74vh;
    min-height: 560px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide::before,
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-slide::before {
    background: linear-gradient(to top, #030712 4%, rgba(3, 7, 18, 0.84) 38%, transparent 100%);
}

.hero-slide::after {
    background: linear-gradient(to right, rgba(3, 7, 18, 0.76), transparent 72%);
}

.hero-content {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: 0 0 72px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #d1d5db;
    letter-spacing: 0.12em;
    font-size: 0.9rem;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    box-shadow: 0 0 20px rgba(209, 213, 219, 0.8);
}

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1.05;
}

.hero-copy h1 {
    max-width: 860px;
    font-size: clamp(2.4rem, 7vw, 5.8rem);
}

.hero-copy p {
    max-width: 680px;
    margin: 20px 0 0;
    color: var(--soft);
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.75;
}

.hero-actions,
.detail-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    color: #111827;
    background: #ffffff;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.button:hover {
    transform: translateY(-1px);
    background: #e5e7eb;
}

.button.secondary {
    color: var(--soft);
    background: rgba(31, 41, 55, 0.72);
    backdrop-filter: blur(10px);
}

.button.secondary:hover {
    color: var(--white);
    background: rgba(55, 65, 81, 0.82);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2));
    bottom: 38px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(156, 163, 175, 0.72);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.section {
    padding: 58px 0;
}

.section.highlight {
    background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.34), transparent);
}

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

.section-title {
    margin: 0;
    color: #f3f4f6;
    font-size: clamp(1.55rem, 4vw, 2.1rem);
    font-weight: 300;
    letter-spacing: 0.03em;
}

.section-desc {
    margin: 8px 0 0;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.75;
}

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

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

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 320px);
    gap: 20px;
    padding: 4px 0 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.movie-card,
.list-card,
.category-tile,
.info-panel,
.player-shell {
    background: var(--panel);
    border: 1px solid rgba(75, 85, 99, 0.34);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
}

.movie-card {
    position: relative;
    min-width: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-4px) scale(1.015);
    background: rgba(31, 41, 55, 0.68);
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.88);
}

.movie-card.large .card-cover {
    aspect-ratio: 16 / 9;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.08);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 62%);
    opacity: 0.72;
    transition: opacity 0.3s ease;
}

.movie-card:hover .card-cover::after {
    opacity: 0.9;
}

.year-badge,
.rank-badge,
.list-index {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #e5e7eb;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(8px);
}

.year-badge {
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    font-size: 0.78rem;
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #111827;
    background: rgba(255, 255, 255, 0.9);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 16px;
}

.card-body h3 {
    margin: 0;
    color: #f9fafb;
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card.large .card-body h3 {
    font-size: 1.24rem;
}

.card-body p {
    margin: 0;
    min-height: 44px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta,
.card-tags,
.meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-meta span,
.card-tags span,
.meta-chips span,
.detail-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #d1d5db;
    background: rgba(55, 65, 81, 0.6);
    font-size: 0.78rem;
}

.card-tags span {
    color: #9ca3af;
    background: rgba(17, 24, 39, 0.55);
}

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

.list-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: background 0.25s ease, transform 0.25s ease;
}

.list-card:hover {
    transform: translateY(-2px);
    background: rgba(31, 41, 55, 0.68);
}

.list-card a {
    position: relative;
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 14px;
    padding: 14px;
    align-items: center;
}

.list-card img {
    width: 86px;
    height: 86px;
    border-radius: 14px;
    object-fit: cover;
}

.list-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 500;
}

.list-card p {
    margin: 0 0 8px;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-card span:not(.list-index) {
    color: #6b7280;
    font-size: 0.84rem;
}

.list-index {
    left: 8px;
    top: 8px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #111827;
    background: #ffffff;
    font-size: 0.86rem;
}

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

.category-tile {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.12), transparent 35%),
        linear-gradient(135deg, rgba(31, 41, 55, 0.82), rgba(17, 24, 39, 0.72));
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 300;
}

.category-tile p {
    margin: 12px 0 20px;
    color: var(--muted);
    line-height: 1.7;
}

.category-tile span {
    color: #d1d5db;
}

.cta-panel,
.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.12), transparent 42%),
        linear-gradient(135deg, rgba(31, 41, 55, 0.86), rgba(3, 7, 18, 0.9));
    border: 1px solid rgba(75, 85, 99, 0.38);
    box-shadow: var(--shadow);
}

.cta-panel {
    padding: clamp(28px, 5vw, 54px);
    text-align: center;
}

.cta-panel h2,
.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
}

.cta-panel p,
.page-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.8;
}

.page-hero {
    margin: 32px auto 20px;
    padding: clamp(32px, 7vw, 78px);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr repeat(3, minmax(140px, 190px));
    gap: 12px;
    margin: 28px 0 0;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(75, 85, 99, 0.58);
    border-radius: 12px;
    outline: none;
    color: #f3f4f6;
    background: rgba(17, 24, 39, 0.68);
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(209, 213, 219, 0.68);
}

.empty-state {
    display: none;
    margin: 28px 0;
    padding: 28px;
    border-radius: var(--radius-md);
    color: var(--muted);
    text-align: center;
    background: rgba(31, 41, 55, 0.4);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 430px) 1fr;
    gap: clamp(24px, 5vw, 48px);
    align-items: end;
    margin: 32px auto;
    padding: clamp(18px, 4vw, 42px);
}

.detail-hero .cover-large {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 32px 72px rgba(0, 0, 0, 0.45);
}

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

.detail-title h1 {
    font-size: clamp(2.1rem, 6vw, 4.8rem);
}

.detail-title p {
    margin: 20px 0 0;
    color: var(--soft);
    line-height: 1.8;
    font-size: 1.06rem;
}

.player-section {
    padding: 12px 0 38px;
}

.player-shell {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.player-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

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

.play-mask {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    color: #111827;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.12));
    cursor: pointer;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 0 54px rgba(255, 255, 255, 0.22);
    font-size: 2.2rem;
    transform: translateX(3px);
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.info-panel {
    border-radius: var(--radius-lg);
    padding: clamp(20px, 4vw, 34px);
}

.info-panel h2,
.side-panel h2 {
    margin: 0 0 16px;
    color: #f3f4f6;
    font-weight: 300;
    font-size: 1.6rem;
}

.info-panel p {
    margin: 0 0 20px;
    color: #d1d5db;
    line-height: 1.95;
}

.side-panel {
    position: sticky;
    top: 128px;
}

.side-panel .list-stack {
    gap: 12px;
}

.breadcrumb {
    margin-top: 28px;
    color: #6b7280;
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #d1d5db;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(55, 65, 81, 0.72);
    background: rgba(3, 7, 18, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    padding: 42px 0 32px;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
    color: #6b7280;
}

.footer-brand p {
    max-width: 360px;
    line-height: 1.8;
}

.footer-grid h3 {
    margin: 0 0 12px;
    color: #d1d5db;
    font-size: 1rem;
    font-weight: 500;
}

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

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

.footer-bottom {
    padding: 18px 0 28px;
    border-top: 1px solid rgba(55, 65, 81, 0.45);
    font-size: 0.88rem;
}

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

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

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

    .side-panel {
        position: static;
    }
}

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

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

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

    .mobile-nav-inner {
        padding: 12px 0;
        overflow-x: auto;
    }

    .brand-subtitle {
        display: none;
    }

    .hero-slider {
        min-height: 520px;
        height: 72vh;
    }

    .hero-content {
        padding-bottom: 86px;
    }

    .hero-dots {
        left: 16px;
        right: auto;
        bottom: 34px;
    }

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

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

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

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

    .detail-hero .cover-large {
        max-width: 420px;
        width: 100%;
    }

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

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

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

    .hero-slider {
        min-height: 500px;
    }

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

    .button {
        width: 100%;
    }

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

    .scroll-row {
        grid-auto-columns: minmax(230px, 85vw);
    }

    .list-card a {
        grid-template-columns: 72px 1fr;
    }

    .list-card img {
        width: 72px;
        height: 72px;
    }

    .play-icon {
        width: 68px;
        height: 68px;
        font-size: 1.8rem;
    }
}
