:root {
  --bg: #fff7fb;
  --surface: #ffffff;
  --surface-soft: #fff0f7;
  --text: #1f1f2e;
  --muted: #6b6575;
  --line: rgba(236, 72, 153, 0.16);
  --primary: #db2777;
  --secondary: #7c3aed;
  --accent: #f472b6;
  --shadow: 0 24px 80px rgba(124, 58, 237, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(244, 114, 182, 0.22), transparent 30rem),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.15), transparent 28rem),
    linear-gradient(180deg, #fff7fb 0%, #ffffff 45%, #fff7fb 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 28px rgba(219, 39, 119, 0.26);
}

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

.desktop-nav a,
.mobile-nav a {
  color: #4b4558;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--primary);
}

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

.header-search input,
.mobile-nav input,
.filter-toolbar input,
.filter-toolbar select {
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  color: var(--text);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.header-search button,
.mobile-nav button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-toolbar input:focus,
.filter-toolbar select:focus {
  border-color: rgba(219, 39, 119, 0.55);
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 3px;
  background: var(--primary);
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.mobile-nav.open {
  display: grid;
  gap: 14px;
}

.mobile-nav form {
  display: flex;
  gap: 8px;
}

.mobile-nav input {
  min-width: 0;
  flex: 1;
  padding: 11px 14px;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #1f1230;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(21, 8, 34, 0.96), rgba(131, 24, 88, 0.74), rgba(124, 58, 237, 0.42)),
    linear-gradient(0deg, rgba(20, 10, 30, 0.75), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  animation: fadeIn 0.95s ease both;
}

.hero-kicker,
.section-title span,
.page-hero span,
.feature-panel span,
.detail-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.95), rgba(124, 58, 237, 0.95));
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 650px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #8a1858;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 240, 247, 0.95);
}

.hero .badge {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 24px;
  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: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 16px 34px rgba(219, 39, 119, 0.24);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.btn.full {
  width: 100%;
}

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

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

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

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

.section-overlap {
  position: relative;
  z-index: 4;
  margin-top: -54px;
  padding-top: 0;
}

.section-title {
  margin-bottom: 28px;
  text-align: center;
}

.section-title.with-link {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
}

.section-title h2,
.page-hero h1,
.feature-panel h2,
.detail-text h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-title p,
.page-hero p,
.feature-panel p {
  max-width: 720px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.section-title.with-link p {
  margin-left: 0;
}

.section-title.with-link > a {
  flex: 0 0 auto;
  color: var(--primary);
  font-weight: 800;
}

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow);
}

.category-card img,
.category-overview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.category-card span,
.category-card p,
.category-overview-card div {
  position: relative;
  z-index: 2;
}

.category-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-8px);
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.6;
}

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

.large-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(31, 31, 46, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  box-shadow: 0 28px 80px rgba(219, 39, 119, 0.16);
}

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

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

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

.score-pill,
.type-pill {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(31, 31, 46, 0.72);
  backdrop-filter: blur(8px);
}

.score-pill {
  left: 12px;
}

.type-pill {
  right: 12px;
}

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

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

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--primary);
}

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

.split-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.5fr);
  gap: 28px;
  align-items: stretch;
}

.feature-panel {
  border-radius: 32px;
  padding: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.95), rgba(124, 58, 237, 0.95));
  box-shadow: var(--shadow);
}

.feature-panel h2,
.feature-panel p {
  color: #ffffff;
}

.feature-panel p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
}

.horizontal-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 240px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scrollbar-width: thin;
}

.rail-card {
  min-width: 220px;
}

.ranking-section {
  padding-top: 34px;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-list.compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.ranking-list.full {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.ranking-item a {
  display: grid;
  grid-template-columns: 44px 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(31, 31, 46, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item a:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 70px rgba(219, 39, 119, 0.13);
}

.ranking-item img {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  object-fit: cover;
}

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

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

.ranking-info strong,
.ranking-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-info em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.ranking-score {
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
}

.page-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 70px 52px;
  overflow: hidden;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 240, 247, 0.9)),
    radial-gradient(circle at right, rgba(124, 58, 237, 0.22), transparent 26rem);
  box-shadow: var(--shadow);
}

