:root {
    --night-950: #030712;
    --night-900: #0b1020;
    --night-850: #111827;
    --night-800: #1f2937;
    --night-700: #374151;
    --gold-600: #d97706;
    --gold-500: #f59e0b;
    --gold-400: #fbbf24;
    --gold-300: #fcd34d;
    --red-500: #ef4444;
    --blue-500: #3b82f6;
    --text: #f8fafc;
    --muted: #9ca3af;
    --soft: rgba(255, 255, 255, 0.08);
    --line: rgba(251, 191, 36, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --glow: 0 0 34px rgba(245, 158, 11, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--night-950), var(--night-900) 42%, var(--night-950));
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(3, 7, 18, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--gold-400);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.18);
}

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

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

.nav-link {
    color: #d1d5db;
    font-size: 15px;
    transition: color 0.2s ease;
}

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

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

.header-search input,
.filter-bar input,
.search-panel input,
.filter-bar select,
.search-panel select {
    border: 1px solid rgba(55, 65, 81, 0.95);
    background: rgba(11, 16, 32, 0.92);
    color: var(--text);
    border-radius: 12px;
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-bar input:focus,
.search-panel input:focus,
.filter-bar select:focus,
.search-panel select:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

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

.header-search button,
.search-panel button {
    border: 0;
    cursor: pointer;
}

.header-search button {
    color: var(--night-950);
    background: var(--gold-500);
    padding: 10px 14px;
    border-radius: 11px;
    font-weight: 700;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 11px;
}

.hero-carousel {
    position: relative;
    height: clamp(560px, 72vh, 760px);
    overflow: hidden;
    background: var(--night-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: scale(1.03);
    background-position: center;
    background-size: cover;
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-overlay,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.20), transparent 34%),
        linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.78) 45%, rgba(3, 7, 18, 0.48)),
        linear-gradient(180deg, rgba(3, 7, 18, 0.12), var(--night-950));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 40px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold-400);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
    font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
}

.hero-content h2 {
    margin-top: 14px;
    font-size: clamp(30px, 4vw, 54px);
    color: var(--gold-300);
}

.hero-desc {
    max-width: 720px;
    margin: 22px 0 0;
    color: #d1d5db;
    font-size: clamp(17px, 2vw, 23px);
    line-height: 1.7;
}

.hero-meta,
.card-meta,
.row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta {
    margin-top: 24px;
}

.hero-meta span,
.card-meta span,
.row-meta span,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.82);
    color: #d1d5db;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 10px;
    font-size: 13px;
}

.hero-actions,
.hero-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 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 {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--night-950);
    box-shadow: var(--glow);
}

.btn-ghost {
    background: rgba(31, 41, 55, 0.82);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.hero-chips a,
.hot-searches a {
    color: #e5e7eb;
    border: 1px solid rgba(251, 191, 36, 0.18);
    background: rgba(245, 158, 11, 0.08);
    border-radius: 999px;
    padding: 8px 12px;
    transition: background 0.2s ease, color 0.2s ease;
}

.hero-chips a:hover,
.hot-searches a:hover {
    background: rgba(245, 158, 11, 0.18);
    color: var(--gold-300);
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 74px 0;
}

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

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
    margin: 0;
    font-weight: 900;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.text-link {
    color: var(--gold-400);
    font-weight: 800;
}

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

.category-pill,
.category-card a {
    display: block;
    min-height: 120px;
    border-radius: 22px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(11, 16, 32, 0.9));
    border: 1px solid var(--line);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-pill:hover,
.category-card a:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.42);
    box-shadow: var(--glow);
}

.category-pill strong {
    display: block;
    font-size: 18px;
    color: var(--gold-300);
    margin-bottom: 8px;
}

.category-pill span,
.category-card p,
.site-footer p,
.movie-card p,
.movie-row p,
.page-hero p,
.detail-one-line,
.detail-content p {
    color: var(--muted);
    line-height: 1.75;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(11, 16, 32, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: var(--glow);
}

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

.movie-card.featured .card-cover {
    aspect-ratio: 16 / 11;
}

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

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

.cover-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(3, 7, 18, 0.82));
}

