:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --panel: #1c1917;
    --panel-soft: #292524;
    --line: rgba(255, 255, 255, 0.08);
    --text: #fafaf9;
    --muted: #a8a29e;
    --muted-2: #78716c;
    --amber: #f59e0b;
    --amber-2: #fbbf24;
    --red: #ef4444;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    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.12), transparent 30%), var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

img.is-missing {
    opacity: 0;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 10, 9, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--amber-2);
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-2), var(--amber));
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.24);
}

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

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

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

.nav-link:hover,
.nav-link.is-active {
    color: var(--text);
    background: rgba(245, 158, 11, 0.12);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    color: var(--text);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 999px;
}

.site-search {
    position: relative;
    display: flex;
    width: min(360px, 34vw);
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: visible;
    background: rgba(28, 25, 23, 0.86);
}

.site-search input,
.big-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.site-search input {
    padding: 11px 14px 11px 18px;
}

.site-search button,
.big-search button {
    border: 0;
    color: #1c1917;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-2), var(--amber));
    cursor: pointer;
}

.site-search button {
    padding: 0 18px;
    border-radius: 999px;
}

.search-suggest {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(28, 25, 23, 0.98);
    box-shadow: var(--shadow);
}

.search-suggest.is-open {
    display: grid;
    gap: 6px;
}

.search-suggest a {
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    border-radius: 12px;
    color: var(--muted);
}

.search-suggest a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.search-suggest strong {
    color: var(--text);
}

.hero-carousel {
    position: relative;
    min-height: 700px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(16px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.34;
}

.hero-slide::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 10, 9, 0.96) 0%, rgba(12, 10, 9, 0.76) 48%, rgba(12, 10, 9, 0.36) 100%);
}

.hero-panel,
.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    align-items: center;
    gap: 54px;
}

.hero-panel {
    min-height: 700px;
    padding: 96px 0 82px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--amber-2);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #d6d3d1;
    font-size: 18px;
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.mini-tags span,
.detail-meta span,
.detail-meta strong {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #e7e5e4;
    background: rgba(255, 255, 255, 0.06);
}

.hero-tags span,
.detail-meta span,
.detail-meta strong {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 800;
}

.detail-meta strong {
    color: var(--amber-2);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.btn-primary,
.btn-ghost,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
}

.btn-primary {
    color: #1c1917;
    background: linear-gradient(135deg, var(--amber-2), var(--amber));
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.22);
}

.btn-ghost,
.text-link {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.hero-poster,
.detail-poster {
    position: relative;
    aspect-ratio: 3 / 4.2;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

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

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

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

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

.intro-strip,
.dark-panel,
.text-panel,
.page-hero,
.detail-content .text-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(28, 25, 23, 0.96), rgba(41, 37, 36, 0.82));
    box-shadow: var(--shadow);
}

.intro-strip {
    margin-top: -44px;
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
}

.intro-strip h2,
.section-title h2,
.text-panel h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.18;
}

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

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

.section-title a {
    color: var(--amber-2);
    font-weight: 900;
}

.grid {
    display: grid;
    gap: 22px;
}

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

.poster-grid.six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

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

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

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(28, 25, 23, 0.9);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card-large {
    display: grid;
    grid-template-columns: 42% 1fr;
}

.poster-link,
.poster-frame {
    display: block;
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(68, 64, 60, 0.9));
}

.movie-card-large .poster-frame {
    height: 100%;
    min-height: 260px;
}

.poster-frame img {
    transition: transform 0.32s ease, opacity 0.2s ease;
}

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

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.score-badge {
    right: 12px;
    top: 12px;
    color: #1c1917;
    background: var(--amber-2);
}

.rank-badge {
    left: 12px;
    top: 12px;
    color: var(--text);
    background: rgba(239, 68, 68, 0.9);
}

.card-body {
    padding: 16px;
}

.movie-card-large .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--amber-2);
}

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

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--muted-2);
    font-size: 12px;
}

.mini-tags span {
    min-height: 26px;
    padding: 0 9px;
    color: var(--muted);
    font-size: 12px;
}

.dark-panel {
    padding: 34px;
}

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

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

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

.category-card,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(12, 10, 9, 0.34);
    overflow: hidden;
}

