:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: rgba(30, 41, 59, 0.58);
  --bg-card: rgba(30, 41, 59, 0.72);
  --bg-card-hover: rgba(30, 41, 59, 0.96);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --orange: #f97316;
  --sky: #0ea5e9;
  --radius-xl: 1.25rem;
  --radius-lg: 0.875rem;
  --shadow-card: 0 18px 40px rgba(2, 6, 23, 0.35);
  --shadow-accent: 0 16px 36px rgba(245, 158, 11, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.16), transparent 30rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
  display: block;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.20), rgba(15, 23, 42, 0.85));
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
}

.nav-shell {
  max-width: 1280px;
  height: 4rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
}

.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 1.15rem;
  background: linear-gradient(90deg, var(--amber-light), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.93rem;
}

.nav-link {
  color: #cbd5e1;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.mobile-menu-button {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: rgba(30, 41, 59, 0.82);
  cursor: pointer;
}

.mobile-menu-button span {
  width: 1.2rem;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: #cbd5e1;
}

.mobile-nav {
  display: none;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.85rem;
}

.hero-slider {
  position: relative;
  min-height: 520px;
  height: 72vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0f172a 4%, rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.14)),
    linear-gradient(to right, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.78));
}

.hero-content {
  position: absolute;
  left: max(1rem, calc((100vw - 1280px) / 2 + 1rem));
  bottom: 5.5rem;
  max-width: 720px;
  z-index: 2;
}

.hero-kicker,
.hero-tags,
.card-footer,
.detail-meta,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.hero-kicker span,
.tag-pill,
.meta-pill {
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fde68a;
  font-size: 0.86rem;
}

.hero-content h1 {
  margin: 1rem 0;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  margin: 0 0 1.4rem;
  color: #e2e8f0;
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.8;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.primary-button,
.ghost-button,
.section-more,
.clear-button,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.search-button {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: var(--shadow-accent);
}

.ghost-button,
.section-more,
.clear-button {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.clear-button:hover,
.search-button:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  right: max(1rem, calc((100vw - 1280px) / 2 + 1rem));
  bottom: 2.1rem;
  display: flex;
  gap: 0.55rem;
  z-index: 3;
}

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

.hero-dot.is-active {
  width: 2.2rem;
  background: var(--amber-light);
}

.hero-search-card {
  position: absolute;
  right: max(1rem, calc((100vw - 1280px) / 2 + 1rem));
  top: 5.4rem;
  width: min(360px, calc(100% - 2rem));
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.64);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  z-index: 4;
}

.hero-search-card label {
  display: block;
  margin-bottom: 0.6rem;
  color: #fde68a;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-search-card form div,
.search-inline {
  display: flex;
  gap: 0.5rem;
}

.hero-search-card input,
.search-inline input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 2.7rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.85rem;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.86);
  outline: none;
  padding: 0 0.9rem;
}

.hero-search-card button {
  border: 0;
  border-radius: 0.85rem;
  padding: 0 1rem;
  color: #111827;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  cursor: pointer;
}

.page-main,
.section,
.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.section.compact {
  padding-top: 2.4rem;
  padding-bottom: 2.4rem;
}

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

.section-head h1,
.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.1;
}

.section-head p,
.page-title p,
.category-card p,
.footer-grid p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 1.3rem;
}

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

.movie-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.65rem;
  scrollbar-width: none;
}

.movie-strip::-webkit-scrollbar {
  display: none;
}

.movie-card {
  min-width: 0;
}

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

.movie-card-link {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card);
}

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

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

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

.quality-badge,
.category-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.quality-badge {
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.55rem;
  background: rgba(2, 6, 23, 0.72);
}

.category-badge {
  left: 0.75rem;
  bottom: 0.75rem;
  padding: 0.28rem 0.62rem;
  background: rgba(245, 158, 11, 0.86);
}

.rank-badge {
  top: 0.65rem;
  left: 0.65rem;
  min-width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 0.45rem;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-desc,
.card-footer {
  color: var(--muted);
  font-size: 0.82rem;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  margin: 0.65rem 0 0.85rem;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-footer {
  margin-top: auto;
  justify-content: space-between;
  color: var(--muted-2);
}

.horizontal-link {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition: background 0.2s ease, transform 0.2s ease;
}

.horizontal-link:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.horizontal-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.7rem;
}

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

.horizontal-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.horizontal-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
}

.horizontal-info em,
.horizontal-info span {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.55;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(14, 165, 233, 0.08)),
    var(--bg-card);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.18);
}

.category-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.category-card strong {
  margin-top: auto;
  color: #fde68a;
}

.filter-panel {
  margin: 0 0 2rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.70);
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.22);
}

.filter-head,
.filter-row {
  display: grid;
  gap: 1rem;
}

.filter-head {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 1rem;
}

.filter-head h2 {
  margin: 0;
}

.filter-head p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.filter-count {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
}

.filter-row {
  grid-template-columns: 2fr repeat(4, minmax(120px, 1fr)) auto;
  align-items: end;
}

.filter-row label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.clear-button {
  min-height: 2.7rem;
  cursor: pointer;
}

.no-results {
  display: none;
  padding: 2rem;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-xl);
  text-align: center;
  color: var(--muted);
}

.no-results.is-visible {
  display: block;
}

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

.back-link {
  display: inline-flex;
  margin-bottom: 1.2rem;
  color: var(--muted);
}

.back-link:hover {
  color: #ffffff;
}

.player-shell {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow-card);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000000;
}

.player-status {
  padding: 0.75rem 1rem;
  color: var(--muted);
  font-size: 0.86rem;
  background: rgba(15, 23, 42, 0.95);
}

.detail-title {
  margin: 1.6rem 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.12;
}

.detail-meta {
  margin-bottom: 1rem;
}

.movie-tags {
  margin: 1rem 0 1.4rem;
}

.content-panel {
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
}

.content-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.content-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.sidebar {
  position: sticky;
  top: 5.5rem;
}

.sidebar h2 {
  margin-top: 0;
}

.sidebar-list {
  display: grid;
  gap: 0.9rem;
}

.static-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.static-page section {
  margin-top: 1rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
}

.static-page h1,
.static-page h2 {
  margin-top: 0;
}

.static-page p,
.static-page li {
  color: #cbd5e1;
  line-height: 1.9;
}

.site-footer {
  border-top: 1px solid rgba(30, 41, 59, 0.95);
  background: rgba(15, 23, 42, 0.96);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}

.footer-grid h2 {
  margin: 0 0 0.9rem;
  font-size: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
  border-top: 1px solid rgba(30, 41, 59, 0.8);
  color: var(--muted-2);
  font-size: 0.86rem;
  text-align: center;
}

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

  .mobile-menu-button {
    display: block;
  }

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

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

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

  .filter-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .hero-slider {
    height: 78vh;
    min-height: 620px;
  }

  .hero-search-card {
    left: 1rem;
    right: 1rem;
    top: auto;
    bottom: 1rem;
    width: auto;
  }

  .hero-content {
    left: 1rem;
    right: 1rem;
    bottom: 8.5rem;
  }

  .hero-dots {
    right: 1rem;
    bottom: 7rem;
  }

  .featured-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

@media (max-width: 560px) {
  .nav-shell {
    padding: 0 0.85rem;
  }

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

  .hero-content h1 {
    font-size: 2.3rem;
  }

  .hero-content p {
    font-size: 0.98rem;
  }

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

  .card-body {
    padding: 0.8rem;
  }

  .horizontal-link {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .category-overview-grid,
  .filter-row,
  .filter-head {
    grid-template-columns: 1fr;
  }
}
