:root {
    --night-950: #020617;
    --night-900: #0f172a;
    --night-850: #111827;
    --night-800: #1e293b;
    --night-700: #334155;
    --night-600: #475569;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --white: #ffffff;
    --key-gold-300: #fde047;
    --key-gold-400: #facc15;
    --key-gold-500: #eab308;
    --key-gold-600: #ca8a04;
    --mystery-blue-400: #60a5fa;
    --mystery-blue-500: #3b82f6;
    --red-400: #f87171;
    --red-500: #ef4444;
    --shadow-glow: 0 0 18px rgba(234, 179, 8, 0.32);
    --shadow-night: 0 18px 55px rgba(0, 0, 0, 0.48);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.95);
    border-bottom: 1px solid rgba(113, 63, 18, 0.35);
    backdrop-filter: blur(10px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--key-gold-400);
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(234, 179, 8, 0.12);
    color: var(--key-gold-400);
    box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.24);
}

.logo-text {
    font-size: 20px;
    background: linear-gradient(90deg, var(--key-gold-300), var(--key-gold-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: var(--gray-300);
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--key-gold-400);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select,
.search-page-form input,
.slim-filter select {
    border: 1px solid var(--night-700);
    background: var(--night-900);
    color: var(--gray-300);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 9px 12px;
}

.header-search button,
.mobile-search button {
    border: 0;
    padding: 9px 14px;
    border-radius: 12px;
    background: rgba(234, 179, 8, 0.12);
    color: var(--key-gold-400);
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-page-form input:focus,
.slim-filter select:focus {
    border-color: var(--key-gold-500);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.14);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--gray-300);
    font-size: 26px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid rgba(30, 41, 59, 0.95);
}

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

.mobile-nav-link {
    padding: 10px 0;
    color: var(--gray-300);
}

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.mobile-search input {
    min-width: 0;
    padding: 10px 12px;
}

.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 50% 10%, rgba(234, 179, 8, 0.15), transparent 36%),
        linear-gradient(0deg, var(--night-950) 0%, rgba(2, 6, 23, 0.88) 38%, rgba(2, 6, 23, 0.42) 100%);
}

.hero-content {
    width: min(1000px, calc(100% - 32px));
    margin: 0 auto;
    padding: 88px 0 78px;
    text-align: center;
    animation: fadeUp 0.8s ease both;
}

.hero-kicker {
    margin: 0 0 18px;
    color: var(--key-gold-400);
    letter-spacing: 0.16em;
    font-size: 13px;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(38px, 7vw, 78px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 16px 38px rgba(0, 0, 0, 0.55);
}

.hero-summary,
.page-hero p {
    width: min(760px, 100%);
    margin: 22px auto 0;
    color: var(--gray-300);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

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

.hero-tags {
    justify-content: center;
    margin: 24px 0 0;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.72);
    color: var(--gray-300);
    font-size: 13px;
}

.hero-tags span:first-child,
.detail-tags span:first-child {
    background: rgba(234, 179, 8, 0.14);
    color: var(--key-gold-400);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 32px;
}

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

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

.btn-primary {
    background: var(--key-gold-500);
    color: var(--night-950);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--key-gold-400);
}

.btn-secondary {
    background: var(--night-800);
    color: var(--white);
}

