:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.72);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(250, 204, 21, 0.35);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --brand: #facc15;
  --brand-strong: #f97316;
  --blue: #38bdf8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --radius: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(250, 204, 21, 0.12), transparent 28rem),
    radial-gradient(circle at 82% 8%, rgba(56, 189, 248, 0.12), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #172033 48%, #0f172a 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 10px 30px rgba(250, 204, 21, 0.3);
  transform: rotate(0deg);
  transition: transform 0.45s ease;
}

.logo:hover .logo-mark {
  transform: rotate(180deg);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.25s ease, background 0.25s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.header-search input {
  width: 180px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 6px 8px;
}

.header-search input::placeholder {
  color: var(--subtle);
}

.header-search button,
.btn,
.filter-form button,
.search-panel button {
  border: 0;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-search button:hover,
.btn:hover,
.filter-form button:hover,
.search-panel button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(249, 115, 22, 0.36);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

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

.mobile-nav {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
}

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

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 86px 0 72px;
}

.star-field {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
    radial-gradient(2px 2px at 60px 70px, #ffffff, transparent),
    radial-gradient(1px 1px at 50px 50px, #ffffff, transparent),
    radial-gradient(1px 1px at 130px 80px, #ffffff, transparent),
    radial-gradient(2px 2px at 90px 10px, #ffffff, transparent);
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: starMove 200s linear infinite;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.92));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 54px;
  align-items: center;
}

.hero-copy {
  max-width: 780px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 14px;
  color: var(--brand);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.1);
  font-weight: 800;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.55rem, 7vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.hero h1 strong {
  color: var(--brand);
}

.hero-lead {
  margin: 24px 0 32px;
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.4vw, 1.42rem);
  line-height: 1.8;
}

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

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-chips a,
.hero-chip {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.hero-chips a:hover {
  color: var(--brand);
  border-color: var(--line-strong);
  background: rgba(250, 204, 21, 0.08);
}

.hero-slider {
  position: relative;
  min-height: 600px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-card {
  position: relative;
  height: 600px;
  overflow: hidden;
  border-radius: 34px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.hero-card img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.02) 0%, rgba(15, 23, 42, 0.38) 40%, rgba(0, 0, 0, 0.88) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 50%);
}

.hero-card-body {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px;
}

.hero-card-body h2 {
  margin: 12px 0 10px;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.12;
}

.hero-card-body p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 32px;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.35);
}

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

.section {
  position: relative;
  padding: 76px 0;
}

.section.alt {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.25));
}

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

.section-head h2,
.page-section h2,
.detail-content h2 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.15;
}

.section-head p,
.page-hero p {
  margin: 0;
  color: var(--subtle);
  line-height: 1.75;
}

.section-more {
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: var(--bg-soft);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.featured-grid .poster-link {
  aspect-ratio: 4 / 5;
  border-radius: 28px;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.86));
  transition: opacity 0.28s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.09);
  filter: saturate(1.12);
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.poster-play {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.34);
}

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

.meta-row,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.meta-row span,
.tag-list span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.featured-grid .movie-card h3 {
  font-size: 1.28rem;
}

.movie-card h3 a {
  transition: color 0.25s ease;
}

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

.movie-card p {
  margin: 0;
  color: var(--subtle);
  font-size: 0.92rem;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

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

.stat-card,
.category-tile,
.content-card,
.detail-box,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.stat-card,
.category-tile {
  padding: 24px;
}

.stat-card strong {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
  font-size: clamp(1.6rem, 4vw, 2.7rem);
}

.stat-card span,
.category-tile p {
  color: var(--subtle);
  line-height: 1.7;
}

.category-tile {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: rgba(250, 204, 21, 0.08);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.page-hero {
  padding: 96px 0 42px;
}

.page-hero h1 {
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  max-width: 920px;
}

.page-hero p {
  max-width: 760px;
  margin-top: 18px;
  font-size: 1.08rem;
}

.filter-form,
.search-panel form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px auto;
  gap: 12px;
  margin: 26px 0 34px;
}

.filter-form input,
.filter-form select,
.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  outline: 0;
  color: var(--text);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(15, 23, 42, 0.8);
}

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

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.pagination a:hover,
.pagination span.current {
  color: #ffffff;
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(249, 115, 22, 0.2));
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 44px;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.86) 50%, rgba(15, 23, 42, 0.72) 100%),
    var(--poster-image) center / cover no-repeat;
  filter: saturate(1.1);
  transform: scale(1.04);
}

.detail-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.detail-cover img {
  height: 100%;
  object-fit: cover;
}

.detail-title h1 {
  margin: 16px 0 16px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-title p {
  max-width: 840px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.8;
}

.player-section {
  padding: 46px 0 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #050816;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.player-shell video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: #050816;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(250, 204, 21, 0.16), transparent 22rem),
    rgba(0, 0, 0, 0.2);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 24px 60px rgba(249, 115, 22, 0.34);
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.player-button:hover {
  transform: scale(1.06);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 36px 0 76px;
}

.detail-box,
.content-card,
.search-panel {
  padding: 28px;
}

.detail-content p,
.detail-box p,
.content-card p {
  color: var(--muted);
  line-height: 1.9;
  font-size: 1rem;
}

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

.side-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  transition: background 0.25s ease;
}

.side-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.side-card img {
  height: 104px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-soft);
}

.side-card strong {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-card span {
  color: var(--subtle);
  font-size: 0.86rem;
}

.search-panel {
  margin-bottom: 34px;
}

.search-results-note {
  margin: 0 0 20px;
  color: var(--subtle);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--subtle);
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  margin: 6px 0;
  transition: color 0.25s ease;
}

.footer-grid a:hover {
  color: var(--brand);
}

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

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  border-top: 1px solid var(--line);
  text-align: center;
}

@keyframes starMove {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-200px);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-18px);
  }
}

.float {
  animation: float 6s ease-in-out infinite;
}

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

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

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

  .hero-slider {
    min-height: 560px;
  }

  .detail-cover {
    max-width: 320px;
  }

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

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

@media (max-width: 760px) {
  .nav-wrap,
  .container,
  .section-inner,
  .footer-grid,
  .footer-bottom,
  .mobile-nav {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    padding-top: 46px;
  }

  .hero-grid {
    gap: 34px;
  }

  .hero-slider,
  .hero-card {
    min-height: auto;
    height: 480px;
  }

  .hero-card-body {
    padding: 24px;
  }

  .featured-grid,
  .category-grid,
  .stat-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: 52px 0;
  }

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

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

  .detail-title h1 {
    font-size: 2.4rem;
  }

  .detail-box,
  .content-card,
  .search-panel {
    padding: 20px;
  }

  .player-button {
    width: 84px;
    height: 84px;
    font-size: 1.8rem;
  }
}
