:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --bg-card: rgba(15, 23, 42, 0.86);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --accent: #f59e0b;
    --accent-strong: #f97316;
    --shadow: 0 22px 55px rgba(0, 0, 0, 0.32);
    --radius: 22px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #111827 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 22px;
    align-items: center;
    min-height: 76px;
    padding: 0 max(18px, calc((100vw - var(--max)) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

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

.logo-mark {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: #1f1300;
    background: linear-gradient(135deg, var(--accent), #fde68a);
    box-shadow: 0 10px 26px rgba(245, 158, 11, 0.34);
}

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

.desktop-nav a,
.mobile-panel a {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
}

.header-search {
    display: flex;
    align-items: center;
    min-width: 260px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
}

.header-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input {
    padding: 10px 14px;
}

.header-search button,
.large-search button {
    border: 0;
    color: #1b1300;
    background: var(--accent);
    cursor: pointer;
    font-weight: 800;
}

.header-search button {
    align-self: stretch;
    padding: 0 16px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

.mobile-panel {
    display: none;
}

.hero-slider {
    position: relative;
    height: 68vh;
    min-height: 560px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 5s ease;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.18)),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.28) 48%, transparent 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - var(--max)) / 2));
    bottom: 72px;
    width: min(680px, calc(100% - 48px));
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #fbbf24;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 14px;
    font-size: clamp(2.3rem, 6vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
}

.hero-content h2 {
    font-size: clamp(1.8rem, 4vw, 3.8rem);
}

.hero-content p {
    max-width: 640px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: clamp(1rem, 1.45vw, 1.22rem);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 900;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #1c1403;
    background: linear-gradient(135deg, var(--accent), #fde68a);
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
    color: var(--text);
    border-color: rgba(248, 250, 252, 0.22);
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(12px);
}

.btn-small {
    min-height: 38px;
    padding: 0 14px;
    color: #1c1403;
    background: var(--accent);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.42);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
    font-size: 2rem;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: max(24px, calc((100vw - var(--max)) / 2));
    bottom: 32px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

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

.hero-quick {
    position: absolute;
    right: max(24px, calc((100vw - var(--max)) / 2));
    bottom: 48px;
    z-index: 5;
    display: grid;
    gap: 10px;
    width: 240px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.58);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-quick strong {
    color: var(--accent);
}

.hero-quick a {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted);
}

.search-band {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 520px);
    gap: 26px;
    align-items: center;
    margin-top: 44px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.search-band h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.prose-card h2,
.rank-row h2,
.category-overview-card h2 {
    margin: 0;
    line-height: 1.12;
}

.large-search {
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.5);
}

.large-search input {
    padding: 15px 18px;
}

.large-search button {
    padding: 0 24px;
}

.section-block {
    margin-top: 58px;
}

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

.section-heading h2 {
    font-size: clamp(1.55rem, 2.8vw, 2.5rem);
}

.section-heading a,
.text-link {
    color: #fbbf24;
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(30, 41, 59, 0.82);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.12);
}

.poster-link img,
.compact-card img,
.rank-poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-link img,
.category-tile img,
.compact-card img,
.rank-poster img {
    transition: transform 0.3s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.compact-card:hover img,
.rank-row:hover .rank-poster img {
    transform: scale(1.06);
}

.poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #1c1403;
    background: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--soft);
    font-size: 0.82rem;
}

.card-meta span,
.detail-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 1.08rem;
    line-height: 1.28;
}

.movie-card p {
    min-height: 4.2em;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.tag-row span,
.chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.7);
    font-size: 0.76rem;
}

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

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 150px 1fr;
}

.movie-card-horizontal .poster-link {
    aspect-ratio: auto;
    min-height: 210px;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.category-tile:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 70%);
}

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

.category-tile span {
    position: absolute;
    left: 18px;
    bottom: 16px;
    z-index: 2;
    font-size: 1.2rem;
    font-weight: 900;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

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

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

.compact-card {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.66);
}

.compact-card img {
    height: 82px;
    border-radius: 12px;
}

.compact-card span {
    font-weight: 800;
}

.page-main {
    padding: 34px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 22px;
    color: var(--soft);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #fbbf24;
}

.page-hero,
.soft-hero {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 28rem),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 4vw, 4rem);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.chip.is-active {
    color: #1c1403;
    background: var(--accent);
    font-weight: 900;
}

.category-movie-grid,
.search-results {
    margin-top: 30px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.category-overview-card p {
    color: var(--muted);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-cover-stack img {
    width: 100%;
    height: 132px;
    object-fit: cover;
    border-radius: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.78);
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.56);
}

.filter-panel option {
    color: #0f172a;
}

.featured-rank-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-top: 30px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 96px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
}

.rank-number {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #1c1403;
    background: var(--accent);
    font-weight: 900;
}

.rank-poster {
    height: 124px;
    overflow: hidden;
    border-radius: 14px;
}

.rank-row p {
    margin: 8px 0;
    color: var(--muted);
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 28rem),
        rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 22px;
    background: rgba(148, 163, 184, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.detail-info h1 {
    margin-bottom: 16px;
    font-size: clamp(2rem, 4vw, 4.6rem);
    letter-spacing: -0.05em;
}

.detail-info p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 1.1rem;
}

.detail-meta {
    margin-bottom: 16px;
}

.big-tags span {
    padding: 7px 12px;
    font-size: 0.86rem;
}

.player-section {
    margin-top: 34px;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 26px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.22));
    cursor: pointer;
}

.play-layer.is-hidden {
    display: none;
}

.play-symbol {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 999px;
    color: #1c1403;
    background: var(--accent);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.34);
    font-size: 2rem;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 34px;
}

.prose-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.prose-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.site-footer {
    display: grid;
    gap: 16px;
    padding: 38px max(18px, calc((100vw - var(--max)) / 2));
    border-top: 1px solid var(--line);
    color: var(--soft);
    background: rgba(2, 6, 23, 0.72);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

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

.is-filtered-out {
    display: none !important;
}

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

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

    .hero-quick {
        display: none;
    }
}

@media (max-width: 860px) {
    .site-header {
        grid-template-columns: auto 1fr auto;
    }

    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-panel {
        position: absolute;
        top: 76px;
        left: 16px;
        right: 16px;
        display: none;
        grid-column: 1 / -1;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.95);
    }

    .site-header.menu-open .mobile-panel {
        display: grid;
        gap: 8px;
    }

    .hero-slider {
        height: 72vh;
        min-height: 560px;
    }

    .hero-content {
        bottom: 80px;
    }

    .hero-control {
        display: none;
    }

    .search-band,
    .split-section,
    .detail-content,
    .detail-hero,
    .category-overview-card,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(320px, 100%);
    }

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

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, var(--max));
    }

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

    .hero-content {
        left: 16px;
        width: calc(100% - 32px);
    }

    .movie-grid,
    .category-grid,
    .mini-grid,
    .featured-rank-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        grid-template-columns: 116px 1fr;
    }

    .movie-card-horizontal .poster-link {
        min-height: 172px;
    }

    .page-hero,
    .soft-hero,
    .detail-hero {
        padding: 22px;
    }

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

    .rank-poster {
        display: none;
    }

    .rank-row .btn {
        grid-column: 2;
    }
}
