:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c33;
    --panel-card: #172033;
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --yellow: #facc15;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.12), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 38%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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: 100;
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28);
    font-size: 14px;
}

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

.nav-link {
    padding: 9px 13px;
    color: var(--soft);
    border-radius: 999px;
    font-size: 15px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(34, 211, 238, 0.14);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.mobile-search input {
    width: 190px;
    padding: 10px 14px;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
}

.header-search button,
.mobile-search button {
    height: 40px;
    padding: 0 16px;
    color: #001017;
    border: 0;
    background: var(--cyan);
    font-weight: 700;
}

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

.menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #fff;
}

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: #0f172a;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06) contrast(1.03);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.28) 100%),
        linear-gradient(0deg, #020617 0%, transparent 44%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    z-index: 2;
}

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

.hero-eyebrow,
.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 12px 0 4px;
    font-size: clamp(30px, 5vw, 58px);
    line-height: 1.06;
    font-weight: 900;
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(26px, 4vw, 50px);
    line-height: 1.1;
    font-weight: 900;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 21px);
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin-bottom: 30px;
    color: #d1d5db;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-pill,
.score-pill {
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.18);
    color: var(--cyan);
    font-weight: 800;
}

.score-pill {
    background: rgba(250, 204, 21, 0.16);
    color: var(--yellow);
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    color: #001017;
    background: var(--cyan);
    box-shadow: 0 14px 38px rgba(34, 211, 238, 0.24);
}

.btn-secondary {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.main-content {
    padding: 64px 0 76px;
}

.content-section {
    margin-bottom: 68px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
    font-weight: 900;
}

.section-heading p,
.page-title p {
    margin: 6px 0 0;
    color: var(--muted);
}

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 18px 55px rgba(2, 6, 23, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 22px 70px rgba(34, 211, 238, 0.08);
    transform: translateY(-5px) scale(1.01);
}

.card-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #0b1120;
}

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

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

.card-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12));
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade {
    opacity: 1;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    color: #fff;
    border-radius: 50%;
    background: var(--cyan-strong);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.76);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.duration-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    color: #fff;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    min-height: 3em;
    color: #fff;
    font-size: 17px;
    line-height: 1.42;
    font-weight: 850;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-card:hover h3 {
    color: var(--cyan);
}

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

.card-meta {
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
}

.mini-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.mini-tags span,
.detail-tags span {
    padding: 3px 8px;
    color: #dbeafe;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 85% 20%, rgba(34, 211, 238, 0.22), transparent 44%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.8));
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
    border-color: rgba(34, 211, 238, 0.62);
    transform: translateY(-4px);
}

.category-tile h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 0 0 18px;
    color: var(--muted);
}

.tile-link {
    color: var(--cyan);
    font-weight: 800;
}

.page-hero {
    padding: 84px 0 34px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 74% 18%, rgba(34, 211, 238, 0.16), transparent 26rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.44));
}

.page-title {
    max-width: 780px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr repeat(3, minmax(130px, 170px));
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    background: rgba(2, 6, 23, 0.72);
}

.no-results {
    display: none;
    padding: 36px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.no-results.is-visible {
    display: block;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 96px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    transition: border-color 0.22s ease, transform 0.22s ease;
}

.rank-row:hover {
    border-color: rgba(34, 211, 238, 0.62);
    transform: translateX(4px);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--cyan);
    border-radius: 14px;
    background: rgba(34, 211, 238, 0.12);
    font-size: 18px;
    font-weight: 900;
}

.rank-row img {
    width: 96px;
    height: 66px;
    object-fit: cover;
    border-radius: 13px;
    background: #0b1120;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 850;
}

.rank-info p {
    margin: 0 0 7px;
    color: var(--muted);
    font-size: 13px;
}

.rank-score {
    color: var(--yellow);
    font-size: 18px;
    font-weight: 900;
}

.detail-hero {
    padding: 46px 0 36px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.72));
}

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

.breadcrumb a:hover {
    color: var(--cyan);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 32px;
    align-items: start;
}

.player-wrap {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(2, 6, 23, 0.28);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-trigger {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    padding-left: 6px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: var(--cyan-strong);
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.32);
    font-size: 26px;
}

.detail-title {
    margin-top: 26px;
}

.detail-title h1 {
    margin-bottom: 14px;
}

.detail-title .detail-meta {
    margin-bottom: 18px;
    color: var(--muted);
}

.detail-title p {
    color: var(--soft);
    font-size: 17px;
}

.detail-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
}

.detail-panel img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    background: #0b1120;
}

.detail-panel h2,
.article-block h2 {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 900;
}

.article-block {
    margin-top: 28px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
}

.article-block p {
    margin: 0 0 14px;
    color: var(--soft);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.compact-card {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.74);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    border-color: rgba(34, 211, 238, 0.62);
    transform: translateY(-2px);
}

.compact-card img {
    width: 84px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    background: #0b1120;
}

.compact-card strong {
    display: block;
    color: #fff;
    font-size: 14px;
    line-height: 1.35;
}

.compact-card span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a:hover {
    color: var(--cyan);
}

.pagination-note {
    margin-top: 24px;
    color: var(--muted);
    text-align: center;
}

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

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

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

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .site-header.is-open .mobile-panel {
        display: block;
    }

    .hero-slider {
        min-height: 620px;
        height: 76vh;
    }

    .hero-copy {
        padding-top: 80px;
    }

    .hero-control {
        display: none;
    }

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

    .rank-row {
        grid-template-columns: 46px 78px 1fr;
    }

    .rank-score {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    .site-logo {
        font-size: 18px;
    }

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

    .hero-meta,
    .hero-actions,
    .page-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    .rank-row {
        grid-template-columns: 42px 74px 1fr;
        gap: 11px;
    }

    .rank-row img {
        width: 74px;
        height: 54px;
    }

    .detail-panel,
    .article-block {
        padding: 18px;
        border-radius: 18px;
    }
}
