* {
    box-sizing: border-box;
}

:root {
    --bg: #030712;
    --bg-soft: #111827;
    --panel: rgba(17, 24, 39, 0.78);
    --panel-strong: #111827;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f9fafb;
    --muted: #9ca3af;
    --muted-strong: #d1d5db;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-soft: rgba(245, 158, 11, 0.18);
    --danger: #ef4444;
    --radius: 20px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 5%, rgba(245, 158, 11, 0.14), transparent 34rem),
        radial-gradient(circle at 85% 12%, rgba(217, 119, 6, 0.12), transparent 30rem),
        linear-gradient(180deg, #030712 0%, #111827 48%, #030712 100%);
    font-family: 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 {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(17, 24, 39, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--accent), #fb923c);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.34);
}

.brand-text strong,
.footer-logo {
    display: block;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
}

.brand-text small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 1;
}

.nav-link,
.mobile-link,
.category-strip a {
    color: var(--muted-strong);
    border-radius: 12px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 650;
}

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

.category-strip {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.category-strip-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
}

.category-strip a {
    padding: 6px 12px;
    white-space: nowrap;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
}

.category-strip a:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: white;
    border-radius: 99px;
}

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

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #050816;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.72) 45%, rgba(0, 0, 0, 0.08) 100%),
        linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.36) 38%, transparent 74%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1280px;
}

.hero-content > * {
    max-width: 720px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-content p {
    margin: 0 0 22px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.detail-meta,
.card-meta,
.compact-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.compact-meta span {
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
}

.hero-meta span:first-child,
.detail-meta span:first-child {
    color: white;
    background: var(--accent);
}

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

.primary-button,
.ghost-button,
.search-panel button,
.global-search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    color: white;
    font-weight: 800;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.primary-button,
.search-panel button {
    background: linear-gradient(135deg, var(--accent), #fb923c);
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.22);
}

.primary-button:hover,
.search-panel button:hover,
.global-search-box button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
}

.ghost-button,
.global-search-box button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
}

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

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

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 50px;
    height: 50px;
    transform: translateY(-50%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(12px);
    font-size: 32px;
    line-height: 1;
}

.hero-control:hover {
    background: rgba(245, 158, 11, 0.9);
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 32px;
    background: var(--accent);
}

.content-section,
.filter-section,
.search-page-panel {
    padding: 42px 0;
}

.quick-search {
    margin-top: -46px;
    position: relative;
    z-index: 5;
}

.search-panel,
.filter-panel,
.search-page-panel {
    background: rgba(17, 24, 39, 0.86);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel {
    padding: 22px;
}

.search-panel label,
.search-page-panel label,
.filter-field label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 750;
}

.search-panel div,
.global-search-box {
    display: flex;
    gap: 12px;
}

input,
select {
    width: 100%;
    color: var(--text);
    background: rgba(3, 7, 18, 0.8);
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    padding: 13px 14px;
}

input:focus,
select:focus {
    border-color: rgba(245, 158, 11, 0.62);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
}

.section-link {
    color: var(--accent);
    font-weight: 800;
    white-space: nowrap;
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

.movie-card {
    min-width: 0;
    background: rgba(17, 24, 39, 0.82);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

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

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

.cover-box {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 25% 20%, rgba(245, 158, 11, 0.22), transparent 35%),
        linear-gradient(135deg, #111827, #1f2937 48%, #78350f);
}

.movie-card .cover-box {
    aspect-ratio: 3 / 4;
}

.movie-card.wide .cover-box {
    aspect-ratio: 16 / 10;
}

.cover-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.25s ease;
}

.movie-card:hover .cover-box img,
.category-card:hover img,
.side-poster:hover img {
    transform: scale(1.07);
}

.fallback-title {
    position: absolute;
    inset: auto 12px 14px;
    display: none;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 850;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.cover-box.is-missing .fallback-title {
    display: block;
}

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 8px;
    color: white;
    background: rgba(0, 0, 0, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 800;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.84);
    color: white;
    background: rgba(245, 158, 11, 0.9);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.card-meta {
    gap: 6px;
    margin-bottom: 8px;
}

.card-meta span {
    padding: 3px 7px;
    font-size: 11px;
}

.movie-card h3,
.compact-card h3,
.category-card h3 {
    margin: 0 0 8px;
    color: white;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card p,
.compact-card p,
.category-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
}

.tag-line {
    margin-top: 10px;
    color: var(--accent);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.category-card {
    display: block;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.82);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: transform 0.28s ease, border-color 0.28s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.52);
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 132px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #78350f);
}

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

.category-info {
    padding: 16px;
}

.category-info span,
.category-overview-head span,
.year-head span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

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

.compact-card {
    background: rgba(17, 24, 39, 0.76);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.compact-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.5);
}

