:root {
    --moonlight-950: #020617;
    --moonlight-900: #0f172a;
    --moonlight-850: #111c33;
    --moonlight-800: #1e293b;
    --moonlight-700: #334155;
    --lunar-50: #f8fafc;
    --lunar-100: #f1f5f9;
    --lunar-200: #e2e8f0;
    --lunar-300: #cbd5e1;
    --lunar-400: #94a3b8;
    --golden-300: #fcd34d;
    --golden-400: #fbbf24;
    --golden-500: #f59e0b;
    --golden-700: #b45309;
    --border-soft: rgba(148, 163, 184, 0.18);
    --card-bg: rgba(15, 23, 42, 0.72);
    --glass-bg: rgba(15, 23, 42, 0.64);
    --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--lunar-100);
    background:
        radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.16), transparent 26rem),
        radial-gradient(circle at 86% 8%, rgba(59, 130, 246, 0.12), transparent 28rem),
        linear-gradient(180deg, var(--moonlight-900), var(--moonlight-950) 38rem);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-soft);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--moonlight-950);
    background: linear-gradient(135deg, var(--golden-300), var(--golden-500));
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
}

.brand-name,
.footer-logo {
    font-size: 20px;
    color: var(--lunar-50);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    color: var(--lunar-300);
    padding: 9px 13px;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--golden-300);
    background: rgba(245, 158, 11, 0.12);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--moonlight-800);
    color: var(--lunar-100);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 99px;
}

.hero {
    position: relative;
    height: min(760px, 78vh);
    min-height: 560px;
    overflow: hidden;
    background: var(--moonlight-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.1s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: -28px;
    background-position: center;
    background-size: cover;
    filter: blur(10px);
    opacity: 0.34;
}

.hero-overlay,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.72) 48%, rgba(2, 6, 23, 0.88)),
        linear-gradient(0deg, var(--moonlight-950), rgba(2, 6, 23, 0.18) 34%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: clamp(28px, 6vw, 86px);
}

.hero-kicker,
.eyebrow {
    color: var(--golden-300);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.06;
    letter-spacing: -0.05em;
    background: linear-gradient(90deg, var(--golden-300), var(--golden-400), var(--golden-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy p,
.page-hero p,
.detail-line {
    margin: 22px 0 0;
    max-width: 680px;
    color: var(--lunar-300);
    font-size: clamp(17px, 2.4vw, 22px);
}

.hero-tags,
.detail-meta,
.tag-row,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--lunar-200);
    background: rgba(30, 41, 59, 0.76);
    border: 1px solid var(--border-soft);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    color: var(--moonlight-950);
    background: linear-gradient(135deg, var(--golden-300), var(--golden-500));
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.24);
}

.btn-ghost {
    color: var(--lunar-100);
    background: rgba(30, 41, 59, 0.88);
    border: 1px solid var(--border-soft);
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(252, 211, 77, 0.22);
    aspect-ratio: 2 / 3;
}

.hero-poster img,
.movie-poster img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--moonlight-800), var(--moonlight-950));
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.36);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--golden-400);
}

.section-block {
    padding: 76px 0 0;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.text-link {
    color: var(--golden-300);
    font-weight: 700;
}

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

.category-card,
.catalog-card,
.search-panel,
.rank-board,
.detail-content article {
    background: var(--glass-bg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.category-card {
    min-height: 172px;
    padding: 22px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.catalog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(252, 211, 77, 0.36);
}

.category-card span {
    color: var(--golden-300);
    font-weight: 800;
}

.category-card strong {
    display: block;
    color: var(--lunar-50);
    font-size: 19px;
    margin-top: 16px;
}

.category-card em {
    color: var(--lunar-400);
    font-style: normal;
    margin-top: 12px;
}

.search-panel {
    border-radius: 24px;
    padding: 18px;
    margin-bottom: 24px;
}

.search-box {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--lunar-300);
    font-weight: 700;
}

.search-box input {
    width: 100%;
    color: var(--lunar-50);
    background: rgba(2, 6, 23, 0.58);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 13px 15px;
    outline: none;
}

.search-box input:focus {
    border-color: rgba(252, 211, 77, 0.5);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.11);
}

.filter-chip {
    color: var(--lunar-200);
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 8px 13px;
    cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: var(--moonlight-950);
    background: var(--golden-400);
}

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

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

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--moonlight-800);
}

