:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #171717;
  --panel-soft: #202020;
  --line: #2b2b2b;
  --muted: #a3a3a3;
  --muted-2: #737373;
  --text: #ffffff;
  --amber: #f59e0b;
  --amber-2: #d97706;
  --shadow: rgba(245, 158, 11, 0.14);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(23, 23, 23, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-shell {
  max-width: var(--max);
  height: 66px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: fit-content;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--amber);
  color: #111111;
  font-size: 15px;
  box-shadow: 0 0 28px var(--shadow);
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong,
.footer-brand strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 9px 13px;
  border-radius: 10px;
  color: #d4d4d4;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--amber);
  color: #111111;
}

.nav-search {
  width: 230px;
}

.search-box {
  position: relative;
}

.search-box input,
.page-filter input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: rgba(38, 38, 38, 0.9);
  border-radius: 999px;
  padding: 11px 15px;
  transition: 0.2s ease;
}

.search-box input:focus,
.page-filter input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-results {
  position: absolute;
  z-index: 300;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 15, 15, 0.98);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

.search-results.open {
  display: block;
}

.search-results a,
.search-empty {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-results a:hover {
  background: rgba(245, 158, 11, 0.1);
}

.search-results strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.search-results span,
.search-empty {
  color: var(--muted);
  font-size: 12px;
}

.nav-toggle {
  display: none;
  border: 0;
  color: var(--text);
  background: var(--panel-soft);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

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

.mobile-search {
  margin-top: 6px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #050505;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.62) 42%, rgba(0, 0, 0, 0.15) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(0, 0, 0, 0) 28%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: max(20px, calc((100vw - var(--max)) / 2));
  width: min(680px, calc(100vw - 40px));
  transform: translateY(-45%);
}

.hero-tags,
.detail-tags,
.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-strip span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.9);
  color: #111111;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 30px;
  color: #d4d4d4;
  font-size: clamp(16px, 2.3vw, 21px);
}

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

.primary-btn,
.ghost-btn,
.section-more,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 22px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-btn {
  color: #111111;
  background: var(--amber);
  box-shadow: 0 18px 40px var(--shadow);
}

.primary-btn:hover {
  background: var(--amber-2);
  transform: translateY(-2px);
}

.primary-btn.full {
  width: 100%;
  margin-top: 16px;
}

.ghost-btn,
.section-more,
.panel-link {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(38, 38, 38, 0.72);
}

.ghost-btn:hover,
.section-more:hover,
.panel-link:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: 0.2s ease;
}

.hero-control:hover {
  background: var(--amber);
  color: #111111;
}

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

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

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

.hero-dots button {
  width: 26px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--amber);
}

.hero-search {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 64px;
  width: min(680px, calc(100vw - 40px));
  transform: translateX(-50%);
}

.hero-search input {
  min-height: 52px;
  padding-inline: 22px;
  background: rgba(10, 10, 10, 0.82);
}

.content-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 70px 20px;
}

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

.section-head h2,
.panel-head h2,
.story-card h2,
.related-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-overview-body p,
.site-footer p,
.story-card p {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--amber) !important;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.featured-grid {
  grid-auto-flow: dense;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  transition: 0.25s ease;
}

.movie-card:hover {
  border-color: var(--amber);
  box-shadow: 0 24px 60px var(--shadow);
  transform: translateY(-5px);
}

.movie-card.featured-card {
  grid-column: span 2;
  grid-row: span 2;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #050505;
}

.featured-card .card-media {
  aspect-ratio: 16 / 9;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img,
.category-card:hover img,
.compact-item:hover img {
  transform: scale(1.08);
}

.card-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08));
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade {
  opacity: 1;
}

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.74);
  color: var(--text);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: var(--amber);
  color: #111111;
}

.tag-strip {
  position: absolute;
  z-index: 2;
  left: 10px;
  bottom: 10px;
}

.tag-strip span {
  background: rgba(23, 23, 23, 0.9);
  color: var(--amber);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 0 0 9px;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.featured-card .card-body h3 {
  font-size: 24px;
}

.card-body p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

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

.category-card,
.category-overview-card a {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  transition: 0.25s ease;
}

.category-card:hover,
.category-overview-card a:hover {
  border-color: var(--amber);
  box-shadow: 0 24px 60px var(--shadow);
  transform: translateY(-4px);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: 0.45s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.18));
}

