:root {
  --color-bg: #fff7f9;
  --color-panel: #ffffff;
  --color-panel-soft: #fff1f4;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-line: #ffe1e8;
  --color-rose: #e11d48;
  --color-rose-dark: #be123c;
  --color-rose-soft: #ffe4ea;
  --color-dark: #111827;
  --shadow-soft: 0 18px 50px rgba(225, 29, 72, 0.12);
  --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 228, 234, 0.86), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--color-bg) 52%, #ffffff 100%);
  color: var(--color-text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(255, 225, 232, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #fb7185, #e11d48 54%, #be123c);
  box-shadow: 0 14px 28px rgba(225, 29, 72, 0.28);
}

.brand-text {
  font-size: 26px;
  color: var(--color-rose);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-rose);
  background: var(--color-rose-soft);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 0;
  background: var(--color-rose-soft);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--color-rose);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--color-dark);
}

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

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

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

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 30%, rgba(251, 113, 133, 0.26), transparent 28rem),
    linear-gradient(135deg, #111827, #4c0519 62%, #111827);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transform: scale(1.04);
}

.hero-image.is-missing,
.poster-img.is-missing,
.mini-img.is-missing,
.rank-img.is-missing,
.detail-poster-img.is-missing {
  opacity: 0;
}

.hero-fallback,
.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 900;
  letter-spacing: 0.12em;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 12rem),
    linear-gradient(135deg, #fb7185, #be123c 54%, #111827);
}

.hero-fallback {
  font-size: clamp(42px, 9vw, 118px);
}

.poster-fallback {
  font-size: 22px;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.56) 43%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  color: #ffffff;
  max-width: 760px;
  justify-self: center;
  transform: translateX(-210px);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--color-rose);
  background: var(--color-rose-soft);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  color: #ffffff;
  background: rgba(225, 29, 72, 0.78);
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 23px);
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: currentColor;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-tags .tag {
  color: var(--color-rose-dark);
  background: var(--color-rose-soft);
  border-color: var(--color-line);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #fb7185, var(--color-rose));
  box-shadow: 0 18px 38px rgba(225, 29, 72, 0.34);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

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

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

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

.section {
  padding: 64px 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.center-heading {
  align-items: center;
}

.slim-heading {
  margin-bottom: 18px;
}

.section-heading h2,
.page-hero h1,
.detail-main h1,
.content-card h2 {
  margin: 0;
  font-weight: 950;
  color: var(--color-text);
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-more {
  display: inline-flex;
  align-items: center;
  color: var(--color-rose);
  font-weight: 900;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  box-shadow: var(--shadow-card);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.movie-card[hidden] {
  display: none;
}

.poster-link,
.poster-shell,
.detail-poster,
.mini-poster,
.rank-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fb7185, #be123c);
}

.poster-shell {
  aspect-ratio: 3 / 4.15;
}

.poster-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s ease, opacity 0.2s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(225, 29, 72, 0.9);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card-meta,
.movie-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 8px 0 8px;
  color: var(--color-text);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

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

.score {
  color: var(--color-rose);
  font-size: 16px;
  font-weight: 950;
}

.category-band {
  background: linear-gradient(135deg, rgba(255, 241, 244, 0.96), rgba(255, 255, 255, 0.92));
}

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

.category-tile {
  display: grid;
  min-height: 170px;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-card);
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-tile span {
  color: var(--color-rose);
  font-size: 22px;
  font-weight: 950;
}

.category-tile small {
  color: var(--color-muted);
  font-weight: 800;
}

.category-samples {
  display: grid;
  gap: 4px;
  color: #4b5563;
  font-size: 13px;
}

.category-samples a {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 30px;
}

.ranking-panel,
.content-card,
.category-overview-card,
.search-panel,
.filter-bar {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.24s ease, background 0.24s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  background: var(--color-rose-soft);
}

.rank-row.compact {
  grid-template-columns: 30px 46px minmax(0, 1fr);
  padding: 8px;
}

.rank-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--color-rose);
  font-weight: 950;
}

.rank-poster {
  width: 54px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
}

.rank-row.compact .rank-poster {
  width: 46px;
}

.rank-img,
.mini-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info {
  display: grid;
  min-width: 0;
}

.rank-info strong,
.mini-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--color-text);
  font-weight: 900;
}

.rank-info em,
.mini-info em {
  overflow: hidden;
  color: var(--color-muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-hero {
  padding: 64px 0 12px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 160px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
}

.filter-bar label,
.search-panel select,
.search-panel input {
  display: grid;
  gap: 8px;
}

.filter-bar span {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 900;
}

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  background: #ffffff;
  color: var(--color-text);
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.14);
}

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

.category-overview-card {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 950;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: var(--color-panel-soft);
}

.mini-poster {
  width: 58px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
}

.mini-info {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.ranking-page {
  padding-top: 24px;
}

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

.search-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 160px 160px;
  gap: 14px;
  padding: 18px;
  margin-bottom: 18px;
}

.search-status {
  min-height: 30px;
  margin-bottom: 18px;
  color: var(--color-muted);
  font-weight: 800;
}

.detail-wrap {
  padding: 34px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 800;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 88% 18%, rgba(251, 113, 133, 0.18), transparent 22rem),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-poster {
  aspect-ratio: 3 / 4.2;
  border-radius: 26px;
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.18);
}

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

.detail-main h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #4b5563;
  background: #f9fafb;
  font-weight: 800;
  font-size: 13px;
}

.player-section {
  margin-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.24);
}

.video-player {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 45%, rgba(225, 29, 72, 0.48), transparent 14rem),
    rgba(0, 0, 0, 0.38);
  cursor: pointer;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

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

.play-circle {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: var(--color-rose);
  box-shadow: 0 20px 42px rgba(225, 29, 72, 0.38);
  font-size: 32px;
  text-indent: 5px;
}

.play-cover strong {
  max-width: min(620px, 84%);
  overflow: hidden;
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 950;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.content-card {
  margin-top: 28px;
  padding: 28px;
}

.content-card h2 {
  margin-bottom: 12px;
  font-size: 28px;
}

.content-card p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.detail-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 4px;
}

.detail-pager a {
  display: inline-flex;
  max-width: 48%;
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--color-rose);
  background: var(--color-rose-soft);
  font-weight: 900;
}

.related-section {
  padding-bottom: 0;
}

.site-footer {
  margin-top: 34px;
  border-top: 1px solid var(--color-line);
  background: #ffffff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  color: var(--color-muted);
}

.footer-brand {
  color: var(--color-rose);
  font-size: 22px;
  font-weight: 950;
}

.footer-links {
  display: flex;
  gap: 14px;
  font-weight: 800;
}

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

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

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

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

  .hero-copy {
    transform: none;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .site-nav {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 14px;
  }

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

  .nav-link {
    border-radius: 14px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-copy {
    padding-top: 30px;
  }

  .movie-grid,
  .list-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .large-rank-list,
  .search-panel,
  .filter-bar,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    padding: 24px 0;
    text-align: center;
  }
}

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

  .hero {
    min-height: 620px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .section {
    padding: 44px 0;
  }

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

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

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p,
  .movie-card-meta,
  .movie-card-bottom {
    font-size: 12px;
  }

  .mini-list {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 34px 48px minmax(0, 1fr);
  }

  .detail-hero {
    padding: 18px;
  }

  .content-card {
    padding: 20px;
  }

  .detail-pager {
    display: grid;
  }

  .detail-pager a {
    max-width: 100%;
  }
}