.movie-poster img {
    transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.play-dot,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    color: var(--moonlight-950);
    background: var(--golden-400);
    font-weight: 900;
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 58px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 13px;
}

.movie-card-body {
    padding: 15px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--lunar-400);
    font-size: 12px;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.3;
}

.movie-card h3 a:hover {
    color: var(--golden-300);
}

.movie-card p {
    color: var(--lunar-400);
    margin: 0 0 12px;
    font-size: 14px;
}

.tag-row {
    gap: 7px;
}

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
}

.tag-row.large span {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 14px;
}

.rank-board {
    border-radius: 24px;
    overflow: hidden;
}

.rank-row {
    display: grid;
    grid-template-columns: 54px 1fr 72px;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-soft);
}

.rank-row:last-child {
    border-bottom: 0;
}

.rank-row:hover {
    background: rgba(245, 158, 11, 0.1);
}

.rank-no {
    color: var(--golden-300);
    font-weight: 900;
}

.rank-title {
    font-weight: 700;
}

.rank-year {
    color: var(--lunar-400);
    text-align: right;
}

.page-main {
    padding-bottom: 86px;
}

.page-hero {
    padding: 72px 0 38px;
}

.page-hero.compact {
    max-width: 860px;
}

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

.catalog-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    border-radius: 26px;
    padding: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.catalog-cover {
    min-height: 260px;
    border-radius: 20px;
    background-position: center;
    background-size: cover;
    background-color: var(--moonlight-800);
}

.catalog-body h2 {
    margin: 6px 0 10px;
    color: var(--golden-300);
}

.catalog-body p {
    color: var(--lunar-300);
}

.catalog-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.catalog-links a {
    color: var(--lunar-200);
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 6px 10px;
}

.detail-main {
    padding-bottom: 0;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background: var(--moonlight-950);
}

.detail-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: clamp(28px, 6vw, 72px);
    align-items: center;
    min-height: 620px;
    padding: 64px 0;
}

.detail-cover {
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(252, 211, 77, 0.22);
}

.breadcrumb {
    display: flex;
    gap: 10px;
    color: var(--lunar-400);
    margin-bottom: 18px;
}

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

.detail-meta {
    margin: 24px 0 18px;
}

.player-section {
    padding: 72px 0 0;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    border: 1px solid rgba(252, 211, 77, 0.18);
    box-shadow: var(--shadow-soft);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.72));
    color: var(--moonlight-950);
    cursor: pointer;
}

.player-start span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--golden-400);
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.35);
    font-size: 34px;
    padding-left: 5px;
}

.player-wrap.is-playing .player-start {
    display: none;
}

.detail-content {
    padding: 42px 0 0;
}

.detail-content article {
    border-radius: 26px;
    padding: clamp(22px, 4vw, 34px);
}

.detail-content h2 {
    margin: 0 0 14px;
    color: var(--golden-300);
}

.detail-content p {
    color: var(--lunar-200);
    font-size: 18px;
}

.site-footer {
    margin-top: 86px;
    padding: 42px 0 24px;
    background: rgba(2, 6, 23, 0.68);
    border-top: 1px solid var(--border-soft);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
}

.footer-grid p {
    color: var(--lunar-400);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    color: var(--lunar-300);
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.55);
}

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

.copyright {
    margin-top: 24px;
    color: var(--lunar-400);
    font-size: 14px;
}

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

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

    .hero-content {
        grid-template-columns: 1fr 260px;
    }
}

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

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid var(--border-soft);
    }

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

    .hero {
        height: auto;
        min-height: 760px;
    }

    .hero-content,
    .detail-grid,
    .footer-grid,
    .catalog-card {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 72px 0 110px;
    }

    .hero-poster,
    .detail-cover {
        width: min(280px, 75vw);
        margin: 0 auto;
    }

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

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

    .detail-grid {
        min-height: auto;
        padding: 46px 0;
    }

    .detail-hero {
        min-height: auto;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

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

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

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 38px;
    }

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

    .rank-year {
        display: none;
    }
}
