:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --amber: #f59e0b;
    --amber-soft: #fbbf24;
    --orange: #fb923c;
    --cyan: #22d3ee;
    --green: #34d399;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 30rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-shell {
    width: min(1220px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-soft), var(--orange));
    box-shadow: 0 0 36px rgba(245, 158, 11, 0.4);
}

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

.brand-copy strong {
    font-size: 22px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fde68a, #fbbf24, #f97316);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-copy small {
    margin-top: 4px;
    color: var(--subtle);
    font-size: 12px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

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

.site-nav > a,
.nav-dropdown > button {
    padding: 10px 14px;
    border: 0;
    border-radius: 14px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav > a:hover,
.site-nav > a.active,
.nav-dropdown:hover > button {
    color: #fff7ed;
    background: rgba(245, 158, 11, 0.16);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: 190px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown-panel a {
    display: block;
    padding: 10px 12px;
    color: var(--muted);
    border-radius: 12px;
}

.nav-dropdown-panel a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

main {
    overflow: hidden;
}

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

.hero {
    position: relative;
    min-height: 720px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    background: linear-gradient(120deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.6));
}

.hero-glow {
    position: absolute;
    inset: auto 8% 8% auto;
    width: 320px;
    height: 320px;
    z-index: -1;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3), transparent 70%);
    filter: blur(6px);
}

.hero-slide {
    display: none;
    position: absolute;
    inset: 0;
    opacity: 0;
}

.hero-slide.active {
    display: block;
    animation: fadeIn 0.6s ease forwards;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.9));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 48px;
    align-items: center;
    padding: 96px 0 72px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(251, 191, 36, 0.26);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.11);
    font-size: 13px;
}

.hero h1 {
    max-width: 780px;
    margin: 22px 0 18px;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero h1 span {
    background: linear-gradient(90deg, #fff7ed, #fde68a, #f97316);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-lead {
    max-width: 720px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.9;
}

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

.hero-tags span,
.tag-row span,
.meta-row span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 12px;
}

.hero-actions,
.section-actions {
    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 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b, #fb923c);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.26);
}

.btn-ghost {
    color: #fff7ed;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
}

.hero-panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    background: #111827;
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.86));
}

.hero-poster-copy {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
}

.hero-poster-copy strong {
    display: block;
    font-size: 22px;
}

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

.hero-dot {
    width: 38px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.hero-dot.active {
    background: linear-gradient(90deg, #fbbf24, #f97316);
}

.quick-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    max-width: 640px;
    margin-top: 28px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.quick-search input {
    padding: 0 18px;
}

.quick-search button {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: #111827;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    cursor: pointer;
}

.section {
    padding: 76px 0;
}

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

.section-title h2,
.page-title h1 {
    margin: 12px 0 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-title p,
.page-title p,
.category-intro,
.detail-lead {
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.42);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72));
}

.badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.year-badge {
    left: 10px;
    top: 10px;
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.26);
    border: 1px solid rgba(125, 211, 252, 0.3);
}

.heat-badge {
    right: 10px;
    top: 10px;
    color: #451a03;
    background: rgba(251, 191, 36, 0.92);
}

.movie-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    padding: 14px;
}

.movie-copy strong {
    font-size: 17px;
    line-height: 1.35;
}

.movie-copy em,
.movie-copy small {
    color: var(--subtle);
    font-size: 13px;
    font-style: normal;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 10rem),
        rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.category-card:hover {
    border-color: rgba(251, 191, 36, 0.4);
    transform: translateY(-4px);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    color: var(--muted);
    line-height: 1.7;
}

.category-card span {
    display: inline-flex;
    margin-top: 18px;
    color: #fde68a;
    font-weight: 800;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(251, 191, 36, 0.38);
}

.rank-num {
    color: #fde68a;
    font-size: 22px;
    font-weight: 900;
}

.rank-item img {
    width: 72px;
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
    background: #111827;
}

.rank-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rank-copy small {
    color: var(--subtle);
}

.rank-score {
    padding: 8px 10px;
    border-radius: 999px;
    color: #451a03;
    background: #fbbf24;
    font-weight: 900;
}

.panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 160px;
    gap: 12px;
    margin: 24px 0 28px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.78);
}

.filter-status {
    margin: -10px 0 20px;
    color: var(--subtle);
    font-size: 14px;
}

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

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

.breadcrumb a:hover {
    color: #fde68a;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
    padding: 36px 0 80px;
}

.player-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

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

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 16rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.86));
    cursor: pointer;
}

.player-overlay.is-hidden {
    display: none;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    font-size: 30px;
    background: linear-gradient(135deg, #fde68a, #f59e0b, #fb923c);
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.35);
}

.player-info {
    padding: 24px;
}

.player-info h1,
.page-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.prose {
    display: grid;
    gap: 18px;
    margin-top: 24px;
    color: var(--muted);
    line-height: 1.9;
}

.prose h2 {
    margin: 8px 0 0;
    color: var(--text);
    font-size: 24px;
}

.side-stack {
    display: grid;
    gap: 18px;
}

.side-poster {
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    background: #111827;
}

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

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

.stat {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.stat small {
    display: block;
    color: var(--subtle);
    margin-bottom: 6px;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.8);
}

.footer-grid {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.2fr 0.6fr 1.2fr;
    gap: 28px;
}

.footer-grid h2 {
    margin: 0 0 10px;
    color: #fde68a;
}

.footer-grid p {
    color: var(--subtle);
    line-height: 1.7;
}

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

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

.footer-links a:hover {
    color: #111827;
    background: #fbbf24;
}

.empty-result {
    display: none;
    padding: 24px;
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
}

.empty-result.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

    .hero-panel {
        max-width: 420px;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        height: 68px;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .nav-dropdown {
        display: none;
    }

    .hero {
        min-height: auto;
    }

    .hero-content {
        padding: 64px 0 48px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .quick-search,
    .filter-bar {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .quick-search button {
        width: 100%;
    }

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

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

    .rank-item {
        grid-template-columns: 42px 60px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 3;
        width: max-content;
    }

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

@media (max-width: 520px) {
    .brand-copy strong {
        font-size: 18px;
    }

    .brand-copy small {
        display: none;
    }

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

    .hero-panel {
        padding: 12px;
        border-radius: 22px;
    }

    .page-shell {
        width: min(100% - 24px, 1220px);
    }
}