.rank-badge,
.list-rank {
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--night-950);
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.card-body {
    padding: 18px;
}

.card-meta {
    gap: 6px;
    margin-bottom: 12px;
}

.card-meta span {
    font-size: 12px;
    padding: 4px 8px;
}

.movie-card h3,
.movie-row h3 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.movie-row h3 a:hover {
    color: var(--gold-400);
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.ranking-list {
    display: grid;
    gap: 16px;
}

.movie-row {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 18px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(11, 16, 32, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-row:hover {
    transform: translateY(-3px);
    border-color: rgba(251, 191, 36, 0.3);
}

.row-cover {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    overflow: hidden;
    background: var(--night-800);
}

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

.row-body {
    align-self: center;
}

.row-meta {
    margin-bottom: 10px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.22), transparent 32%),
        linear-gradient(180deg, var(--night-900), var(--night-950));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-hero.compact {
    padding: 76px 0 54px;
}

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

.page-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
}

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

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

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

.category-card h2 {
    margin: 16px 0 10px;
    font-size: 28px;
}

.category-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--night-950);
    border-radius: 15px;
    background: var(--gold-400);
    font-weight: 900;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.category-samples a {
    color: var(--gold-300);
    font-size: 14px;
}

.filter-bar,
.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 170px;
    gap: 12px;
    margin-bottom: 26px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(11, 16, 32, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-panel {
    grid-template-columns: minmax(0, 1fr) 220px 120px;
}

.hot-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 26px;
}

.empty-state {
    display: none;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 18px;
}

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

.detail-hero {
    position: relative;
    min-height: 560px;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 560px;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 36px;
    align-items: center;
    padding: 52px 0;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(251, 191, 36, 0.24);
    background: var(--night-800);
}

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

.detail-info h1 {
    max-width: 830px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 780px;
    font-size: 20px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(360px, 0.84fr);
    gap: 26px;
    align-items: start;
}

.player-card,
.detail-content {
    background: rgba(11, 16, 32, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.player-card {
    padding: 14px;
}

.video-wrap {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-poster {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 40%, rgba(245, 158, 11, 0.26), transparent 32%),
        rgba(3, 7, 18, 0.58);
    cursor: pointer;
    text-align: center;
}

.player-poster.is-hidden {
    display: none;
    pointer-events: none;
}

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

.player-poster strong {
    font-size: 23px;
}

.player-poster em {
    color: #d1d5db;
    font-style: normal;
}

.detail-content {
    padding: 26px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.info-grid div {
    background: rgba(31, 41, 55, 0.64);
    border-radius: 16px;
    padding: 14px;
}

.info-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.info-grid strong,
.info-grid a {
    color: var(--gold-300);
    font-weight: 800;
}

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

.site-footer {
    margin-top: 70px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(3, 7, 18, 0.96);
}

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

.footer-brand {
    margin-bottom: 14px;
}

.site-footer h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

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

.footer-links a {
    color: var(--muted);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: #6b7280;
    text-align: center;
    padding: 18px 0;
    font-size: 14px;
}

@media (max-width: 1040px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 10px 0;
    }

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

    .nav-menu {
        display: none;
        order: 4;
        width: 100%;
        flex: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 16px;
        background: rgba(11, 16, 32, 0.98);
    }

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

    .header-search {
        margin-left: auto;
    }

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

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

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

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

@media (max-width: 720px) {
    .header-inner {
        width: min(100% - 24px, 1180px);
    }

    .header-search {
        width: 100%;
        order: 5;
    }

    .header-search input {
        width: 100%;
        flex: 1;
    }

    .hero-carousel {
        height: 680px;
    }

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

    .section {
        padding: 50px 0;
    }

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

    .category-strip,
    .movie-grid,
    .featured-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-bar,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        min-height: auto;
        padding-top: 42px;
    }

    .detail-info h1 {
        font-size: 34px;
    }

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