:root {
  --pink: #ec4899;
  --pink-dark: #db2777;
  --purple: #8b5cf6;
  --blue: #3b82f6;
  --orange: #f97316;
  --yellow: #facc15;
  --teal: #14b8a6;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: rgba(148, 163, 184, 0.28);
  --shadow: 0 18px 45px rgba(31, 41, 55, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #fff1f2 0%, #faf5ff 42%, #eff6ff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

#ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.32;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.25);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7c2d12;
  background: linear-gradient(135deg, #fde047, #fb923c);
  box-shadow: inset 0 -2px 8px rgba(0, 0, 0, 0.12);
  font-size: 16px;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.88);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.mobile-nav-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-nav-button span {
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

.mobile-nav a {
  display: block;
  color: #fff;
  padding: 12px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 700;
}

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

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

.hero {
  background: linear-gradient(90deg, rgba(252, 231, 243, 0.9), rgba(237, 233, 254, 0.9), rgba(219, 234, 254, 0.9));
  padding: 56px 0;
  overflow: hidden;
}

.hero-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 42px;
  align-items: center;
}

.hero-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(40px, 5.2vw, 66px);
  line-height: 1.05;
  color: transparent;
  background: linear-gradient(90deg, #db2777, #7c3aed, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #be185d;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(236, 72, 153, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}

.hero-copy p {
  margin: 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.35);
}

.btn-secondary {
  color: #7c3aed;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(124, 58, 237, 0.16);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-focus-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-mini-card {
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(31, 41, 55, 0.08);
}

.hero-mini-card strong {
  display: block;
  color: #374151;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-mini-card span {
  display: block;
  margin-top: 4px;
  color: #8b5cf6;
  font-size: 12px;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  min-height: 440px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(17, 24, 39, 0.28);
  opacity: 0;
  transform: translateX(18px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-slide:hover img {
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 30px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.2) 52%, rgba(0, 0, 0, 0.02));
}

.hero-overlay h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 38px);
}

.hero-overlay p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.hero-dots {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

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

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

.section {
  padding: 58px 0;
}

.section-soft {
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.86), rgba(250, 245, 255, 0.86));
}

.section-warm {
  background: linear-gradient(135deg, rgba(254, 249, 195, 0.62), rgba(252, 231, 243, 0.72), rgba(237, 233, 254, 0.7));
}

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

.section-header h2,
.page-title h1 {
  margin: 0;
  color: transparent;
  background: linear-gradient(90deg, #f97316, #ec4899, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-header p,
.page-title p {
  max-width: 720px;
  margin: 10px 0 0;
  color: #5b6472;
  line-height: 1.8;
}

.more-link {
  color: #7c3aed;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(31, 41, 55, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 44px rgba(31, 41, 55, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111827;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.08);
}

.play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 40px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.04));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
}

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

.movie-card-body h3 {
  margin: 8px 0;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.32;
}

.movie-card-body h3 a:hover,
.list-info h3 a:hover {
  color: #8b5cf6;
}

.movie-card-body p {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-line,
.list-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
}

.movie-meta-line span:first-child {
  color: #fff;
  background: var(--pink);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  color: #7c3aed;
  background: linear-gradient(90deg, #fce7f3, #ede9fe);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.list-stack {
  display: grid;
  gap: 18px;
}

.list-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(31, 41, 55, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.list-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(31, 41, 55, 0.16);
}

.list-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
  background: #111827;
}

.list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 900;
}

.list-info h3 {
  margin: 0 0 10px;
  font-size: 26px;
}

.list-info p {
  margin: 0 0 16px;
  color: #5f6978;
  line-height: 1.75;
}

.horizontal-scroll {
  overflow-x: auto;
  padding-bottom: 18px;
}

.horizontal-track {
  display: flex;
  gap: 20px;
  width: max-content;
}

.horizontal-track .movie-card {
  width: 260px;
  flex: 0 0 auto;
}

.masonry-grid {
  columns: 4 230px;
  column-gap: 22px;
}