.compact-card a {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 14px;
    padding: 12px;
}

.compact-cover {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
}

.compact-body {
    position: relative;
    min-width: 0;
}

.rank-number {
    display: inline-flex;
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.compact-meta {
    margin-top: 10px;
    gap: 6px;
}

.compact-meta span {
    padding: 3px 7px;
    font-size: 11px;
}

.site-footer {
    margin-top: 48px;
    border-top: 1px solid var(--border);
    background: rgba(3, 7, 18, 0.75);
}

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

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

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

.footer-columns h3 {
    margin: 0 0 12px;
}

.footer-columns ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-columns li {
    margin-bottom: 8px;
}

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

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

.page-main {
    padding-top: 34px;
}

.page-hero {
    padding: 44px 0 28px;
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 68px);
}

.category-overview-block {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 36px;
    padding: 24px;
    background: rgba(17, 24, 39, 0.58);
    border: 1px solid var(--border);
    border-radius: 22px;
}

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

.category-overview-head h2 {
    margin: 4px 0 8px;
    font-size: 30px;
}

.category-overview-head p {
    margin: 0;
    color: var(--muted);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 220px 120px;
    align-items: end;
    gap: 14px;
    padding: 20px;
    margin-bottom: 24px;
}

.filter-count {
    color: var(--accent);
    font-weight: 850;
    padding: 13px 0;
    text-align: right;
}

.search-page-panel {
    padding: 24px;
}

.search-summary {
    margin-top: 14px;
    color: var(--muted);
}

[data-search-results]:empty {
    display: none;
}

.year-navigation {
    position: sticky;
    top: 112px;
    z-index: 10;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px;
    margin-bottom: 24px;
    background: rgba(17, 24, 39, 0.82);
    border: 1px solid var(--border);
    border-radius: 16px;
    backdrop-filter: blur(16px);
}

.year-navigation a {
    padding: 6px 10px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    white-space: nowrap;
}

.year-navigation a:hover {
    color: white;
    background: var(--accent);
}

.year-block {
    margin-bottom: 36px;
}

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

.year-head h2 {
    margin: 0;
    font-size: 34px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.9fr);
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: black;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hls-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56));
    border: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.94);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
    font-size: 32px;
}

.play-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.detail-copy {
    margin-top: 24px;
    padding: 26px;
    background: rgba(17, 24, 39, 0.68);
    border: 1px solid var(--border);
    border-radius: 24px;
}

.detail-copy h1 {
    margin-bottom: 12px;
}

.detail-one-line {
    color: var(--muted-strong);
    font-size: 18px;
}

.detail-meta {
    margin: 18px 0;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tag-cloud span {
    padding: 6px 10px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    font-size: 13px;
}

.detail-copy section {
    margin-top: 24px;
}

.detail-copy h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.detail-copy section p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 16px;
}

.detail-side {
    position: sticky;
    top: 132px;
}

.side-poster {
    aspect-ratio: 3 / 4;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.side-info-card {
    margin-top: 18px;
    padding: 22px;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid var(--border);
    border-radius: 22px;
}

.side-info-card h2 {
    margin: 0 0 14px;
}

.side-info-card dl {
    margin: 0 0 18px;
}

.side-info-card dl div {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.side-info-card dt {
    color: var(--muted);
}

.side-info-card dd {
    margin: 0;
    color: var(--muted-strong);
}

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

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

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

@media (max-width: 860px) {
    .desktop-nav,
    .category-strip {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-control {
        display: none;
    }

    .section-heading,
    .category-overview-head,
    .footer-inner,
    .detail-layout {
        grid-template-columns: 1fr;
        display: grid;
    }

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

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 560px) {
    .container,
    .header-inner,
    .footer-inner,
    .hero-content {
        width: min(100% - 24px, 1280px);
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .search-panel div,
    .global-search-box,
    .hero-actions {
        flex-direction: column;
    }

    .compact-card a {
        grid-template-columns: 100px 1fr;
    }

    .poster-grid,
    .mini-grid {
        gap: 14px;
    }

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

    .card-meta span:nth-child(3) {
        display: none;
    }
}
