:root {
  --bg: #fff7ff;
  --ink: #271633;
  --muted: #6f5d7e;
  --line: rgba(99, 44, 126, 0.14);
  --card: rgba(255, 255, 255, 0.88);
  --purple: #7c3aed;
  --pink: #ec4899;
  --orange: #f97316;
  --shadow: 0 24px 70px rgba(84, 24, 116, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #fbf5ff 0%, #fff4fb 42%, #ffffff 100%);
  color: var(--ink);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #2d1740;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.35);
}

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

.nav-link,
.mobile-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: #60476e;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.22);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f4e8ff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #5b267a;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 16px;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #170820;
}

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

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.34), transparent 34%),
    linear-gradient(90deg, rgba(17, 6, 27, 0.94), rgba(68, 22, 95, 0.62) 46%, rgba(17, 6, 27, 0.32)),
    linear-gradient(0deg, rgba(17, 6, 27, 0.9), transparent 58%);
}

.hero-shell {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 64px;
  align-items: center;
  color: #fff;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  font-size: clamp(28px, 4vw, 48px);
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.25s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 18px 38px rgba(236, 72, 153, 0.34);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 34px;
  cursor: pointer;
}

.hero-arrow.prev {
  left: 20px;
}

.hero-arrow.next {
  right: 20px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: 0.25s ease;
}

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

.search-band {
  padding: 26px 0;
  background: rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid var(--line);
}

.search-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 480px);
  align-items: center;
  gap: 24px;
}

.search-shell h2,
.panel-title h2,
.side-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.search-shell p {
  margin: 0;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(72, 29, 93, 0.08);
}

.search-box span {
  color: var(--pink);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.section-block {
  padding: 56px 0;
}

.section-title,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.section-title > span,
.compact-title > span {
  flex: 0 0 auto;
  width: 6px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--purple), var(--pink));
}

.section-title div {
  flex: 1;
}

.section-title h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

.section-title a,
.panel-title a,
.text-link {
  color: var(--purple);
  font-weight: 900;
}

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

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

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

.movie-card,
.category-card,
.detail-card,
.side-card,
.ranking-panel,
.rank-item {
  background: var(--card);
  border: 1px solid rgba(147, 51, 234, 0.12);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.movie-card {
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 80px rgba(84, 24, 116, 0.24);
}

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
}

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

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

.card-play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: var(--purple);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: 0.25s ease;
}

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

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-meta,
.rank-info div,
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #7b5c8c;
  font-size: 12px;
  font-weight: 800;
}

.card-meta span,
.rank-info div span,
.detail-badges span,
.card-tags span,
.detail-tags span,
.footer-years span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f2e6ff;
  color: #6d28d9;
}

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

.card-body h3 a:hover,
.rank-info h3 a:hover,
.related-item:hover strong {
  color: var(--purple);
}

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

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.movie-card.compact .card-body p,
.movie-card.compact .card-tags {
  display: none;
}

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

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

.category-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.category-cover {
  position: relative;
  min-height: 220px;
  overflow: hidden;
}

.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28, 6, 40, 0.82), transparent 68%);
}

.category-cover span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.category-body {
  padding: 22px;
}

.category-body h2 {
  margin: 0 0 10px;
}

.category-body p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.category-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff4fb;
  color: #9d174d;
  font-size: 13px;
}

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

.ranking-panel,
.side-card {
  padding: 22px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: none;
}

.ranking-list .rank-item {
  grid-template-columns: 64px 126px minmax(0, 1fr);
  margin-bottom: 18px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  font-weight: 900;
}

.rank-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #5b21b6, #ec4899 56%, #fb7185);
}

.page-hero .section-shell {
  padding: 72px 0;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(8px);
}

.breadcrumb {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb:not(.dark) a,
.breadcrumb:not(.dark) strong,
.breadcrumb:not(.dark) span {
  color: rgba(255, 255, 255, 0.88);
}

.page-search {
  max-width: 560px;
  margin-top: 26px;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

.detail-hero {
  min-height: 470px;
  background: #18081f;
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 86px 0 120px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
  margin-top: -84px;
  padding-bottom: 64px;
  position: relative;
  z-index: 3;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #060208;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  color: var(--purple);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.42));
  cursor: pointer;
  transition: 0.25s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  font-size: 36px;
}

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

.detail-card {
  margin-top: 24px;
  padding: 30px;
}

.detail-card h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-card p {
  margin: 0;
  color: #51405d;
  line-height: 1.9;
  text-align: justify;
}

.movie-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.movie-info div {
  padding: 14px;
  border-radius: 18px;
  background: #fff7ff;
}

.movie-info dt {
  color: #8b5aa0;
  font-size: 12px;
  font-weight: 900;
}

.movie-info dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.detail-side {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 20px;
}

.related-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  transition: 0.25s ease;
}

.related-item:hover {
  background: #fff4fb;
}

.related-item img {
  width: 104px;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.35;
}

.related-item small {
  color: var(--muted);
}

.side-link {
  display: block;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f6eaff;
  color: #6d28d9;
  font-weight: 900;
}

.site-footer {
  color: #f7e9ff;
  background: linear-gradient(135deg, #2a0b3d, #4c1167 58%, #831843);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  color: #dec7ec;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.footer-links,
.footer-years {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.footer-years span {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 16px;
  color: #dec7ec;
  text-align: center;
}

@media (max-width: 1060px) {
  .hero-shell,
  .split-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slider,
  .hero-shell {
    min-height: 560px;
  }

  .hero-shell {
    grid-template-columns: 1fr;
    padding: 46px 0 74px;
  }

  .hero-arrow {
    display: none;
  }

  .search-shell,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .section-title,
  .panel-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .latest-grid,
  .compact-grid,
  .category-grid,
  .home-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

  .rank-item,
  .ranking-list .rank-item {
    grid-template-columns: 42px 78px minmax(0, 1fr);
  }

  .rank-info p {
    display: none;
  }

  .detail-hero-content {
    padding: 56px 0 104px;
  }

  .detail-card {
    padding: 22px;
  }

  .movie-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .latest-grid,
  .compact-grid,
  .category-grid,
  .home-categories {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .hero-copy h2,
  .page-hero h1,
  .detail-hero h1 {
    font-size: 34px;
  }

  .card-poster img {
    aspect-ratio: 16 / 10;
  }

  .related-item {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .related-item img {
    width: 86px;
  }
}
