:root {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: #111827;
  --panel-soft: #1f2937;
  --line: rgba(255, 255, 255, 0.08);
  --muted: #9ca3af;
  --text: #f9fafb;
  --amber: #fbbf24;
  --amber-strong: #f59e0b;
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem), #0b1120;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #111827, #374151);
}

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--amber), #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.site-logo {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), #fde68a);
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.32);
}

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

.desktop-nav a,
.mobile-nav a {
  color: #e5e7eb;
  transition: color 0.2s ease;
}

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

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

.top-search input,
.mobile-search input,
.search-large input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(31, 41, 55, 0.92);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 230px;
  padding: 10px 14px;
}

.mobile-search input,
.search-large input {
  flex: 1;
  padding: 14px 18px;
}

.top-search input:focus,
.mobile-search input:focus,
.search-large input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.top-search button,
.mobile-search button,
.search-large button,
.btn,
.panel-more,
.ranking-play {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #111827;
  background: var(--amber);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.search-large button:hover,
.btn:hover,
.panel-more:hover,
.ranking-play:hover {
  transform: translateY(-1px);
  background: #fde68a;
  box-shadow: 0 12px 30px rgba(251, 191, 36, 0.22);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 18px 16px 22px;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.98);
}

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

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #030712;
}

.hero-slider,
.hero-slide,
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.58) saturate(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.95) 0%, rgba(3, 7, 18, 0.72) 42%, rgba(3, 7, 18, 0.35) 100%), linear-gradient(0deg, #0b1120 0%, rgba(11, 17, 32, 0.08) 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 96px 0 80px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111827;
  background: linear-gradient(90deg, var(--amber), #fde68a);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 16px 40px rgba(251, 191, 36, 0.18);
}

.hero h1,
.page-hero h1 {
  max-width: 860px;
  margin: 22px 0 18px;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #d1d5db;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.9;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-meta span,
.detail-meta span,
.genre-tags span,
.tag-list span {
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.9rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  padding: 14px 24px;
}

.btn-ghost {
  color: #f9fafb;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost:hover {
  color: #111827;
  background: var(--amber);
}

.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;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section-block {
  padding: 70px 0;
}

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

.section-title span {
  color: var(--amber);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-title h2 {
  margin: 6px 0 0;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.section-title a {
  color: var(--amber);
  font-weight: 800;
}

.inline-title {
  display: block;
}

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

.category-tile,
.category-overview-card,
.side-card,
.ranking-panel,
.filter-panel,
.detail-section {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.96));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-tile,
.category-overview-card {
  min-height: 172px;
  padding: 22px;
  overflow: hidden;
  position: relative;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile::after,
.category-overview-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -36px;
  bottom: -36px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.13);
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.35);
}

.category-tile strong,
.category-overview-card strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.category-tile span,
.category-overview-card p {
  display: block;
  color: #cbd5e1;
  line-height: 1.75;
}

.category-overview-card div {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

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

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

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

.movie-card {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(31, 41, 55, 0.9);
  border: 1px solid var(--line);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 22px 60px rgba(251, 191, 36, 0.12);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.movie-card-compact .poster-wrap {
  aspect-ratio: 3 / 4;
}

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

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

.poster-badge,
.poster-year {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.poster-badge {
  left: 10px;
  color: #111827;
  background: var(--amber);
}

.poster-year {
  right: 10px;
  color: #f9fafb;
  background: rgba(0, 0, 0, 0.66);
}

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

.movie-card-body strong {
  color: #ffffff;
  font-size: 1.03rem;
  line-height: 1.35;
}

.movie-card-body em {
  color: var(--amber);
  font-size: 0.84rem;
  font-style: normal;
}

.movie-card-body span {
  color: #cbd5e1;
  line-height: 1.6;
  font-size: 0.9rem;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.ranking-panel ol {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.ranking-panel li a {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.72);
}

.ranking-panel li a:hover,
.ranking-row:hover {
  background: rgba(251, 191, 36, 0.1);
}

.ranking-panel li span,
.ranking-number {
  color: var(--amber);
  font-weight: 900;
  font-size: 1.05rem;
}

.ranking-panel strong,
.ranking-info strong {
  display: block;
  color: #fff;
}

.ranking-panel em,
.ranking-info em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 0.84rem;
  margin-top: 3px;
}

.panel-more {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 18px;
}

.page-hero {
  padding: 92px 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.88), rgba(31, 41, 55, 0.72)), radial-gradient(circle at 85% 15%, rgba(251, 191, 36, 0.2), transparent 26rem);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  padding: 18px;
  margin-bottom: 28px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #e5e7eb;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
}

.top-ranking-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 28px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 52px 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(31, 41, 55, 0.86);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  transform: translateX(3px);
}

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

.search-large {
  max-width: 680px;
  margin-top: 28px;
}

.search-results:empty {
  display: none;
}

.search-results h2 {
  margin: 0 0 20px;
  font-size: 2rem;
}

.detail-page {
  position: relative;
  overflow: hidden;
}

.detail-hero-bg {
  position: absolute;
  inset: 0 0 auto;
  height: 520px;
  z-index: -1;
  opacity: 0.45;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) brightness(0.55);
  transform: scale(1.08);
}

.detail-hero-bg div {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 17, 32, 0.2), #0b1120 82%);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #cbd5e1;
  margin: 0 0 18px;
}

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

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: var(--amber);
  font-size: 2rem;
  box-shadow: 0 20px 50px rgba(251, 191, 36, 0.35);
}

.detail-section {
  margin-top: 22px;
  padding: 24px;
}

.detail-section h1,
.detail-section h2 {
  margin: 0 0 14px;
  line-height: 1.18;
}

.detail-section h1 {
  font-size: clamp(2rem, 5vw, 3.9rem);
  letter-spacing: -0.04em;
}

.detail-section h2 {
  font-size: 1.45rem;
}

.detail-section p,
.lead-text {
  color: #d1d5db;
  line-height: 1.9;
  font-size: 1.02rem;
}

.tag-list,
.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-side {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.side-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

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

.side-card {
  padding: 22px;
}

.side-card h2 {
  margin: 0 0 16px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px 12px;
  margin: 0 0 18px;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: #fff;
}

.site-footer {
  margin-top: 40px;
  background: rgba(3, 7, 18, 0.92);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 30px;
  padding: 52px 0;
}

.site-footer p,
.site-footer a {
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 7px 0;
}

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

.site-footer h3 {
  margin: 0 0 12px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

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

@media (max-width: 1120px) {
  .category-grid,
  .category-overview-grid,
  .category-movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .two-column,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel,
  .detail-side {
    position: static;
  }
}

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

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

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

  .hero-content {
    padding-top: 70px;
  }

  .section-title {
    display: block;
  }

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

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

  .ranking-row {
    grid-template-columns: 38px 68px minmax(0, 1fr);
  }

  .ranking-play {
    display: none;
  }
}

@media (max-width: 540px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .site-logo {
    font-size: 1.08rem;
  }

  .logo-icon {
    width: 30px;
    height: 30px;
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.55rem;
  }

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

  .section-block {
    padding: 46px 0;
  }

  .detail-section {
    padding: 18px;
  }

  .search-large {
    display: grid;
  }
}
