* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #111c31;
    --line: rgba(103, 232, 249, 0.18);
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #60a5fa;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --yellow: #facc15;
    --red: #fb7185;
    --shadow: 0 24px 70px rgba(8, 145, 178, 0.17);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 8%, rgba(34, 211, 238, 0.14), transparent 28rem),
        radial-gradient(circle at 86% 12%, rgba(37, 99, 235, 0.18), transparent 32rem),
        linear-gradient(135deg, #020617 0%, #0f1a35 42%, #082f49 100%);
    background-attachment: fixed;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    border-bottom: 1px solid rgba(14, 116, 144, 0.28);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ecfeff;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.35);
    flex: 0 0 auto;
}

.brand-mark::after {
    content: "";
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid currentColor;
    transform: translateX(2px);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-name {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted-strong);
    font-weight: 650;
}

.nav-links a {
    position: relative;
    transition: color 0.22s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--cyan);
}

.nav-links a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 2px;
    border-radius: 99px;
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.75);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 12px;
    color: var(--cyan);
    background: rgba(15, 23, 42, 0.85);
}

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: currentColor;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 16px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
}

.mobile-menu a {
    display: block;
    padding: 13px 12px;
    color: var(--muted-strong);
    border-radius: 12px;
}

.mobile-menu a:hover,
.mobile-menu a.is-active {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.09);
}

.site-main {
    padding-top: 96px;
}

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

.page-hero,
.hero-stage,
.panel,
.category-card,
.movie-card,
.info-card,
.rank-row,
.player-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.hero-stage {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.78)),
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.16), transparent 30rem);
}

.hero-stage::before,
.hero-stage::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    pointer-events: none;
}

.hero-stage::before {
    width: 360px;
    height: 360px;
    right: -110px;
    top: -100px;
    background: rgba(34, 211, 238, 0.14);
}

.hero-stage::after {
    width: 300px;
    height: 300px;
    left: -120px;
    bottom: -90px;
    background: rgba(96, 165, 250, 0.15);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
    gap: 38px;
    align-items: center;
    padding: clamp(28px, 5vw, 70px);
    opacity: 0;
    transform: translateX(28px) scale(0.98);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

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

.eyebrow::before {
    content: "";
    width: 30px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.8);
}

.hero-copy h1 {
    margin: 0 0 10px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.04;
    background: linear-gradient(90deg, #ecfeff, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-line {
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.65;
    max-width: 760px;
    margin: 0 0 12px;
}

.hero-summary {
    color: var(--muted);
    line-height: 1.75;
    max-width: 760px;
    margin: 0 0 22px;
}

.hero-meta,
.card-meta,
.detail-meta,
.tag-list,
.filter-row,
.hero-actions,
.section-actions,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pill,
.tag,
.card-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(34, 211, 238, 0.11);
    border: 1px solid rgba(34, 211, 238, 0.18);
    font-size: 13px;
}

.hero-actions {
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.7);
    transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(34, 211, 238, 0.14);
}

.btn-primary {
    border-color: transparent;
    color: #031624;
    font-weight: 800;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.26);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #67e8f9, #93c5fd);
}

.hero-poster {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: 28px;
    min-height: 420px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.hero-poster:hover img,
.movie-card:hover img,
.horizontal-card:hover img {
    transform: scale(1.07);
}

.hero-poster::after,
.poster-wrap::after,
.horizontal-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 44%;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.84), transparent);
    pointer-events: none;
}

