:root {
  --rose: #e11d48;
  --rose-dark: #9f1239;
  --amber: #b45309;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #fff1f2;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #fff7ed 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

img {
  max-width: 100%;
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rose), #f59e0b);
  box-shadow: 0 12px 26px rgba(225, 29, 72, 0.24);
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #ffffff;
}

.brand-name {
  font-size: 21px;
  letter-spacing: -0.03em;
}

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

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  min-width: 260px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input,
.mobile-search input,
.catalog-controls input,
.catalog-controls select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.header-search input {
  padding: 8px 12px;
  font-size: 14px;
}

.header-search button,
.mobile-search button,
.primary-button,
.ghost-button,
.catalog-controls button {
  border: 0;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.catalog-controls button {
  color: #ffffff;
  background: var(--rose);
}

.header-search button {
  padding: 8px 16px;
  border-radius: 999px;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.catalog-controls button:hover {
  background: var(--rose-dark);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff1f2;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--rose);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 6px;
}

.mobile-search input {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.mobile-search button {
  padding: 10px 18px;
  border-radius: 14px;
}

.hero {
  position: relative;
  min-height: 560px;
  height: 70vh;
  overflow: hidden;
  background: linear-gradient(135deg, #881337, #92400e);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.55) 43%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 74px;
  width: min(650px, calc(100% - 48px));
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.92);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.hero h1,
.detail-copy h1,
.page-hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.75;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.14);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 30px;
  cursor: pointer;
  transform: translateY(-50%);
}

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

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

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

.hero-dots button {
  width: 34px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

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

.section.alt {
  width: 100%;
  padding: 62px max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(90deg, #fff7ed, #fff1f2);
}

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

.section-title > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: #fff1f2;
  color: var(--rose);
  font-size: 22px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(225, 29, 72, 0.32);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.poster-frame {
  position: relative;
  display: block;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, #fecdd3, #fde68a);
}

.movie-card.compact .poster-frame,
.movie-grid.dense .poster-frame {
  height: 220px;
}

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

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

.quality-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--rose);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.movie-card strong {
  color: #1f2937;
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

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

.movie-line {
  min-height: 46px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.movie-genre {
  color: var(--rose);
  font-size: 13px;
  font-weight: 800;
}

.scroll-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  width: 280px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

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

.category-tile {
  min-height: 170px;
  padding: 24px;
  border: 1px solid rgba(225, 29, 72, 0.12);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 23px;
}

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

.category-tile span {
  color: var(--rose);
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 76px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #fff1f2;
  color: var(--rose);
  font-weight: 900;
}

.rank-cover {
  display: block;
  height: 96px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #fecdd3, #fde68a);
}

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

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

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

.rank-score {
  min-width: 70px;
  color: var(--rose);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, #fff1f2, #ffffff 45%, #fff7ed);
}

.page-hero-inner,
.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

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

.catalog-controls {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(150px, 0.5fr)) auto;
  gap: 12px;
  margin-bottom: 26px;
}

.catalog-controls input,
.catalog-controls select {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.catalog-controls button {
  height: 48px;
  padding: 0 20px;
  border-radius: 14px;
}

.catalog-summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 22px;
  color: var(--muted);
}

.empty-state {
  display: none;
  padding: 42px;
  border-radius: 20px;
  background: #fff1f2;
  color: var(--rose-dark);
  font-weight: 800;
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 40px;
  align-items: center;
}

.detail-poster {
  display: block;
  height: 500px;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(135deg, #fecdd3, #fde68a);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  color: #1f2937;
}

.detail-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.detail-copy .tag-list span {
  background: #fff1f2;
  color: var(--rose);
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.player-section {
  padding-top: 0;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.25), rgba(0, 0, 0, 0.58));
  color: #ffffff;
  cursor: pointer;
}

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

.play-circle {
  display: grid;
  width: 98px;
  height: 98px;
  place-items: center;
  border-radius: 999px;
  background: var(--rose);
  box-shadow: 0 20px 40px rgba(225, 29, 72, 0.36);
}

.play-circle::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 8px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 27px solid #ffffff;
}

.article-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
}

.article-card,
.side-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.article-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 25px;
}

.article-card p {
  margin: 0 0 18px;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
}

.compact-poster {
  height: 92px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #fecdd3, #fde68a);
}

.compact-card strong {
  display: block;
  margin-bottom: 6px;
  color: #1f2937;
}

.compact-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

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

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

.breadcrumb a {
  color: var(--rose);
  font-weight: 750;
}

.text-page {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 62px 0;
}

.text-page h1 {
  margin: 0 0 20px;
  font-size: 42px;
}

.text-page p {
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

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

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

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-grid p,
.footer-grid a {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid #d1d5db;
  color: var(--muted);
  text-align: center;
}

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

  .menu-button {
    display: block;
    margin-left: auto;
  }

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

  .catalog-controls,
  .article-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero {
    min-height: 520px;
  }

  .hero-content {
    bottom: 58px;
  }

  .hero-control {
    display: none;
  }

  .hero h1,
  .detail-copy h1,
  .page-hero h1 {
    font-size: 38px;
  }

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

  .poster-frame,
  .movie-card.compact .poster-frame,
  .movie-grid.dense .poster-frame {
    height: 210px;
  }

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

  .detail-poster {
    height: 420px;
  }

  .rank-item {
    grid-template-columns: 42px 62px 1fr;
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
  }

  .catalog-summary {
    display: block;
  }

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

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.dense,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .poster-frame,
  .movie-card.compact .poster-frame,
  .movie-grid.dense .poster-frame {
    height: 260px;
  }

  .section,
  .page-section,
  .page-hero-inner,
  .detail-hero-inner {
    width: min(100% - 24px, 1180px);
  }
}
