:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(30, 41, 59, 0.88);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --line: rgba(148, 163, 184, 0.16);
    --orange: #f97316;
    --amber: #f59e0b;
    --red: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

img {
    width: 100%;
    height: auto;
}

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(18px);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.85rem clamp(1rem, 4vw, 2rem);
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.14rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    color: white;
    box-shadow: 0 14px 36px rgba(249, 115, 22, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 0.5rem;
}

.nav-link {
    padding: 0.64rem 0.9rem;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(249, 115, 22, 0.14);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: min(28rem, 34vw);
    margin-left: auto;
    padding: 0.28rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
}

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

.header-search input {
    padding: 0 0.8rem;
}

.header-search button,
.big-search button {
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    white-space: nowrap;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 0.22rem;
    width: 2.4rem;
    height: 2.4rem;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.85rem;
    color: var(--text);
    background: rgba(15, 23, 42, 0.85);
}

.mobile-toggle span {
    width: 1rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mobile-panel {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
    padding: 0 1rem 1rem;
}

.mobile-panel a {
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.88);
}

.mobile-panel.open {
    display: grid;
}

main {
    max-width: 1440px;
    margin: 0 auto;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    border-radius: 0 0 2.2rem 2.2rem;
    isolation: isolate;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    min-height: 70vh;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.68) 42%, rgba(15, 23, 42, 0.16) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.2) 46%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: absolute;
    left: clamp(1rem, 6vw, 5rem);
    bottom: clamp(2rem, 8vw, 6rem);
    width: min(760px, calc(100% - 2rem));
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: #fdba74;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-article h1 {
    margin: 0;
    color: #ffffff;
    font-weight: 950;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.hero-content h1 {
    font-size: clamp(2.6rem, 6.8vw, 6.2rem);
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.52);
}

.hero-desc {
    max-width: 50rem;
    margin: 1.35rem 0 1.15rem;
    color: #e2e8f0;
    font-size: clamp(1.05rem, 1.7vw, 1.35rem);
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.8rem;
    color: var(--muted-strong);
    font-size: 0.92rem;
}

.hero-meta span,
.detail-meta span {
    padding: 0.38rem 0.76rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.44);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag-row span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.28rem 0.62rem;
    border: 1px solid rgba(249, 115, 22, 0.25);
    border-radius: 999px;
    color: #fdba74;
    background: rgba(249, 115, 22, 0.1);
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-tags {
    margin-top: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.primary-btn,
.ghost-btn,
.watch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    min-height: 3rem;
    padding: 0.78rem 1.45rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 16px 42px rgba(249, 115, 22, 0.3);
}

.primary-btn:hover,
.ghost-btn:hover,
.watch-link:hover {
    transform: translateY(-2px);
}

.primary-btn.small {
    min-height: 2.55rem;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.primary-btn.full {
    width: 100%;
}

.ghost-btn {
    min-height: 3rem;
    padding: 0.78rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.38);
    color: #ffffff;
}

.hero-dots {
    position: absolute;
    right: clamp(1rem, 4vw, 3rem);
    bottom: clamp(1.5rem, 4vw, 3rem);
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}

.hero-dot {
    width: 0.65rem;
    height: 0.65rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 2.2rem;
    background: #fb923c;
}

.home-search-panel,
.page-hero,
.content-section,
.category-summary-list,
.breadcrumb,
.detail-layout {
    margin: clamp(1rem, 3vw, 2rem);
}

.home-search-panel,
.page-hero,
.category-summary-card,
.detail-article,
.detail-side,
.rank-panel,
.player-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.68));
    box-shadow: var(--shadow);
}

.home-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
    gap: 1rem;
    align-items: center;
    padding: clamp(1.3rem, 3vw, 2.4rem);
}

.home-search-panel h2,
.section-head h2,
.category-summary-text h2,
.site-footer h2 {
    margin: 0;
    color: #ffffff;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.home-search-panel h2 {
    font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.home-search-panel p,
.page-hero p,
.section-head p,
.category-summary-card p,
.detail-article p,
.site-footer p,
.rank-content p {
    color: var(--muted-strong);
    line-height: 1.8;
}

.big-search,
.inline-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
}

.big-search {
    padding: 0.45rem;
}

.big-search input {
    padding: 0 1rem;
}

.big-search button {
    min-height: 3rem;
    padding: 0.75rem 1.25rem;
}

.content-section {
    padding: clamp(1rem, 2vw, 1.4rem) 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.section-head.slim {
    align-items: center;
}

.section-head h2 {
    font-size: clamp(1.55rem, 2.8vw, 2.3rem);
}

.section-head a {
    flex: 0 0 auto;
    color: #fdba74;
    font-weight: 800;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: clamp(0.9rem, 2vw, 1.25rem);
}

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.mini-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1.35rem;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.42);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.36);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.78);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.96) 100%);
}

.poster-year,
.rank-badge {
    position: absolute;
    top: 0.75rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.poster-year {
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.72);
}

.rank-badge {
    left: 0.75rem;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.86);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-card-body {
    padding: 0.95rem;
}

