:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #f59e0b;
    --accent-strong: #ea580c;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), transparent 32rem), var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

img {
    display: block;
    max-width: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #020617);
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94));
    border-bottom: 1px solid rgba(245, 158, 11, 0.22);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name,
.footer-brand {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.76rem;
}

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

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

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--accent);
}

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

.header-search input,
.sub-hero-search input,
.filter-toolbar input,
.filter-toolbar select {
    border: 1px solid rgba(148, 163, 184, 0.22);
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.86);
    border-radius: 999px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.sub-hero-search button {
    border: 0;
    color: white;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.header-search input:focus,
.sub-hero-search input:focus,
.filter-toolbar input:focus,
.filter-toolbar select:focus {
    border-color: rgba(245, 158, 11, 0.78);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--accent);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

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

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
}

.mobile-nav a:hover {
    background: rgba(245, 158, 11, 0.08);
}

.hero {
    position: relative;
    height: min(720px, 72vh);
    min-height: 520px;
    overflow: hidden;
    border-bottom: 1px solid rgba(245, 158, 11, 0.14);
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    filter: saturate(1.08) contrast(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.68) 44%, rgba(2, 6, 23, 0.18)), linear-gradient(0deg, #020617 0%, transparent 44%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 130px;
}

.hero-copy {
    max-width: 680px;
}

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

.hero-labels span,
.tag-row span,
.detail-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.24);
    font-size: 0.82rem;
}

.hero h1,
.hero h2 {
    margin: 18px 0 14px;
    font-size: clamp(2.8rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 620px;
    margin: 0;
    color: #dbeafe;
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

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

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

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.24);
}

.btn-secondary {
    color: var(--text);
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.26);
    backdrop-filter: blur(12px);
}

.hero-panel {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 3;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(203, 213, 225, 0.45);
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

.hero-mini-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
}

.hero-mini-card img {
    width: 56px;
    height: 42px;
    border-radius: 10px;
}

.hero-mini-card span {
    min-width: 0;
    overflow: hidden;
    color: var(--soft);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.section {
    padding: 54px 0;
}

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

.section-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-heading h2,
.sub-hero h1,
.rank-hero h1,
.detail-copy h1,
.detail-article h2 {
    margin: 0;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading h2,
.sub-hero h1,
.rank-hero h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.section-link,
.text-link {
    color: var(--accent);
    font-weight: 700;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.66));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

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

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

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    color: white;
    font-size: 0.82rem;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.year-badge {
    right: 10px;
    bottom: 10px;
}

.rank-badge {
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.card-body {
    padding: 16px;
}

.card-meta {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: white;
    font-size: 1.05rem;
    line-height: 1.35;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 45px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

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

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

.category-tile {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: var(--panel);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.42;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.06);
    opacity: 0.56;
}

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

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile span {
    color: white;
    font-size: 1.25rem;
    font-weight: 800;
}

.category-tile p {
    margin: 8px 0 0;
    color: var(--soft);
    font-size: 0.9rem;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    gap: 24px;
}

.rank-lead,
.rank-list,
.sub-hero,
.rank-hero,
.detail-layout,
.detail-article article,
.player-shell,
.filter-toolbar,
.category-overview-card,
.detail-pager {
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.74));
    box-shadow: var(--shadow);
}

.rank-lead {
    padding: 30px;
}

.rank-crown {
    display: inline-grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.rank-lead h2 {
    margin: 20px 0 12px;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
}

.rank-lead p {
    color: var(--soft);
}

.rank-list {
    padding: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 48px 1fr 52px;
    align-items: center;
    gap: 12px;
    padding: 13px 10px;
    border-radius: 14px;
    color: var(--soft);
}

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

.rank-row span,
.full-rank-number {
    color: var(--accent);
    font-weight: 900;
}

.rank-row em,
.full-rank-row em {
    color: #fde68a;
    font-style: normal;
    font-weight: 900;
}

.sub-hero,
.rank-hero {
    margin-top: 38px;
    padding: 36px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
}

.sub-hero p,
.rank-hero p {
    max-width: 760px;
    color: var(--soft);
}

.sub-hero-search {
    display: flex;
    gap: 10px;
    min-width: min(420px, 100%);
}

.sub-hero-search input {
    flex: 1;
    padding: 12px 16px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.crumbs a {
    color: var(--accent);
}

.filter-toolbar {
    margin-bottom: 24px;
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px) minmax(140px, 180px) auto;
    gap: 12px;
    align-items: center;
}

.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
}

