:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #0f172a;
    --muted: #94a3b8;
    --text: #e2e8f0;
    --title: #ffffff;
    --line: rgba(56, 189, 248, 0.18);
    --cyan: #22d3ee;
    --sky: #38bdf8;
    --amber: #f59e0b;
    --shadow: 0 24px 70px rgba(8, 47, 73, 0.46);
}

* {
    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 top left, rgba(14, 116, 144, 0.35), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #08111f 48%, #020617 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    border-bottom: 1px solid rgba(14, 116, 144, 0.32);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(16px);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #ffffff;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sky), var(--cyan));
    color: #00111c;
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.45);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-links a {
    padding: 9px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
    background: rgba(14, 165, 233, 0.22);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 11px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
}

.page-main {
    min-height: 100vh;
}

.page-offset {
    padding-top: 96px;
}

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

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, #020617 0%, transparent 35%, rgba(2, 6, 23, 0.35) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    min-height: 720px;
    margin: 0 auto;
    padding-top: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

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

.hero h1,
.page-title h1,
.detail-info h1 {
    margin: 0;
    color: var(--title);
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-text {
    max-width: 760px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 999px;
    padding: 5px 10px;
    color: #bae6fd;
    background: rgba(8, 47, 73, 0.48);
    font-size: 12px;
}

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

.btn-primary,
.btn-ghost,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #00111c;
    background: linear-gradient(135deg, var(--sky), var(--cyan));
    box-shadow: 0 16px 42px rgba(14, 165, 233, 0.36);
}

.btn-ghost,
.section-more {
    border: 1px solid rgba(56, 189, 248, 0.34);
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.62);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 48px rgba(14, 165, 233, 0.24);
}

.hero-dots {
    position: absolute;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 42px;
    left: max(16px, calc((100vw - 1180px) / 2));
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.hero-dot {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 18px;
    padding: 8px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.66);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.hero-dot.active {
    border-color: rgba(34, 211, 238, 0.75);
    background: rgba(8, 47, 73, 0.78);
}

.hero-dot img {
    width: 48px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    flex: 0 0 auto;
}

.hero-dot span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
}

.quick-search,
.content-section,
.page-title,
.filter-panel,
.detail-hero,
.player-section,
.detail-copy {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.82));
    box-shadow: var(--shadow);
}

.quick-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 440px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    margin-bottom: 48px;
}

.quick-search h2,
.section-head h2,
.detail-copy h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.16;
}

.search-box input {
    width: 100%;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.72);
}

.search-box input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.content-section {
    padding: 28px;
    margin-top: 44px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 22px 54px rgba(8, 47, 73, 0.45);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.5);
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

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

.play-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #00111c;
    background: linear-gradient(135deg, var(--amber), #facc15);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 14px;
}

.card-meta {
    margin-bottom: 10px;
}

.movie-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card p {
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.72);
}

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

.category-card {
    min-height: 142px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 24px;
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 12rem),
        rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card span {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 12px 0 0;
    color: #94a3b8;
    line-height: 1.7;
}

.category-card b {
    margin-top: 18px;
    color: var(--cyan);
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rank-list.full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(56, 189, 248, 0.14);
    border-radius: 18px;
    padding: 14px;
    background: rgba(2, 6, 23, 0.42);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(8, 47, 73, 0.46);
    transform: translateX(4px);
}

.rank-no {
    color: var(--amber);
    font-size: 20px;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    color: #ffffff;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-extra {
    color: #94a3b8;
    font-size: 13px;
}

.page-title {
    padding: 36px;
    margin-bottom: 28px;
}

.page-title p:last-child {
    max-width: 760px;
    margin: 16px 0 0;
    color: #cbd5e1;
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    gap: 14px;
    padding: 20px;
    margin-bottom: 32px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-row button {
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 999px;
    padding: 8px 12px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.82);
}

.filter-row button.active,
.filter-row button:hover {
    color: #00111c;
    background: linear-gradient(135deg, var(--sky), var(--cyan));
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: #94a3b8;
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 30px;
    align-items: center;
    padding: 28px;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 24px;
    box-shadow: 0 24px 58px rgba(2, 6, 23, 0.55);
}

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

.detail-one {
    max-width: 780px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    margin-top: 22px;
}

.detail-tags {
    margin: 18px 0 26px;
}

.player-section {
    padding: 22px;
    margin-top: 34px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 28px 84px rgba(0, 0, 0, 0.45);
}

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

.big-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #00111c;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.24), rgba(2, 6, 23, 0.34));
}

.big-play span {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sky), var(--cyan));
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.45);
    font-size: 30px;
}

.big-play.is-hidden {
    display: none;
}

.detail-copy {
    padding: 32px;
    margin-top: 34px;
}

.detail-copy h2:not(:first-child) {
    margin-top: 28px;
}

.detail-copy p {
    margin: 14px 0 0;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.9;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 44px;
}

.footer-inner p {
    max-width: 620px;
    margin: 12px 0 20px;
    color: #94a3b8;
}

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

.footer-links a {
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 999px;
    padding: 7px 11px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.56);
}

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

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

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

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: 64px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 12px;
        background: rgba(2, 6, 23, 0.96);
    }

    .nav-links.open {
        display: flex;
    }

    .hero,
    .hero-content {
        min-height: 660px;
    }

    .hero-content {
        padding-top: 120px;
        padding-bottom: 160px;
    }

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

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

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

    .category-grid,
    .rank-list,
    .rank-list.full {
        grid-template-columns: 1fr;
    }

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

    .rank-extra {
        grid-column: 2;
    }
}

@media (max-width: 560px) {
    .main-shell {
        width: min(100% - 22px, 1180px);
        padding: 36px 0;
    }

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-text,
    .detail-one {
        font-size: 16px;
    }

    .hero-dots {
        grid-template-columns: 1fr;
        bottom: 22px;
    }

    .hero-dot:nth-child(n+4) {
        display: none;
    }

    .content-section,
    .page-title,
    .quick-search,
    .filter-panel,
    .detail-hero,
    .player-section,
    .detail-copy {
        border-radius: 22px;
        padding: 18px;
    }

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

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

    .card-body {
        padding: 12px;
    }
}
