:root {
  --pink: #ec4899;
  --pink-dark: #be185d;
  --purple: #8b5cf6;
  --purple-deep: #581c87;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #fdf2f8;
  --line: rgba(139, 92, 246, 0.18);
  --shadow: 0 18px 45px rgba(88, 28, 135, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fdf2f8 0%, #f5f3ff 48%, #eff6ff 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--pink) 0%, var(--purple) 55%, var(--blue) 100%);
  box-shadow: 0 12px 28px rgba(88, 28, 135, 0.25);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 22px;
}

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: #fff;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  background: linear-gradient(120deg, var(--pink), var(--purple), var(--blue));
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(76, 5, 65, 0.94), rgba(88, 28, 135, 0.82), rgba(30, 64, 175, 0.76));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 38px;
  align-items: center;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #fde68a;
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.hero-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.hero-search,
.page-search {
  position: relative;
  flex: 1 1 280px;
}

.hero-search input,
.page-search input,
.filter-select {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  outline: 0;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.12);
}

.filter-select {
  max-width: 180px;
  border-radius: 16px;
  background: #fff;
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 15px 30px rgba(236, 72, 153, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 42px rgba(139, 92, 246, 0.34);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.hero-panel {
  border-radius: 28px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.26);
}

.hero-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.hero-focus-item {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-focus-item:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateX(3px);
}

.hero-focus-item img {
  width: 94px;
  height: 62px;
  object-fit: cover;
  border-radius: 13px;
  background: linear-gradient(120deg, var(--pink), var(--purple));
}

.hero-focus-item strong {
  display: block;
  margin-bottom: 6px;
}

.hero-focus-item span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

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

.page-hero {
  padding: 58px 0 22px;
}

.page-hero h1,
.section-title h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.page-hero p,
.section-title p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section {
  padding: 42px 0;
}

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

.section-title-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: var(--shadow);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(88, 28, 135, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.72);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.movie-card.hidden {
  display: none;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.25s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.7));
  opacity: 0.78;
}

.duration,
.play-mark {
  position: absolute;
  z-index: 2;
  color: #fff;
}

.duration {
  right: 12px;
  bottom: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
}

.play-mark {
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%) scale(0.84);
  opacity: 0;
  transition: 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  min-height: 48px;
  font-weight: 800;
  line-height: 1.45;
  color: #111827;
}

.card-title:hover {
  color: var(--pink-dark);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3e8ff;
}

.card-desc {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
}

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

.category-card {
  position: relative;
  min-height: 156px;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.9), rgba(139, 92, 246, 0.92), rgba(59, 130, 246, 0.88));
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -38px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 2;
  margin: 0 0 10px;
}

.category-card p {
  position: relative;
  z-index: 2;
  margin: 0;
  color: rgba(255, 255, 255, 0.83);
  line-height: 1.65;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px minmax(120px, 180px) 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 26px rgba(88, 28, 135, 0.09);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}

.rank-item img {
  width: 180px;
  height: 102px;
  border-radius: 15px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
}

.rank-item h3 {
  margin: 0 0 7px;
  font-size: 20px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
}

.movie-card-horizontal .card-cover {
  aspect-ratio: auto;
  min-height: 100%;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  filter: blur(9px) saturate(1.08);
  transform: scale(1.05);
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(76, 29, 149, 0.84), rgba(30, 64, 175, 0.72));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  align-items: center;
}

.poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
}

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.1;
}

.detail-info p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.85;
  font-size: 17px;
}

.player-card,
.content-card {
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.player-stage {
  position: relative;
  background: #050508;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(236, 72, 153, 0.14), rgba(5, 5, 8, 0.62));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay button {
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 20px 50px rgba(236, 72, 153, 0.35);
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 14px;
}

.content-card p {
  margin: 0 0 18px;
  color: #374151;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.site-footer {
  margin-top: 48px;
  color: #fff;
  background: linear-gradient(120deg, #111827, #581c87 56%, #111827);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 34px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.footer-grid p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

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

.footer-grid a {
  display: block;
  margin: 9px 0;
  color: rgba(255, 255, 255, 0.72);
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  color: rgba(255, 255, 255, 0.62);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

.empty-message {
  display: none;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
}

.empty-message.show {
  display: block;
}

@media (max-width: 980px) {
  .hero-content,
  .detail-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    margin-bottom: 36px;
  }

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

  .rank-item {
    grid-template-columns: 48px 126px 1fr;
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .rank-item img {
    width: 126px;
    height: 82px;
  }
}

@media (max-width: 720px) {
  .nav-shell {
    min-height: 62px;
  }

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

  .nav-links {
    position: absolute;
    top: 62px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    min-height: 620px;
    padding: 38px 0;
  }

  .hero-panel {
    display: none;
  }

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

  .movie-card-horizontal {
    grid-template-columns: 1fr;
  }

  .detail-wrap {
    padding: 36px 0;
  }

  .poster {
    max-width: 260px;
  }

  .rank-item {
    grid-template-columns: 42px 1fr;
  }

  .rank-item img {
    display: none;
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }

  .section-title {
    display: block;
  }
}