.page-hero p {
  margin-left: 0;
}

.category-overview-grid {
  grid-template-columns: repeat(2, 1fr);
}

.category-overview-card {
  min-height: 230px;
}

.category-overview-card div {
  position: absolute;
  inset: auto 0 0;
  padding: 34px;
  background: linear-gradient(180deg, transparent, rgba(21, 8, 34, 0.83));
}

.category-overview-card span {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.category-overview-card h2 {
  margin: 8px 0;
  font-size: 32px;
}

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

.filter-toolbar {
  position: sticky;
  top: 86px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(31, 31, 46, 0.08);
  backdrop-filter: blur(16px);
}

.filter-toolbar input,
.filter-toolbar select {
  width: 100%;
  padding: 13px 16px;
}

.filter-card.is-hidden {
  display: none;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-side .info-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 30px 30px 0 0;
  aspect-ratio: 16 / 9;
  background: #120a19;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #120a19;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(219, 39, 119, 0.28), transparent 18rem),
    linear-gradient(180deg, rgba(15, 8, 25, 0.4), rgba(15, 8, 25, 0.78));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-player.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 20px 44px rgba(219, 39, 119, 0.32);
}

.play-icon::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 24px 0 0 30px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 20px solid #ffffff;
}

.play-layer strong {
  font-size: 18px;
}

.detail-text {
  padding: 32px;
}

.detail-text h1 {
  margin-bottom: 14px;
}

.detail-text .lead {
  color: #4b4558;
  font-size: 19px;
  line-height: 1.8;
}

.detail-text h2 {
  margin: 30px 0 12px;
  font-size: 24px;
}

.detail-text p {
  color: var(--muted);
  line-height: 1.9;
}

.detail-tags {
  margin: 20px 0 4px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.info-card {
  margin-top: 20px;
  padding: 24px;
}

.info-card h2 {
  margin: 0 0 16px;
}

.info-card dl {
  margin: 0 0 22px;
}

.info-card div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-card dt {
  color: var(--muted);
}

.info-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.related-section {
  padding-top: 54px;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

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

.footer-inner p {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 12px 18px;
}

.footer-links a {
  color: var(--muted);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding: 18px 0 30px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .ranking-list.full {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .detail-side {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
  }

  .detail-side .info-card {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

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

  .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    justify-content: end;
    padding-bottom: 92px;
  }

  .hero-actions,
  .page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .section {
    padding: 48px 0;
  }

  .section-title.with-link,
  .split-section,
  .footer-inner {
    display: block;
  }

  .section-title.with-link > a {
    display: inline-flex;
    margin-top: 16px;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .large-grid,
  .ranking-list.compact,
  .ranking-list.full {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 150px;
  }

  .horizontal-rail {
    grid-auto-columns: minmax(210px, 76vw);
    margin-top: 20px;
  }

  .page-hero {
    padding: 48px 24px;
    border-radius: 26px;
  }

  .filter-toolbar {
    top: 76px;
    grid-template-columns: 1fr;
  }

  .ranking-item a {
    grid-template-columns: 38px 58px minmax(0, 1fr);
  }

  .ranking-item img {
    width: 58px;
    height: 58px;
  }

  .ranking-score {
    grid-column: 3;
  }

  .detail-wrap {
    margin-top: 20px;
  }

  .detail-main,
  .video-player {
    border-radius: 24px;
  }

  .detail-text {
    padding: 24px;
  }

  .detail-side {
    display: block;
  }

  .detail-poster {
    max-width: 280px;
    margin: 0 auto;
  }

  .detail-side .info-card {
    margin-top: 18px;
  }

  .footer-links {
    margin-top: 22px;
  }
}
