:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at 82% 10%, rgba(59, 130, 246, 0.16), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1220px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    border-radius: 999px;
    color: #cbd5e1;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 9px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #ecfeff;
    background: rgba(34, 211, 238, 0.12);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
}

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

.mobile-link {
    padding: 10px 12px;
}

main {
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.06);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 44%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 58%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    min-height: 78vh;
    margin: 0 auto;
    padding: 112px 0 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
}

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

.eyebrow {
    margin: 0 0 10px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h1 {
    font-size: clamp(44px, 7vw, 92px);
    text-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.hero-desc {
    max-width: 680px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(34, 211, 238, 0.36);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.1);
    font-size: 12px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.site-search button,
.section-action,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.site-search button {
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.24);
}

.ghost-btn,
.section-action {
    border: 1px solid var(--line);
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.68);
}

.primary-btn:hover,
.ghost-btn:hover,
.site-search button:hover,
.section-action:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.18));
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.54);
    font-size: 30px;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 30px;
    background: var(--cyan);
}

.search-strip,
.content-section,
.page-main {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.search-strip {
    margin-top: -44px;
    position: relative;
    z-index: 8;
}

.search-card,
.filter-panel,
.page-hero,
.detail-hero,
.player-shell,
.detail-copy,
.side-panel {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.68));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-card {
    padding: 26px;
    border-radius: 28px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
    align-items: center;
    gap: 24px;
}

.search-card h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.15;
}

.site-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.site-search input,
.filter-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
}

.site-search input,
.filter-input {
    padding: 0 18px;
}

.filter-select {
    padding: 0 14px;
}

.content-section {
    padding: 70px 0 0;
}

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

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

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

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

.movie-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.58);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

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

.card-body h3,
.rank-content h3 {
    margin: 8px 0 8px;
    line-height: 1.25;
}

.card-body h3 {
    font-size: 18px;
}

.card-body p,
.rank-content p,
.page-hero p,
.detail-one-line,
.text-block p {
    color: #cbd5e1;
}

.card-body p {
    min-height: 3.2em;
    margin: 0 0 14px;
    font-size: 14px;
}

.compact .card-body h3 {
    font-size: 16px;
}

.compact .card-body p {
    font-size: 13px;
}

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

.category-tile,
.category-overview {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--panel);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
}

.category-overview {
    min-height: 260px;
}

.category-tile img,
.category-overview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-tile:hover img,
.category-overview:hover img {
    transform: scale(1.08);
}

.category-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.9)),
        radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.18), transparent 60%);
}

.category-tile strong,
.category-overview strong,
.category-tile small,
.category-overview small,
.category-count {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
}

.category-tile strong,
.category-overview strong {
    bottom: 44px;
    font-size: 22px;
}

.category-tile small,
.category-overview small {
    bottom: 18px;
    color: #bae6fd;
}

.category-count {
    top: 18px;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.page-main {
    padding-top: 112px;
    padding-bottom: 80px;
}

.page-hero {
    padding: clamp(28px, 5vw, 54px);
    border-radius: 34px;
    background:
        radial-gradient(circle at 84% 18%, rgba(34, 211, 238, 0.22), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.82));
}

.page-hero h1 {
    max-width: 780px;
    font-size: clamp(34px, 6vw, 68px);
}

.page-hero p {
    max-width: 720px;
    margin: 16px 0 0;
    font-size: 18px;
}

.slim-hero {
    min-height: 240px;
}

.filter-panel {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 26px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 14px;
}

.filter-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-select {
    min-width: 150px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 112px 58px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
}

.rank-cover img {
    width: 112px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
}

.rank-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 22px;
    font-weight: 900;
}

.rank-content h3 {
    font-size: 22px;
}

.text-link {
    min-height: auto;
    padding: 0;
    color: var(--cyan);
}

.detail-main {
    width: min(1180px, calc(100% - 32px));
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    padding: clamp(22px, 4vw, 38px);
    border-radius: 34px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: var(--shadow);
}

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

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

.detail-one-line {
    max-width: 760px;
    margin: 18px 0 18px;
    font-size: 18px;
}

.player-section {
    margin-top: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: #000;
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #00111a;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.5));
    cursor: pointer;
}

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

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.3);
    font-size: 30px;
    transform: translateX(3px);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    margin-top: 28px;
}

.detail-copy,
.side-panel {
    border-radius: 30px;
    padding: clamp(22px, 4vw, 32px);
}

.text-block + .text-block {
    margin-top: 28px;
}

.text-block h2,
.side-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.text-block p {
    margin: 0;
    font-size: 17px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.detail-meta-grid div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.42);
}

.detail-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.detail-meta-grid strong {
    display: block;
    margin-top: 4px;
}

.pager-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.pager-links a,
.side-list a {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.36);
}

.pager-links a {
    padding: 14px;
    color: #bae6fd;
}

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

.side-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    color: #dbeafe;
}

.side-list span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #00111a;
    background: var(--cyan);
    font-weight: 900;
}

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

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

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

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

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

    .nav-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 86vh;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 104px;
        padding-bottom: 86px;
    }

    .hero-poster {
        display: none;
    }

    .hero-control {
        top: auto;
        bottom: 76px;
    }

    .search-card,
    .filter-panel,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 260px;
    }

    .rank-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .rank-number {
        position: absolute;
        margin: 8px;
    }

    .rank-cover img {
        width: 82px;
    }

    .detail-meta-grid,
    .pager-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .nav-wrap,
    .mobile-nav,
    .search-strip,
    .content-section,
    .page-main,
    .detail-main {
        width: min(100% - 22px, 1220px);
    }

    .brand-text {
        font-size: 18px;
    }

    .hero h1 {
        font-size: 42px;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-body p {
        display: none;
    }

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

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

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

    .detail-meta-grid,
    .pager-links {
        grid-template-columns: 1fr;
    }

    .play-overlay span {
        width: 68px;
        height: 68px;
    }
}
