:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #111827;
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --accent: #f59e0b;
    --accent-2: #fbbf24;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
    --radius: 18px;
}

* {
    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),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 36rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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

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

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

main {
    min-height: 60vh;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

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

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

.brand-text {
    font-size: 1.25rem;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
}

.brand-icon.small {
    width: 30px;
    height: 30px;
}

.brand-icon svg {
    width: 100%;
    height: 100%;
}

.brand-icon path:first-child {
    fill: var(--accent);
}

.brand-icon path:last-child {
    fill: #111827;
}

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

.nav-link {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-2);
    background: rgba(245, 158, 11, 0.1);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: #e2e8f0;
    border-radius: 99px;
}

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

.mobile-link {
    display: block;
    padding: 12px 8px;
    color: #cbd5e1;
    font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover {
    color: var(--accent-2);
}

.hero-carousel {
    position: relative;
    height: 76vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--bg-soft);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(2, 6, 23, 0.22) 55%, rgba(2, 6, 23, 0.76) 100%);
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 88px;
    max-width: 720px;
}

.hero-kicker,
.page-kicker {
    color: var(--accent-2);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

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

.hero-content p {
    margin: 0;
    max-width: 680px;
    color: #cbd5e1;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.hero-tags span,
.detail-tags span,
.keyword-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    color: var(--accent-2);
    background: var(--accent-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.section-more,
.jump-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.primary-button,
.jump-search button {
    background: var(--accent);
    color: #111827;
}

.primary-button:hover,
.jump-search button:hover {
    background: var(--accent-2);
    transform: translateY(-1px);
}

.ghost-button,
.section-more {
    color: #e2e8f0;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.62);
}

.ghost-button:hover,
.section-more:hover {
    color: var(--accent-2);
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

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

.hero-dots button {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.36);
    padding: 0;
}

.hero-dots button.active {
    background: var(--accent);
}

.quick-search {
    margin-top: -38px;
    position: relative;
    z-index: 10;
}

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

.quick-search-inner {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 420px);
    align-items: center;
    gap: 24px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.quick-search h2,
.quick-search p {
    margin: 0;
}

.quick-search p {
    color: var(--muted);
    margin-top: 6px;
}

.jump-search {
    display: flex;
    gap: 10px;
}

.jump-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--text);
    outline: none;
    padding: 12px 14px;
}

.content-section {
    padding: 72px 0 0;
}

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

.section-head h2,
.rank-head h2,
.detail-content h2 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

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

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

.movie-card a {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 45%);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%) scale(0.88);
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: #111827;
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
    filter: brightness(0.78);
}

.movie-card:hover .poster-wrap::after,
.movie-card:hover .play-mark {
    opacity: 1;
}

.movie-card:hover .play-mark {
    transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent);
    color: #111827;
    font-style: normal;
    font-weight: 900;
}

.card-body {
    padding: 12px 2px 0;
}

.card-body h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-body p {
    margin: 6px 0 0;
    min-height: 44px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    color: var(--muted-2);
    font-size: 0.82rem;
}

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: var(--shadow);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.36));
}

.category-card span,
.category-card strong,
.category-card em {
    position: relative;
}

.category-card span {
    color: var(--accent-2);
    font-weight: 800;
}

.category-card strong {
    margin-top: 6px;
    font-size: 1.35rem;
}

.category-card em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 0.92rem;
}

.split-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
}

.split-section .content-section {
    width: auto;
}

.rank-panel {
    position: sticky;
    top: 88px;
    align-self: start;
    margin-top: 72px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.rank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.rank-head a {
    color: var(--accent-2);
    font-weight: 800;
}

.rank-panel ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rank-panel li + li {
    border-top: 1px solid var(--border);
}

.rank-panel li a {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    padding: 12px 0;
}

.rank-panel li span {
    color: var(--accent-2);
    font-weight: 900;
}

.rank-panel li strong {
    display: block;
    line-height: 1.35;
}

.rank-panel li em {
    display: block;
    color: var(--muted);
    font-style: normal;
    font-size: 0.84rem;
    margin-top: 2px;
}

.page-hero {
    min-height: 420px;
    padding: 136px 0 64px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68)), linear-gradient(0deg, var(--bg), transparent 62%);
}

