* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.2);
    --cyan: #06b6d4;
    --blue: #3b82f6;
    --green: #22c55e;
    --orange: #f97316;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.2), transparent 36rem),
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.16), transparent 34rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

.site-nav {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 40px rgba(6, 182, 212, 0.26);
}

.brand-text {
    font-size: 1.08rem;
}

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

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mobile-menu-button span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.95);
}

.mobile-menu.is-open {
    display: grid;
    gap: 6px;
}

.hero-shell {
    position: relative;
    overflow: hidden;
    padding: 54px 0 36px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.68), rgba(8, 47, 73, 0.48) 50%, rgba(2, 6, 23, 0.9));
}

.hero-bg::before,
.hero-bg::after {
    content: "";
    position: absolute;
    width: 28rem;
    height: 28rem;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.34;
}

.hero-bg::before {
    left: -8rem;
    top: 1rem;
    background: #3b82f6;
}

.hero-bg::after {
    right: -6rem;
    bottom: -10rem;
    background: #06b6d4;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-title-row,
.section-heading,
.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #67e8f9;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-title-row h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-search,
.filter-panel {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-search {
    width: min(460px, 100%);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.hero-search input,
.filter-field input,
.filter-field select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.hero-search input {
    padding: 12px 14px;
}

.hero-search button,
.btn,
.rank-watch {
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 40px rgba(6, 182, 212, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-search button {
    padding: 12px 20px;
    white-space: nowrap;
}

.btn,
.rank-watch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    font-weight: 800;
}

.btn:hover,
.hero-search button:hover,
.rank-watch:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 54px rgba(6, 182, 212, 0.32);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: none;
}

.hero-carousel {
    position: relative;
    margin-top: 34px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 32px;
    background: rgba(2, 6, 23, 0.48);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
    align-items: center;
    gap: 36px;
    min-height: 520px;
    padding: clamp(28px, 5vw, 60px);
}

.hero-slide.is-active {
    display: grid;
}

.hero-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 720px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    min-height: 420px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.hero-poster img,
.detail-cover img,
.poster-link img,
.category-tile img,
.category-cover-stack img,
.rank-poster img,
.hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster::after,
.poster-link::after,
.detail-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 58%);
}

.hero-play,
.poster-play,
.detail-cover span {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.hero-play {
    right: 22px;
    bottom: 22px;
    width: 66px;
    height: 66px;
    font-size: 1.5rem;
}

.hero-controls {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    pointer-events: none;
}

.hero-controls button,
.hero-dot {
    pointer-events: auto;
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.hero-dot.is-active {
    width: 28px;
    background: #67e8f9;
}

.hero-thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.hero-thumb.is-active {
    border-color: rgba(103, 232, 249, 0.75);
    background: rgba(6, 182, 212, 0.12);
}

.hero-thumb img {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    flex: 0 0 auto;
}

.hero-thumb span {
    min-width: 0;
    overflow: hidden;
    color: #e2e8f0;
    font-size: 0.92rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-categories {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    padding: 34px 0 0;
}

.category-tile {
    position: relative;
    min-height: 130px;
    border-radius: 22px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.1));
}

.category-tile span {
    position: absolute;
    z-index: 2;
    left: 16px;
    bottom: 14px;
    font-weight: 900;
}

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

.section-heading {
    margin-bottom: 22px;
}

.section-heading h2,
.detail-panel h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    letter-spacing: -0.03em;
}

.section-link {
    color: #67e8f9;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(103, 232, 249, 0.45);
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.36);
}

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

.poster-link img {
    transition: transform 0.35s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 12px 12px 12px;
    height: 40%;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.24);
    filter: blur(30px);
}

.poster-meta,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.64);
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.rank-badge {
    left: 12px;
    right: auto;
    background: linear-gradient(135deg, var(--orange), var(--blue));
}

.poster-play {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
}

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

.movie-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.movie-tags span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.14);
    font-size: 0.74rem;
    font-weight: 800;
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 1.05rem;
    line-height: 1.38;
}

.movie-card h3 a:hover,
.rank-content h2 a:hover {
    color: #67e8f9;
}

.movie-card p,
.category-card p,
.detail-panel p,
.rank-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.72;
}

.movie-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: #cbd5e1;
    font-size: 0.86rem;
}

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

.category-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    min-height: 190px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    height: 150px;
}

.category-cover-stack img {
    border-radius: 14px;
    min-height: 0;
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.page-main {
    padding: 44px 0 72px;
}

.page-hero {
    padding: 44px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(8, 47, 73, 0.38)), rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.page-hero p {
    margin-top: 16px;
}

.filter-panel {
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-field {
    display: grid;
    gap: 8px;
    min-width: 170px;
    flex: 1;
}

.filter-search {
    min-width: min(360px, 100%);
    flex: 2;
}

.filter-field span {
    color: #bae6fd;
    font-size: 0.78rem;
    font-weight: 800;
}

.filter-field input,
.filter-field select {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.42);
}

.filter-field select option {
    color: #0f172a;
}

.empty-state {
    display: none;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    color: #cbd5e1;
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 110px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-number {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 900;
    font-size: 1.2rem;
}

.rank-poster {
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
}

.rank-content h2 {
    margin: 8px 0;
    font-size: 1.25rem;
}

.detail-main {
    padding-bottom: 72px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 48px 0;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    filter: blur(10px);
    transform: scale(1.05);
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72));
}

.detail-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 42px;
    align-items: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: #67e8f9;
}

.tag-cloud {
    margin-top: 22px;
}

.detail-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.detail-cover span {
    left: 50%;
    top: 50%;
    width: 70px;
    height: 70px;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
}

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

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(103, 232, 249, 0.2);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.28), rgba(0, 0, 0, 0.58));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 24px 60px rgba(6, 182, 212, 0.32);
    font-size: 1.8rem;
}

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

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

.detail-panel {
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-panel p {
    margin-top: 16px;
}

.detail-meta-panel {
    grid-column: 1 / -1;
}

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

.detail-meta-panel div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.detail-meta-panel dt {
    margin-bottom: 8px;
    color: #67e8f9;
    font-size: 0.82rem;
    font-weight: 800;
}

.detail-meta-panel dd {
    margin: 0;
    color: #ffffff;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.76);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    padding: 34px 0;
}

.footer-brand {
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.site-footer p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.footer-links a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    padding: 18px 16px 28px;
    color: #64748b;
    text-align: center;
}

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

    .mobile-menu-button {
        display: flex;
    }

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

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

    .hero-poster {
        min-height: auto;
        max-height: 520px;
    }

    .hero-thumbs,
    .quick-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .category-card-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 680px) {
    .container,
    .site-nav,
    .mobile-menu {
        width: min(100% - 24px, 1180px);
    }

    .hero-shell {
        padding-top: 30px;
    }

    .hero-slide,
    .page-hero {
        padding: 22px;
        border-radius: 24px;
    }

    .hero-title-row h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(2rem, 12vw, 3.1rem);
    }

    .hero-search,
    .filter-panel {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-thumbs,
    .quick-categories,
    .movie-grid,
    .compact-grid,
    .rank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .rank-watch {
        grid-column: 1 / -1;
    }

    .detail-meta-panel dl,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .hero-thumbs,
    .quick-categories,
    .movie-grid,
    .compact-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }
}
