:root {
  color-scheme: light;
  --site-bg: #fff7fc;
  --ink: #111827;
  --muted: #6b7280;
  --line: rgba(148, 163, 184, 0.28);
  --pink: #db2777;
  --purple: #7c3aed;
  --blue: #2563eb;
  --soft: rgba(255, 255, 255, 0.88);
  --shadow: 0 22px 65px rgba(31, 41, 55, 0.16);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(244, 114, 182, 0.2), transparent 32rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 30rem),
    linear-gradient(180deg, #fff7fc 0%, #f8fbff 48%, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-size: 20px;
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
  box-shadow: 0 12px 30px rgba(219, 39, 119, 0.28);
}

.brand-text {
  font-size: clamp(20px, 2vw, 26px);
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  border-radius: 999px;
  padding: 10px 14px;
  color: #374151;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.22s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--pink);
  background: rgba(219, 39, 119, 0.08);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
  font-size: 22px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  border-radius: 34px;
  min-height: clamp(520px, 72vh, 760px);
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.7fr);
  align-items: center;
  gap: 32px;
  padding: clamp(28px, 6vw, 72px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.78) 48%, rgba(17, 24, 39, 0.4) 100%),
    radial-gradient(circle at 18% 20%, rgba(219, 39, 119, 0.38), transparent 24rem),
    radial-gradient(circle at 72% 12%, rgba(124, 58, 237, 0.32), transparent 26rem);
  z-index: 1;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fce7f3;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.hero-copy h1 {
  max-width: 720px;
  color: #ffffff;
  font-size: clamp(38px, 5.8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.07em;
  font-weight: 950;
  margin: 0 0 18px;
}

.hero-movie-title {
  display: block;
  margin-top: 10px;
  background: linear-gradient(90deg, #f9a8d4, #c4b5fd, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.78;
  margin: 0 0 24px;
}

.hero-meta,
.card-meta,
.detail-meta,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.1);
}

.hero-meta .pill {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.28);
}

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

.btn-light {
  color: #be185d;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  min-height: 460px;
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.3), rgba(37, 99, 235, 0.24));
  box-shadow: 0 32px 60px rgba(0, 0, 0, 0.32);
  transform: rotate(2deg);
}

.hero-poster-card img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
}

.hero-poster-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(17, 24, 39, 0.84));
}

.hero-card-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  color: #ffffff;
}

.hero-card-caption strong {
  display: block;
  margin-bottom: 6px;
  font-size: 24px;
}

.hero-controls {
  position: absolute;
  left: clamp(24px, 5vw, 72px);
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.22s ease, background 0.22s ease;
}

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

.quick-search {
  position: relative;
  z-index: 8;
  width: min(780px, 100%);
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.quick-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 17px 22px;
  font-size: 16px;
}

.quick-search button {
  border: 0;
  padding: 0 24px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}

.section {
  padding: 56px 0 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.section-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.75;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.68);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.14);
}

.movie-card a {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(249, 168, 212, 0.7), transparent 38%),
    linear-gradient(135deg, rgba(219, 39, 119, 0.9), rgba(124, 58, 237, 0.88), rgba(37, 99, 235, 0.86));
}

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

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

.poster-frame img.image-missing,
.hero-backdrop.image-missing,
.hero-poster-card img.image-missing {
  display: none;
}

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

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 900;
  color: #111827;
}

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

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

.category-card {
  min-height: 150px;
  border-radius: 28px;
  padding: 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.36), transparent 36%),
    linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
  box-shadow: 0 22px 46px rgba(124, 58, 237, 0.22);
  transition: transform 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px) scale(1.01);
}

.category-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 950;
}

.category-card span {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(130px, 0.6fr));
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  outline: 0;
  background: #ffffff;
  color: #111827;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 88px 1fr auto;
  align-items: center;
  gap: 16px;
  border-radius: 24px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

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

.rank-thumb {
  width: 88px;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--pink), var(--blue));
}

.page-hero {
  margin-top: 28px;
  border-radius: 32px;
  padding: clamp(34px, 6vw, 70px);
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, #be185d 0%, #6d28d9 52%, #1d4ed8 100%);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 28px;
  align-items: start;
  padding-top: 38px;
}

.detail-poster {
  position: sticky;
  top: 96px;
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
  box-shadow: var(--shadow);
}

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

.detail-content {
  border-radius: 30px;
  padding: clamp(24px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.09);
}

.detail-content h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.06;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.detail-lead {
  margin: 18px 0 0;
  color: #374151;
  font-size: 19px;
  line-height: 1.78;
}

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

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  margin-top: 38px;
  background: #030712;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #030712;
  cursor: pointer;
}

.play-gate {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(219, 39, 119, 0.28), rgba(3, 7, 18, 0.58));
  cursor: pointer;
}

.play-gate.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-gate-inner {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-radius: 999px;
  padding: 18px 24px;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.28);
}

.play-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--pink);
  background: #ffffff;
}

.link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-cloud a {
  border-radius: 999px;
  padding: 9px 13px;
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.09);
  font-weight: 800;
}

.site-footer {
  margin-top: 72px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: #6b7280;
  background: rgba(255, 255, 255, 0.66);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 980px) {
  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .detail-poster {
    position: relative;
    top: auto;
    max-width: 360px;
  }
}

@media (max-width: 640px) {
  .main-shell {
    width: min(100% - 22px, 1180px);
  }

  .hero-carousel {
    min-height: 640px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 28px 22px 76px;
  }

  .quick-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .quick-search button {
    min-height: 48px;
  }

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

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

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

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