.page-hero.compact {
    min-height: 330px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 34rem),
        linear-gradient(135deg, #0f172a, #020617);
}

.page-hero.compact::before {
    display: none;
}

.page-hero > div {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 780px;
}

.page-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(2.3rem, 6vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.page-hero p {
    color: #cbd5e1;
    font-size: 1.08rem;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 200px 180px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel label span {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-weight: 800;
    font-size: 0.9rem;
}

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

.category-overview-card a {
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 160px;
}

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

.category-overview-body {
    padding: 20px;
}

.category-overview-body h2 {
    margin: 0;
}

.category-overview-body p {
    min-height: 54px;
    color: var(--muted);
}

.category-overview-body span {
    color: var(--accent-2);
    font-weight: 800;
}

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

.wide-card a {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 16px;
    min-height: 138px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.75);
}

.wide-card img {
    width: 104px;
    height: 138px;
    object-fit: cover;
    border-radius: 12px;
}

.wide-card span {
    color: var(--accent-2);
    font-weight: 800;
    font-size: 0.84rem;
}

.wide-card h3 {
    margin: 6px 0;
    line-height: 1.2;
}

.wide-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-hero {
    position: relative;
    min-height: 680px;
    padding: 130px 0 70px;
    background-size: cover;
    background-position: center;
}

.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.34)),
        linear-gradient(0deg, var(--bg), transparent 72%);
}

.detail-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

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

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(2.4rem, 6vw, 5.4rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.detail-one-line {
    margin: 0;
    max-width: 760px;
    color: #cbd5e1;
    font-size: 1.12rem;
}

.player-section {
    padding-top: 0;
}

.player-shell {
    position: relative;
    margin-top: -48px;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.84));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-circle {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    color: #111827;
    font-size: 2rem;
    box-shadow: 0 22px 52px rgba(245, 158, 11, 0.26);
}

.detail-content {
    padding: 56px 0 0;
}

.detail-content article {
    max-width: 940px;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.detail-content h2 + p {
    margin-top: 12px;
}

.detail-content p {
    color: #cbd5e1;
    font-size: 1.04rem;
}

.detail-content h2:not(:first-child) {
    margin-top: 30px;
}

.keyword-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.site-footer {
    margin-top: 86px;
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.78);
}

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

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

.footer-links h2 {
    margin: 0 0 12px;
    font-size: 1.1rem;
}

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

.footer-links a {
    color: #cbd5e1;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.footer-links a:hover {
    color: var(--accent-2);
    border-color: rgba(245, 158, 11, 0.35);
}

.movie-card.is-hidden {
    display: none;
}

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

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

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
        margin-top: 16px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .mobile-nav.open {
        display: block;
    }

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

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

    .quick-search-inner,
    .footer-inner,
    .detail-inner,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .jump-search {
        flex-direction: column;
    }

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

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

    .detail-info h1 {
        font-size: clamp(2.2rem, 12vw, 4rem);
    }
}

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

    .brand-text {
        font-size: 1.08rem;
    }

    .hero-carousel {
        min-height: 540px;
    }

    .hero-content,
    .quick-search-inner,
    .content-section,
    .detail-content,
    .player-section,
    .split-section,
    .page-hero > div,
    .detail-inner,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

    .quick-search-inner,
    .detail-content article {
        padding: 22px;
    }

    .content-section {
        padding-top: 52px;
    }

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

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

    .category-grid,
    .category-overview-grid,
    .wide-grid {
        grid-template-columns: 1fr;
    }

    .wide-card a {
        grid-template-columns: 92px 1fr;
    }

    .wide-card img {
        width: 92px;
        height: 126px;
    }

    .detail-hero {
        min-height: auto;
        padding-bottom: 94px;
    }

    .player-shell {
        margin-top: -36px;
        border-radius: 18px;
    }

    .player-circle {
        width: 66px;
        height: 66px;
        font-size: 1.55rem;
    }
}
