:root {
    --night-950: #0a1929;
    --night-900: #102a43;
    --night-850: #18324d;
    --night-800: #243b53;
    --night-700: #334e68;
    --night-300: #9fb3c8;
    --night-200: #bcccdc;
    --ocean-500: #2eabff;
    --ocean-600: #1a92e6;
    --moon-600: #d89320;
    --text: #f8fbff;
    --muted: #b8c7d7;
    --line: rgba(120, 202, 255, 0.18);
    --card: rgba(16, 42, 67, 0.74);
    --card-strong: rgba(36, 59, 83, 0.82);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(46, 171, 255, 0.17), transparent 32rem),
        radial-gradient(circle at 80% 12rem, rgba(216, 147, 32, 0.12), transparent 24rem),
        linear-gradient(180deg, var(--night-950), var(--night-900) 42%, var(--night-950));
    font-family: Inter, Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    z-index: 50;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(16, 42, 67, 0.94), rgba(16, 42, 67, 0.72));
    border-bottom: 1px solid rgba(120, 202, 255, 0.12);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, #53bbff, var(--ocean-600));
    box-shadow: 0 12px 28px rgba(46, 171, 255, 0.32);
    font-size: 15px;
}

.brand-copy {
    display: grid;
    line-height: 1.15;
}

.brand-copy strong,
.footer-logo strong {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.brand-copy small {
    color: var(--night-300);
    font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
    color: var(--night-200);
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fff;
}

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.nav-search input,
.mobile-nav input,
.filter-bar input,
.filter-bar select,
.hero-search input {
    color: #fff;
    background: rgba(36, 59, 83, 0.65);
    border: 1px solid rgba(159, 179, 200, 0.22);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
    width: 238px;
    padding: 10px 12px;
}

.nav-search input:focus,
.mobile-nav input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.hero-search input:focus {
    border-color: rgba(83, 187, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(46, 171, 255, 0.16);
    background: rgba(36, 59, 83, 0.9);
}

.nav-search button,
.mobile-nav button,
.hero-search button,
.primary-btn,
.secondary-btn,
.play-toggle,
.slider-btn,
.inline-btn {
    border: 0;
    cursor: pointer;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ocean-500), var(--ocean-600));
    box-shadow: 0 14px 30px rgba(26, 146, 230, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button {
    padding: 10px 14px;
}

.nav-search button:hover,
.mobile-nav button:hover,
.hero-search button:hover,
.primary-btn:hover,
.play-toggle:hover,
.slider-btn:hover,
.inline-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(26, 146, 230, 0.32);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    color: #fff;
    border: 1px solid rgba(159, 179, 200, 0.18);
    border-radius: 12px;
    background: rgba(36, 59, 83, 0.7);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid rgba(159, 179, 200, 0.12);
    border-radius: 18px;
    background: rgba(10, 25, 41, 0.94);
}

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

.mobile-nav form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.mobile-nav input {
    min-width: 0;
    padding: 10px 12px;
}

.mobile-nav button {
    padding: 10px 14px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(36, 59, 83, 0.35);
}

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

.hero-section {
    position: relative;
    min-height: 640px;
    display: grid;
    align-items: center;
    margin-bottom: 70px;
}

.hero-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(120, 202, 255, 0.18);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(16, 42, 67, 0.96), rgba(10, 25, 41, 0.92));
    box-shadow: var(--shadow);
}

.hero-track {
    display: flex;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-slide {
    position: relative;
    flex: 0 0 100%;
    min-height: 560px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 40px;
    padding: 54px;
    isolation: isolate;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 18% 20%, rgba(83, 187, 255, 0.22), transparent 28rem),
        linear-gradient(135deg, rgba(16, 42, 67, 0.9), rgba(10, 25, 41, 0.58));
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    color: #e8f6ff;
    border: 1px solid rgba(83, 187, 255, 0.28);
    border-radius: 999px;
    background: rgba(46, 171, 255, 0.12);
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.hero-copy p,
.page-hero p,
.detail-title p {
    color: var(--night-200);
    line-height: 1.8;
    font-size: 17px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0;
}

.primary-btn,
.secondary-btn,
.inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    font-weight: 800;
}

