:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --panel: #1c1917;
  --panel-soft: #292524;
  --panel-line: rgba(250, 250, 249, 0.08);
  --text: #fafaf9;
  --muted: #a8a29e;
  --muted-strong: #d6d3d1;
  --accent: #f59e0b;
  --accent-deep: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.14), transparent 34rem),
    radial-gradient(circle at 95% 10%, rgba(120, 113, 108, 0.18), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.34);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(41, 37, 36, 0.72);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 180px;
  height: 40px;
  padding: 0 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.header-search button,
.mobile-search button,
.btn-primary,
.btn-secondary,
.hero-control,
.hero-dot,
.play-button {
  border: 0;
  cursor: pointer;
}

.header-search button,
.mobile-search button {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: #1c1917;
  background: var(--accent);
  font-weight: 800;
}

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

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

.mobile-nav {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  background: rgba(28, 25, 23, 0.96);
}

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

.page-main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  margin: 0 0 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--panel-line);
  background: #0c0a09;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 7s ease;
}

.hero-slide.is-active .hero-image {
  transform: scale(1.12);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.64) 38%, rgba(12, 10, 9, 0.18)),
    linear-gradient(0deg, var(--bg), transparent 44%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  align-content: center;
  max-width: var(--max);
}

.hero-copy {
  max-width: 680px;
  padding-top: 30px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
  font-size: 13px;
  font-weight: 800;
}

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

.hero-copy p {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.hero-meta {
  margin-top: 18px;
}

.hero-meta span,
.detail-meta span,
.tag {
  padding: 6px 10px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.58);
}

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

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  color: #1c1917;
  background: var(--accent);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
}

.btn-secondary {
  color: var(--text);
  background: rgba(250, 250, 249, 0.12);
  border: 1px solid var(--panel-line);
}

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

.btn-primary:hover {
  background: #fbbf24;
}

.hero-controls {
  position: absolute;
  right: max(16px, calc((100% - var(--max)) / 2));
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-control {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(28, 25, 23, 0.74);
  border: 1px solid var(--panel-line);
  backdrop-filter: blur(14px);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  background: rgba(250, 250, 249, 0.46);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section,
.detail-section {
  margin: 0 0 56px;
}

.section-head,
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2,
.page-title h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.section-head p,
.page-title p,
.detail-section p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

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

.movie-card,
.category-card,
.stat-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(41, 37, 36, 0.94), rgba(28, 25, 23, 0.94));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.stat-card:hover {
  transform: translateY(-7px);
  border-color: rgba(245, 158, 11, 0.52);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1c1917;
}

.movie-card-large .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #1c1917;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.card-body strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.card-line,
.card-meta,
.card-tags {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.card-tags {
  color: #fcd34d;
}

.category-card {
  min-height: 190px;
  padding: 22px;
}

.category-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 12px;
}

.category-card p {
  margin: 0 0 22px;
  color: var(--muted-strong);
}

.category-card span {
  color: var(--accent);
  font-weight: 900;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.rank-panel,
.filter-panel,
.detail-panel {
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.82);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.rank-panel {
  padding: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 54px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: rgba(250, 250, 249, 0.07);
}

.rank-index {
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
}

.rank-row img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-row strong,
.rank-row em {
  display: block;
}

.rank-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-row b {
  color: var(--accent);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 160px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.82);
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
}

.empty-state {
  display: none;
  margin: 20px 0 0;
  padding: 22px;
  border: 1px dashed rgba(245, 158, 11, 0.32);
  border-radius: var(--radius);
  color: var(--muted-strong);
  text-align: center;
}

.empty-state.show {
  display: block;
}

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

.breadcrumbs {
  margin-bottom: 18px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 34px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.68)),
    rgba(0, 0, 0, 0.18);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 26px;
  border-radius: 999px;
  color: #1c1917;
  background: var(--accent);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.28);
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid #1c1917;
}

.detail-panel {
  padding: 24px;
}

.detail-title h1 {
  font-size: clamp(30px, 4vw, 52px);
}

.detail-cover {
  margin-top: 22px;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: var(--panel-soft);
}

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

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

.article-body {
  display: grid;
  gap: 18px;
  color: var(--muted-strong);
  font-size: 17px;
}

.article-body p {
  margin: 0;
}

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

.site-footer {
  border-top: 1px solid var(--panel-line);
  background: rgba(12, 10, 9, 0.9);
}

.footer-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 26px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 32px;
}

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

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

.site-footer a {
  display: block;
  margin: 8px 0;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  color: var(--muted);
  border-top: 1px solid var(--panel-line);
  font-size: 14px;
}

@media (max-width: 1060px) {
  .grid-cards,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grid-featured,
  .grid-categories,
  .split-layout,
  .detail-hero,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-search {
    display: none;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .header-inner {
    min-height: 64px;
  }

  .hero-carousel {
    height: 640px;
  }

  .hero-layer {
    background:
      linear-gradient(0deg, var(--bg), rgba(12, 10, 9, 0.4) 48%, rgba(12, 10, 9, 0.2)),
      linear-gradient(90deg, rgba(12, 10, 9, 0.84), rgba(12, 10, 9, 0.28));
  }

  .hero-copy {
    align-self: end;
    padding-bottom: 112px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
  }

  .section-head,
  .page-title {
    display: block;
  }

  .grid-featured,
  .grid-categories,
  .split-layout,
  .detail-hero,
  .footer-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row b {
    display: none;
  }
}

@media (max-width: 430px) {
  .grid-cards,
  .related-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-line,
  .card-tags {
    display: none;
  }
}
