:root {
  --page-bg: #fff7fb;
  --text-main: #1f2937;
  --text-soft: #64748b;
  --pink: #ec4899;
  --pink-deep: #db2777;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --card: #ffffff;
  --line: rgba(148, 163, 184, 0.24);
  --shadow: 0 18px 45px rgba(219, 39, 119, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: linear-gradient(180deg, #fff1f7 0%, #ffffff 42%, #eff6ff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 25px rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #f472b6, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f472b6, #60a5fa);
  border-radius: 14px;
  box-shadow: 0 12px 22px rgba(236, 72, 153, 0.24);
  font-size: 14px;
}

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

.nav-link {
  color: #475569;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--pink);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #475569;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 24px 16px;
  background: #ffffff;
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: #475569;
  font-weight: 700;
}

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

.hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, #f9a8d4 0%, #c4b5fd 48%, #93c5fd 100%);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(76, 29, 149, 0.76), rgba(219, 39, 119, 0.38), rgba(14, 165, 233, 0.3));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 540px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 42px;
  padding: 80px 0 110px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.06;
  font-weight: 900;
}

.hero-copy h1 span {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 16px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(17px, 2.4vw, 24px);
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #db2777;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 70px rgba(30, 41, 59, 0.28);
  border-radius: var(--radius-xl);
  padding: 20px;
  backdrop-filter: blur(16px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
}

.hero-panel h2 {
  margin: 18px 0 6px;
  font-size: 26px;
  line-height: 1.25;
}

.hero-panel p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-tags span,
.tag-row span,
.info-pill,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

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

.hero-dot.active {
  background: #ffffff;
}

.hero-wave {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 88px;
}

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

.section {
  padding: 64px 0;
}

.section-soft {
  background: linear-gradient(90deg, #f3e8ff 0%, #fce7f3 52%, #dbeafe 100%);
}

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

.section-head h2,
.page-title h1 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--text-soft);
}

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

.category-tile {
  min-height: 180px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #fce7f3, #dbeafe);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:nth-child(3n + 2) {
  background: linear-gradient(135deg, #dbeafe, #e9d5ff);
}

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

.category-tile:hover,
.movie-card:hover,
.rank-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 52px rgba(219, 39, 119, 0.18);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-tile p {
  margin: 0;
  color: #475569;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(148, 163, 184, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fce7f3, #dbeafe);
}

.movie-card-compact .poster-frame {
  aspect-ratio: 4 / 3;
}

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

.movie-card:hover .poster-frame img,
.rank-item:hover img {
  transform: scale(1.06);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.66));
  opacity: 0.72;
}

.poster-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  color: #ffffff;
  background: var(--pink);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(236, 72, 153, 0.88);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card-body h3 {
  min-height: 44px;
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.38;
}

.movie-card-body p {
  min-height: 44px;
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.tag-row span {
  color: #db2777;
  background: #fce7f3;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 118px;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(148, 163, 184, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item img {
  width: 86px;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.4s ease;
}

.rank-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f472b6, #60a5fa);
  border-radius: 14px;
  font-weight: 900;
}

.rank-item h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.rank-item p {
  margin: 0 0 4px;
  color: var(--text-soft);
  font-size: 13px;
}

.rank-item small {
  color: #94a3b8;
}

.search-panel,
.page-title,
.detail-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.search-panel {
  padding: 22px;
  margin-bottom: 28px;
}

.search-input,
.filter-select {
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--text-main);
  background: #ffffff;
  outline: none;
  font: inherit;
}

.search-input {
  flex: 1 1 280px;
}

.filter-select {
  flex: 0 1 170px;
}

.empty-state {
  display: none;
  padding: 32px;
  color: var(--text-soft);
  text-align: center;
  border-radius: 22px;
  background: #ffffff;
}

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

.page-title {
  margin: 34px 0 28px;
  padding: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.breadcrumb a,
.breadcrumb span {
  color: #64748b;
  background: #f8fafc;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-card {
  padding: 30px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.16;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.info-pill {
  color: #db2777;
  background: #fce7f3;
}

.detail-card p {
  color: #475569;
  font-size: 16px;
}

.content-block {
  margin-top: 24px;
}

.content-block h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.player-card {
  margin-top: 32px;
  padding: 18px;
  background: #0f172a;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(236, 72, 153, 0.26), rgba(2, 6, 23, 0.36));
}

.play-layer.hide {
  display: none;
}

.play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #f472b6, #60a5fa);
  border-radius: 999px;
  box-shadow: 0 24px 48px rgba(14, 165, 233, 0.26);
  font-size: 30px;
  cursor: pointer;
}

.player-title {
  margin: 16px 4px 0;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.hidden-card {
  display: none !important;
}

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .detail-poster {
    max-width: 360px;
  }
}

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

  .menu-toggle {
    display: inline-block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 52px;
  }

  .hero-panel {
    display: none;
  }

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

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

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

  .rank-item {
    grid-template-columns: 34px 72px minmax(0, 1fr);
  }

  .rank-item img {
    width: 72px;
    height: 80px;
  }

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

@media (max-width: 520px) {
  .nav-wrap,
  .container,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 21px;
  }

  .movie-grid,
  .movie-grid-wide {
    gap: 12px;
  }

  .movie-card-body h3 {
    font-size: 14px;
  }

  .movie-card-body p,
  .tag-row {
    display: none;
  }
}
