:root {
  --bg: #fff7fb;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #fdf2f8;
  --line: #fbcfe8;
  --primary: #db2777;
  --primary-dark: #be185d;
  --accent: #fb7185;
  --shadow: 0 24px 70px rgba(190, 24, 93, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at top left, #ffe4f1 0, transparent 34rem), var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(251, 207, 232, 0.7);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 0.9rem;
  box-shadow: 0 12px 30px rgba(219, 39, 119, 0.26);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.nav-link {
  padding: 0.65rem 0.95rem;
  color: #4b5563;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-dark);
  background: var(--soft);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  background: #f9fafb;
  border: 1px solid #fce7f3;
  border-radius: 999px;
}

.header-search input,
.movie-search {
  width: 15rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 0.72rem 0.95rem;
}

.header-search button,
.primary-btn,
.secondary-btn,
.filter-btn {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 34px rgba(219, 39, 119, 0.22);
}

.header-search button {
  padding: 0.65rem 1rem;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.35rem;
}

.secondary-btn {
  color: var(--primary-dark);
  background: #ffffff;
  border: 1px solid var(--line);
}

.primary-btn:hover,
.secondary-btn:hover,
.filter-btn:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 0.9rem;
  background: var(--soft);
}

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

main {
  min-height: 70vh;
}

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.section-tight {
  padding-top: 2rem;
}

.section-heading {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.45rem 0.85rem;
  color: var(--primary-dark);
  background: #fce7f3;
  border-radius: 999px;
  font-weight: 800;
}

.section-heading h1,
.section-heading h2,
.hero-copy h1,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  color: #111827;
  letter-spacing: -0.05em;
}

.section-heading h2,
.page-title h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.section-heading p,
.page-title p {
  max-width: 46rem;
  color: var(--muted);
  line-height: 1.8;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  color: #ffffff;
  background: #111827;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.58), rgba(190, 24, 93, 0.25)), linear-gradient(0deg, rgba(17, 24, 39, 0.9), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 720px;
  margin: 0 auto;
  padding: 8rem 1.25rem 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: 2rem;
  align-items: center;
}

.hero-copy h1 {
  max-width: 54rem;
  font-size: clamp(2.8rem, 6vw, 6.2rem);
  line-height: 0.98;
}

.hero-copy p {
  max-width: 42rem;
  margin: 1.5rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.15rem;
  line-height: 1.9;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags {
  margin: 1.6rem 0;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.68rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.hero-panel {
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel img {
  aspect-ratio: 2 / 2.65;
  object-fit: cover;
  border-radius: 1.1rem;
}

.hero-panel h2 {
  margin: 1rem 0 0.3rem;
  font-size: 1.35rem;
}

.hero-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 2rem;
  width: min(1240px, calc(100% - 2.5rem));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  font-size: 1.35rem;
}

.hero-dots {
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.active {
  width: 2.1rem;
  background: #ffffff;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: -3rem;
  position: relative;
  z-index: 5;
}

.stat-card,
.category-card,
.info-card,
.detail-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #fce7f3;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 1.2rem;
}

.stat-card strong {
  display: block;
  color: var(--primary-dark);
  font-size: 1.75rem;
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.2rem;
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #fce7f3;
  border-radius: 1.35rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: var(--line);
  box-shadow: 0 24px 60px rgba(190, 24, 93, 0.16);
}

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

.poster-link img {
  aspect-ratio: 2 / 2.85;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 3;
  color: #ffffff;
  font-weight: 800;
  border-radius: 999px;
}

.play-chip {
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.34rem 0.68rem;
  background: rgba(219, 39, 119, 0.9);
}

.rank-badge {
  top: 0.65rem;
  left: 0.65rem;
  min-width: 2.2rem;
  padding: 0.35rem 0.55rem;
  text-align: center;
  font-style: normal;
  background: linear-gradient(135deg, #f59e0b, #f43f5e);
}

.movie-card-body {
  padding: 0.95rem;
}

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--primary-dark);
}

.movie-card p {
  min-height: 3.1rem;
  margin: 0.55rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.tag-row span {
  color: var(--primary-dark);
  background: var(--soft);
}

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

.category-card {
  padding: 1.3rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
}

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

.category-card span {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--primary-dark);
  font-weight: 800;
}

.filter-panel {
  margin: 0 0 1.5rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #fce7f3;
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.movie-search {
  flex: 1;
  min-width: 220px;
  background: #f9fafb;
  border: 1px solid #fce7f3;
  border-radius: 999px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.65rem 0.95rem;
  color: #4b5563;
  background: #ffffff;
  border: 1px solid #fce7f3;
}

.filter-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(219, 39, 119, 0.18);
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
}

.rank-side {
  position: sticky;
  top: 6rem;
  align-self: start;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid #fce7f3;
  border-radius: var(--radius);
  box-shadow: 0 15px 38px rgba(15, 23, 42, 0.06);
}

.rank-side h2 {
  margin: 0 0 0.85rem;
  font-size: 1.25rem;
}

.rank-line {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #fce7f3;
}

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

.rank-line strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-line em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.85rem;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--detail-bg) center / cover no-repeat;
  filter: blur(22px);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.68), rgba(190, 24, 93, 0.28));
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 5rem 1.25rem;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
  aspect-ratio: 2 / 2.85;
  object-fit: cover;
}

