:root {
  --rose: #f43f5e;
  --rose-dark: #be123c;
  --pink: #ec4899;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff1f2;
  --panel: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #fff7f8 55%, #ffffff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  flex: 0 0 auto;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, var(--rose), var(--pink), #fb7185);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-link {
  color: #374151;
  font-weight: 650;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.inline-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.inline-filter input,
.inline-filter select {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
  width: 210px;
  padding: 10px 16px;
}

.header-search button,
.mobile-search button,
.primary-button,
.ghost-button,
.text-button,
.inline-filter button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.header-search button,
.mobile-search button {
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
}

.header-search input:focus,
.mobile-search input:focus,
.inline-filter input:focus,
.inline-filter select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  color: #374151;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.mobile-nav {
  display: none;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.mobile-nav.open {
  display: grid;
  gap: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: 42px;
  padding: 82px max(32px, calc((100vw - 1240px) / 2 + 24px)) 96px;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.65s ease, transform 0.65s ease;
  transform: scale(1.015);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-content {
  max-width: 730px;
  color: #fff;
  animation: fadeUp 0.7s ease both;
}

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fecdd3;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  font-weight: 800;
  font-size: 14px;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.08em;
  max-width: 840px;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2.6vw, 25px);
  line-height: 1.65;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

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

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 13px 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 16px 30px rgba(244, 63, 94, 0.28);
}

.ghost-button {
  padding: 12px 20px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

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

.hero-poster {
  display: block;
  width: min(330px, 100%);
  margin-left: auto;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2.5deg);
  transition: transform 0.35s ease;
}

.hero-poster:hover {
  transform: rotate(0) translateY(-8px);
}

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

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

.hero-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

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

.page-shell,
.detail-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 24px 74px;
}

.home-shell {
  padding-top: 64px;
}

.content-section {
  margin-bottom: 64px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.section-more,
.text-button {
  color: var(--rose);
  font-weight: 850;
}

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

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

.tight-grid {
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.85);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(244, 63, 94, 0.24);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.75));
  opacity: 0.86;
}

.badge,
.play-chip,
.rank-num {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge-top {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(244, 63, 94, 0.92);
  font-size: 12px;
  font-weight: 850;
}

.play-chip {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--rose);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.card-body {
  padding: 18px;
}

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

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

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

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

.tag-row span {
  color: #be123c;
  background: #ffe4e6;
}

.movie-card.featured {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
}

.movie-card.featured .poster-link img {
  height: 100%;
}

.tinted-section {
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #fff1f2, #fdf2f8);
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 292px;
  gap: 20px;
  overflow-x: auto;
  padding: 6px 4px 20px;
  scroll-snap-type: x proximity;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

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

.category-tile {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 34px rgba(136, 19, 55, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 46px rgba(136, 19, 55, 0.24);
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.compact-list,
.rank-list,
.ranking-top {
  display: grid;
  gap: 16px;
}

.compact-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.compact-poster {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

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

.compact-card h3 {
  margin: 0 0 7px;
  font-size: 17px;
  line-height: 1.3;
}

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

.compact-card p {
  display: -webkit-box;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-card span {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
}

.rank-num {
  top: 8px;
  left: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff !important;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  font-size: 13px !important;
  font-weight: 900 !important;
}

.page-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
  padding: 72px max(24px, calc((100vw - 1240px) / 2 + 24px));
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(251, 113, 133, 0.65), transparent 28%), linear-gradient(135deg, #111827, #881337 52%, #be123c);
}

.page-hero div {
  max-width: 820px;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.page-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.75;
}

.inline-filter {
  margin-top: 26px;
  flex-wrap: wrap;
}

.inline-filter input {
  min-width: min(480px, 100%);
  padding: 13px 18px;
}

.inline-filter select {
  padding: 13px 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  overflow: hidden;
  border-radius: 20px;
}

.category-cover-stack img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 8px 0 10px;
  font-size: 26px;
}

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

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

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

.detail-shell {
  padding-top: 34px;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  padding: 34px;
  border-radius: 36px;
  color: #fff;
  background: radial-gradient(circle at 85% 15%, rgba(251, 113, 133, 0.55), transparent 28%), linear-gradient(135deg, #111827, #4c0519 55%, #881337);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

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

.detail-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.detail-one-line {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1.7;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffe4e6;
  background: rgba(255, 255, 255, 0.1);
}

.detail-tags {
  margin-bottom: 24px;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 20px 52px rgba(244, 63, 94, 0.32);
  cursor: pointer;
  font-size: 34px;
  transform: translateZ(0);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 34px;
}

.story-card {
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

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

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

.filter-grid .movie-card.is-hidden {
  display: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, #f9fafb, #fff1f2);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-inner h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.footer-inner p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.footer-inner ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  padding: 20px 24px;
  text-align: center;
  color: #6b7280;
  border-top: 1px solid rgba(229, 231, 235, 0.78);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@media (max-width: 900px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    min-height: 660px;
    padding-top: 72px;
  }

  .hero-poster {
    display: none;
  }

  .featured-grid,
  .movie-card.featured,
  .split-section,
  .category-overview-grid,
  .detail-hero,
  .detail-content,
  .footer-inner,
  .ranking-top {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding: 24px;
  }

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

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

  .site-logo {
    font-size: 21px;
  }

  .hero-carousel {
    min-height: 600px;
  }

  .hero-slide {
    padding: 62px 20px 82px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-shell,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .movie-card {
    border-radius: 18px;
  }

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p,
  .card-meta,
  .tag-row {
    display: none;
  }

  .tinted-section {
    padding: 20px;
    border-radius: 24px;
  }

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

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

  .page-hero {
    min-height: 280px;
    padding: 54px 16px;
  }

  .inline-filter {
    display: grid;
  }

  .inline-filter input,
  .inline-filter select {
    width: 100%;
    min-width: 0;
  }

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

  .detail-meta,
  .detail-tags {
    display: none;
  }

  .big-play {
    width: 74px;
    height: 74px;
    font-size: 28px;
  }
}
