:root {
  --bg: #fff7fb;
  --bg-strong: #fff0f7;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --text: #27212f;
  --muted: #6f6377;
  --line: rgba(236, 72, 153, 0.16);
  --primary: #ec4899;
  --primary-strong: #db2777;
  --secondary: #8b5cf6;
  --gold: #f59e0b;
  --shadow: 0 20px 60px rgba(141, 84, 135, 0.16);
  --soft-shadow: 0 12px 34px rgba(141, 84, 135, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(236, 72, 153, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(139, 92, 246, 0.14), transparent 28rem),
    linear-gradient(180deg, #fff7fb 0%, #ffffff 48%, #fff7fb 100%);
  min-height: 100vh;
}

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: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.08);
}

.site-header-inner {
  max-width: 1220px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 26px rgba(236, 72, 153, 0.34);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: #4b4055;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-strong);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(139, 92, 246, 0.1));
  transform: translateY(-1px);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 2px solid rgba(236, 72, 153, 0.16);
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
}

.top-search input,
.mobile-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  background: transparent;
}

.top-search button,
.mobile-search button,
.hero-button,
.section-action,
.detail-button,
.text-link {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.top-search button,
.mobile-search button {
  padding: 10px 16px;
  border-radius: 999px;
}

.hero-button,
.section-action,
.detail-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}

.hero-button:hover,
.section-action:hover,
.detail-button:hover,
.text-link:hover,
.top-search button:hover,
.mobile-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(236, 72, 153, 0.3);
  filter: saturate(1.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff0f7;
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.mobile-nav {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

.mobile-nav a {
  display: block;
  padding: 12px 4px;
  color: #4b4055;
  font-weight: 800;
  border-top: 1px solid var(--line);
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 22px;
}

.hero {
  position: relative;
  min-height: clamp(560px, 72vh, 780px);
  overflow: hidden;
  background: #140d20;
}

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

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 13, 32, 0.94), rgba(20, 13, 32, 0.64) 46%, rgba(20, 13, 32, 0.18)),
    linear-gradient(0deg, rgba(20, 13, 32, 0.82), transparent 42%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  margin: 0 auto;
  min-height: clamp(560px, 72vh, 780px);
  padding: 92px 22px 120px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: 44px;
  align-items: center;
  color: #ffffff;
}

.hero-kicker,
.page-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(236, 72, 153, 0.72);
  backdrop-filter: blur(12px);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta,
.muted-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.hero-meta {
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 18px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-meta span,
.card-meta span,
.pill {
  background: #fff0f7;
  border-color: rgba(236, 72, 153, 0.12);
}

.hero-actions,
.section-heading,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

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

.hero-mini-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  color: #ffffff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-mini-card:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.2);
}

.hero-mini-card img {
  width: 78px;
  height: 104px;
  border-radius: 16px;
  object-fit: cover;
  position: static;
}

.hero-mini-card strong {
  display: block;
  font-size: 17px;
  margin-bottom: 7px;
}

.hero-mini-card em {
  display: block;
  color: rgba(255, 255, 255, 0.74);
  font-style: normal;
  line-height: 1.5;
}

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

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

.hero-dot.active {
  width: 54px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.main-section {
  padding: 72px 0 0;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 46px);
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.detail-section p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(236, 72, 153, 0.32);
  box-shadow: var(--shadow);
}

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

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

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

.poster-glow {
  position: absolute;
  inset: auto 14px 14px;
  height: 38%;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.4), rgba(139, 92, 246, 0.35));
  filter: blur(26px);
  opacity: 0.4;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.card-meta {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}

.card-meta span {
  min-height: 24px;
  padding: 3px 8px;
}

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

.card-body h3 a:hover,
.ranking-info h3 a:hover,
.breadcrumb a:hover,
.detail-copy a:hover {
  color: var(--primary-strong);
}

.card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: #fff0f7;
  font-size: 12px;
  font-weight: 800;
}