.category-card div {
  position: absolute;
  z-index: 2;
  inset: auto 18px 18px 18px;
}

.category-card span,
.category-overview-body span {
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.category-card h3,
.category-overview-body h2 {
  margin: 8px 0;
  font-size: 21px;
}

.category-card p {
  margin: 0;
  color: #d4d4d4;
  font-size: 13px;
}

.split-section,
.category-layout,
.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
}

.ranking-panel {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(38, 38, 38, 0.92), rgba(18, 18, 18, 0.92));
  padding: 22px;
}

.sticky-panel {
  position: sticky;
  top: 86px;
}

.compact-list {
  display: grid;
  gap: 14px;
}

.compact-item {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  color: var(--text);
}

.compact-item img {
  width: 92px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  transition: 0.3s ease;
}

.compact-item h4 {
  display: -webkit-box;
  margin: 0 0 4px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-item p {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
}

.compact-item:hover h4 {
  color: var(--amber);
}

.compact-rank {
  position: absolute;
  top: -5px;
  left: -5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--amber);
  color: #111111;
  font-size: 12px;
  font-weight: 900;
}

.panel-link {
  width: 100%;
  margin-top: 18px;
}

.page-main {
  min-height: 70vh;
  padding-top: 66px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 34%),
    linear-gradient(180deg, #171717, #0a0a0a);
  padding: 72px max(20px, calc((100vw - var(--max)) / 2)) 62px;
}

.small-hero {
  padding-bottom: 46px;
}

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

.page-hero p {
  max-width: 740px;
  margin: 0;
  font-size: 17px;
}

.breadcrumb,
.detail-breadcrumb a {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--amber);
  font-weight: 800;
}

.page-filter {
  max-width: 620px;
  margin-top: 26px;
}

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

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 190px;
  overflow: hidden;
}

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

.category-overview-body {
  padding: 22px;
}

.detail-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 20px 70px;
}

.detail-primary {
  min-width: 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.38);
}

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

.player-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.24));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: var(--amber);
  color: #111111;
  font-size: 32px;
  box-shadow: 0 0 0 16px rgba(245, 158, 11, 0.12), 0 18px 50px var(--shadow);
}

.detail-info {
  margin-top: 26px;
}

.detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-2);
}

.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
}

.detail-meta span {
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 6px 12px;
}

.story-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 22px;
}

.story-card h2 {
  font-size: 22px;
}

.story-card p {
  margin: 12px 0 0;
}

.lead-text {
  color: #e5e5e5 !important;
  font-size: 17px;
}

.detail-nav-links {
  margin-top: 22px;
}

.detail-nav-links a {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px 16px;
  color: #d4d4d4;
  transition: 0.2s ease;
}

.detail-nav-links a:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.poster-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 14px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 15px;
  object-fit: cover;
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
  position: sticky;
  top: 86px;
}

.related-panel {
  padding: 20px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #111111;
  padding: 48px 20px 24px;
}

.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

.site-footer h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.site-footer p {
  max-width: 360px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

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

.footer-bottom {
  max-width: var(--max);
  margin: 34px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted-2);
  text-align: center;
  font-size: 13px;
}

.is-filtered-out {
  display: none !important;
}

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

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

  .split-section,
  .category-layout,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .sticky-panel,
  .detail-sidebar {
    position: static;
  }

  .detail-sidebar {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}

@media (max-width: 720px) {
  .nav-shell {
    height: 62px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    top: 47%;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-control {
    display: none;
  }

  .hero-search {
    bottom: 48px;
  }

  .content-section {
    padding: 46px 16px;
  }

  .section-head {
    display: grid;
  }

  .movie-grid,
  .compact-grid,
  .category-movie-grid,
  .ranking-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.featured-card {
    grid-column: auto;
    grid-row: auto;
  }

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

  .page-hero {
    padding: 52px 16px 44px;
  }

  .detail-shell {
    padding-inline: 16px;
  }

  .detail-sidebar {
    grid-template-columns: 1fr;
  }

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