:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --dim: #94a3b8;
    --amber: #fbbf24;
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(251, 191, 36, 0.16), transparent 32rem),
        radial-gradient(circle at 82% 18%, rgba(249, 115, 22, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

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

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

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.28);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

.brand-name {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #fbbf24, #fb923c, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    color: #e2e8f0;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--amber);
}

.header-search {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(440px, 38vw);
}

.global-search-input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 0 16px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.global-search-input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
    border-color: rgba(251, 191, 36, 0.68);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.search-submit,
.filter-controls button,
.primary-button,
.ghost-button,
.section-more,
.detail-link {
    border: 0;
    border-radius: 999px;
    min-height: 42px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 750;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(249, 115, 22, 0.24);
    transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.search-submit:hover,
.filter-controls button:hover,
.primary-button:hover,
.section-more:hover,
.detail-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(249, 115, 22, 0.32);
}

.ghost-button,
.section-more,
.detail-link {
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.34);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: none;
}

.ghost-button:hover,
.section-more:hover,
.detail-link:hover {
    color: #fff;
    border-color: rgba(251, 191, 36, 0.76);
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.8);
}

.mobile-menu {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
    background: rgba(51, 65, 85, 0.72);
}

.global-search-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(580px, 88vw);
    max-height: 68vh;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
}

.search-result {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.search-result:hover {
    background: rgba(51, 65, 85, 0.72);
}

.search-result img {
    width: 58px;
    height: 78px;
    border-radius: 10px;
    object-fit: cover;
}

.search-result strong {
    display: block;
    margin-bottom: 4px;
    color: #fff;
}

.search-result span,
.search-empty {
    color: var(--dim);
    font-size: 13px;
}

.hero-carousel {
    position: relative;
    min-height: 74vh;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg,
.detail-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.08);
}

.hero-overlay,
.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 47%, rgba(15, 23, 42, 0.25) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.35) 48%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content,
.detail-hero-inner,
.page-shell,
.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
    min-height: 74vh;
    padding: 76px 0 96px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 14px;
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: 999px;
    padding: 6px 12px;
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.1);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.inner-hero h1,
.detail-copy h1 {
    margin: 0 0 20px;
    font-size: clamp(44px, 7vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.07em;
    background: linear-gradient(90deg, #fbbf24, #fb923c, #facc15);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-one-line,
.inner-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 0 0 20px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 24px);
    line-height: 1.75;
}

.hero-meta,
.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.hero-meta span,
.movie-card-meta span,
.rank-badge {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 5px 10px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.62);
    font-size: 13px;
    font-weight: 650;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span,
.detail-tags a {
    border-radius: 999px;
    padding: 6px 10px;
    color: #fef3c7;
    background: rgba(251, 191, 36, 0.12);
    font-size: 12px;
    font-weight: 700;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.24);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.66);
    backdrop-filter: blur(12px);
}

.hero-controls button {
    border: 0;
    color: #fff;
    background: rgba(51, 65, 85, 0.75);
    cursor: pointer;
}

.hero-controls > button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    padding: 0;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 26px;
    background: linear-gradient(90deg, var(--amber), var(--orange));
}

.page-shell {
    padding: 56px 0 76px;
}

.content-section,
.filter-panel,
.detail-panel,
.player-section,
.sitemap-section {
    margin-bottom: 56px;
}

.section-heading,
.filter-panel {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2,
.filter-panel h2,
.detail-panel h2,
.player-section h2,
.sitemap-section h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-badge {
    top: 12px;
    left: 12px;
    right: auto;
    bottom: auto;
}

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

.movie-card h3 {
    margin: 10px 0 8px;
    color: #fff;
    font-size: 20px;
    line-height: 1.3;
}

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

.movie-card p,
.rank-copy p,
.footer-brand p,
.detail-panel p,
.sitemap-section li span {
    color: var(--dim);
    line-height: 1.72;
}

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

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

.category-tile {
    display: grid;
    gap: 16px;
    min-height: 230px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-lg);
    padding: 18px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.72));
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.46);
}

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

