* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-2: #1e293b;
    --line: #334155;
    --text: #f8fafc;
    --muted: #94a3b8;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --yellow: #facc15;
    --red: #f87171;
    --green: #34d399;
    --purple: #a78bfa;
    --radius: 18px;
    --shadow: 0 22px 70px rgba(0, 0, 0, .34);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, .24), transparent 34rem), linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
    color: var(--text);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.04em;
    white-space: nowrap;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 0 34px rgba(34, 211, 238, .42);
    font-size: 13px;
}

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

.nav-menu a,
.nav-category-links a {
    color: #cbd5e1;
    font-weight: 600;
    transition: color .2s ease, transform .2s ease;
}

.nav-menu a:hover,
.nav-menu a.is-active,
.nav-category-links a:hover {
    color: #93c5fd;
}

.nav-category-links {
    display: flex;
    gap: 14px;
    padding-left: 10px;
    border-left: 1px solid rgba(148, 163, 184, .22);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, .92);
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 999px;
    padding: 6px;
}

.nav-search input,
.intro-search input,
.filter-panel input,
.filter-panel select {
    border: 0;
    color: #fff;
    outline: 0;
    background: transparent;
}

.nav-search input {
    width: 210px;
    padding: 8px 8px 8px 14px;
}

.nav-search button,
.intro-search button,
.btn,
.filter-panel select {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.nav-search button,
.intro-search button,
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), #06b6d4);
    box-shadow: 0 12px 30px rgba(37, 99, 235, .32);
}

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

.nav-toggle {
    display: none;
    margin-left: auto;
    color: #fff;
    background: rgba(30, 41, 59, .9);
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 12px;
    padding: 8px 12px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity .9s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, .96) 0%, rgba(15, 23, 42, .72) 42%, rgba(2, 6, 23, .18) 100%), linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 76px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #67e8f9;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.hero-content h1 {
    width: min(780px, 100%);
    margin: 0 0 18px;
    font-size: clamp(42px, 8vw, 82px);
    line-height: .98;
    letter-spacing: -.07em;
}

.hero-desc {
    width: min(660px, 100%);
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(30, 58, 138, .52);
    border: 1px solid rgba(96, 165, 250, .24);
}

.hero-tags span,
.detail-tags span {
    padding: 7px 13px;
    font-weight: 700;
}

.movie-tags span {
    padding: 4px 8px;
    color: #bae6fd;
    font-size: 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 20px;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-card:hover {
    transform: translateY(-4px);
}

.btn-ghost {
    color: #e2e8f0;
    background: rgba(15, 23, 42, .62);
    border: 1px solid rgba(148, 163, 184, .22);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, .48);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .2s ease;
    font-size: 34px;
    line-height: 1;
}

.hero-arrow:hover {
    background: rgba(37, 99, 235, .85);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .46);
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

.hero-dot.is-active {
    width: 32px;
    background: #fff;
}

.intro-panel {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 28px;
    align-items: center;
    margin-top: -34px;
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 26px;
    background: rgba(15, 23, 42, .88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.intro-panel h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-section h2 {
    margin: 0;
    letter-spacing: -.04em;
}

.intro-panel h2,
.section-head h2,
.detail-section h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.intro-panel p,
.page-hero p,
.category-info p,
.detail-section p {
    color: #cbd5e1;
}

.intro-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(96, 165, 250, .22);
    border-radius: 999px;
    background: rgba(2, 6, 23, .8);
}

.intro-search input {
    flex: 1;
    padding: 12px 14px;
}

.intro-search button {
    padding: 12px 18px;
    font-weight: 800;
}

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

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

.section-link {
    color: #93c5fd;
    font-weight: 800;
}

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

.category-tile {
    min-height: 142px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid rgba(96, 165, 250, .18);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(30, 58, 138, .5), rgba(15, 23, 42, .88));
    box-shadow: 0 18px 48px rgba(2, 6, 23, .28);
    transition: transform .2s ease, border-color .2s ease;
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    color: #94a3b8;
    font-style: normal;
    font-size: 14px;
}

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

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

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 220px;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, .82);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.movie-card:hover {
    border-color: rgba(96, 165, 250, .42);
    box-shadow: 0 22px 60px rgba(37, 99, 235, .18);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.movie-card:hover .movie-poster img {
    transform: scale(1.07);
    opacity: .9;
}

.movie-badge,
.movie-score {
    position: absolute;
    top: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(15, 23, 42, .75);
    backdrop-filter: blur(10px);
}

.movie-badge {
    left: 10px;
}

.movie-score {
    right: 10px;
    color: #fde68a;
}

.movie-body {
    padding: 16px;
}

.movie-body h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 17px;
    line-height: 1.35;
}

