:root {
  --color-primary: #ec4899;
  --color-primary-dark: #db2777;
  --color-rose: #f43f5e;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-soft: #fff1f6;
  --color-border: #f9c6d8;
  --shadow-card: 0 16px 40px rgba(236, 72, 153, 0.14);
  --shadow-soft: 0 12px 28px rgba(31, 41, 55, 0.10);
  --radius-large: 28px;
  --radius-card: 18px;
  --container-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--container-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--color-primary), var(--color-rose));
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.24);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.30);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  content: "";
  background: #ffffff;
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  width: 100%;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(260px, 28vw);
  padding: 9px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(12px);
}

.header-search input {
  width: 100%;
  color: #ffffff;
  border: 0;
  outline: 0;
  background: transparent;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.mobile-nav {
  display: none;
  padding: 0 0 12px;
  gap: 10px;
  justify-content: space-around;
  color: #ffffff;
  font-size: 14px;
}

.hero {
  position: relative;
  height: 560px;
  margin-bottom: 56px;
  overflow: hidden;
  background: #111827;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-image,
.poster,
.related-poster,
.rank-poster,
.detail-poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fce7f3, #fbcfe8 42%, #fecdd3);
}

.hero-image.is-missing::after,
.poster.is-missing::after,
.related-poster.is-missing::after,
.rank-poster.is-missing::after,
.detail-poster.is-missing::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #9d174d;
  font-weight: 800;
  text-align: center;
  content: attr(data-title);
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.72), transparent 32%), linear-gradient(135deg, #fce7f3, #fecdd3);
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.46) 52%, rgba(17, 24, 39, 0.20));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0 0 76px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(236, 72, 153, 0.86);
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.32);
}

.hero-title {
  max-width: 800px;
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.90);
  font-size: 19px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn-primary,
.btn-secondary,
.btn-soft,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  padding: 13px 26px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-primary), var(--color-rose));
  box-shadow: 0 16px 32px rgba(236, 72, 153, 0.32);
}

.btn-secondary {
  padding: 12px 24px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.btn-soft {
  padding: 10px 18px;
  color: var(--color-primary-dark);
  background: #fff1f6;
}

.btn-ghost {
  padding: 10px 18px;
  color: var(--color-primary-dark);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-soft:hover,
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.45);
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

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

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

.section-stack {
  display: grid;
  gap: 58px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

.section-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-rose));
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #f9a8d4, transparent);
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster {
  aspect-ratio: 3 / 4;
}

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

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

.card-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: opacity 0.22s ease, background 0.22s ease;
}

.movie-card:hover .card-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.28);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: #be185d;
  font-size: 12px;
  font-weight: 700;
  background: #fce7f3;
}

.movie-title {
  margin: 0;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
}

.movie-desc {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.65;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.feature-panel {
  padding: 34px;
  border-radius: var(--radius-large);
  background: linear-gradient(90deg, #fce7f3, #ffe4e6);
  box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.10);
}

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

.large-grid .poster {
  aspect-ratio: 16 / 10;
}

.horizontal-scroll {
  overflow-x: auto;
  padding-bottom: 12px;
}

.horizontal-track {
  display: flex;
  gap: 18px;
  width: max-content;
}

.horizontal-card {
  width: 340px;
}

.horizontal-card .movie-card {
  flex-direction: row;
  height: 150px;
}

.horizontal-card .poster {
  width: 132px;
  flex: 0 0 132px;
  aspect-ratio: auto;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 28px;
}

.rank-box,
.panel-card,
.filter-panel,
.content-card {
  border-radius: var(--radius-large);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-box {
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.rank-num {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 900;
  background: #f3f4f6;
}

.rank-item:nth-child(-n+3) .rank-num,
.ranking-row:nth-child(-n+3) .rank-num {
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-primary), var(--color-rose));
}

.rank-title {
  margin: 0 0 4px;
  font-weight: 800;
}

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

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

.category-card {
  display: grid;
  gap: 16px;
  min-height: 220px;
  padding: 26px;
  border-radius: var(--radius-large);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 25px;
}

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

.category-count {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: #be185d;
  font-weight: 800;
  background: #fce7f3;
}

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

.category-samples span {
  padding: 6px 9px;
  border-radius: 10px;
  color: #6b7280;
  font-size: 12px;
  background: #f9fafb;
}

.page-hero {
  padding: 56px 0 32px;
}

.page-hero-card {
  display: grid;
  gap: 16px;
  padding: 34px;
  border-radius: var(--radius-large);
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.32), transparent 28%), linear-gradient(135deg, var(--color-primary), var(--color-rose));
  box-shadow: var(--shadow-card);
}

