:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --panel: #1c1917;
  --panel-soft: #292524;
  --panel-deep: #11100f;
  --line: rgba(214, 211, 209, 0.12);
  --text: #f8fafc;
  --muted: #a8a29e;
  --gold: #f59e0b;
  --gold-deep: #b45309;
  --gold-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.13), transparent 30%), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(28, 25, 23, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.site-nav {
  width: min(1240px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  color: #fff7ed;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

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

.nav-links a:hover {
  color: var(--gold);
  transform: translateY(-1px);
}

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

.nav-search input,
.search-panel input,
.search-panel select {
  color: #fff7ed;
  background: #0c0a09;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.nav-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(245, 158, 11, 0.68);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.nav-search button,
.btn,
.btn-ghost,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-search button,
.btn {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #1c1917;
}

.btn-ghost {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.btn-soft {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.25);
}

.nav-search button:hover,
.btn:hover,
.btn-ghost:hover,
.btn-soft:hover {
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #fff7ed;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.95), rgba(12, 10, 9, 1));
}

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

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

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

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  transform: scale(1.04);
}

.hero-backdrop img.is-missing {
  opacity: 0;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 32%, rgba(245, 158, 11, 0.2), transparent 22%), linear-gradient(90deg, #0c0a09 0%, rgba(12, 10, 9, 0.82) 43%, rgba(12, 10, 9, 0.42) 100%), linear-gradient(180deg, rgba(12, 10, 9, 0.25), #0c0a09 94%);
}

.hero-inner {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 42px;
  padding: 76px 0 88px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 14px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  font-weight: 750;
}

.hero h1 {
  margin: 24px 0 18px;
  max-width: 820px;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #d6d3d1;
  font-size: 19px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #fef3c7;
  background: rgba(120, 113, 108, 0.28);
  border: 1px solid rgba(214, 211, 209, 0.12);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(145deg, #292524, #0c0a09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster img.is-missing {
  opacity: 0;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(12, 10, 9, 0.92));
}

.hero-poster-label {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
}

.hero-poster-label strong {
  display: block;
  font-size: 22px;
}

.hero-poster-label span {
  color: #fbbf24;
  font-size: 14px;
}

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

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

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

.main-section,
.category-page,
.detail-page,
.list-page,
.search-page,
.ranking-page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

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

.section-title h2,
.page-title h1,
.detail-copy h2 {
  margin: 0;
  color: #fff7ed;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-title p,
.page-title p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.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(28, 25, 23, 0.82);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.3);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: radial-gradient(circle at 30% 10%, rgba(245, 158, 11, 0.24), transparent 36%), linear-gradient(145deg, #292524, #0c0a09);
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease, opacity 0.2s ease;
}

.poster img.is-missing {
  opacity: 0;
}

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

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

.poster-play {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  color: #1c1917;
  background: #fbbf24;
  font-size: 13px;
  font-weight: 850;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1c1917;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

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

.movie-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 750;
}

.movie-card h3 {
  min-height: 52px;
  margin: 7px 0 7px;
  font-size: 17px;
  line-height: 1.35;
}

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

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

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

.category-card {
  display: block;
  min-height: 180px;
  padding: 24px;
  border-radius: 22px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 38%), linear-gradient(145deg, #292524, #11100f);
  border: 1px solid var(--line);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.page-title {
  margin-bottom: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 42px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(28, 25, 23, 0.82);
  color: #d6d3d1;
}

.pagination .active,
.pagination a:hover {
  color: #1c1917;
  background: #fbbf24;
  border-color: #fbbf24;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: stretch;
}

.player-card,
.detail-panel,
.copy-card,
.search-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(28, 25, 23, 0.86);
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.16), rgba(0, 0, 0, 0.4));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  color: #1c1917;
  cursor: pointer;
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.detail-panel {
  padding: 24px;
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}

.detail-meta {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  color: #d6d3d1;
}

.detail-meta span {
  color: var(--muted);
}

.detail-actions {
  margin-top: 22px;
}

.detail-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.45fr);
  gap: 24px;
  margin-top: 28px;
}

.copy-card {
  padding: 26px;
}

.copy-card p {
  color: #d6d3d1;
}

.search-panel {
  padding: 22px;
  margin-bottom: 30px;
}

.search-controls {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 14px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 70px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(28, 25, 23, 0.82);
}

.ranking-item img {
  width: 96px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #292524;
}

.ranking-item img.is-missing {
  opacity: 0;
}

.ranking-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #1c1917;
  background: #fbbf24;
  font-weight: 900;
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  background: rgba(28, 25, 23, 0.88);
}

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

.footer-brand p,
.footer-col a {
  color: var(--muted);
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-col h3 {
  margin: 0 0 8px;
  color: #fff7ed;
}

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

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

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

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

  .hero-inner,
  .detail-hero,
  .detail-copy {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-nav {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    order: 5;
    width: 100%;
    margin-left: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #1c1917;
  }

  .nav-links.is-open {
    display: grid;
    gap: 12px;
  }

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

  .hero h1 {
    font-size: 42px;
  }

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

  .category-grid,
  .footer-inner,
  .search-controls {
    grid-template-columns: 1fr;
  }

  .section-title {
    display: block;
  }

  .ranking-item {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }

  .ranking-item .btn-soft {
    grid-column: 1 / -1;
  }
}