.breadcrumb {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.95rem;
}

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

.detail-copy h1 {
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 1.02;
}

.detail-copy .lead {
  margin: 1.25rem 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.13rem;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.detail-meta span {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.player-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 1.25rem 1rem;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111827;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(17, 24, 39, 0.3);
  z-index: 2;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.play-button {
  position: relative;
  z-index: 3;
  width: 5.5rem;
  height: 5.5rem;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 24px 64px rgba(219, 39, 119, 0.35);
}

.player-box.is-playing .player-cover {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 1.5rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.detail-card {
  padding: 1.5rem;
}

.detail-card h2 {
  margin: 0 0 0.9rem;
  font-size: 1.45rem;
}

.detail-card p {
  margin: 0 0 1rem;
  color: #4b5563;
  line-height: 1.9;
}

.info-list {
  display: grid;
  gap: 0.65rem;
}

.info-list div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.7rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #fce7f3;
}

.info-list span {
  color: var(--muted);
  font-weight: 800;
}

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

.site-footer {
  color: #4b5563;
  background: #ffffff;
  border-top: 1px solid #fce7f3;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
}

.footer-logo {
  margin-bottom: 1rem;
}

.site-footer h3 {
  margin: 0 0 1rem;
  color: #111827;
}

.site-footer p {
  max-width: 28rem;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.footer-links a {
  padding: 0.45rem 0.75rem;
  background: var(--soft);
  border-radius: 999px;
  color: var(--primary-dark);
  font-weight: 700;
}

.footer-copy {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  color: #9ca3af;
  font-size: 0.92rem;
}

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

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

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

  .header-search {
    display: none;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-menu {
    display: none;
    order: 10;
    width: 100%;
    margin-left: 0;
    padding-top: 0.6rem;
    flex-direction: column;
    align-items: stretch;
  }

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

  .nav-link {
    text-align: center;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 6rem;
  }

  .hero-panel {
    display: none;
  }

  .quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
  }

  .section-heading,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

  .category-grid,
  .footer-grid,
  .rank-layout,
  .detail-content,
  .detail-inner {
    grid-template-columns: 1fr;
  }

  .detail-inner {
    padding-top: 3rem;
  }

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

  .rank-side {
    position: static;
  }
}

@media (max-width: 520px) {
  .section {
    padding: 3rem 1rem;
  }

  .hero-copy h1 {
    font-size: 2.55rem;
  }

  .movie-grid,
  .movie-grid.wide,
  .related-grid,
  .quick-stats {
    grid-template-columns: 1fr;
  }

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

  .movie-card p {
    min-height: auto;
  }
}