.tag:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 250px;
  padding: 16px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #ffffff, #fff6fb);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.category-thumbs img {
  height: 96px;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.category-title {
  font-size: 20px;
  font-weight: 900;
}

.category-desc {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 64px 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--primary));
}

.ranking-poster img {
  width: 92px;
  height: 122px;
  border-radius: 18px;
  object-fit: cover;
}

.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.ranking-info p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

.page-hero {
  padding: 62px 0 34px;
}

.page-hero-card {
  position: relative;
  overflow: hidden;
  padding: 44px;
  border-radius: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.24), transparent 17rem),
    linear-gradient(135deg, #db2777, #7c3aed);
  box-shadow: var(--shadow);
}

.page-hero-card p {
  color: rgba(255, 255, 255, 0.84);
  max-width: 760px;
}

.page-kicker {
  background: rgba(255, 255, 255, 0.18);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.4fr);
  gap: 14px;
  align-items: end;
  margin: 0 0 24px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.filter-search input,
.filter-selects select {
  width: 100%;
  min-height: 46px;
  border: 2px solid rgba(236, 72, 153, 0.14);
  border-radius: 16px;
  outline: 0;
  padding: 0 14px;
  background: #ffffff;
  color: var(--text);
}

.filter-search input:focus,
.filter-selects select:focus,
.top-search input:focus,
.mobile-search input:focus {
  border-color: rgba(236, 72, 153, 0.48);
}

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

.filter-selects label span {
  display: block;
  margin: 0 0 6px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.empty-result {
  margin: 24px 0;
  padding: 28px;
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
}

.detail-hero {
  padding: 50px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 30px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 32px;
  background: #fff0f7;
  box-shadow: var(--shadow);
}

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

.detail-title {
  padding: 34px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.detail-title h1 {
  color: var(--text);
}

.detail-title p {
  color: var(--muted);
  line-height: 1.85;
  font-size: 17px;
}

.detail-kicker {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.detail-actions {
  margin-top: 22px;
}

.player-card,
.detail-section {
  margin-top: 34px;
  padding: 22px;
  border-radius: 32px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.player-stage {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #080712;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(8, 7, 18, 0.08), rgba(8, 7, 18, 0.54));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-play {
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 36px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.detail-copy {
  display: grid;
  gap: 18px;
  color: #403748;
  line-height: 1.9;
  font-size: 16px;
}

.detail-copy p {
  margin: 0;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 20px;
  background: #fff9fc;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, background 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-3px);
  background: #ffffff;
}

.compact-card img {
  width: 74px;
  height: 98px;
  object-fit: cover;
  border-radius: 16px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  margin-bottom: 6px;
  line-height: 1.35;
}

.compact-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

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

.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: var(--primary-strong);
  font-size: 20px;
}

.footer-inner p {
  color: var(--muted);
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-weight: 800;
}

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

@media (max-width: 1040px) {
  .top-search {
    display: none;
  }

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

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

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

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

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

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

  .site-header-inner {
    height: 66px;
  }

  .brand-text {
    font-size: 19px;
  }

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

  .hero-rail {
    display: none;
  }

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

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

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

  .ranking-row {
    grid-template-columns: 48px 72px 1fr;
  }

  .ranking-row .text-link {
    grid-column: 2 / -1;
    width: fit-content;
  }

  .ranking-number {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .ranking-poster img {
    width: 72px;
    height: 96px;
  }

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

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container,
  .site-header-inner,
  .mobile-nav,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero,
  .hero-content {
    min-height: 640px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: 38px;
  }

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

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

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

  .page-hero-card,
  .detail-title,
  .detail-section,
  .player-card {
    padding: 18px;
    border-radius: 24px;
  }

  .ranking-row {
    grid-template-columns: 44px 1fr;
  }

  .ranking-poster {
    display: none;
  }

  .ranking-row .text-link {
    grid-column: 2;
  }
}