.page-hero-card h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
}

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

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stat-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.20);
}

.filter-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
  padding: 22px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.filter-control {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #fbcfe8;
  border-radius: 14px;
  outline: none;
  background: #fff7fb;
}

.filter-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.14);
}

.filter-status {
  color: var(--color-muted);
  font-size: 14px;
}

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

.detail-hero {
  padding: 42px 0;
  background: radial-gradient(circle at top left, #ffe4e6, transparent 38%), linear-gradient(180deg, #fff1f6, #ffffff);
}

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

.breadcrumbs a {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
}

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

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
}

.detail-line {
  margin: 0 0 20px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.85;
}

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

.meta-box {
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.07);
}

.meta-label {
  display: block;
  margin-bottom: 4px;
  color: var(--color-muted);
  font-size: 12px;
}

.meta-value {
  color: #111827;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-section {
  padding: 36px 0 12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-large);
  background: #0f172a;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

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

.play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  background: linear-gradient(90deg, var(--color-primary), var(--color-rose));
  box-shadow: 0 16px 34px rgba(236, 72, 153, 0.42);
  transform: translate(-50%, -50%);
}

.play-overlay.is-hidden {
  display: none;
}

.player-note {
  margin: 12px 0 0;
  color: var(--color-muted);
  font-size: 14px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 28px;
  padding: 24px 0 54px;
}

.content-card {
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 16px;
  color: #4b5563;
  line-height: 1.9;
}

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

.related-item {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.related-poster {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

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

.related-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
}

.related-meta {
  margin: 0;
  color: var(--color-muted);
  font-size: 12px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 48px 130px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.07);
}

.rank-poster {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

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

.site-footer {
  margin-top: 56px;
  padding: 46px 0 28px;
  background: linear-gradient(180deg, #fff7fb, #ffe4e6);
  border-top: 1px solid #fbcfe8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
}

.footer-text,
.footer-links a,
.copyright {
  color: #6b7280;
  line-height: 1.8;
}

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

.footer-links a:hover {
  color: var(--color-primary-dark);
}

.copyright {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid #f9c6d8;
  text-align: center;
  font-size: 13px;
}

.no-results {
  display: none;
  padding: 28px;
  border-radius: 20px;
  color: var(--color-muted);
  text-align: center;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.no-results.is-visible {
  display: block;
}

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

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

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    padding-top: 10px;
  }

  .nav-links,
  .header-search {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }

  .hero {
    height: 520px;
  }

  .movie-grid,
  .large-grid,
  .category-grid,
  .split-section,
  .detail-layout,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-row {
    grid-template-columns: 40px 92px minmax(0, 1fr);
  }

  .ranking-row .btn-soft {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, var(--container-width));
  }

  .brand {
    font-size: 20px;
  }

  .hero {
    height: 500px;
    margin-bottom: 36px;
  }

  .hero-content {
    padding-bottom: 62px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-control {
    display: none;
  }

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

  .card-body {
    padding: 12px;
  }

  .movie-title {
    font-size: 15px;
  }

  .feature-panel,
  .page-hero-card,
  .content-card,
  .filter-panel {
    padding: 20px;
  }

  .filter-row,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-card {
    width: 300px;
  }

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