.secondary-btn {
    background: rgba(36, 59, 83, 0.72);
    border: 1px solid rgba(159, 179, 200, 0.18);
    box-shadow: none;
}

.secondary-btn:hover {
    background: rgba(51, 78, 104, 0.92);
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    max-width: 560px;
    padding: 10px;
    border: 1px solid rgba(159, 179, 200, 0.12);
    border-radius: 20px;
    background: rgba(10, 25, 41, 0.45);
}

.hero-search input {
    min-width: 0;
    padding: 14px 16px;
}

.hero-search button {
    padding: 14px 18px;
    font-weight: 800;
}

.hero-poster {
    position: relative;
    align-self: stretch;
    min-height: 420px;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(36, 59, 83, 0.7);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(10, 25, 41, 0.82));
}

.hero-poster-caption {
    position: absolute;
    z-index: 2;
    left: 24px;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-poster-caption span,
.tag-row span,
.detail-tags span,
.filter-pill,
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    color: #eaf7ff;
    border: 1px solid rgba(159, 179, 200, 0.15);
    border-radius: 999px;
    background: rgba(16, 42, 67, 0.68);
    font-size: 12px;
    font-weight: 700;
}

.slider-controls {
    position: absolute;
    z-index: 3;
    right: 28px;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-btn {
    width: 44px;
    height: 44px;
    font-size: 22px;
}

.slider-dots {
    position: absolute;
    z-index: 3;
    left: 54px;
    bottom: 32px;
    display: flex;
    gap: 8px;
}

.slider-dot {
    width: 30px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(188, 204, 220, 0.32);
    cursor: pointer;
}

.slider-dot.active {
    background: var(--ocean-500);
}

.section-block {
    margin: 0 0 72px;
}

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

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

.section-head p {
    margin: 8px 0 0;
    color: var(--night-300);
}

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(159, 179, 200, 0.13);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(83, 187, 255, 0.42);
    background: rgba(36, 59, 83, 0.86);
}

.poster-box {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(51, 78, 104, 0.55);
}

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

.movie-card:hover .poster-box img {
    transform: scale(1.05);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(10, 25, 41, 0.86));
}

.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    min-width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--moon-600), var(--ocean-600));
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.movie-card-body {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--night-300);
    font-size: 12px;
    font-weight: 700;
}

.movie-card h2 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
}

.movie-card p {
    min-height: 3.2em;
    margin: 0;
    color: var(--night-300);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-scroller {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.card-scroller::-webkit-scrollbar {
    display: none;
}

.movie-card-compact .movie-card-body {
    padding: 14px;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(159, 179, 200, 0.13);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(46, 171, 255, 0.22), transparent 12rem),
        linear-gradient(135deg, rgba(36, 59, 83, 0.9), rgba(16, 42, 67, 0.78));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(83, 187, 255, 0.46);
}

.category-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 900;
}

.category-card p {
    margin: 0 0 22px;
    color: var(--night-200);
    line-height: 1.75;
}

.category-card .inline-btn {
    padding: 11px 14px;
}

.page-hero {
    margin-bottom: 38px;
    padding: 36px;
    border: 1px solid rgba(159, 179, 200, 0.13);
    border-radius: 30px;
    background:
        radial-gradient(circle at 18% 0, rgba(46, 171, 255, 0.2), transparent 28rem),
        linear-gradient(135deg, rgba(16, 42, 67, 0.92), rgba(10, 25, 41, 0.84));
    box-shadow: var(--shadow);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px 160px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid rgba(159, 179, 200, 0.12);
    border-radius: 22px;
    background: rgba(10, 25, 41, 0.35);
}

.filter-bar input,
.filter-bar select {
    min-width: 0;
    padding: 12px 14px;
}