.filter-count {
    color: var(--muted);
    white-space: nowrap;
    font-size: 0.9rem;
}

.category-overview-grid {
    display: grid;
    gap: 20px;
}

.category-overview-card {
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(220px, 310px) 1fr;
    gap: 22px;
    align-items: center;
}

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

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

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 1.8rem;
}

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

.rank-hero {
    grid-template-columns: 1fr 280px;
}

.rank-hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.rank-hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
}

.rank-hero-poster span {
    position: absolute;
    inset: auto 14px 14px;
    padding: 10px 12px;
    border-radius: 14px;
    color: white;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

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

.full-rank-row {
    display: grid;
    grid-template-columns: 64px 76px 1fr 1.2fr 60px;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.full-rank-row img {
    width: 76px;
    height: 100px;
    border-radius: 14px;
}

.full-rank-row small {
    color: var(--muted);
}

.detail-hero {
    padding-top: 34px;
}

.detail-layout {
    margin-top: 20px;
    padding: 24px;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 28px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
}

.detail-copy h1 {
    margin-top: 14px;
    font-size: clamp(2.4rem, 5vw, 5rem);
}

.detail-one-line {
    max-width: 760px;
    color: var(--soft);
    font-size: 1.08rem;
}

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

.detail-meta div {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.26);
}

.detail-meta dt {
    color: var(--muted);
    font-size: 0.82rem;
}

.detail-meta dd {
    margin: 4px 0 0;
    color: white;
    font-weight: 700;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: white;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.72));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 20px 48px rgba(245, 158, 11, 0.32);
    font-size: 2rem;
}

.player-cover strong {
    font-size: 1.1rem;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-article article {
    padding: 28px;
}

.detail-article h2 {
    margin: 0 0 12px;
    font-size: 1.6rem;
}

.detail-article p {
    margin: 0 0 22px;
    color: var(--soft);
    font-size: 1.02rem;
}

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

.detail-pager a {
    min-width: 0;
    overflow: hidden;
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--soft);
    background: rgba(2, 6, 23, 0.3);
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.site-footer {
    margin-top: 50px;
    border-top: 1px solid rgba(245, 158, 11, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(0, 0, 0, 0.96));
}

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

.footer-inner p {
    max-width: 520px;
    color: var(--muted);
}

.footer-inner h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 1.1rem;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 0.9rem;
}

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

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .header-search {
        display: none;
    }

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

    .hero-mini-list {
        display: none;
    }

    .hero-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .hero {
        min-height: 560px;
        height: 68vh;
    }

    .hero-content {
        padding-bottom: 92px;
    }

    .movie-grid,
    .category-grid,
    .rank-layout,
    .sub-hero,
    .rank-hero,
    .detail-layout,
    .footer-inner,
    .category-overview-card,
    .detail-pager {
        grid-template-columns: 1fr;
    }

    .filter-toolbar {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        padding: 18px;
    }

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

    .full-rank-row {
        grid-template-columns: 48px 64px 1fr 48px;
    }

    .full-rank-row small {
        display: none;
    }
}

@media (max-width: 560px) {
    .container,
    .header-inner,
    .mobile-nav,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .brand-subtitle {
        display: none;
    }

    .brand-name {
        font-size: 1.05rem;
    }

    .hero h1,
    .hero h2 {
        font-size: 2.45rem;
    }

    .hero p {
        font-size: 0.98rem;
    }

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

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

    .movie-card-horizontal .card-poster {
        aspect-ratio: 3 / 4;
    }

    .card-body {
        padding: 12px;
    }

    .sub-hero,
    .rank-hero {
        padding: 22px;
    }

    .sub-hero-search {
        display: grid;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }

    .player-cover span {
        width: 68px;
        height: 68px;
    }
}