.hero-switch {
    position: absolute;
    z-index: 4;
    left: clamp(28px, 5vw, 70px);
    right: clamp(28px, 5vw, 70px);
    bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-arrows,
.hero-dots {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: var(--cyan);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(34, 211, 238, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
}

.hero-dot {
    width: 38px;
    height: 8px;
    border-radius: 999px;
    padding: 0;
    opacity: 0.55;
}

.hero-dot.is-active {
    opacity: 1;
    background: var(--cyan);
}

.section {
    padding: 54px 0 0;
}

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

.section-kicker {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.1;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-desc {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
    max-width: 760px;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 28px 80px rgba(8, 145, 178, 0.24);
}

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

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

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #422006;
    font-weight: 900;
    background: rgba(250, 204, 21, 0.92);
}

.card-body {
    padding: 15px;
}

.card-title {
    display: block;
    color: #f8fafc;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 9px;
}

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

.card-line {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    min-height: 46px;
    margin: 0 0 13px;
}

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

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

.horizontal-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 16px;
    min-height: 184px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.horizontal-poster {
    position: relative;
    overflow: hidden;
}

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

.horizontal-body {
    min-width: 0;
    padding: 18px 18px 18px 0;
}

.horizontal-body h3 {
    margin: 0 0 9px;
    font-size: 20px;
}

.horizontal-body p {
    margin: 0 0 13px;
    color: var(--muted);
    line-height: 1.68;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    padding: 22px;
    border-radius: 24px;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -40px;
    bottom: -50px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    z-index: 1;
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

.page-hero {
    overflow: hidden;
    padding: clamp(28px, 5vw, 54px);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(8, 47, 73, 0.74)),
        radial-gradient(circle at 85% 10%, rgba(34, 211, 238, 0.18), transparent 26rem);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 850px;
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.85;
    font-size: 17px;
}

.search-panel {
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    color: var(--text);
    outline: none;
    background: rgba(2, 6, 23, 0.48);
}

.search-input:focus {
    border-color: rgba(34, 211, 238, 0.7);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.filter-button {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.16);
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.74);
}

.filter-button:hover,
.filter-button.is-active {
    color: #031624;
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

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

.breadcrumbs {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 14px;
}

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

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

.player-card {
    overflow: hidden;
    border-radius: 26px;
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    color: #f8fafc;
    text-align: center;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.42));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

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

.player-error {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #fecdd3;
    background: rgba(2, 6, 23, 0.88);
    text-align: center;
}

.player-error[hidden] {
    display: none;
}

.detail-content {
    padding: 24px;
}

.detail-content h1 {
    margin: 0 0 15px;
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.08;
}

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

.detail-section {
    margin-top: 28px;
}

.detail-section h2 {
    margin: 0 0 12px;
    color: #e0f2fe;
    font-size: 24px;
}

.detail-section p {
    color: var(--muted-strong);
    line-height: 1.9;
    margin: 0;
}

.poster-side {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

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

.poster-side .side-body {
    padding: 18px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 68px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 112px;
    padding: 12px;
    border-radius: 20px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.42);
}

.rank-number {
    color: var(--cyan);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-thumb {
    overflow: hidden;
    width: 86px;
    height: 86px;
    border-radius: 16px;
    background: #0f172a;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h2,
.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

.rank-score {
    padding: 9px 12px;
    border-radius: 999px;
    color: #422006;
    font-weight: 900;
    background: rgba(250, 204, 21, 0.92);
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid rgba(14, 116, 144, 0.24);
    background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 28px;
    color: var(--muted);
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 12px;
    color: var(--text);
}

.footer-inner p,
.footer-inner a {
    margin: 0 0 8px;
    color: var(--muted);
    line-height: 1.75;
}

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

.hidden-card {
    display: none !important;
}

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-poster {
        min-height: 260px;
        max-height: 340px;
    }

    .hero-poster img {
        min-height: 260px;
    }
}

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

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

    .site-main {
        padding-top: 92px;
    }

    .hero-stage {
        min-height: 760px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 28px;
    }

    .hero-switch {
        left: 28px;
        right: 28px;
        bottom: 20px;
    }

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

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

    .horizontal-grid,
    .category-grid,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }
}

@media (max-width: 560px) {
    .container,
    .header-inner,
    .footer-inner,
    .mobile-menu {
        width: min(100% - 22px, 1180px);
    }

    .brand-subtitle {
        display: none;
    }

    .hero-stage {
        min-height: 790px;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

    .hero-copy h2 {
        font-size: 30px;
    }

    .hero-summary {
        display: none;
    }

    .hero-actions .btn {
        width: 100%;
    }

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

    .horizontal-card {
        grid-template-columns: 104px minmax(0, 1fr);
        min-height: 158px;
    }

    .horizontal-body {
        padding: 14px 14px 14px 0;
    }

    .card-line {
        min-height: auto;
    }

    .page-hero {
        padding: 26px 20px;
    }
}