.empty-state {
    display: none;
    margin: 28px 0;
    padding: 28px;
    text-align: center;
    color: var(--night-200);
    border: 1px solid rgba(159, 179, 200, 0.12);
    border-radius: 22px;
    background: rgba(16, 42, 67, 0.55);
}

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

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

.ranking-row {
    display: grid;
    grid-template-columns: 62px 92px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(159, 179, 200, 0.13);
    border-radius: 20px;
    background: rgba(16, 42, 67, 0.7);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-row:hover {
    transform: translateX(4px);
    border-color: rgba(83, 187, 255, 0.4);
}

.ranking-index {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--moon-600), var(--ocean-600));
    font-weight: 900;
}

.ranking-row img {
    width: 92px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-row h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 880;
}

.ranking-row p {
    margin: 0;
    color: var(--night-300);
    line-height: 1.65;
}

.detail-hero {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 34px;
    align-items: start;
    margin-bottom: 48px;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(159, 179, 200, 0.13);
    border-radius: 30px;
    background: rgba(36, 59, 83, 0.65);
    box-shadow: var(--shadow);
}

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

.detail-title {
    display: grid;
    gap: 18px;
    padding: 34px;
    border: 1px solid rgba(159, 179, 200, 0.13);
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(46, 171, 255, 0.18), transparent 20rem),
        rgba(16, 42, 67, 0.74);
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--night-300);
    font-size: 14px;
}

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

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

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

.player-section {
    margin: 0 0 46px;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(120, 202, 255, 0.18);
    border-radius: 30px;
    background: #050b12;
    box-shadow: var(--shadow);
    cursor: pointer;
}

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

.play-toggle {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: 86px;
    height: 86px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 30px;
}

.play-toggle:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.player-card.is-playing .play-toggle {
    opacity: 0;
    pointer-events: none;
}

.detail-section {
    margin-bottom: 46px;
    padding: 28px;
    border: 1px solid rgba(159, 179, 200, 0.13);
    border-radius: 28px;
    background: rgba(16, 42, 67, 0.66);
}

.detail-section p {
    color: var(--night-200);
    line-height: 1.9;
    font-size: 17px;
}

.hidden-card {
    display: none !important;
}

.site-footer {
    margin-top: 88px;
    border-top: 1px solid rgba(159, 179, 200, 0.13);
    background: rgba(10, 25, 41, 0.88);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.site-footer p,
.site-footer a,
.footer-bottom {
    color: var(--night-300);
    line-height: 1.75;
    font-size: 14px;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.site-footer a:hover {
    color: var(--ocean-400);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(159, 179, 200, 0.09);
}

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

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

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

    .hero-slide {
        padding: 34px;
    }

    .hero-poster {
        min-height: 380px;
    }

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

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

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

@media (max-width: 720px) {
    .nav-shell {
        min-height: 66px;
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .brand-copy small {
        display: none;
    }

    .page-main {
        padding-top: 92px;
    }

    .hero-section {
        min-height: auto;
        margin-bottom: 46px;
    }

    .hero-shell,
    .page-hero,
    .detail-title,
    .detail-section {
        border-radius: 22px;
    }

    .hero-slide {
        gap: 24px;
        min-height: auto;
        padding: 24px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-title h1 {
        font-size: 38px;
    }

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

    .hero-poster {
        min-height: 300px;
    }

    .slider-dots {
        left: 24px;
        bottom: 18px;
    }

    .slider-controls {
        right: 18px;
        bottom: 18px;
    }

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

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

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

    .category-grid,
    .footer-grid,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 44px 70px 1fr;
    }

    .ranking-row .inline-btn {
        grid-column: 1 / -1;
    }

    .ranking-row img {
        width: 70px;
    }

    .player-card {
        border-radius: 20px;
    }

    .play-toggle {
        width: 68px;
        height: 68px;
        font-size: 24px;
    }
}

@media (max-width: 460px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }
}
