:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --panel: rgba(28, 25, 23, 0.82);
  --panel-strong: #292524;
  --text: #fafaf9;
  --muted: #a8a29e;
  --line: rgba(245, 158, 11, 0.16);
  --brand: #f59e0b;
  --brand-dark: #b45309;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input {
  font: inherit;
}

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

main {
  min-height: 70vh;
}

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1c1917;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.28);
}

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

.brand-copy strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 4px;
}

.desktop-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link,
.mobile-link {
  color: #d6d3d1;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: var(--brand);
}

.icon-button,
.search-close,
.quick-filters button {
  border: 1px solid rgba(245, 158, 11, 0.24);
  color: var(--text);
  background: rgba(41, 37, 36, 0.72);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-button:hover,
.search-close:hover,
.quick-filters button:hover {
  transform: translateY(-1px);
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.55);
}

.nav-toggle {
  display: none;
}

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

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

.mobile-link {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  background: #0c0a09;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.56fr);
  align-items: center;
  gap: 54px;
  padding: 110px max(24px, calc((100vw - 1240px) / 2)) 170px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-shade,
.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.94), rgba(12, 10, 9, 0.65), rgba(12, 10, 9, 0.28)),
    linear-gradient(0deg, #0c0a09 0%, rgba(12, 10, 9, 0.58) 42%, rgba(12, 10, 9, 0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 24px 0 12px;
  font-size: clamp(36px, 5.8vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 0 0 18px;
  color: #fef3c7;
  font-size: clamp(24px, 3.2vw, 44px);
  font-weight: 900;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: #d6d3d1;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.8;
}

.hero-meta,
.detail-facts,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
  color: #d6d3d1;
}

.hero-meta span,
.detail-facts span,
.card-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: rgba(28, 25, 23, 0.72);
  color: #f5f5f4;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.text-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1c1917;
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.28);
}

.ghost-button,
.section-link,
.text-button {
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: rgba(28, 25, 23, 0.62);
  color: #fef3c7;
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

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

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--brand);
}

.hero-search-card {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: min(1120px, calc(100% - 32px));
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 24px;
  background: rgba(28, 25, 23, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search-card strong {
  color: #fef3c7;
}

.hero-search-card input,
.search-field input,
.inline-filter input {
  width: 100%;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 16px;
  background: rgba(12, 10, 9, 0.7);
  color: var(--text);
  padding: 13px 16px;
  outline: 0;
}

.hero-category-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-category-links a {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
}

.hero-search-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.section-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0 0;
}

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

.section-heading.align-start {
  align-items: start;
}

.section-heading h2,
.detail-text h2,
.index-group h2,
.category-card h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.03em;
}

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

.category-tile {
  min-height: 190px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-image:
    linear-gradient(0deg, rgba(12, 10, 9, 0.9), rgba(12, 10, 9, 0.2)),
    var(--tile-image);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(245, 158, 11, 0.14);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
}

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

.category-tile strong {
  margin-top: 8px;
  color: #e7e5e4;
  line-height: 1.5;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.13);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(41, 37, 36, 0.82), rgba(28, 25, 23, 0.88));
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card[hidden] {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
}

.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.05);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.86), transparent);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  border-radius: 999px;
  color: #1c1917;
  background: #fbbf24;
  font-weight: 900;
}

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

.card-meta {
  gap: 6px;
  margin: 0 0 10px;
}

.card-meta span {
  font-size: 12px;
  padding: 4px 8px;
}

.movie-card h2 {
  margin: 0 0 10px;
  color: #fff7ed;
  font-size: 18px;
  line-height: 1.35;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  font-size: 12px;
  padding: 4px 8px;
}

.card-category {
  display: inline-flex;
  margin-top: 12px;
  color: #fbbf24;
  font-weight: 800;
  font-size: 14px;
}

.page-hero {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 42px auto 0;
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 30rem),
    linear-gradient(135deg, rgba(41, 37, 36, 0.92), rgba(12, 10, 9, 0.96));
  border: 1px solid rgba(245, 158, 11, 0.16);
  box-shadow: var(--shadow);
  padding: clamp(34px, 6vw, 82px);
}

.category-list {
  display: grid;
  gap: 24px;
}

.category-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.72);
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-cover {
  display: block;
  overflow: hidden;
  border-radius: 18px;
}

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

.category-card p,
.detail-text p,
.site-footer p {
  color: #d6d3d1;
  line-height: 1.85;
}

.category-mini-links,
.index-link-grid,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.category-mini-links a,
.index-link-grid a,
.footer-links a {
  border: 1px solid rgba(245, 158, 11, 0.16);
  background: rgba(12, 10, 9, 0.36);
  color: #fef3c7;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
}

.inline-filter {
  display: grid;
  gap: 8px;
  min-width: min(360px, 100%);
  color: var(--muted);
}

.wide-filter {
  min-width: min(460px, 100%);
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -8px 0 24px;
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(14px);
}

.search-panel.is-open {
  display: grid;
}

.search-panel-card {
  position: relative;
  width: min(720px, 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 28px;
  background: rgba(28, 25, 23, 0.95);
  box-shadow: var(--shadow);
  padding: 30px;
}

.search-panel-card h2 {
  margin: 0 0 8px;
  font-size: 34px;
}

.search-panel-card p,
.empty-result {
  color: var(--muted);
}

.search-close {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 26px;
}

.search-field {
  display: grid;
  gap: 8px;
  margin: 22px 0;
}

.global-search-results {
  display: grid;
  gap: 12px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 6px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: 18px;
  background: rgba(12, 10, 9, 0.38);
  padding: 10px;
}

.search-result-item img {
  width: 64px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.search-result-item span {
  display: grid;
  gap: 5px;
}

.search-result-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.detail-hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-image: var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: blur(2px);
  transform: scale(1.04);
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  color: #d6d3d1;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  max-width: 880px;
}

.detail-tags {
  margin: 20px 0 28px;
}

.player-section {
  padding-top: 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #1c1917;
  background: #fbbf24;
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.35);
}

.player-cover strong {
  font-size: clamp(20px, 3vw, 34px);
}

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

.detail-text article,
.index-group {
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.66);
  padding: 26px;
}

.index-group + .index-group {
  margin-top: 24px;
}

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

.index-link-grid a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid rgba(245, 158, 11, 0.12);
  background: #0c0a09;
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 34px;
}

.footer-brand {
  color: #fbbf24;
  font-size: 22px;
  font-weight: 900;
}

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

@media (max-width: 1120px) {
  .movie-grid,
  .compact-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 {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-inner {
    height: 68px;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 90px 18px 230px;
  }

  .hero-poster {
    display: none;
  }

  .hero-search-card {
    grid-template-columns: 1fr;
    bottom: 18px;
  }

  .hero-dots {
    bottom: 190px;
  }

  .section-heading,
  .footer-inner,
  .detail-text,
  .detail-grid,
  .category-card {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .footer-inner {
    display: grid;
    align-items: start;
  }

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

  .detail-hero {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .header-actions .search-toggle {
    padding: 9px 12px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-copy em {
    display: none;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .category-grid,
  .movie-grid,
  .compact-grid,
  .index-link-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 122px minmax(0, 1fr);
  }

  .poster-link img {
    height: 100%;
  }

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

  .movie-card p {
    min-height: 0;
  }

  .page-hero {
    padding: 30px 20px;
  }

  .search-panel-card {
    padding: 24px 18px;
  }
}
