:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(250, 204, 21, 0.18);
  --gold: #facc15;
  --amber: #f59e0b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --danger: #fb7185;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(250, 204, 21, 0.14), transparent 32rem),
    radial-gradient(circle at 90% 12%, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 78%);
  z-index: -1;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #0f172a;
  box-shadow: 0 0 34px rgba(250, 204, 21, 0.32);
  font-size: 15px;
}

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

.nav-link,
.mobile-nav-link {
  color: var(--soft);
  border: 1px solid transparent;
  transition: all 0.24s ease;
}

.nav-link {
  padding: 9px 15px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--gold);
  background: rgba(250, 204, 21, 0.09);
  border-color: rgba(250, 204, 21, 0.22);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.mobile-search input {
  width: 230px;
  padding: 10px 14px;
  color: #fff;
  outline: none;
  background: transparent;
}

.header-search button,
.mobile-search button {
  align-self: stretch;
  padding: 0 16px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  font-weight: 800;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  font-size: 24px;
}

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

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid rgba(250, 204, 21, 0.16);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.08) contrast(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(250, 204, 21, 0.18), transparent 24rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(15, 23, 42, 0.18) 70%),
    linear-gradient(0deg, #020617 0%, transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 3;
  min-height: 620px;
  display: flex;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.hero-copy {
  width: min(680px, 100%);
  animation: slide-in 560ms ease both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 18px;
  color: var(--gold);
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 999px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 620px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.85;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 30px;
}

.hero-meta span,
.badge,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
}

.hero-meta span,
.badge {
  padding: 9px 12px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: all 0.24s ease;
}

.btn-primary {
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  box-shadow: 0 16px 40px rgba(250, 204, 21, 0.18);
}

.btn-secondary {
  color: var(--gold);
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.26);
}

.btn-ghost {
  color: var(--soft);
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.01);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: all 0.24s ease;
}

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

.main-section {
  padding: 64px 0;
}

.section-muted {
  background: rgba(15, 23, 42, 0.34);
  border-block: 1px solid rgba(250, 204, 21, 0.08);
}

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

.section-title small {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  font-weight: 900;
}

.section-title p,
.page-title p {
  max-width: 760px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(250, 204, 21, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.68));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: all 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(250, 204, 21, 0.38);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32), 0 0 38px rgba(250, 204, 21, 0.08);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 23;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.86);
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 42px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(250, 204, 21, 0.92);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}

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

.movie-card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

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

.movie-card p {
  min-height: 50px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

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

.tag-row span {
  padding: 7px 9px;
  color: var(--gold);
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.14);
}

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(250, 204, 21, 0.16);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.08), rgba(15, 23, 42, 0.72));
  transition: all 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(250, 204, 21, 0.42);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.14), rgba(15, 23, 42, 0.86));
}

.category-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  font-size: 24px;
  font-weight: 900;
}

.category-card strong {
  color: #fff;
  font-size: 20px;
}

.category-card p {
  color: var(--muted);
  line-height: 1.65;
}

.category-samples {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.category-samples a {
  color: var(--soft);
  font-size: 13px;
}

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

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 28px;
}

.rank-panel,
.info-panel,
.player-panel,
.filter-panel {
  border: 1px solid rgba(250, 204, 21, 0.14);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.22);
}

.rank-panel {
  padding: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 72px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  transition: all 0.2s ease;
}

.rank-row:hover {
  background: rgba(30, 41, 59, 0.68);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  font-weight: 900;
}

.rank-row img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  color: #fff;
  font-size: 16px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-text em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-arrow {
  color: var(--gold);
  font-size: 26px;
}

.page-hero {
  padding: 56px 0 30px;
}

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

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

.filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 28px;
}

.filter-panel input,
.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  outline: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.player-panel {
  overflow: hidden;
}

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

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.7));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-overlay span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  font-size: 34px;
  box-shadow: 0 0 58px rgba(250, 204, 21, 0.34);
}

.player-caption {
  padding: 20px;
}

.player-caption h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
  font-weight: 900;
}

.player-caption p {
  color: var(--muted);
  line-height: 1.8;
}

.info-panel {
  position: sticky;
  top: 92px;
  overflow: hidden;
}

.info-panel img {
  width: 100%;
  aspect-ratio: 16 / 23;
  object-fit: cover;
}

.info-body {
  padding: 20px;
}

.info-body h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 900;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.story-block {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid rgba(250, 204, 21, 0.12);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
}

.story-block h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.story-block p {
  color: var(--soft);
  line-height: 1.9;
}

.quote-line {
  border-left: 4px solid var(--gold);
  color: var(--gold);
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.1), rgba(15, 23, 42, 0));
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 28px 0;
}

.search-box button {
  min-width: 110px;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  font-weight: 900;
}

.search-empty {
  padding: 46px;
  text-align: center;
  color: var(--muted);
  border: 1px solid rgba(250, 204, 21, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid rgba(250, 204, 21, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 36px 0;
}

.footer-logo {
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: start;
  justify-content: flex-end;
}

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

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

.footer-bottom {
  padding: 16px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(250, 204, 21, 0.08);
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .rank-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .info-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header-inner {
    min-height: 64px;
  }

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

  .hero p {
    font-size: 16px;
  }

  .section-head,
  .footer-grid {
    display: block;
  }

  .section-actions,
  .footer-links {
    margin-top: 18px;
    justify-content: flex-start;
  }

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

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

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    min-height: 0;
    font-size: 13px;
  }

  .rank-row {
    grid-template-columns: 36px 58px minmax(0, 1fr) 12px;
    gap: 10px;
    padding: 10px;
  }

  .rank-row img {
    width: 58px;
    height: 78px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .detail-actions {
    display: grid;
  }

  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
  }
}