.movie-title,
.rank-title {
    display: block;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.35;
}

.movie-title:hover,
.rank-title:hover {
    color: #fdba74;
}

.movie-card-body p {
    min-height: 3.05rem;
    margin: 0.45rem 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.65;
}

.movie-meta {
    margin-top: 0.25rem;
    font-size: 0.78rem;
}

.movie-card .tag-row {
    margin-top: 0.65rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.category-card,
.category-summary-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.category-card {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.38);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}

.category-covers img {
    height: 8.5rem;
    object-fit: cover;
    border-radius: 0.8rem;
}

.category-card h3 {
    margin: 0 0 0.45rem;
    color: #ffffff;
    font-size: 1.22rem;
    font-weight: 950;
}

.category-card p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 0.9rem;
    line-height: 1.7;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
    gap: 1.2rem;
}

.rank-panel {
    padding: 1rem;
}

.rank-list {
    display: grid;
    gap: 0.85rem;
}

.home-rank-list .rank-item:nth-child(n+7) {
    display: none;
}

.rank-item {
    display: grid;
    grid-template-columns: 5.3rem minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 1.1rem;
    padding: 0.65rem;
    background: rgba(15, 23, 42, 0.65);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 0.85rem;
}

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

.rank-cover span {
    position: absolute;
    left: 0.45rem;
    top: 0.45rem;
    padding: 0.18rem 0.42rem;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.rank-content p {
    margin: 0.25rem 0;
    font-size: 0.88rem;
}

.watch-link {
    padding: 0.55rem 0.8rem;
    color: #fdba74;
    border: 1px solid rgba(249, 115, 22, 0.28);
    background: rgba(249, 115, 22, 0.09);
    white-space: nowrap;
}

.page-hero {
    padding: clamp(2rem, 5vw, 4.5rem);
    overflow: hidden;
    background:
        radial-gradient(circle at right top, rgba(249, 115, 22, 0.22), transparent 28rem),
        linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.68));
}

.page-hero h1 {
    max-width: 850px;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.page-hero p {
    max-width: 760px;
    margin: 1rem 0 0;
    font-size: 1.05rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.4rem;
}

.category-summary-list {
    display: grid;
    gap: 1rem;
}

.category-summary-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
    gap: 1.25rem;
    padding: clamp(1rem, 2vw, 1.5rem);
}

.category-summary-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.category-summary-text h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.inline-search {
    width: min(100%, 34rem);
    padding: 0.35rem 0.5rem 0.35rem 0.9rem;
}

.inline-search.large {
    width: min(100%, 48rem);
}

.inline-search span {
    color: #fdba74;
    font-size: 0.82rem;
    font-weight: 900;
}

.inline-search input {
    padding: 0.65rem 0.5rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #fdba74;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.28fr);
    gap: 1.2rem;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 1rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.66));
}

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

.player-icon {
    display: grid;
    place-items: center;
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 18px 48px rgba(249, 115, 22, 0.35);
}

.detail-article {
    padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-article h1 {
    font-size: clamp(2rem, 4.2vw, 4rem);
}

.detail-article .lead {
    margin-top: 1rem;
    font-size: 1.12rem;
    color: #e2e8f0;
}

.detail-meta,
.detail-tags {
    margin-top: 1rem;
}

.detail-article h2 {
    margin: 1.7rem 0 0.75rem;
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 950;
}

.detail-side {
    padding: 1rem;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 1.2rem;
    background: rgba(15, 23, 42, 0.8);
}

.fact-list {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.fact-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.72rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.fact-list span {
    color: var(--muted);
}

.fact-list strong {
    color: #ffffff;
    text-align: right;
}

.site-footer {
    margin-top: 3rem;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.98));
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 1440px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem);
}

.footer-brand {
    color: #ffffff;
    margin-bottom: 0.7rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
}

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

.footer-links a:hover {
    color: #fdba74;
}

.copyright {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1rem clamp(1rem, 4vw, 2rem) 2rem;
    color: var(--muted);
    font-size: 0.9rem;
}

[hidden],
.is-filtered-out {
    display: none !important;
}

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

    .header-search {
        width: min(100%, 28rem);
    }

    .split-section,
    .detail-layout,
    .category-summary-card,
    .home-search-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-container {
        gap: 0.55rem;
    }

    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: flex;
        margin-left: auto;
    }

    .hero-slider,
    .hero-slide img {
        min-height: 78vh;
    }

    .hero-content {
        bottom: 4.5rem;
    }

    .hero-meta span:nth-child(n+4) {
        display: none;
    }

    .hero-actions a {
        width: 100%;
    }

    .home-search-panel,
    .page-hero,
    .content-section,
    .category-summary-list,
    .breadcrumb,
    .detail-layout {
        margin-left: 0.85rem;
        margin-right: 0.85rem;
    }

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

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

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

    .rank-item {
        grid-template-columns: 4.7rem minmax(0, 1fr);
    }

    .rank-item .watch-link {
        grid-column: 1 / -1;
    }

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

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