.btn-secondary:hover,
.btn-ghost:hover {
    background: var(--night-700);
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.5);
    color: var(--gray-300);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.hero-feature-card {
    width: min(520px, 100%);
    margin: 36px auto 0;
    padding: 18px 20px;
    border: 1px solid rgba(234, 179, 8, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: var(--shadow-night);
    backdrop-filter: blur(10px);
    display: grid;
    gap: 5px;
}

.hero-feature-card span {
    color: var(--key-gold-400);
    font-size: 13px;
}

.hero-feature-card strong {
    color: var(--white);
    font-size: 20px;
}

.hero-feature-card em {
    color: var(--gray-400);
    font-style: normal;
    font-size: 14px;
}

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

.page-top {
    padding-top: 34px;
}

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

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

.section-heading h2 {
    margin: 0 0 8px;
    color: var(--white);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.section-heading p {
    margin: 0;
    color: var(--gray-400);
}

.compact-heading {
    margin-bottom: 18px;
}

.section-link {
    color: var(--key-gold-400);
    font-weight: 700;
    white-space: nowrap;
}

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

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

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

.movie-card {
    position: relative;
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    background: var(--night-900);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.movie-card a:hover {
    transform: translateY(-5px);
    border-color: rgba(234, 179, 8, 0.48);
    background: var(--night-800);
    box-shadow: var(--shadow-glow);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--night-800);
}

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

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

.card-body {
    display: grid;
    gap: 10px;
    padding: 17px;
}

.card-title {
    color: var(--white);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    color: var(--gray-400);
    font-size: 14px;
    line-height: 1.55;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.rank-badge {
    position: absolute;
    left: -8px;
    top: -8px;
    z-index: 3;
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--key-gold-300), var(--key-gold-600));
    color: var(--night-950);
    font-weight: 900;
    box-shadow: var(--shadow-glow);
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 28px;
}

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

.movie-list-item {
    display: grid;
    grid-template-columns: auto 112px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(51, 65, 85, 0.66);
    border-radius: 16px;
    background: var(--night-900);
    transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.movie-list-item:hover {
    background: var(--night-800);
    border-color: rgba(234, 179, 8, 0.42);
    transform: translateY(-2px);
}

.movie-list-item img {
    width: 112px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.list-rank {
    color: var(--key-gold-400);
    font-weight: 900;
    min-width: 54px;
}

.list-info {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.list-info strong {
    color: var(--white);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-info em {
    color: var(--gray-400);
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-info small {
    color: var(--gray-500);
}

.ranking-panel {
    padding: 22px;
    border: 1px solid rgba(51, 65, 85, 0.66);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.62));
    box-shadow: var(--shadow-night);
}

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

.category-tile {
    position: relative;
    min-height: 168px;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(51, 65, 85, 0.7);
    background: var(--night-900);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.category-tile.large {
    min-height: 220px;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(234, 179, 8, 0.42);
    box-shadow: var(--shadow-glow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.1));
}

.category-content {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 8px;
    padding: 18px;
}

.category-content strong {
    color: var(--white);
    font-size: 20px;
    font-weight: 900;
}

.category-content em {
    color: var(--gray-400);
    font-style: normal;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    position: relative;
    margin-bottom: 52px;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 24px;
    background:
        radial-gradient(circle at 80% 20%, rgba(234, 179, 8, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.88));
    box-shadow: var(--shadow-night);
}

.compact-page-hero {
    padding: 56px;
    text-align: center;
}

.compact-page-hero p {
    margin-left: auto;
    margin-right: auto;
}

.category-page-hero {
    min-height: 330px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: center;
    padding: 42px;
}

.category-page-hero img {
    width: 100%;
    height: 245px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: var(--shadow-night);
}

.accent-blue {
    border-color: rgba(59, 130, 246, 0.32);
}

.accent-red {
    border-color: rgba(239, 68, 68, 0.3);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 14px;
    margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select,
.slim-filter select {
    min-height: 46px;
    padding: 0 14px;
}

.filter-empty {
    padding: 30px;
    text-align: center;
    border-radius: 18px;
    background: var(--night-900);
    color: var(--gray-400);
    margin-bottom: 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--gray-500);
    margin-bottom: 20px;
    font-size: 14px;
}

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

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

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

.player-card,
.content-card,
.side-card,
.poster-panel {
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 20px;
    background: var(--night-900);
    box-shadow: var(--shadow-night);
}

.player-card {
    overflow: hidden;
    margin-bottom: 22px;
}

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

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background:
        radial-gradient(circle, rgba(234, 179, 8, 0.22), transparent 28%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.14));
    color: var(--night-950);
}

.player-play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--key-gold-500);
    color: var(--night-950);
    font-size: 34px;
    box-shadow: var(--shadow-glow);
}

.player-info {
    padding: 24px;
}

.player-info h1 {
    margin: 14px 0;
    color: var(--white);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
}

.player-info p,
.content-card p {
    margin: 0;
    color: var(--gray-300);
    line-height: 1.82;
}

.content-card {
    padding: 24px;
    margin-bottom: 22px;
}

.content-card h2,
.side-card h2,
.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 20px;
}

.tag-cloud {
    gap: 10px;
}

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

.poster-panel {
    overflow: hidden;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.poster-panel div {
    padding: 18px;
    display: grid;
    gap: 8px;
}

.poster-panel strong {
    color: var(--white);
    font-size: 20px;
}

.poster-panel span {
    color: var(--gray-400);
}

.side-card {
    padding: 20px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px 14px;
    margin: 0;
}

.side-card dt {
    color: var(--gray-500);
}

.side-card dd {
    margin: 0;
    color: var(--gray-300);
}

.related-block {
    margin-top: 56px;
}

.search-page-block {
    min-height: 420px;
}

.search-page-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    margin-bottom: 16px;
}

.search-page-form input {
    min-height: 50px;
    padding: 0 16px;
}

.slim-filter {
    grid-template-columns: 220px;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--night-800);
    background: rgba(2, 6, 23, 0.78);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 34px;
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: 30px;
}

.site-footer p {
    color: var(--gray-400);
    line-height: 1.7;
}

.site-footer ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.site-footer a {
    color: var(--gray-400);
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--key-gold-400);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--night-800);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .two-column-section,
    .detail-layout,
    .category-page-hero {
        grid-template-columns: 1fr;
    }

    .category-page-hero img {
        height: 280px;
    }

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

@media (max-width: 700px) {
    .header-inner,
    .page-shell,
    .footer-grid,
    .footer-bottom,
    .mobile-nav {
        width: min(100% - 24px, 1180px);
    }

    .hero-section {
        min-height: 620px;
    }

    .hero-content {
        padding: 70px 0 52px;
    }

    .hero-actions {
        display: grid;
    }

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

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

    .movie-list-item {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 12px;
    }

    .movie-list-item img {
        grid-row: span 2;
        width: 78px;
        height: 92px;
    }

    .list-rank {
        display: none;
    }

    .filter-bar,
    .search-page-form,
    .slim-filter {
        grid-template-columns: 1fr;
    }

    .compact-page-hero,
    .category-page-hero {
        padding: 28px;
    }

    .page-hero h1,
    .hero-content h1 {
        font-size: 38px;
    }

    .player-info,
    .content-card,
    .side-card {
        padding: 18px;
    }
}
