
:root {
  --bg: #070b14;
  --bg-soft: #0d1220;
  --panel: rgba(13, 18, 32, 0.86);
  --panel-strong: #121a2e;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eefc;
  --muted: #9ba8c7;
  --brand: #7c5cff;
  --brand-2: #31d0c6;
  --brand-3: #ffb74a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.14), transparent 35%),
    radial-gradient(circle at top right, rgba(49, 208, 198, 0.11), transparent 28%),
    linear-gradient(180deg, #050811 0%, #0a1020 42%, #070b14 100%);
  color: var(--text);
  font-family: "Noto Sans CJK SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(6, 10, 18, 0.72);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
  display: grid;
  place-items: center;
  color: white;
  font-size: 20px;
}

.brand strong {
  font-size: 1.02rem;
}

.brand span {
  color: var(--muted);
  font-size: 0.86rem;
  display: block;
  font-weight: 500;
}

.nav-toggle {
  margin-left: auto;
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

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

.site-nav a {
  padding: 11px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.2s ease;
  border: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  min-width: 280px;
}

.nav-search input {
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
}

.nav-search button,
.btn,
.chip,
.tab-btn {
  border: 0;
  cursor: pointer;
}

.nav-search button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
}

.mobile-nav {
  display: none;
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 11px 0;
  color: var(--muted);
}

.hero {
  padding: 26px 0 18px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 12px);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 26, 46, 0.92), rgba(10, 15, 28, 0.94));
  box-shadow: var(--shadow);
}

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

.hero-slide {
  display: none;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 24px;
  min-height: 560px;
  padding: 28px;
  align-items: stretch;
}

.hero-slide.active {
  display: grid;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 12px 24px 12px;
}

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #dfe8ff;
  font-size: 0.9rem;
  letter-spacing: 0.4px;
  margin-bottom: 18px;
}

.hero-kicker .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 0 0 6px rgba(49, 208, 198, 0.12);
}

.hero h1,
.hero h2 {
  font-size: clamp(2rem, 5vw, 4.7rem);
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.03em;
}

.hero p {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 64ch;
  margin: 18px 0 0;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d9e5ff;
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  transition: 0.2s ease;
  color: white;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 30px rgba(49, 208, 198, 0.15);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
}

.btn:hover,
.chip:hover,
.movie-card:hover {
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 12px 0 12px 12px;
}

.hero-poster {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-poster img,
.hero-poster video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 10, 18, 0.1) 55%, rgba(6, 10, 18, 0.7) 100%);
}

.hero-badge {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(8, 11, 18, 0.55);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-badge strong {
  display: block;
  font-size: 1.03rem;
  margin-bottom: 4px;
}

.hero-badge span {
  color: var(--muted);
  font-size: 0.9rem;
}

.slider-actions {
  position: absolute;
  inset: auto 18px 18px auto;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  cursor: pointer;
}

.section {
  padding: 22px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: 1.55rem;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: #cbe3ff;
  font-size: 0.95rem;
}

.stats-grid,
.category-grid,
.movie-grid,
.rank-list,
.filter-row {
  display: grid;
  gap: 14px;
}

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

.stat-card,
.panel,
.movie-card,
.category-card,
.rank-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.stat-card span {
  color: var(--muted);
}

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

.category-card {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.24), transparent 70%);
}

.category-card strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

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

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

.movie-card {
  overflow: hidden;
  transition: 0.24s ease;
}

.movie-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-body {
  padding: 14px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-excerpt {
  margin: 10px 0 0;
  color: #b8c5e0;
  font-size: 0.9rem;
}

.movie-card .movie-badges {
  position: absolute;
  inset: 12px auto auto 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(7, 11, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 0.76rem;
  backdrop-filter: blur(10px);
}

.page-hero {
  padding: 24px 0 8px;
}

.page-hero .panel {
  padding: 22px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.page-hero p {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 75ch;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.filter-bar input {
  min-width: min(100%, 320px);
}

.filter-bar select {
  min-width: 160px;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.breadcrumbs a {
  color: #d3e1ff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
}

.detail-side,
.detail-main {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-side {
  padding: 18px;
  position: sticky;
  top: 98px;
  height: fit-content;
}

.detail-poster {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
}

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

.detail-meta {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  padding-bottom: 8px;
}

.meta-row span:first-child {
  color: var(--muted);
}

.meta-row span:last-child {
  text-align: right;
}

.detail-main {
  padding: 22px;
}

.detail-main h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.14;
}

.detail-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.16);
  color: #efe9ff;
  border: 1px solid rgba(124, 92, 255, 0.25);
  margin-bottom: 14px;
}

.detail-blurb {
  color: #bfd0f4;
  font-size: 1.01rem;
  margin-bottom: 16px;
}

.detail-section {
  margin-top: 20px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.detail-section p {
  margin: 0;
  color: #c6d2ec;
}

.player-shell {
  border-radius: 22px;
  overflow: hidden;
  background: #02040a;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 60px rgba(0,0,0,0.34);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

.tab-btn {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.related-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

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

.related-card .cap {
  padding: 12px;
}

.site-footer {
  padding: 28px 0 36px;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.footer-grid h3 {
  margin: 0 0 10px;
  color: var(--text);
}

.footer-links a {
  display: block;
  color: var(--muted);
  padding: 4px 0;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  border: 0;
  box-shadow: var(--shadow);
  display: none;
}

.back-to-top.show {
  display: grid;
  place-items: center;
}

.search-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
}

.search-filters {
  position: sticky;
  top: 98px;
  height: fit-content;
}

.search-results {
  min-height: 300px;
}

.loading {
  padding: 48px 18px;
  text-align: center;
  color: var(--muted);
}

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

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

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

  .detail-side,
  .search-filters {
    position: static;
  }
}

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

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-nav.open {
    display: block;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 18px;
  }

  .hero-slider {
    min-height: auto;
  }

  .hero-visual {
    padding: 0 12px 12px;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 20px), var(--max));
  }

  .hero h1,
  .hero h2 {
    font-size: 2.05rem;
  }

  .movie-grid,
  .category-grid,
  .stats-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar input,
  .filter-bar select {
    width: 100%;
    min-width: 0;
  }
}
