:root {
  --rose: #f43f5e;
  --pink: #ec4899;
  --orange: #fb923c;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7fb;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f9fafb;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--rose), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 12px 28px rgba(244, 63, 94, 0.3);
  font-size: 15px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  position: relative;
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  background: var(--rose);
  transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--rose);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #374151;
  background: #f3f4f6;
}

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff1f2, #fdf2f8 50%, #fff7ed);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  position: absolute;
  right: max(28px, calc((100vw - 1180px) / 2));
  bottom: 38px;
  width: min(430px, 38vw);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 34px;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.28);
  transform: rotate(3deg);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 24%, rgba(244, 63, 94, 0.22), transparent 28%),
    radial-gradient(circle at 82% 70%, rgba(236, 72, 153, 0.24), transparent 32%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 660px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rose);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 14px 0;
  color: var(--ink);
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.12;
  color: #be123c;
}

.hero p,
.page-hero p,
.detail-info .lead {
  margin: 0;
  max-width: 720px;
  color: #4b5563;
  font-size: 18px;
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.primary-btn {
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(120deg, var(--rose), var(--pink));
  box-shadow: 0 16px 34px rgba(244, 63, 94, 0.25);
}

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

.ghost-btn {
  min-height: 48px;
  padding: 0 24px;
  color: #374151;
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid rgba(229, 231, 235, 0.9);
}

.ghost-btn.dark {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.text-link {
  color: var(--rose);
  gap: 6px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.28);
}

.hero-dot.is-active {
  width: 32px;
  background: var(--rose);
}

.search-panel {
  position: relative;
  z-index: 5;
  margin-top: -32px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
}

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

.search-box input:focus,
.search-box select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.result-count {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.content-section {
  padding: 72px 0;
}

.content-section.shell {
  padding-left: 0;
  padding-right: 0;
}

.soft-bg {
  background: linear-gradient(180deg, #fff, var(--soft));
}

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

.section-title-row h2,
.detail-text h2,
.category-overview-card h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-title-row p,
.category-overview-card p,
.detail-text p,
.movie-info p,
.rank-row p {
  margin: 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #fee2e2;
  aspect-ratio: 2 / 3;
}

.poster-wrap img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(120deg, var(--rose), var(--pink));
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.25);
}

.play-chip {
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
  font-size: 12px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  font-size: 13px;
}

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  margin: 0 0 6px;
  min-height: 3em;
  font-size: 16px;
  line-height: 1.45;
}

.movie-info h3 a:hover,
.rank-content h3 a:hover,
.category-overview-card h2 a:hover {
  color: var(--rose);
}

.muted {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #be123c;
  background: #fff1f2;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 18px 36px rgba(244, 63, 94, 0.18);
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -36px;
  bottom: -36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-tile span {
  font-weight: 900;
  opacity: 0.75;
}

.category-tile h3 {
  margin: 22px 0 8px;
  font-size: 24px;
}

.category-tile p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.86);
}

.category-tile strong {
  position: relative;
  z-index: 2;
}

.tile-1 { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.tile-2 { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.tile-3 { background: linear-gradient(135deg, #f97316, #ef4444); }
.tile-4 { background: linear-gradient(135deg, #10b981, #14b8a6); }

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

.rank-row {
  display: grid;
  grid-template-columns: 84px 62px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.rank-cover {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
  background: #fee2e2;
}

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

.rank-index {
  color: var(--rose);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.rank-content h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.page-hero {
  padding: 70px 0 36px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: center;
  padding: 20px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

.category-cover-stack img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #fee2e2;
}

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

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

.breadcrumb a:hover {
  color: var(--rose);
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 32px;
  background: #fee2e2;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  font-size: clamp(34px, 6vw, 58px);
}

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

.meta-grid div {
  padding: 15px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.meta-grid strong,
.meta-grid span {
  display: block;
}

.meta-grid strong {
  color: var(--muted);
  font-size: 13px;
}

.meta-grid span {
  margin-top: 6px;
  font-weight: 900;
}

.detail-tags {
  margin-top: 20px;
}

.player-section {
  padding: 20px 0 44px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #030712;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.18), rgba(3, 7, 18, 0.82));
}

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

.player-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(120deg, var(--rose), var(--pink));
  box-shadow: 0 20px 48px rgba(244, 63, 94, 0.34);
  font-size: 30px;
}

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

.detail-text article {
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

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

.site-footer {
  padding: 48px 0;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: #fff;
  -webkit-text-fill-color: transparent;
}

.site-footer p {
  margin: 14px 0 0;
  color: #9ca3af;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #fff;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 7px 0;
  color: #d1d5db;
}

.site-footer a:hover {
  color: #fff;
}

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

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

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

@media (max-width: 820px) {
  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    padding: 12px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    height: 720px;
  }

  .hero-slide {
    align-items: start;
    padding-top: 70px;
  }

  .hero-slide img {
    right: 22px;
    bottom: 70px;
    width: min(270px, 68vw);
    opacity: 0.92;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.74), rgba(255, 241, 242, 0.65));
  }

  .search-box {
    grid-template-columns: 1fr;
  }

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

  .category-grid,
  .category-overview-grid,
  .detail-text,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-overview-card,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 68px 44px 1fr;
  }

  .rank-row .text-link {
    grid-column: 3;
    justify-content: flex-start;
  }
}

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

  .brand {
    font-size: 20px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .movie-grid,
  .related-grid {
    gap: 14px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 14px;
  }

  .rank-row {
    grid-template-columns: 56px 1fr;
  }

  .rank-index {
    display: none;
  }

  .rank-row .text-link {
    grid-column: 2;
  }
}
