* {
  box-sizing: border-box;
}

:root {
  --bg: #fff7fb;
  --text: #222233;
  --muted: #6b6475;
  --line: rgba(244, 114, 182, 0.18);
  --primary: #ec4899;
  --primary-dark: #be185d;
  --orange: #fb923c;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 20px 60px rgba(190, 24, 93, 0.12);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(244, 114, 182, 0.22), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(251, 146, 60, 0.18), transparent 30rem),
    linear-gradient(180deg, #fff5fb 0%, #fff 42%, #fff7fb 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 247, 251, 0.78);
  backdrop-filter: blur(20px);
}

.header-inner,
.hero-inner,
.section,
.footer-inner,
.detail-shell,
.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, #ec4899, #fb923c);
  box-shadow: 0 16px 32px rgba(236, 72, 153, 0.28);
}

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

.nav-link {
  padding: 10px 14px;
  color: #56475d;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #fb923c);
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.22);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--primary-dark);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 42px 0 52px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(236, 72, 153, 0.18), rgba(251, 146, 60, 0.16)),
    radial-gradient(circle at 75% 28%, rgba(244, 114, 182, 0.22), transparent 22rem);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 34px;
}

.hero-copy {
  padding: 40px 0;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.hero h1,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.gradient-text {
  color: transparent;
  background: linear-gradient(135deg, #db2777, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-desc,
.page-title p,
.detail-title p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #fb923c);
  box-shadow: 0 18px 36px rgba(236, 72, 153, 0.28);
}

.btn-soft {
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
}

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

.hero-stage {
  position: relative;
  min-height: 520px;
}

.hero-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 0.84fr 1fr;
  gap: 18px;
  align-items: end;
  padding: 18px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: 0.45s ease;
}

.hero-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  z-index: 2;
}

.hero-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 22px 42px rgba(38, 16, 30, 0.2);
}

.hero-panel {
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(190, 24, 93, 0.92), rgba(251, 146, 60, 0.88)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 16rem);
  border-radius: 28px;
}

.hero-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.5vw, 42px);
  line-height: 1.08;
}

.hero-panel p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.hero-meta span,
.detail-meta span,
.meta-line span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-meta span {
  padding: 6px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  cursor: pointer;
}

.hero-dots button.active {
  width: 28px;
  background: #fff;
}

.section {
  padding: 40px 0;
}

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

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

.section-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(190, 24, 93, 0.08);
  transition: 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(190, 24, 93, 0.15);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fce7f3, #ffedd5);
}

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: rgba(236, 72, 153, 0.92);
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

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

.movie-card h3 {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #211827;
  font-size: 17px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.meta-line,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meta-line span {
  padding: 4px 8px;
  color: #8b3a61;
  background: #fff0f7;
  font-size: 12px;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  padding: 4px 8px;
  color: #95520f;
  background: #fff7ed;
  font-size: 12px;
}

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

.category-card {
  min-height: 180px;
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 241, 248, 0.92)),
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.18), transparent 10rem);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.category-card span {
  color: var(--primary-dark);
  font-weight: 900;
}

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

.side-card,
.search-panel,
.detail-card,
.player-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.side-card {
  position: sticky;
  top: 96px;
  padding: 20px;
}

.side-card h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 36px 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: 0.2s ease;
}

.rank-item:hover {
  background: #fff0f7;
}

.rank-item img {
  width: 58px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.mini-rank {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #fb923c);
  border-radius: 11px;
  font-weight: 900;
}

.rank-text {
  min-width: 0;
}

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

.rank-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.filters,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
  padding: 16px;
}

.search-input,
.select-input {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: #fff;
  font: inherit;
}

.search-input {
  flex: 1 1 280px;
}

.select-input {
  flex: 0 0 170px;
}

.detail-hero {
  padding: 36px 0 26px;
}

.detail-title {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 26px;
  align-items: end;
}

.detail-title img {
  width: 180px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-meta {
  margin: 16px 0 0;
}

.detail-meta span {
  padding: 7px 11px;
  color: #8b3a61;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.player-card {
  overflow: hidden;
  margin-top: 26px;
  background: #111827;
}

.player-box {
  position: relative;
  background: #0f1020;
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 16, 32, 0.28), rgba(15, 16, 32, 0.82));
  cursor: pointer;
}

.player-overlay.hidden {
  display: none;
}

.big-play {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.92), rgba(251, 146, 60, 0.92));
  font-size: 36px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  padding: 28px 0 44px;
}

.detail-card {
  padding: 24px;
}

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

.detail-card p {
  margin: 0 0 18px;
  color: #4b4458;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

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

.site-footer {
  margin-top: 40px;
  color: #fff;
  background: linear-gradient(135deg, #be185d, #fb923c);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

.footer-inner p {
  max-width: 430px;
  color: rgba(255, 255, 255, 0.82);
}

.footer-inner h3 {
  margin: 0 0 12px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.84);
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 1080px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-inner,
  .split-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .side-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    padding: 12px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: grid;
  }

  .hero-inner,
  .hero-card,
  .detail-title {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 720px;
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .hero-inner,
  .section,
  .footer-inner,
  .detail-shell,
  .page-shell {
    width: min(100% - 22px, 1200px);
  }

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

  .hero-stage {
    min-height: 760px;
  }

  .hero-panel {
    padding: 18px;
  }

  .detail-title img {
    width: 150px;
  }
}
