:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --bg-card: rgba(28, 25, 23, 0.86);
  --border: rgba(217, 119, 6, 0.2);
  --gold: #f59e0b;
  --gold-strong: #d97706;
  --gold-soft: #fde68a;
  --red: #b91c1c;
  --text: #fafaf9;
  --muted: #a8a29e;
  --muted-strong: #d6d3d1;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.no-scroll {
  overflow: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

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

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--gold-soft);
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--red));
  color: white;
  font-size: 14px;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  color: var(--muted-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: white;
  background: rgba(245, 158, 11, 0.18);
}

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

.header-search {
  margin-left: auto;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-row input,
.filter-row select {
  min-width: 0;
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: rgba(28, 25, 23, 0.72);
  color: white;
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input,
.mobile-search input {
  width: 260px;
  padding: 10px 14px;
}

.big-search input {
  width: min(560px, 100%);
  padding: 16px 20px;
}

.filter-row input,
.filter-row select {
  padding: 13px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
  background: rgba(28, 25, 23, 0.96);
}

.header-search button,
.mobile-search button,
.big-search button,
.primary-btn,
.ghost-btn,
.section-more {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.header-search button,
.mobile-search button,
.big-search button,
.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--gold-strong), var(--red));
  box-shadow: 0 12px 30px rgba(185, 28, 28, 0.22);
}

.header-search button,
.mobile-search button {
  padding: 10px 16px;
}

.big-search button,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  font-weight: 800;
}

.ghost-btn,
.section-more {
  color: var(--gold-soft);
  border: 1px solid rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.08);
}

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

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 14px;
  background: rgba(28, 25, 23, 0.78);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--gold-soft);
  border-radius: 99px;
}

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

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

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

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.96) 0%, rgba(12, 10, 9, 0.76) 38%, rgba(12, 10, 9, 0.22) 100%),
    linear-gradient(0deg, #0c0a09 0%, transparent 45%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 88px 0 116px;
}

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

.hero-meta span,
.detail-meta span {
  padding: 6px 12px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
}

.hero-copy h1 {
  max-width: 860px;
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 30px;
}

.hero-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(180, 83, 9, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  background: rgba(12, 10, 9, 0.5);
  color: white;
  font-size: 42px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-control:hover {
  background: rgba(245, 158, 11, 0.24);
}

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

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

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 36px;
  background: var(--gold);
}

.quick-search-panel,
.content-section,
.page-hero {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 30px;
  margin-top: -44px;
  position: relative;
  z-index: 8;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.quick-search-copy h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.text-card h2 {
  margin: 0;
  color: var(--text);
  font-weight: 920;
  letter-spacing: -0.04em;
}

.quick-search-copy h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.quick-search-copy p,
.section-head p,
.page-hero p,
.category-overview-card p,
.text-card p,
.detail-one-line {
  color: var(--muted-strong);
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.content-section {
  padding: 74px 0 0;
}

.section-head,
.category-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head h2,
.category-overview-head h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-head p,
.category-overview-head p {
  max-width: 720px;
  margin: 8px 0 0;
}

.horizontal-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 20px;
  scroll-snap-type: x proximity;
}

.movie-grid,
.category-grid,
.mini-category-grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  scroll-snap-align: start;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.54);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #292524;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.82) 0%, transparent 48%);
}

.rank-badge,
.type-pill {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-weight: 900;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  padding: 6px 9px;
  text-align: center;
  background: linear-gradient(135deg, var(--red), var(--gold));
}

.type-pill {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--gold-soft);
}

.card-body p {
  display: -webkit-box;
  min-height: 3.4em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

.compact-card .card-body p {
  display: none;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 40px;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 16px;
  background: rgba(28, 25, 23, 0.66);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(41, 37, 36, 0.88);
}

.rank-num {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--gold-soft);
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  color: white;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

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

.mini-category-grid a {
  padding: 18px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 16px;
  background: rgba(28, 25, 23, 0.74);
  color: var(--gold-soft);
  font-weight: 850;
  transition: transform 0.2s ease, background 0.2s ease;
}

.mini-category-grid a:hover {
  transform: translateY(-4px);
  background: rgba(180, 83, 9, 0.24);
}

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

.category-tile,
.category-overview-card,
.text-card {
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.74);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.24);
}

.category-tile {
  padding: 16px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.46);
}

.tile-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.tile-images img {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.category-tile h3,
.category-overview-card h2 {
  margin: 0 0 8px;
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p,
.category-overview-card p {
  margin: 0;
}

.page-hero {
  min-height: 320px;
  display: flex;
  align-items: end;
  padding: 96px 0 46px;
}

.page-hero h1 {
  font-size: clamp(42px, 8vw, 76px);
}

.page-hero p {
  max-width: 820px;
  margin: 14px 0 0;
  font-size: 19px;
}

.slim-hero,
.category-hero,
.ranking-hero,
.search-hero {
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 34rem),
    linear-gradient(135deg, rgba(28, 25, 23, 0.9), rgba(12, 10, 9, 0.4));
  border-bottom: 1px solid rgba(245, 158, 11, 0.12);
}

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

.category-overview-card {
  padding: 24px;
}

.filter-panel {
  padding-top: 42px;
}

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

.expanded-filter {
  grid-template-columns: minmax(220px, 1fr) 160px 160px 160px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: #0c0a09;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.08);
  transform: scale(1.03);
}

.detail-content {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  padding: 110px 0 60px;
}

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

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.breadcrumb a:hover {
  color: var(--gold-soft);
}

.detail-info h1 {
  margin-bottom: 16px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
}

.detail-one-line {
  max-width: 820px;
  margin: 22px 0 18px;
  font-size: 20px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 28px;
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: black;
  object-fit: contain;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.74));
}

.player-start.hidden {
  display: none;
}

.play-symbol {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--red));
  font-size: 34px;
  box-shadow: 0 0 60px rgba(245, 158, 11, 0.42);
}

.player-start span:last-child {
  font-size: 20px;
  font-weight: 900;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.text-card {
  padding: 28px;
}

.text-card h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

.text-card p {
  margin: 0;
  font-size: 17px;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid rgba(245, 158, 11, 0.16);
  background: rgba(12, 10, 9, 0.86);
}

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
  display: grid;
  gap: 14px;
}

.footer-inner p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--muted-strong);
}

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

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

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

  .split-section,
  .detail-text {
    grid-template-columns: 1fr;
  }

  .quick-search-panel {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-carousel,
  .hero-copy {
    min-height: 620px;
  }

  .hero-copy {
    padding-top: 90px;
  }

  .hero-control {
    display: none;
  }

  .quick-search-panel {
    margin-top: -26px;
    padding: 22px;
  }

  .big-search,
  .mobile-search {
    flex-direction: column;
    align-items: stretch;
  }

  .big-search input,
  .header-search input,
  .mobile-search input {
    width: 100%;
  }

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

  .filter-row,
  .expanded-filter {
    grid-template-columns: 1fr;
  }

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

  .rank-meta {
    grid-column: 2;
  }

  .detail-content {
    grid-template-columns: 1fr;
    align-items: end;
    gap: 24px;
  }

  .detail-poster {
    width: min(240px, 72vw);
  }
}

@media (max-width: 560px) {
  .logo {
    font-size: 18px;
  }

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

  .content-section {
    padding-top: 52px;
  }

  .section-head,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .horizontal-cards {
    grid-auto-columns: minmax(210px, 78vw);
  }

  .detail-content {
    padding-top: 88px;
  }
}
