:root {
  --rose: #e11d48;
  --rose-dark: #be123c;
  --amber: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #fff1f2;
  --line: #f3f4f6;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 48%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(244, 63, 94, 0.12);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  box-shadow: 0 12px 24px rgba(225, 29, 72, 0.25);
  font-size: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 14px;
  color: #374151;
  font-weight: 700;
  border-radius: 999px;
  transition: 0.22s ease;
}

.site-nav a:hover {
  color: var(--rose);
  background: #fff1f2;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff1f2;
  color: var(--rose);
  font-size: 22px;
}

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 96px 24px 76px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.32) 45%, rgba(0, 0, 0, 0.78)), radial-gradient(circle at center, rgba(225, 29, 72, 0.28), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  color: #ffe4e6;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 1.04;
  font-weight: 950;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.38);
}

.hero-content h2 {
  margin: 18px 0 0;
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900;
}

.hero-content p {
  max-width: 760px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions,
.chip-row,
.section-actions,
.pagination,
.detail-actions,
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.hero-actions {
  margin-top: 30px;
}

.btn,
.filter-actions button,
.filter-actions a,
.pagination a,
.detail-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 850;
  cursor: pointer;
  transition: 0.22s ease;
}

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

.btn.secondary,
.detail-actions a,
.filter-actions a,
.pagination a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.btn:hover,
.filter-actions button:hover,
.filter-actions a:hover,
.pagination a:hover,
.detail-actions a:hover {
  transform: translateY(-2px);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
}

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

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

.section,
.page-section {
  padding: 70px 0;
}

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

.section-heading.center {
  display: block;
  text-align: center;
}

.section-heading h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
  font-weight: 950;
}

.section-heading p,
.page-hero p,
.detail-title p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: 0.3s ease;
}

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

.movie-card.large {
  grid-column: span 2;
}

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

.movie-card.horizontal .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--rose);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.75);
  opacity: 0;
  transition: 0.25s ease;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
}

.movie-card:hover .play-pill {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.meta-chip,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.meta-chip.left {
  left: 12px;
  background: var(--rose);
}

.meta-chip.right {
  right: 12px;
  max-width: 52%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: #2563eb;
}

.rank-badge {
  left: 12px;
  top: auto;
  bottom: 12px;
  min-width: 34px;
  text-align: center;
  background: linear-gradient(135deg, var(--amber), var(--rose));
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 14px;
}

.genre-line,
.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.genre-line {
  margin-bottom: 6px;
  color: #9f1239;
  font-weight: 750;
}

.hot-band {
  width: 100%;
  padding: 66px 0;
  background: linear-gradient(90deg, #fff7ed, #fff1f2);
}

.scroll-row {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
}

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

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

.category-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 112px;
  padding: 22px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.category-tile:hover {
  color: var(--rose);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-tile strong {
  display: block;
  font-size: 22px;
}

.category-tile span {
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 64px;
  border-radius: 32px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.96), rgba(245, 158, 11, 0.88)), radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 40%);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  color: #ffffff;
}

.small-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.86);
}

.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel label span {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-size: 14px;
  font-weight: 800;
}

.filter-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #ffe4e6;
  border-radius: 999px;
  outline: 0;
  background: #fff7f8;
  color: var(--ink);
  font-size: 16px;
}

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

.filter-actions {
  justify-content: flex-end;
}

.filter-actions button,
.filter-actions a,
.pagination a {
  color: var(--rose);
  background: #fff1f2;
  border: 0;
}

.filter-empty {
  display: none;
  margin-top: 24px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border-radius: 20px;
}

body.has-empty-filter .filter-empty {
  display: block;
}

.pagination {
  margin: 42px 0 0;
}

.pagination a {
  min-width: 46px;
}

.pagination .current {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--rose);
  font-weight: 900;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 76px 110px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  font-size: 20px;
  font-weight: 950;
}

.rank-row img {
  width: 110px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.rank-row h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 950;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.rank-row .btn {
  white-space: nowrap;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.player-panel,
.info-panel,
.side-panel,
.text-panel {
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.58));
  cursor: pointer;
}

.player-box.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.big-play {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--rose);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
  font-size: 32px;
}

.detail-title {
  padding: 26px;
}

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

.detail-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #9f1239;
  background: #fff1f2;
  font-weight: 800;
  font-size: 14px;
}

.side-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.side-panel .side-body {
  padding: 20px;
}

.text-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 30px;
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 950;
}

.text-panel p {
  margin: 0 0 20px;
  color: #374151;
  line-height: 1.9;
  font-size: 16px;
}

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

.related-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 72px;
}

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

.mini-link {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #fff7f8;
  font-weight: 800;
}

.mini-link:hover {
  color: var(--rose);
}

.mini-link img {
  width: 54px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.site-footer {
  margin-top: 42px;
  padding: 54px 0 28px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 0.95fr;
  gap: 34px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

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

.footer-links a:hover {
  color: #fb7185;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto 0;
  padding-top: 24px;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    padding: 14px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .movie-grid,
  .movie-grid.featured,
  .movie-grid.compact-grid,
  .category-list,
  .footer-grid,
  .detail-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-row .btn {
    grid-column: 2 / -1;
  }
}

@media (max-width: 640px) {
  .hero-slide {
    min-height: 620px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .page-hero {
    padding: 42px 24px;
    border-radius: 24px;
  }

  .section-heading {
    display: block;
  }

  .movie-grid,
  .movie-grid.featured,
  .movie-grid.compact-grid,
  .category-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.large {
    grid-column: auto;
  }

  .rank-row {
    grid-template-columns: 44px 74px 1fr;
    gap: 12px;
  }

  .rank-row img {
    width: 74px;
  }

  .rank-row h2 {
    font-size: 18px;
  }
}
