:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --bg-card-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(96, 165, 250, 0.22);
    --line-soft: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --blue: #2563eb;
    --blue-light: #38bdf8;
    --cyan: #22d3ee;
    --orange: #f97316;
    --yellow: #facc15;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.24), transparent 34rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
    -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;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 58, 138, 0.96), rgba(15, 23, 42, 0.98));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    font-size: 13px;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.28);
}

.logo-text {
    font-size: 22px;
    line-height: 1;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu a {
    padding: 9px 13px;
    color: #d1d5db;
    border-radius: 12px;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.is-active {
    color: white;
    background: rgba(37, 99, 235, 0.38);
}

.header-search {
    position: relative;
    width: 250px;
}

.header-search input,
.toolbar input,
.toolbar select {
    width: 100%;
    color: white;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    padding: 10px 12px 10px 38px;
}

.header-search input:focus,
.toolbar input:focus,
.toolbar select:focus {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
    background: rgba(15, 23, 42, 0.96);
}

.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.mobile-toggle {
    display: none;
    border: 0;
    color: white;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.75);
}

.mobile-panel {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-panel a {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    color: #d1d5db;
}

.mobile-panel a:hover {
    background: rgba(37, 99, 235, 0.3);
    color: white;
}

.page-main {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    width: 100%;
    min-height: 620px;
    overflow: hidden;
    border-bottom: 1px solid var(--line-soft);
}

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

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

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

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) brightness(0.7);
}

.hero-shade {
    background:
        radial-gradient(circle at 78% 35%, rgba(56, 189, 248, 0.28), transparent 22rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.75) 46%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 45%, rgba(2, 6, 23, 0.74) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: end;
    gap: 40px;
    padding: 96px 0 60px;
}

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

.eyebrow,
.badge,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(37, 99, 235, 0.86);
}

.eyebrow {
    padding: 7px 13px;
    margin-bottom: 18px;
    font-size: 14px;
}

.hero h1,
.hero h2 {
    margin: 0;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 76px);
}

.hero h2 {
    margin-top: 16px;
    font-size: clamp(30px, 4.5vw, 56px);
}

.hero p {
    margin: 18px 0 0;
    max-width: 720px;
    color: #dbeafe;
    font-size: 18px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    padding: 12px 18px;
    border: 1px solid transparent;
    color: white;
    background: linear-gradient(135deg, var(--blue), #1d4ed8);
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.32);
}

.btn.secondary {
    border-color: var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.btn.secondary:hover {
    background: rgba(30, 41, 59, 0.92);
}

.hero-side {
    align-self: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-side h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

.focus-item {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.62);
    transition: background 0.2s ease, transform 0.2s ease;
}

.focus-item:hover {
    background: rgba(37, 99, 235, 0.22);
    transform: translateX(2px);
}

.focus-item img {
    width: 86px;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    object-fit: cover;
}

.focus-item strong {
    display: block;
    color: white;
    line-height: 1.35;
}

.focus-item span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.5);
}

.hero-dot.is-active {
    width: 28px;
    background: var(--blue-light);
}

.section {
    margin: 62px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    color: #7dd3fc;
    font-weight: 700;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--line-soft);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.42), rgba(8, 47, 73, 0.36));
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 58%);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.78);
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 8px;
    color: white;
    font-size: 18px;
    line-height: 1.35;
}

.card-summary {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    min-height: 45px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted-strong);
    font-size: 13px;
}

.badge {
    padding: 4px 9px;
    font-size: 12px;
    background: rgba(37, 99, 235, 0.8);
}

.badge.soft {
    color: #bfdbfe;
    border: 1px solid var(--line);
    background: rgba(30, 41, 59, 0.66);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag {
    padding: 4px 9px;
    color: #cbd5e1;
    font-size: 12px;
    background: rgba(51, 65, 85, 0.72);
}

.rank-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    padding: 10px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid var(--line-soft);
}

.rank-no {
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.8);
    font-size: 20px;
    font-weight: 900;
}

.rank-no.top {
    color: white;
    background: linear-gradient(135deg, var(--yellow), var(--orange));
}

.list-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 16px;
    align-items: center;
}

.list-card .poster {
    border-radius: 14px;
}

.category-tile {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.26), transparent 12rem),
        linear-gradient(135deg, rgba(30, 58, 138, 0.46), rgba(15, 23, 42, 0.82));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.65);
}

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

.category-tile p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 14px;
}

.page-hero {
    padding: 58px 0 28px;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: var(--muted-strong);
    font-size: 17px;
}

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

.breadcrumb a {
    color: #7dd3fc;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 170px;
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.65);
}

.toolbar input,
.toolbar select {
    padding: 11px 12px;
}

.empty-state {
    display: none;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.65);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
    align-items: start;
    margin: 34px 0 70px;
}

.player-card,
.detail-panel,
.side-panel {
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.22)),
        rgba(2, 6, 23, 0.15);
}

.player-overlay.is-hidden {
    display: none;
}

.big-play {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 60px rgba(37, 99, 235, 0.42);
    font-size: 30px;
    transform: translateX(2px);
}

.detail-content {
    padding: 24px;
}

.detail-content h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.detail-content h2 {
    margin: 26px 0 10px;
    color: white;
    font-size: 24px;
}

.detail-content p {
    margin: 0 0 12px;
    color: #d1d5db;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
}

.side-panel {
    padding: 18px;
}

.side-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.54);
}

.mini-card:hover {
    background: rgba(37, 99, 235, 0.22);
}

.mini-card img {
    width: 94px;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    object-fit: cover;
}

.mini-card strong {
    display: block;
    color: white;
    line-height: 1.35;
}

.mini-card span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(2, 6, 23, 0.96));
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.footer-inner h3 {
    margin: 0 0 12px;
}

.footer-inner p,
.footer-inner a {
    color: var(--muted);
    font-size: 14px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 30px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 13px;
}

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

    .mobile-panel .header-search {
        display: block;
        width: 100%;
        margin-top: 10px;
    }

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

    .hero-side {
        align-self: end;
    }

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

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

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

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

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

    .hero,
    .hero-inner {
        min-height: 720px;
    }

    .hero-inner {
        padding-top: 84px;
        padding-bottom: 28px;
    }

    .hero-side {
        padding: 14px;
    }

    .grid.cards,
    .grid.cards.large,
    .grid.categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .toolbar {
        grid-template-columns: 1fr;
    }

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

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .page-main,
    .nav-shell,
    .mobile-panel,
    .hero-inner,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, 1200px);
    }

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

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

    .hero h2 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .grid.cards,
    .grid.cards.large,
    .grid.categories {
        grid-template-columns: 1fr;
    }

    .card-body {
        padding: 14px;
    }

    .mini-card,
    .focus-item {
        grid-template-columns: 82px 1fr;
    }

    .mini-card img,
    .focus-item img {
        width: 82px;
    }
}
