:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(30, 41, 59, 0.76);
    --panel-strong: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #fbbf24;
    --accent-2: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.13), transparent 32rem),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
    line-height: 1.6;
}

body.is-menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0));
    transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled,
body.is-menu-open .site-header {
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(251, 191, 36, 0.25);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: rotate(8deg) scale(1.04);
}

.brand-text {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-text span {
    color: var(--accent);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: var(--muted-strong);
    font-size: 15px;
}

.desktop-nav > a,
.nav-dropdown > a {
    padding: 24px 0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.nav-dropdown > a.is-active {
    color: var(--accent);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 66px;
    left: 50%;
    width: 190px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

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

.dropdown-panel a:hover {
    color: var(--accent);
    background: rgba(148, 163, 184, 0.12);
}

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

.header-search input,
.mobile-search input,
.local-filter input {
    width: 245px;
    padding: 11px 15px;
    color: var(--text);
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.local-filter input:focus {
    border-color: rgba(251, 191, 36, 0.8);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.header-search button,
.mobile-search button,
.local-filter button,
.primary-button,
.ghost-button,
.rank-action,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.mobile-search button,
.local-filter button,
.primary-button {
    padding: 11px 18px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 30px rgba(251, 191, 36, 0.2);
}

.header-search button:hover,
.mobile-search button:hover,
.local-filter button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(251, 191, 36, 0.28);
}

.ghost-button,
.section-more,
.rank-action {
    padding: 10px 16px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(251, 191, 36, 0.28);
}

.ghost-button:hover,
.section-more:hover,
.rank-action:hover {
    color: var(--accent);
    border-color: rgba(251, 191, 36, 0.72);
    transform: translateY(-2px);
}

.mobile-toggle {
    width: 42px;
    height: 42px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--text);
    border-radius: 99px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

body.is-menu-open .mobile-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

body.is-menu-open .mobile-toggle span:nth-child(2) {
    opacity: 0;
}

body.is-menu-open .mobile-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-panel {
    display: none;
    padding: 18px 16px 24px;
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid var(--line);
}

.mobile-panel nav,
.mobile-category-links {
    display: grid;
    gap: 8px;
}

.mobile-panel nav a {
    padding: 10px 12px;
    color: var(--muted-strong);
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.06);
}

.mobile-panel nav a:hover {
    color: var(--accent);
}

.mobile-category-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
}

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

.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: #020617;
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    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%;
    object-fit: cover;
    filter: saturate(1.05) brightness(0.68);
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76) 45%, rgba(15, 23, 42, 0.18)),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.05) 44%, rgba(15, 23, 42, 0.82) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 120px 0 96px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 8px 14px;
    color: var(--accent);
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hero-content h1,
.page-banner h1,
.detail-copy h1 {
    max-width: 860px;
    margin: 18px 0;
    font-size: clamp(42px, 8vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-content p,
.page-banner p,
.detail-copy p {
    max-width: 720px;
    margin: 0 0 24px;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-list,
.meta-line,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags span,
.tag-list span,
.meta-line span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span:first-child,
.tag-list span:first-child {
    color: var(--accent);
    border-color: rgba(251, 191, 36, 0.3);
}

.hero-actions {
    margin-top: 28px;
}

.primary-button,
.ghost-button {
    min-height: 46px;
    padding: 12px 20px;
}

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

.hero-dot {
    width: 38px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(248, 250, 252, 0.34);
    cursor: pointer;
}

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

.section {
    padding: 82px 0;
}

.section-dark {
    background: rgba(2, 6, 23, 0.28);
}

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

.section-title h2,
.category-section h2,
.detail-panel h2,
.site-footer h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(26px, 3vw, 40px);
    letter-spacing: -0.04em;
}

.section-title p,
.category-section p,
.site-footer p,
.detail-panel p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.44);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.96));
}

.poster-link img,
.detail-poster img,
.rank-poster img,
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

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

.card-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 38px;
    padding: 5px 8px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

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

.meta-line {
    gap: 6px;
    margin-bottom: 10px;
}

.meta-line span {
    min-height: 24px;
    padding: 3px 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

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

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

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

.movie-card-compact h3 {
    font-size: 16px;
}

.movie-card-compact p,
.movie-card-compact .tag-list {
    display: none;
}

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

.category-card {
    position: relative;
    min-height: 235px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.26));
}