.movie-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #94a3b8;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 12px;
    margin-bottom: 12px;
}

.movie-meta span {
    padding: 3px 7px;
    border-radius: 8px;
    background: rgba(51, 65, 85, .78);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 86px 1fr auto;
    gap: 14px;
    align-items: center;
    min-height: 86px;
    padding: 12px 16px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
    background: rgba(15, 23, 42, .78);
    transition: background .2s ease, transform .2s ease;
}

.rank-item:hover {
    background: rgba(30, 41, 59, .92);
    transform: translateX(4px);
}

.rank-no {
    color: rgba(148, 163, 184, .42);
    font-size: 30px;
    font-weight: 900;
}

.rank-item img {
    width: 86px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-title {
    color: #fff;
    font-weight: 800;
}

.rank-score {
    color: #fde68a;
    font-weight: 900;
}

.page-main {
    min-height: 70vh;
    padding-bottom: 64px;
}

.page-hero {
    padding: 76px 0 36px;
}

.page-hero h1 {
    margin-bottom: 16px;
    font-size: clamp(42px, 7vw, 70px);
    line-height: 1.02;
}

.page-hero p {
    width: min(760px, 100%);
    margin: 0;
    font-size: 18px;
}

.category-list {
    display: grid;
    gap: 22px;
}

.category-card {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 26px;
    align-items: center;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 28px;
    background: rgba(15, 23, 42, .76);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
    transition: transform .2s ease, border-color .2s ease;
}

.category-card:hover {
    border-color: rgba(96, 165, 250, .34);
}

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

.category-cover img {
    aspect-ratio: 3 / 4;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    background: #1e293b;
}

.category-info h2 {
    margin: 0 0 10px;
    font-size: 32px;
}

.category-info p {
    margin: 0 0 22px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin: 0 0 26px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 22px;
    background: rgba(15, 23, 42, .82);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 999px;
    background: rgba(2, 6, 23, .76);
}

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

.empty-state {
    display: none;
    padding: 40px;
    color: #94a3b8;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, .26);
    border-radius: 24px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding-top: 28px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #93c5fd;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(96, 165, 250, .24);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-card video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, .24), rgba(2, 6, 23, .72));
    border: 0;
    cursor: pointer;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 2;
}

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

.play-circle {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 0 60px rgba(34, 211, 238, .45);
    font-size: 30px;
}

.detail-info h1 {
    margin-bottom: 16px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
}

.detail-one-line {
    margin: 0 0 20px;
    color: #cbd5e1;
    font-size: 18px;
}

.detail-meta-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0;
    margin: 22px 0 0;
    list-style: none;
}

.detail-meta-list li {
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 14px;
    background: rgba(15, 23, 42, .82);
}

.detail-meta-list span {
    display: block;
    color: #94a3b8;
    font-size: 12px;
}

.detail-meta-list strong {
    display: block;
    color: #f8fafc;
    font-size: 15px;
}

.detail-section {
    margin-top: 30px;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 26px;
    background: rgba(15, 23, 42, .78);
}

.detail-section h2 {
    margin-bottom: 14px;
}

.detail-section p {
    margin: 0;
    font-size: 17px;
}

.site-footer {
    margin-top: 70px;
    background: linear-gradient(90deg, #020617, #0f1f45, #020617);
    border-top: 1px solid rgba(148, 163, 184, .16);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr .7fr 1fr;
    gap: 34px;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 900;
}

.site-footer h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.site-footer p,
.site-footer a {
    display: block;
    margin: 0 0 8px;
    color: #94a3b8;
}

.site-footer a:hover {
    color: #93c5fd;
}

.footer-bottom {
    padding: 18px;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, .12);
}

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

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

    .grid-six {
        grid-template-columns: repeat(4, 1fr);
    }

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

@media (max-width: 820px) {
    .nav-wrap {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin: 0;
        padding: 12px 0;
        border-top: 1px solid rgba(148, 163, 184, .16);
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-category-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px 0 0;
        border-left: 0;
        border-top: 1px solid rgba(148, 163, 184, .16);
    }

    .hero-carousel {
        min-height: 560px;
        height: 78vh;
    }

    .hero-content {
        padding-bottom: 86px;
    }

    .hero-arrow {
        display: none;
    }

    .intro-panel,
    .category-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .grid-six,
    .category-grid,
    .rank-list-large {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .brand {
        font-size: 20px;
    }

    .hero-actions,
    .intro-search {
        flex-direction: column;
    }

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

    .scroll-row {
        grid-auto-columns: 76%;
    }

    .rank-item {
        grid-template-columns: 42px 68px 1fr;
    }

    .rank-score {
        grid-column: 3;
    }

    .rank-item img {
        width: 68px;
        height: 48px;
    }

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

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