:root {
    color-scheme: dark;
    --page-bg: #030712;
    --panel-bg: #0f172a;
    --soft-bg: #111827;
    --card-bg: #111827;
    --card-bg-strong: #172033;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(250, 204, 21, 0.26);
    --text: #f9fafb;
    --muted: #9ca3af;
    --muted-strong: #d1d5db;
    --gold: #facc15;
    --gold-dark: #d97706;
    --red: #ef4444;
    --green: #22c55e;
    --shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 10% 0%, rgba(250, 204, 21, 0.08), transparent 30%),
        radial-gradient(circle at 90% 8%, rgba(239, 68, 68, 0.08), transparent 24%),
        var(--page-bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.65;
}

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

img {
    object-fit: cover;
}

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

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

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

.nav-wrap {
    display: flex;
    align-items: center;
    min-height: 72px;
    gap: 22px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 13px;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), #f97316);
    box-shadow: 0 14px 30px rgba(250, 204, 21, 0.24);
}

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

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

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: var(--gold);
    background: rgba(255, 255, 255, 0.07);
}

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

.nav-search input,
.mobile-panel input,
.filter-bar input,
.filter-bar select {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: rgba(17, 24, 39, 0.94);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 248px;
    padding: 10px 14px;
}

.nav-search input:focus,
.mobile-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(250, 204, 21, 0.8);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
}

.nav-search button,
.mobile-panel button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), #f59e0b);
    font-weight: 900;
    box-shadow: 0 16px 30px rgba(250, 204, 21, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn.secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn.ghost {
    color: var(--gold);
    background: rgba(250, 204, 21, 0.08);
    box-shadow: none;
    border: 1px solid rgba(250, 204, 21, 0.22);
}

.nav-search button:hover,
.mobile-panel button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(250, 204, 21, 0.24);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

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

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav,
.mobile-panel form {
    display: grid;
    gap: 10px;
    width: min(100%, var(--container));
    margin: 14px auto 0;
}

.mobile-panel input {
    min-height: 46px;
    padding: 10px 14px;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #050816;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.08);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.78) 44%, rgba(3, 7, 18, 0.16) 100%),
        linear-gradient(0deg, rgba(3, 7, 18, 0.78), transparent 46%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 600px;
    padding: 60px 0;
}

.hero-copy {
    width: min(680px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--gold);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.hero p {
    width: min(620px, 100%);
    margin: 0 0 28px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2.1vw, 21px);
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.hero-meta span,
.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(250, 204, 21, 0.22);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(250, 204, 21, 0.08);
    font-size: 13px;
    font-weight: 700;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    right: max(24px, calc((100vw - var(--container)) / 2));
    bottom: 36px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-controls button,
.hero-dot {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-controls button:hover,
.hero-dot:hover,
.hero-dot.is-active {
    color: #111827;
    background: var(--gold);
    transform: translateY(-2px);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 999px;
}

.section {
    padding: 70px 0;
}

.section.compact {
    padding: 44px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    max-width: 720px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

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

.poster-shadow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent);
}

.year-badge,
.type-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

.year-badge {
    left: 12px;
    color: #111827;
    background: var(--gold);
}

.type-badge {
    right: 12px;
    color: var(--text);
    background: rgba(17, 24, 39, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.rank-badge {
    left: 12px;
    top: auto;
    bottom: 12px;
    color: var(--text);
    background: linear-gradient(135deg, var(--red), #f97316);
}

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

.movie-card h3,
.rank-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 900;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.breadcrumb a:hover {
    color: var(--gold);
}

.movie-card p,
.rank-info p {
    margin: 0 0 12px;
    color: var(--muted-strong);
    font-size: 14px;
    line-height: 1.55;
}

.movie-meta {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--soft-bg);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.88), rgba(3, 7, 18, 0.26));
}

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

.category-card-content {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding: 20px;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 950;
}

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

.page-hero {
    padding: 64px 0 34px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(250, 204, 21, 0.1), transparent 42%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.98), rgba(3, 7, 18, 0.9));
}

.page-hero h1 {
    max-width: 940px;
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

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

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(17, 24, 39, 0.72);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(140px, 0.45fr));
    gap: 12px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
}

.empty-state {
    display: none;
    padding: 32px;
    border: 1px dashed rgba(250, 204, 21, 0.28);
    border-radius: var(--radius-lg);
    color: var(--muted-strong);
    text-align: center;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 68px 110px 1fr;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-number {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 16px;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), #f97316);
    font-size: 22px;
    font-weight: 950;
}

.rank-cover {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

.rank-cover img {
    width: 100%;
    height: 100%;
}

.detail-layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow);
    background: var(--soft-bg);
}

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-one-line {
    margin: 0 0 22px;
    color: var(--muted-strong);
    font-size: 19px;
}

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

.detail-meta-list li {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    color: var(--muted-strong);
}

.detail-meta-list strong {
    display: block;
    color: var(--text);
    font-size: 13px;
}

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

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

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

.play-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    color: #111827;
    background: rgba(250, 204, 21, 0.94);
    box-shadow: 0 18px 42px rgba(250, 204, 21, 0.26);
    font-size: 28px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.play-overlay:hover {
    transform: translate(-50%, -50%) scale(1.06);
}

.player-shell.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.content-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(17, 24, 39, 0.72);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
}

.content-card p {
    margin: 0 0 18px;
    color: var(--muted-strong);
}

.content-card p:last-child {
    margin-bottom: 0;
}

.site-footer {
    margin-top: 60px;
    border-top: 1px solid var(--line);
    background: rgba(3, 7, 18, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 36px;
    padding: 44px 0 26px;
}

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

.site-footer p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
}

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

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.06);
}

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

.footer-bottom {
    padding: 18px 0 28px;
    color: var(--muted);
    font-size: 14px;
}

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

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

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

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

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

    .hero-controls {
        left: 16px;
        right: auto;
        bottom: 22px;
    }

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

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

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

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

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

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

    .site-logo {
        font-size: 19px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

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

    .hero-content {
        padding: 44px 0 76px;
    }

    .hero-actions,
    .section-head,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions .btn,
    .section-actions .btn,
    .detail-actions .btn {
        width: 100%;
    }

    .section {
        padding: 48px 0;
    }

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

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

    .movie-card h3,
    .rank-info h3 {
        font-size: 16px;
    }

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

    .rank-card {
        grid-template-columns: 46px 82px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }

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

    .content-card {
        padding: 20px;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .movie-grid.wide,
    .category-grid {
        grid-template-columns: 1fr;
    }
}