.category-card img {
    position: absolute;
    inset: 0;
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card span {
    font-size: 24px;
    font-weight: 900;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 82px 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: var(--panel-strong);
}

.rank-number {
    color: var(--accent);
    font-size: 30px;
    font-weight: 950;
    letter-spacing: -0.08em;
}

.rank-copy h3 {
    margin: 0 0 6px;
    font-size: 21px;
}

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

.rank-list-wide .rank-row {
    grid-template-columns: 98px 70px minmax(0, 1fr) auto;
}

.page-banner {
    padding: 150px 0 72px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.28), #0f172a),
        radial-gradient(circle at 78% 28%, rgba(251, 191, 36, 0.14), transparent 26rem);
}

.page-banner h1 {
    font-size: clamp(42px, 6vw, 72px);
}

.category-sections {
    display: grid;
    gap: 42px;
}

.category-section {
    padding: 26px;
    background: rgba(15, 23, 42, 0.36);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

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

.section-filter {
    padding-top: 40px;
}

.local-filter {
    width: min(720px, 100%);
    margin: 0 0 28px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.local-filter input {
    flex: 1;
    width: auto;
    background: transparent;
    border: 0;
}

.empty-state {
    margin: 26px 0 0;
    padding: 22px;
    color: var(--muted-strong);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    text-align: center;
}

.detail-main {
    background: linear-gradient(180deg, #020617, #0f172a 24%, #111827 100%);
}

.detail-hero {
    position: relative;
    min-height: 730px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 132px 0 72px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.32;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.1);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.94)),
        linear-gradient(0deg, #0f172a, transparent 42%);
}

.detail-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    box-shadow: var(--shadow);
    background: var(--panel-strong);
}

.detail-copy h1 {
    font-size: clamp(40px, 7vw, 78px);
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
    border: 1px solid rgba(251, 191, 36, 0.24);
    border-radius: 28px;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text);
    background: radial-gradient(circle, rgba(15, 23, 42, 0.3), rgba(2, 6, 23, 0.66));
    border: 0;
    cursor: pointer;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-symbol {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 50%;
    box-shadow: 0 20px 60px rgba(251, 191, 36, 0.28);
    font-size: 34px;
}

.play-overlay strong {
    font-size: 20px;
}

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

.detail-panel {
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28);
}

.detail-panel p {
    color: var(--muted-strong);
    font-size: 17px;
}

.detail-tags {
    margin-top: 20px;
}

.site-footer {
    padding: 58px 0 0;
    background: #020617;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
}

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

.site-footer p {
    color: var(--muted);
}

.site-footer h2 {
    margin-bottom: 14px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

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

.footer-bottom {
    margin-top: 44px;
    padding: 18px;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    text-align: center;
}

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

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

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

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

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

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

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

    .mobile-search {
        margin-bottom: 14px;
    }

    .mobile-search input {
        flex: 1;
        width: auto;
    }

    .hero-content {
        align-items: center;
        text-align: center;
        padding-top: 110px;
    }

    .hero-shade {
        background:
            linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.62) 55%, rgba(15, 23, 42, 0.88) 100%),
            rgba(2, 6, 23, 0.36);
    }

    .hero-tags,
    .hero-actions {
        justify-content: center;
    }

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

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

    .rank-row,
    .rank-list-wide .rank-row {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 14px;
    }

    .rank-number,
    .rank-action {
        display: none;
    }

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

    .detail-poster {
        width: min(300px, 72vw);
        margin: 0 auto;
    }

    .detail-copy {
        text-align: center;
    }

    .detail-copy .breadcrumb,
    .detail-copy .hero-tags,
    .detail-copy .hero-actions,
    .detail-copy .eyebrow {
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .brand-text {
        font-size: 21px;
    }

    .hero-content h1,
    .page-banner h1,
    .detail-copy h1 {
        letter-spacing: -0.05em;
    }

    .hero-actions,
    .local-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-button,
    .ghost-button,
    .local-filter button,
    .local-filter input {
        width: 100%;
    }

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

    .movie-card {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .movie-card .poster-link {
        height: 100%;
        min-height: 176px;
    }

    .movie-card-compact p,
    .movie-card-compact .tag-list {
        display: none;
    }

    .rank-copy p {
        display: none;
    }

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

    .play-symbol {
        width: 66px;
        height: 66px;
        font-size: 28px;
    }
}
