:root {
  --bg: #07111f;
  --bg-2: #0a1929;
  --panel: rgba(15, 28, 48, 0.78);
  --panel-2: rgba(10, 18, 32, 0.88);
  --line: rgba(255,255,255,0.08);
  --text: #f4f7fb;
  --muted: #b8c3d5;
  --muted-2: #7f8da6;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --accent-soft: rgba(245, 158, 11, 0.18);
  --shadow: 0 24px 70px rgba(0,0,0,.42);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245,158,11,.12), transparent 32%),
    radial-gradient(circle at top right, rgba(59,130,246,.10), transparent 28%),
    linear-gradient(180deg, #09111d 0%, #07111f 42%, #040911 100%);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.36), transparent 75%);
  opacity: .55;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }
button { cursor: pointer; }

.site-shell {
  position: relative;
  z-index: 1;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  background: rgba(6, 13, 24, .72);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 80px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  flex: 0 0 auto;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #ff7a18);
  color: #111827;
  box-shadow: 0 12px 30px rgba(245,158,11,.28);
}
.brand-text {
  line-height: 1.05;
}
.brand-text strong {
  display: block;
  font-size: 1.12rem;
}
.brand-text span {
  color: var(--muted-2);
  font-size: .8rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: .2s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255,255,255,.06);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.searchbar {
  width: min(360px, 36vw);
  position: relative;
}
.searchbar input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 999px;
  padding: 14px 18px 14px 46px;
  outline: none;
  transition: .2s ease;
}
.searchbar input:focus {
  border-color: rgba(245,158,11,.45);
  box-shadow: 0 0 0 4px rgba(245,158,11,.12);
}
.searchbar svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted-2);
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  color: var(--text);
}

.hero {
  margin-top: 22px;
}
.hero-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 36px;
  background:
    radial-gradient(circle at 20% 20%, rgba(245,158,11,.22), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(59,130,246,.18), transparent 24%),
    linear-gradient(135deg, rgba(12,20,35,.98), rgba(8,15,28,.94) 46%, rgba(13,24,44,.98));
  box-shadow: var(--shadow);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
  padding: 30px;
  min-height: 620px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 12px 10px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.18);
  color: #ffd58f;
  font-size: .92rem;
}
.hero h1, .section-title h2, .page-title h1, .detail-title h1 {
  margin: 0;
  line-height: 1.08;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.9rem);
  letter-spacing: -.03em;
  max-width: 11ch;
}
.hero p {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.85;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: .22s ease;
  font-weight: 700;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1b1302;
  box-shadow: 0 16px 36px rgba(245,158,11,.22);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-secondary {
  background: rgba(255,255,255,.05);
  border-color: var(--line);
  color: var(--text);
}
.btn-secondary:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }

.hero-tags, .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: .2s ease;
}
.chip:hover {
  color: var(--text);
  border-color: rgba(245,158,11,.26);
  background: rgba(245,158,11,.08);
}

.hero-features {
  display: grid;
  gap: 14px;
  align-content: center;
}
.hero-slide {
  position: relative;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 16px;
  padding: 20px;
  border-radius: 28px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  min-height: 240px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: .45s ease;
  pointer-events: none;
  position: absolute;
  inset: 0;
}
.hero-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.hero-slides {
  position: relative;
  min-height: 624px;
}
.hero-slide .poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  background: rgba(255,255,255,.05);
}
.hero-slide .poster img,
.movie-card .poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide .poster { aspect-ratio: 4 / 5; }
.hero-article {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.hero-article h3 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.12;
}
.hero-article p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-2);
  font-size: .92rem;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
}

.section {
  margin-top: 26px;
}
.section-title, .page-title, .detail-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 16px;
}
.section-title h2, .page-title h1, .detail-title h1 {
  font-size: clamp(1.4rem, 2.8vw, 2.35rem);
}
.section-title p, .page-title p, .detail-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 62ch;
}

.panel {
  background: rgba(10, 19, 34, .74);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-inner {
  padding: 24px;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.movie-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  transition: .22s ease;
  min-width: 0;
}
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245,158,11,.28);
  box-shadow: 0 16px 34px rgba(0,0,0,.24);
}
.movie-card .poster {
  aspect-ratio: 4 / 5.4;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.05);
  position: relative;
}
.movie-card .poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.22));
}
.movie-card .title {
  font-weight: 800;
  line-height: 1.4;
  font-size: 1rem;
}
.movie-card .sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-2);
  font-size: .85rem;
}
.movie-card .desc {
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.65;
  margin-top: -2px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.toolbar .searchbar {
  flex: 1 1 320px;
  width: auto;
}
.count {
  color: var(--muted-2);
  font-size: .92rem;
}

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

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.pager a, .pager span {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--muted);
}
.pager a.active, .pager span.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #201400;
  border-color: transparent;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}
.detail-poster {
  aspect-ratio: 4 / 5.4;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
}
.detail-aside {
  display: grid;
  gap: 16px;
}
.info-list {
  display: grid;
  gap: 12px;
}
.info-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.info-item strong {
  color: var(--muted-2);
  font-size: .92rem;
}
.info-item span {
  color: var(--text);
  line-height: 1.55;
}

.story, .review {
  line-height: 1.9;
  color: var(--muted);
  font-size: 1.01rem;
}
.story strong, .review strong {
  color: var(--text);
}

.player-shell {
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
}
.player-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.player-top strong {
  font-size: 1.02rem;
}
.player-top span {
  color: var(--muted-2);
  font-size: .92rem;
}
.player-stage {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}
.player-stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}
.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.play-button {
  pointer-events: auto;
  width: 86px;
  height: 86px;
  border: none;
  border-radius: 999px;
  background: rgba(245,158,11,.90);
  color: #111827;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 40px rgba(245,158,11,.24);
  transition: .2s ease;
}
.play-button:hover { transform: scale(1.05); }
.player-note {
  padding: 14px 20px 18px;
  color: var(--muted);
  font-size: .92rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

.taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.taglist .chip {
  font-size: .92rem;
}

.footer {
  margin: 34px 0 18px;
  padding: 22px 0 8px;
  color: var(--muted-2);
  text-align: center;
  line-height: 1.8;
}
.footer strong { color: var(--text); }

.group-title {
  margin: 20px 0 14px;
  font-size: 1.18rem;
}
.genre-rail {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.genre-rail .chip { white-space: nowrap; }

.fade-up {
  animation: fadeUp .55s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
  .hero-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .hero-slides { min-height: 520px; }
  .movie-grid, .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .topbar-inner {
    min-height: 72px;
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .nav-links {
    display: none;
    width: 100%;
    order: 3;
    padding-bottom: 4px;
  }
  .nav-links.open { display: flex; }
  .searchbar { width: 100%; max-width: none; }
  .menu-btn { display: inline-grid; place-items: center; }
  .hero-grid { padding: 18px; }
  .hero-shell { border-radius: 28px; }
  .movie-grid, .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-slide { grid-template-columns: 1fr; min-height: 420px; }
  .hero-slides { min-height: 760px; }
}
@media (max-width: 560px) {
  .site-shell, .topbar-inner { width: calc(100% - 20px); }
  .hero-grid, .panel-inner { padding: 14px; }
  .movie-grid, .catalog-grid { grid-template-columns: 1fr; }
  .section-title, .page-title, .detail-title {
    flex-direction: column;
    align-items: start;
  }
  .player-top {
    flex-direction: column;
    align-items: start;
  }
  .info-item {
    grid-template-columns: 1fr;
  }
}
