:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --purple: #7c3aed;
  --pink: #db2777;
  --red: #dc2626;
  --orange: #ea580c;
  --blue: #2563eb;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #581c87 50%, #0f172a);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand {
  color: #fff;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 10px 24px rgba(219, 39, 119, 0.32);
  font-size: 14px;
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(90deg, #d8b4fe, #f9a8d4);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #e5e7eb;
  padding: 10px 13px;
  border-radius: 999px;
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  padding: 11px 15px;
  outline: none;
  color: var(--ink);
  background: #fff;
}

.header-search input {
  width: 220px;
}

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.filter-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.20);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(124, 58, 237, 0.30);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.mobile-inner {
  padding: 14px 0 18px;
  display: grid;
  gap: 10px;
}

.mobile-link {
  color: #e5e7eb;
  padding: 9px 0;
}

.hero {
  position: relative;
  height: min(82vh, 760px);
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #581c87 45%, #831843);
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.08);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 35%, rgba(236, 72, 153, 0.28), transparent 28%), linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(88, 28, 135, 0.74), rgba(15, 23, 42, 0.30));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 42px;
  color: #fff;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.82);
  padding: 8px 15px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.meta-line,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.tag-cloud span,
.filter-chip,
.card-tags span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 11px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-card {
  align-self: center;
  border-radius: 28px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transform: rotate(2deg);
}

.hero-card img {
  position: static;
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  opacity: 1;
  border-radius: 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.section {
  padding: 72px 0;
}

.section-light {
  background: #fff;
}

.section-warm {
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

.section-cool {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section-rose {
  background: linear-gradient(135deg, #fff1f2, #faf5ff);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

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

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

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

.card-link,
.wide-link,
.category-card,
.rank-card,
.stat-card,
.info-panel {
  display: block;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover,
.wide-link:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b, #831843);
}

.poster-wrap img,
.wide-cover img,
.detail-cover img,
.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-link:hover .poster-wrap img,
.wide-link:hover .wide-cover img,
.rank-card:hover .rank-poster img {
  transform: scale(1.08);
}

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.card-badge,
.watch-pill,
.rank-num {
  position: absolute;
  z-index: 2;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  left: 12px;
  top: 12px;
  background: rgba(124, 58, 237, 0.92);
  padding: 5px 9px;
}

.watch-pill {
  right: 12px;
  bottom: 12px;
  background: rgba(220, 38, 38, 0.92);
  padding: 7px 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.card-link:hover .watch-pill {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.card-body strong,
.wide-body strong {
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink);
}

.card-desc,
.wide-body em {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  font-style: normal;
}

.card-meta,
.meta-line {
  color: #64748b;
  font-size: 13px;
}

.wide-link {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
}

.wide-cover {
  display: block;
  width: 132px;
  height: 132px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b, #831843);
}

.wide-body {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 9px;
}

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

.category-card {
  padding: 24px;
  border: 1px solid rgba(124, 58, 237, 0.08);
  position: relative;
  isolation: isolate;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at top right, rgba(219, 39, 119, 0.13), transparent 34%);
}

.category-card h2,
.category-card h3,
.info-panel h2,
.info-panel h3 {
  margin: 0 0 10px;
}

.category-card p,
.info-panel p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

.category-card span {
  display: inline-block;
  margin-top: 18px;
  color: var(--purple);
  font-weight: 800;
}

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px 96px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  align-items: center;
}

.rank-num {
  position: static;
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 20px;
}

.rank-poster {
  width: 96px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b, #831843);
}

.rank-body h3 {
  margin: 0 0 9px;
}

.rank-body p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 10px;
}

.page-hero {
  padding: 64px 0;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  color: #fff;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 4vw, 54px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.75;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 16px;
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  margin-bottom: 28px;
}

.filter-input {
  min-width: min(420px, 100%);
  flex: 1;
}

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

.no-results {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: 18px;
}

.detail-hero {
  background: linear-gradient(135deg, #0f172a, #581c87 55%, #831843);
  color: #fff;
  padding: 34px 0 64px;
}

.breadcrumbs {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  margin-bottom: 28px;
}

.breadcrumbs a:hover {
  color: #fff;
}

.detail-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #1e1b4b, #831843);
}

.detail-cover img {
  aspect-ratio: 3 / 4;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
}

.detail-copy p {
  font-size: 18px;
  line-height: 1.85;
  color: #e5e7eb;
}

.tag-cloud,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.player-section {
  background: #0b1020;
  padding: 56px 0;
}

.player-shell {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

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

.player-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.24), rgba(0, 0, 0, 0.65));
}

.player-shell.is-playing .player-poster {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 20px 45px rgba(219, 39, 119, 0.38);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}

.info-panel {
  padding: 28px;
  margin-bottom: 24px;
}

.info-panel p {
  margin-top: 12px;
}

.sidebar-card {
  position: sticky;
  top: 92px;
}

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

.stat-card {
  padding: 24px;
}

.stat-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}

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

.image-missing {
  visibility: hidden;
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero-card {
    display: none;
  }

  .poster-grid,
  .poster-grid.compact,
  .category-grid,
  .wide-grid,
  .stats-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-card {
    position: static;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 18px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 78px;
  }

  .hero-actions,
  .section-heading,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn,
  .filter-btn,
  .filter-input,
  .filter-select {
    width: 100%;
  }

  .poster-grid,
  .poster-grid.compact,
  .category-grid,
  .wide-grid,
  .stats-grid,
  .related-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body strong {
    font-size: 15px;
  }

  .card-desc {
    display: none;
  }

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

  .rank-card {
    grid-template-columns: 48px 76px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-num {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .rank-poster {
    width: 76px;
    height: 98px;
  }

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

  .play-button {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
