:root {
    --night-950: #020617;
    --night-900: #0f172a;
    --night-850: #111827;
    --night-800: #1e293b;
    --night-700: #334155;
    --gold-400: #facc15;
    --gold-500: #eab308;
    --gold-600: #ca8a04;
    --blue-500: #3b82f6;
    --red-500: #ef4444;
    --white: #ffffff;
    --muted: #9ca3af;
    --soft: #cbd5e1;
    --border: rgba(250, 204, 21, 0.16);
    --shadow-glow: 0 0 25px rgba(234, 179, 8, 0.24);
    --shadow-night: 0 24px 80px rgba(0, 0, 0, 0.46);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--white);
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(180deg, var(--night-950), var(--night-900) 58%, var(--night-950));
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--night-950);
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    border-radius: 12px;
    box-shadow: var(--shadow-glow);
}

.brand-text,
.footer-brand {
    font-size: 21px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link,
.mobile-nav-link,
.footer-links a {
    color: var(--soft);
    transition: color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active,
.footer-links a:hover {
    color: var(--gold-400);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--white);
    background: rgba(30, 41, 59, 0.6);
    cursor: pointer;
}

.mobile-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: var(--gold-400);
}

.mobile-nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 16px 16px;
    background: rgba(2, 6, 23, 0.96);
}

.mobile-nav.is-open {
    display: grid;
}

.mobile-nav-link {
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: var(--night-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-background,
.detail-hero-bg,
.page-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-background img,
.detail-hero-bg img,
.page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.02) contrast(1.05);
}

.hero-gradient,
.detail-hero-bg span,
.page-hero-bg span {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 28%, rgba(234, 179, 8, 0.28), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.74) 48%, rgba(2, 6, 23, 0.34)),
        linear-gradient(0deg, var(--night-950), rgba(2, 6, 23, 0.18) 45%, var(--night-950));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 56px;
    padding: 78px 0 92px;
}

.hero-copy {
    max-width: 740px;
    animation: slideUp 0.5s ease both;
}

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

.hero h1,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 20px 0 0;
    color: var(--soft);
    font-size: clamp(17px, 2vw, 23px);
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(250, 204, 21, 0.24);
    color: var(--gold-400);
    background: rgba(234, 179, 8, 0.08);
    border-radius: 999px;
    line-height: 1;
}

.hero-tags span,
.detail-tags span {
    padding: 8px 12px;
}

.tag-row span {
    padding: 6px 9px;
    font-size: 12px;
}

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

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

.btn.primary,
.btn.small {
    color: var(--night-950);
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    box-shadow: var(--shadow-glow);
}

.btn.ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(30, 41, 59, 0.72);
}

.btn.small {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 14px;
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow-night), var(--shadow-glow);
    animation: fadeIn 0.8s ease both;
}

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

.hero-controls {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 30px;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
    border: 1px solid rgba(250, 204, 21, 0.22);
    color: var(--gold-400);
    background: rgba(2, 6, 23, 0.64);
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 9px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 99px;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--gold-400);
}

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

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

.section-heading h2,
.rank-panel-head h2,
.story-card h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
}

.section-heading p,
.category-large-body p,
.story-card p,
.site-footer p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more,
.rank-panel-head a {
    color: var(--gold-400);
    font-weight: 700;
}

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

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.latest-grid,
.related-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(250, 204, 21, 0.38);
    box-shadow: var(--shadow-night), var(--shadow-glow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--night-800);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 11px;
    color: var(--night-950);
    background: var(--gold-400);
}

.rank-badge {
    top: 12px;
    left: 12px;
    width: 42px;
    height: 30px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red-500), var(--gold-500));
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.28);
}

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

.movie-title {
    display: -webkit-box;
    min-height: 2.8em;
    overflow: hidden;
    color: var(--white);
    font-weight: 800;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-title:hover {
    color: var(--gold-400);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 10px 0 13px;
    overflow: hidden;
    color: var(--soft);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.category-card,
.category-large-card,
.story-card,
.filter-panel,
.rank-panel {
    border: 1px solid rgba(148, 163, 184, 0.13);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.55));
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.category-card {
    display: grid;
    gap: 16px;
    padding: 16px;
    border-radius: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.category-large-card:hover {
    transform: translateY(-4px);
    border-color: rgba(250, 204, 21, 0.34);
}

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

.category-covers img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    object-fit: cover;
}

.category-card h3,
.category-large-body h2 {
    margin: 0;
}

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

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 20px;
    border-radius: 24px;
}

.rank-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 36px 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.42);
}

.rank-num {
    color: var(--gold-400);
    font-weight: 900;
}

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

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.rank-score {
    color: var(--night-950);
    background: var(--gold-400);
    border-radius: 999px;
    padding: 4px 9px;
    font-weight: 900;
    font-size: 12px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 20px;
}

.search-box,
.select-box {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.search-box input,
.select-box select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    outline: none;
    color: var(--white);
    background: rgba(2, 6, 23, 0.62);
    padding: 0 14px;
}

.search-box input:focus,
.select-box select:focus {
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.08);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0;
    background: var(--night-950);
}

.compact-hero {
    background:
        radial-gradient(circle at 20% 20%, rgba(234, 179, 8, 0.18), transparent 24%),
        linear-gradient(135deg, var(--night-950), var(--night-900));
}

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

.category-large-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
}

.category-large-card {
    overflow: hidden;
    border-radius: 26px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-large-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 14px;
    background: rgba(2, 6, 23, 0.45);
}

.category-large-covers img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
}

.category-large-body {
    padding: 20px;
}

.category-movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.rank-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: var(--night-950);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
    padding: 76px 0 58px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(250, 204, 21, 0.22);
    border-radius: 24px;
    box-shadow: var(--shadow-night), var(--shadow-glow);
}

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

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

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.detail-meta span {
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.62);
}

.player-section {
    padding-top: 42px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow-night), var(--shadow-glow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
    cursor: pointer;
}

.player-shell.is-playing .player-overlay {
    display: none;
}

.player-icon {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    padding-left: 5px;
    color: var(--night-950);
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    border-radius: 999px;
    box-shadow: var(--shadow-glow);
    font-size: 30px;
}

.player-overlay strong {
    font-size: 20px;
}

.detail-content {
    display: grid;
    gap: 20px;
}

.story-card {
    padding: 24px;
    border-radius: 22px;
}

.story-card p {
    color: var(--soft);
    font-size: 16px;
}

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

.detail-pager a {
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
}

.detail-pager a:hover {
    color: var(--gold-400);
}

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

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .mobile-toggle {
        display: flex;
    }

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

    .hero-poster {
        display: none;
    }

    .rank-panel {
        position: static;
    }
}

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

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

    .hero-content {
        padding: 58px 0 96px;
    }

    .hero h1,
    .page-hero h1,
    .detail-intro h1 {
        font-size: clamp(34px, 12vw, 50px);
    }

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

    .filter-panel,
    .detail-pager,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-hero-inner {
        gap: 24px;
        padding: 46px 0 38px;
    }

    .detail-poster {
        max-width: 260px;
    }

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

    .rank-score {
        display: none;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .featured-grid,
    .latest-grid,
    .category-movie-grid,
    .rank-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-card-body p,
    .tag-row {
        display: none;
    }

    .movie-title {
        min-height: 2.7em;
        font-size: 14px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
