:root {
  --purple: #9333ea;
  --purple-dark: #581c87;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --green: #10b981;
  --text: #24142f;
  --muted: #6f6279;
  --surface: #ffffff;
  --soft: #faf5ff;
  --line: rgba(147, 51, 234, 0.16);
  --shadow: 0 18px 45px rgba(88, 28, 135, 0.18);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(236, 72, 153, 0.14), transparent 34rem),
    linear-gradient(180deg, #faf5ff 0%, #ffffff 38%, #faf5ff 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--purple), var(--pink), #a855f7);
  box-shadow: 0 12px 30px rgba(88, 28, 135, 0.22);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 20px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #fff;
  background: #3b0764;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 42px;
  width: 100%;
  min-height: 640px;
  padding: 86px max(32px, calc((100vw - 1180px) / 2)) 74px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(58, 7, 100, 0.92), rgba(88, 28, 135, 0.78), rgba(236, 72, 153, 0.24)),
    var(--hero-image) center / cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.16), transparent 24rem),
    linear-gradient(180deg, transparent 64%, rgba(250, 245, 255, 1) 100%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #db2777;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.hero-content .eyebrow {
  color: #fbcfe8;
}

.hero-content h1 {
  margin: 16px 0;
  max-width: 860px;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.movie-meta,
.footer-links,
.detail-actions,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.movie-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(147, 51, 234, 0.12);
  color: #7e22ce;
  font-size: 13px;
  font-weight: 700;
}

.hero-content .hero-tags span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.primary-button,
.secondary-button,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-box button {
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  box-shadow: 0 14px 28px rgba(236, 72, 153, 0.28);
}

.secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.primary-button:hover,
.secondary-button:hover,
.search-box button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #581c87, #ec4899);
}

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

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

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

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

.hero-carousel + .quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search,
.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 24px;
  padding: 28px;
}

.quick-search h2,
.page-hero h1,
.section-title h2,
.side-panel h2,
.rank-section h2,
.detail-info h1,
.player-section h2,
.detail-content h2 {
  margin: 0;
}

.quick-search p,
.page-hero p,
.category-card p,
.movie-card p,
.detail-content p,
.lead,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.search-box,
.search-controls {
  display: flex;
  gap: 10px;
}

.search-box input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.section-block {
  margin: 52px 0;
}

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

.section-title h2 {
  margin-top: 6px;
  font-size: clamp(26px, 3vw, 42px);
}

.section-title > a {
  color: #7e22ce;
  font-weight: 800;
}

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

.category-chips a {
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(88, 28, 135, 0.08);
  color: #581c87;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-chips a:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(88, 28, 135, 0.16);
}

.category-chips span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(88, 28, 135, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #581c87, #ec4899);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.year-badge,
.play-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

.year-badge {
  left: 12px;
  padding: 6px 10px;
  background: rgba(88, 28, 135, 0.78);
}

.play-badge {
  right: 12px;
  padding: 6px 10px;
  background: rgba(236, 72, 153, 0.86);
}

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

.movie-title {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 12px;
  font-size: 14px;
}

.movie-meta {
  gap: 6px;
}

.movie-meta span {
  padding: 5px 8px;
  font-size: 12px;
}

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

.side-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #faf5ff);
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(250, 245, 255, 0.9);
}

.rank-row img {
  width: 52px;
  height: 66px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #581c87, #ec4899);
}

.rank-num {
  color: #db2777;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-side {
  color: var(--muted);
  font-size: 13px;
}

.page-main {
  padding: 34px 0 20px;
}

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

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

.page-hero {
  padding: 34px;
  margin-bottom: 30px;
}

.page-hero h1 {
  margin-top: 8px;
  font-size: clamp(32px, 5vw, 58px);
}

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

.category-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(88, 28, 135, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs img {
  height: 118px;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #581c87, #ec4899);
}

.category-card h2 {
  margin: 8px 0;
}

.category-card span,
.filter-status {
  color: #7e22ce;
  font-weight: 800;
}

.search-controls {
  grid-template-columns: 1fr 180px 150px 120px;
  display: grid;
}

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

.rank-section {
  padding: 20px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  padding: 28px;
}

.detail-poster img {
  width: 100%;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #581c87, #ec4899);
  box-shadow: 0 20px 45px rgba(88, 28, 135, 0.2);
}

.detail-info h1 {
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
}

.lead {
  font-size: 18px;
}

.player-section,
.detail-content {
  margin-top: 28px;
  padding: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 24px;
  background: #10051c;
  aspect-ratio: 16 / 9;
}

.player-shell video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  z-index: 1;
  object-fit: contain;
  background: #000;
}

.player-cover {
  z-index: 2;
  cursor: pointer;
  background: #12051e;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.5;
  filter: blur(1px) saturate(1.1);
}

.big-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(236, 72, 153, 0.32);
}

.detail-content p {
  font-size: 17px;
}

.site-footer {
  margin-top: 70px;
  padding: 40px 0;
  color: #fff;
  background: linear-gradient(90deg, #3b0764, #581c87, #be185d);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 28px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

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

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

  .menu-button {
    display: inline-flex;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 72px;
  }

  .hero-poster {
    max-width: 280px;
    transform: none;
  }

  .quick-search,
  .filter-panel,
  .split-layout,
  .footer-inner,
  .detail-hero,
  .search-controls {
    grid-template-columns: 1fr;
  }

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

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

  .side-panel {
    position: static;
  }
}

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

  .logo {
    font-size: 18px;
  }

  .hero-carousel,
  .hero-slide {
    min-height: 760px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

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

  .movie-grid,
  .rank-grid,
  .category-overview,
  .category-chips {
    grid-template-columns: 1fr;
  }

  .category-card {
    grid-template-columns: 1fr;
  }

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

  .rank-side {
    display: none;
  }

  .quick-search,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-content {
    padding: 20px;
  }
}
