:root {
  --page-bg: #fff7fd;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(148, 163, 184, 0.25);
  --primary: #ef4444;
  --pink: #ec4899;
  --purple: #8b5cf6;
  --orange: #f97316;
  --blue: #0ea5e9;
  --green: #10b981;
  --card: rgba(255, 255, 255, 0.94);
  --shadow: 0 18px 45px rgba(88, 28, 135, 0.13);
  --shadow-hover: 0 26px 70px rgba(88, 28, 135, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(244, 114, 182, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 32rem),
    linear-gradient(135deg, #fff1f8 0%, #f5f3ff 48%, #eff6ff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, #ef4444, #ec4899, #f97316);
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.25);
}

.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo-symbol {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ef4444;
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), 0 6px 18px rgba(127, 29, 29, 0.25);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fff7ad;
  transform: translateY(-1px);
}

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

.top-search input,
.mobile-search input,
.search-panel input {
  width: 245px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.9);
  padding: 11px 16px;
  outline: none;
  color: #111827;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.top-search button,
.mobile-search button,
.search-panel button,
.hero-button,
.secondary-button,
.play-overlay,
.pager-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.top-search button,
.mobile-search button {
  padding: 10px 16px;
  color: #7e22ce;
  background: #fff;
}

.nav-toggle {
  display: none;
  color: #fff;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 9px 12px;
  font-weight: 800;
}

.mobile-nav {
  padding: 0 16px 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.12);
}

.mobile-nav nav {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.mobile-nav a {
  color: #374151;
}

.hero-carousel {
  position: relative;
  height: min(640px, calc(100vh - 68px));
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.56) 48%, rgba(17, 24, 39, 0.22) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.12) 70%);
  z-index: 1;
}

.hero-slide .container {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 74px;
}

.hero-copy {
  max-width: 720px;
  color: #fff;
}

.hero-eyebrow,
.card-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fef3c7;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 14px 0 14px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 950;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

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

.hero-meta,
.detail-meta,
.card-meta,
.rank-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.tag-list span,
.card-meta span,
.rank-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

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

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  color: #fff;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.34);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  color: #111827;
  background: rgba(255, 255, 255, 0.9);
}

.hero-button:hover,
.secondary-button:hover,
.play-overlay:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 42px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

.page-main {
  padding: 52px 0 76px;
}

.section {
  margin-top: 64px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 950;
  line-height: 1.15;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head p,
.page-title p {
  margin: 10px 0 0;
  max-width: 780px;
  color: var(--muted);
  line-height: 1.8;
}

.view-more {
  color: #7c3aed;
  font-weight: 900;
  white-space: nowrap;
}

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

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 280px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.movie-card {
  scroll-snap-align: start;
  background: var(--card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(88, 28, 135, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

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

.movie-card-link {
  display: block;
  height: 100%;
}

.card-cover {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(236, 72, 153, 0.92), rgba(139, 92, 246, 0.92)),
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.35), transparent 12rem);
}

.card-poster .card-cover,
.library-grid .card-cover {
  aspect-ratio: 2 / 3;
}

.card-cover img,
.category-tile img,
.ranking-item img,
.related-card img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

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

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(10px);
}

.card-content {
  padding: 17px;
}

.card-kicker {
  color: #ec4899;
  margin-bottom: 8px;
}

.card-content h3 {
  margin: 0 0 9px;
  color: #1f2937;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta span {
  color: #6b7280;
  background: #f3f4f6;
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
  background: #111827;
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.68;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.18));
}

.category-tile span,
.category-tile h2,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 900;
}

.category-tile h2 {
  margin: 14px 0 8px;
  font-size: 24px;
  font-weight: 950;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.ranking-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 24px;
}

.ranking-list,
.ranking-board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ranking-list {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.ranking-item a {
  display: grid;
  grid-template-columns: 42px 92px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-item a:hover {
  background: linear-gradient(90deg, #faf5ff, #fdf2f8);
  transform: translateX(4px);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 950;
  background: #9ca3af;
}

.rank-gold .rank-number {
  background: linear-gradient(135deg, #facc15, #d97706);
}

.rank-silver .rank-number {
  background: linear-gradient(135deg, #e5e7eb, #6b7280);
}

.rank-bronze .rank-number {
  background: linear-gradient(135deg, #fb923c, #c2410c);
}

.ranking-item img {
  width: 92px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #1f2937;
  font-weight: 900;
}

.rank-info em {
  margin-top: 3px;
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

.rank-heat {
  color: #ec4899;
  font-weight: 950;
}

.search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.search-panel input {
  width: min(420px, 100%);
  border-color: rgba(139, 92, 246, 0.2);
  background: #fff;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  color: #4b5563;
  background: #f3f4f6;
  cursor: pointer;
  font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  background: linear-gradient(90deg, #ef4444, #ec4899);
}

.page-title {
  padding: 46px 0 10px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #6b7280;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 42px 0 80px;
}

.detail-main,
.detail-sidebar,
.content-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.detail-main {
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #030712;
  overflow: hidden;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  padding: 16px 28px;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.96), rgba(139, 92, 246, 0.96));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  z-index: 3;
}

.play-overlay[hidden] {
  display: none;
}

.play-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.player-state {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 4;
  color: #fff;
  font-size: 14px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.detail-body {
  padding: 30px;
}

.detail-title h1 {
  margin-bottom: 16px;
}

.detail-meta span {
  color: #4b5563;
  background: #f3f4f6;
  backdrop-filter: none;
}

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

.detail-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.detail-section h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 24px;
  font-weight: 950;
}

.detail-section p {
  margin: 0;
  color: #4b5563;
  line-height: 1.9;
  font-size: 16px;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.detail-facts div {
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #faf5ff, #fdf2f8);
}

.detail-facts span {
  display: block;
  color: #6b7280;
  font-size: 13px;
}

.detail-facts strong {
  display: block;
  margin-top: 5px;
  color: #1f2937;
}

.detail-sidebar {
  position: sticky;
  top: 94px;
  padding: 20px;
  height: fit-content;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tag-list span {
  color: #6d28d9;
  background: #f5f3ff;
  backdrop-filter: none;
}

.related-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.related-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}

.related-card figure {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.related-card strong,
.related-card span {
  display: block;
}

.related-card strong {
  color: #1f2937;
  font-size: 14px;
  line-height: 1.45;
}

.related-card span {
  color: #6b7280;
  font-size: 12px;
  margin-top: 5px;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.content-card p {
  color: #6b7280;
  line-height: 1.8;
}

.no-results {
  display: none;
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  color: #6b7280;
  text-align: center;
  box-shadow: var(--shadow);
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  color: #dbeafe;
  background: linear-gradient(90deg, #581c87, #1e3a8a, #312e81);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-grid p {
  max-width: 430px;
  color: rgba(219, 234, 254, 0.82);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fde68a;
  font-size: 18px;
  font-weight: 950;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(219, 234, 254, 0.74);
  text-align: center;
}

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

  .nav-toggle {
    display: inline-flex;
  }

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

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

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

  .detail-sidebar {
    position: static;
  }
}

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

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

  .hero-carousel {
    min-height: 560px;
  }

  .hero-slide .container {
    padding-bottom: 92px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
  }

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

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

  .ranking-item a {
    grid-template-columns: 34px 74px 1fr;
  }

  .rank-heat {
    display: none;
  }

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

  .detail-body {
    padding: 22px;
  }

  .detail-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .library-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-search input {
    width: 100%;
  }

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

  .hero-button,
  .secondary-button {
    width: 100%;
  }
}