.masonry-grid .movie-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  break-inside: avoid;
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 18px 36px rgba(124, 58, 237, 0.24);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #f97316, #ec4899);
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 48px rgba(124, 58, 237, 0.28);
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-tile span {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.page-hero {
  padding: 48px 0 28px;
}

.page-title {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(31, 41, 55, 0.08);
}

.search-field {
  display: grid;
  gap: 8px;
  color: #4b5563;
  font-weight: 800;
}

.search-field input,
.filter-selects select {
  height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  background: #fff;
  color: #374151;
  outline: none;
}

.search-field input {
  padding: 0 16px;
}

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-selects select {
  padding: 0 12px;
}

.empty-state {
  margin: 26px 0;
  padding: 26px;
  border-radius: 20px;
  text-align: center;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.8);
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.rank-card {
  display: grid;
  grid-template-columns: 76px 150px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(31, 41, 55, 0.08);
}

.rank-number {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--pink), var(--orange));
}

.rank-card img {
  width: 150px;
  height: 92px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 10px;
  color: #7c3aed;
  font-size: 13px;
  font-weight: 800;
}

.rank-action {
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  margin: 28px auto 18px;
  width: min(1200px, calc(100% - 32px));
  font-size: 14px;
}

.breadcrumb a {
  color: #7c3aed;
  font-weight: 800;
}

.detail-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  min-height: 440px;
}

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

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info h1 {
  margin: 0 0 16px;
  color: transparent;
  background: linear-gradient(90deg, #db2777, #7c3aed, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.12;
}

.detail-lead {
  margin: 0 0 22px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  margin-bottom: 22px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff;
  color: #6b7280;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(31, 41, 55, 0.06);
}

.player-section,
.detail-content,
.related-section {
  width: min(1200px, calc(100% - 32px));
  margin: 42px auto 0;
}

.player-section h2,
.detail-content h2,
.related-section h2 {
  margin: 0 0 18px;
  color: #1f2937;
  font-size: 30px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 26px 55px rgba(17, 24, 39, 0.28);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-start {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 16px 34px rgba(236, 72, 153, 0.36);
  font-size: 28px;
  cursor: pointer;
}

.player-state {
  position: absolute;
  left: 20px;
  bottom: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.detail-content {
  padding: 34px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(31, 41, 55, 0.09);
}

.detail-content p {
  color: #4b5563;
  line-height: 1.92;
  font-size: 17px;
}

.site-footer {
  margin-top: 72px;
  color: #f9fafb;
  background: linear-gradient(90deg, #111827, #1f2937, #111827);
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 38px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-grid h2 {
  color: transparent;
  background: linear-gradient(90deg, #f472b6, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
}

.footer-grid p {
  color: #d1d5db;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #d1d5db;
}

.footer-links a:hover {
  color: #f9a8d4;
}

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

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  color: #9ca3af;
  border-top: 1px solid rgba(156, 163, 175, 0.24);
  text-align: center;
}

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.all-grid,
  .category-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-visual {
    min-height: 380px;
  }

  .hero-slide img {
    min-height: 380px;
  }

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

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav-button {
    display: inline-flex;
  }

  .site-logo {
    font-size: 20px;
  }

  .hero {
    padding: 34px 0;
  }

  .hero-inner {
    gap: 28px;
  }

  .hero-focus-list,
  .category-tiles,
  .movie-grid,
  .movie-grid.all-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-visual {
    min-height: 320px;
  }

  .hero-slide img {
    min-height: 320px;
  }

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

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

  .list-card,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .rank-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .list-thumb {
    aspect-ratio: 16 / 9;
  }

  .detail-hero,
  .page-title,
  .detail-content {
    padding: 22px;
  }

  .detail-poster {
    min-height: auto;
    aspect-ratio: 3 / 4;
  }

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

@media (max-width: 520px) {
  .container,
  .site-nav,
  .mobile-nav,
  .hero-inner,
  .page-title,
  .breadcrumb,
  .detail-hero,
  .player-section,
  .detail-content,
  .related-section,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1200px);
  }

  .movie-grid,
  .movie-grid.all-grid,
  .category-tiles,
  .hero-focus-list {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

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