.category-covers img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    object-fit: cover;
}

.category-tile span,
.category-tile strong {
    color: #fcd34d;
    font-weight: 800;
}

.category-tile h3 {
    margin: 8px 0;
    font-size: 24px;
}

.category-tile p {
    color: var(--dim);
    line-height: 1.6;
}

.filter-panel {
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-xl);
    padding: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
}

.filter-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 150px 150px auto;
    gap: 12px;
    width: min(760px, 100%);
}

.filter-count {
    min-width: 120px;
    color: var(--dim);
    text-align: right;
}

.inner-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 390px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 20% 10%, rgba(251, 191, 36, 0.2), transparent 28rem),
        linear-gradient(135deg, #0f172a, #020617 78%);
}

.inner-hero {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 72px 16px;
}

.inner-hero > div {
    max-width: 880px;
}

.inner-hero h1 {
    font-size: clamp(42px, 7vw, 78px);
}

.small-meta {
    justify-content: center;
}

.ranking-list {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.rank-item {
    display: grid;
    grid-template-columns: 78px 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-lg);
    padding: 14px;
    background: rgba(15, 23, 42, 0.75);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.rank-number {
    color: #fbbf24;
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-thumb img {
    width: 92px;
    height: 126px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-copy h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.detail-hero {
    min-height: 650px;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 42px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    color: var(--dim);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: end;
    gap: 42px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

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

.detail-shell {
    margin-top: -62px;
    position: relative;
    z-index: 3;
}

.player-section,
.detail-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-xl);
    padding: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
}

.player-box {
    position: relative;
    overflow: hidden;
    margin-top: 22px;
    border-radius: 24px;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.78));
    cursor: pointer;
}

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

.player-icon {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 55px rgba(249, 115, 22, 0.34);
    font-size: 34px;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    margin-bottom: 56px;
}

.meta-panel dl {
    margin: 0;
    display: grid;
    gap: 14px;
}

.meta-panel div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.meta-panel dt {
    color: var(--dim);
}

.meta-panel dd {
    margin: 0;
    color: #fff;
    font-weight: 650;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

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

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

.compact-card p {
    display: none;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 42px;
    padding: 48px 0;
}

.footer-logo {
    margin-bottom: 16px;
}

.site-footer h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.site-footer a {
    color: var(--dim);
}

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

.sitemap-shell {
    display: grid;
    gap: 24px;
}

.sitemap-section {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-lg);
    padding: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.sitemap-section ul {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    columns: 3;
    column-gap: 32px;
}

.sitemap-section li {
    break-inside: avoid;
    margin-bottom: 10px;
}

.sitemap-section a {
    color: #e2e8f0;
}

.sitemap-section li span {
    display: block;
    font-size: 12px;
}

.is-hidden {
    display: none !important;
}

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

    .mobile-menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .header-search {
        width: min(520px, 52vw);
    }

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

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

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

@media (max-width: 840px) {
    .site-header-inner {
        height: auto;
        min-height: 72px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .header-search {
        order: 3;
        width: 100%;
        margin-left: 0;
    }

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

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

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

    .filter-panel,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-controls {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .filter-count {
        text-align: left;
    }

    .detail-hero {
        min-height: auto;
    }

    .rank-number {
        text-align: left;
    }

    .sitemap-section ul {
        columns: 2;
    }
}

@media (max-width: 560px) {
    .brand-name {
        font-size: 20px;
    }

    .search-submit {
        display: none;
    }

    .hero-content,
    .page-shell,
    .detail-hero-inner,
    .footer-grid {
        width: min(100% - 24px, 1280px);
    }

    .hero-copy h1,
    .inner-hero h1,
    .detail-copy h1 {
        font-size: 40px;
    }

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

    .category-covers {
        grid-template-columns: repeat(3, minmax(70px, 1fr));
    }

    .sitemap-section ul {
        columns: 1;
    }
}
