* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --panel: #1c1917;
  --panel-soft: #292524;
  --text: #fafaf9;
  --muted: #a8a29e;
  --line: rgba(255, 255, 255, 0.08);
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 32rem),
    linear-gradient(180deg, #1c1917 0%, #0c0a09 42%, #0c0a09 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), #f97316);
  color: #111827;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.32);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 15px;
  color: var(--muted);
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(245, 158, 11, 0.14);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 20px;
}

main,
.page-main,
.detail-main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  min-height: 660px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  box-shadow: var(--shadow);
  background: #111;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.38;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.94), rgba(12, 10, 9, 0.62), rgba(12, 10, 9, 0.88)),
    radial-gradient(circle at 70% 42%, rgba(245, 158, 11, 0.2), transparent 26rem);
}

.hero-content {
  position: relative;
  height: 100%;
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: center;
  padding: 72px;
}

.hero-copy h1 {
  margin: 16px 0;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 760px;
  color: #d6d3d1;
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow,
.small-meta {
  color: var(--amber-light);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.tag-list span {
  border: 1px solid rgba(245, 158, 11, 0.24);
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.hero-actions,
.center-action {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

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

.primary-btn {
  background: linear-gradient(135deg, var(--amber), #f97316);
  color: #1c1917;
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.28);
}

.secondary-btn {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

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

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(28, 25, 23, 0.8);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--amber);
}

.intro-strip,
.page-hero,
.filter-panel,
.content-section,
.site-footer {
  border: 1px solid var(--line);
  background: rgba(28, 25, 23, 0.76);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.intro-strip {
  margin: 28px 0 0;
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.intro-strip h2,
.page-hero h1,
.section-heading h2 {
  margin: 0;
}

.intro-strip p,
.page-hero p,
.section-subtitle {
  color: var(--muted);
  line-height: 1.8;
}

.content-section {
  margin: 34px 0;
  border-radius: var(--radius);
  padding: 28px;
}

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

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-subtitle {
  margin: 6px 0 0;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(41, 37, 36, 0.78);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

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

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

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #111827;
  background: var(--amber-light);
  font-size: 13px;
  font-weight: 900;
}

.score-badge.big {
  min-width: 60px;
  min-height: 38px;
  font-size: 18px;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.4;
}

.movie-card h3 a:hover,
.horizontal-card h3 a:hover {
  color: var(--amber-light);
}

.movie-card p {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.meta-row,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  transition: 0.3s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(12, 10, 9, 0.9));
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile em {
  margin-top: 6px;
  color: #d6d3d1;
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.5;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(41, 37, 36, 0.72);
}

.horizontal-cover {
  overflow: hidden;
  border-radius: 14px;
}

.horizontal-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.horizontal-card h3 {
  margin: 8px 0;
  font-size: 18px;
}

.horizontal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.page-main {
  padding: 32px 0 8px;
}

.page-hero {
  border-radius: var(--radius);
  padding: 52px;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 28rem),
    rgba(28, 25, 23, 0.78);
}

.page-hero.compact {
  padding: 42px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 62px);
  letter-spacing: -0.04em;
}

.filter-panel {
  margin: 24px 0;
  border-radius: 20px;
  padding: 20px;
}

.filter-label {
  display: block;
  margin-bottom: 12px;
  color: var(--amber-light);
  font-weight: 800;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
}

.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 10, 9, 0.72);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.detail-main {
  padding: 28px 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 20px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 34px;
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.14), transparent 25rem),
    rgba(28, 25, 23, 0.78);
}

.detail-cover {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 14px 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.lead {
  color: #e7e5e4;
  font-size: 18px;
  line-height: 1.8;
}

.player-section,
.detail-content {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  background: rgba(28, 25, 23, 0.78);
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.42));
}

.play-cover span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #1c1917;
  background: var(--amber-light);
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.36);
}

.play-cover.hidden {
  display: none;
}

.detail-content h2 {
  margin: 8px 0 12px;
  font-size: 26px;
}

.detail-content p {
  margin: 0 0 24px;
  color: #d6d3d1;
  line-height: 1.9;
}

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

.site-footer {
  width: min(1240px, calc(100% - 32px));
  margin: 42px auto 0;
  border-radius: 24px 24px 0 0;
  padding: 28px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.hidden-by-filter {
  display: none !important;
}

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 280px;
    padding: 52px;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    background: rgba(12, 10, 9, 0.95);
  }

  .main-nav.open {
    display: flex;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-content {
    min-height: 760px;
    grid-template-columns: 1fr;
    padding: 36px 24px 86px;
  }

  .hero-poster {
    width: min(260px, 82vw);
  }

  .intro-strip,
  .footer-inner,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .ranking-list,
  .horizontal-grid,
  .detail-hero,
  .filter-row {
    grid-template-columns: 1fr;
  }

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

  .detail-cover {
    max-width: 320px;
  }
}

@media (max-width: 520px) {
  .header-inner,
  main,
  .page-main,
  .detail-main,
  .site-footer {
    width: min(100% - 20px, 1240px);
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .page-hero,
  .content-section,
  .detail-hero,
  .player-section,
  .detail-content {
    padding: 20px;
    border-radius: 20px;
  }

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

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