.category-card a:first-child,
.category-head {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.category-card strong,
.category-head strong {
    color: var(--text);
    font-size: 18px;
}

.category-card span,
.category-head span {
    color: var(--muted);
    font-size: 13px;
}

.category-sample {
    display: grid;
    gap: 6px;
    padding: 0 18px 18px;
}

.compact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.compact-link:hover {
    color: var(--amber-2);
}

.compact-link em {
    color: var(--muted-2);
    font-style: normal;
}

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

.category-thumbs img {
    min-width: 0;
}

.category-overview-card .text-link {
    margin: 0 18px 18px;
    min-height: 38px;
    font-size: 13px;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 40px auto 0;
    padding: 54px;
    overflow: hidden;
}

.small-hero h1,
.category-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-hero {
    position: relative;
    overflow: hidden;
}

.detail-inner {
    min-height: 600px;
    padding: 72px 0;
}

.detail-copy h1 {
    font-size: clamp(36px, 5vw, 66px);
}

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

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

.one-line {
    font-size: 19px;
}

.detail-meta {
    margin-top: 24px;
}

.detail-tags {
    margin-bottom: 28px;
}

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

.video-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--text);
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.68));
    cursor: pointer;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #1c1917;
    background: linear-gradient(135deg, var(--amber-2), var(--amber));
    font-size: 34px;
    box-shadow: 0 20px 44px rgba(245, 158, 11, 0.28);
}

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

.video-shell.is-playing .play-overlay {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
}

.text-panel {
    padding: 28px;
}

.text-panel p {
    margin: 14px 0 0;
    color: #d6d3d1;
    font-size: 16px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 58px 1fr auto 58px;
    align-items: center;
    gap: 16px;
    padding: 10px;
    border-radius: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}

.rank-row:hover {
    color: var(--text);
    background: rgba(245, 158, 11, 0.1);
}

.rank-row img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
}

.rank-num,
.rank-row b {
    color: var(--amber-2);
    font-weight: 900;
    text-align: center;
}

.rank-row strong {
    color: var(--text);
}

.rank-row em {
    font-style: normal;
}

.big-search {
    display: flex;
    max-width: 660px;
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(12, 10, 9, 0.45);
}

.big-search input {
    min-height: 56px;
    padding: 0 22px;
}

.big-search button {
    padding: 0 26px;
}

.search-results {
    display: grid;
    gap: 20px;
}

.search-results .poster-grid {
    margin-top: 16px;
}

.empty-state {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(28, 25, 23, 0.78);
}

.site-footer {
    margin-top: 50px;
    border-top: 1px solid var(--line);
    background: rgba(28, 25, 23, 0.78);
}

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

.footer-grid p,
.footer-grid a {
    color: var(--muted);
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.footer-grid a {
    display: block;
    margin-top: 8px;
}

.footer-grid a:hover {
    color: var(--amber-2);
}

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

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

@media (max-width: 860px) {
    .nav-wrap {
        grid-template-columns: auto auto;
        gap: 16px;
    }

    .nav-toggle {
        display: block;
        justify-self: end;
    }

    .nav-links,
    .site-search {
        grid-column: 1 / -1;
        width: 100%;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 8px;
    }

    .nav-links.is-open {
        display: flex;
    }

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

    .hero-carousel,
    .hero-panel {
        min-height: 760px;
    }

    .hero-panel,
    .detail-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-poster,
    .detail-poster {
        max-width: 320px;
        transform: none;
    }

    .intro-strip,
    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .featured-grid,
    .poster-grid.four,
    .poster-grid.three,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-row {
        grid-template-columns: 38px 54px 1fr 48px;
    }

    .rank-row em {
        display: none;
    }

    .page-hero {
        padding: 34px;
    }
}

@media (max-width: 560px) {
    .hero-carousel,
    .hero-panel {
        min-height: 720px;
    }

    .hero-panel,
    .detail-inner {
        width: min(100% - 24px, 1180px);
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .poster-grid.six,
    .poster-grid.five,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .section-wrap {
        width: min(100% - 24px, 1180px);
        padding: 38px 0;
    }

    .dark-panel {
        padding: 22px;
    }

    .video-shell {
        border-radius: 18px;
    }

    .play-overlay span {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
