:root {
  --rose: #e11d48;
  --rose-soft: #fff1f2;
  --orange: #f97316;
  --orange-soft: #fff7ed;
  --ink: #111827;
  --muted: #6b7280;
  --line: #f3d7d2;
  --paper: #ffffff;
  --shadow: 0 18px 45px rgba(127, 29, 29, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(244, 63, 94, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 32rem),
    linear-gradient(180deg, #fff7ed 0%, #fff 42%, #fff7ed 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(225, 29, 72, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand,
.footer-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;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.32);
}

.brand-text {
  font-size: 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: rgba(255, 241, 242, 0.72);
  border: 1px solid rgba(225, 29, 72, 0.08);
  border-radius: 999px;
}

.nav-link,
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  color: #4b5563;
  border-radius: 999px;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.22);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--rose-soft);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

.hero {
  position: relative;
  height: min(720px, calc(100vh - 76px));
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: #5f1428;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.52fr);
  align-items: center;
  gap: 56px;
  width: 100%;
  padding: 76px max(32px, calc((100vw - 1180px) / 2)) 92px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  filter: saturate(1.15);
  transform: scale(1.05);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(127, 29, 29, 0.96), rgba(225, 29, 72, 0.76), rgba(249, 115, 22, 0.62)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.12));
}

.hero-content {
  max-width: 760px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--rose);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #ffe4e6;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5.2vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 22px 0 12px;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.12;
}

.hero p,
.page-hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-tags,
.card-tags,
.detail-tags,
.side-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.hero-tags button,
.card-tags span,
.detail-tags span,
.side-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 0;
  color: #9f1239;
  background: rgba(255, 241, 242, 0.92);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: default;
}

.hero-tags button {
  cursor: pointer;
}

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

.button-primary,
.button-ghost,
.button-secondary,
.text-link,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.22s ease;
}

.button-primary {
  color: var(--rose);
  background: #fff;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.2);
}

.button-primary:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--rose-soft);
}

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

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
}

.button-ghost.dark {
  color: var(--rose);
  border-color: rgba(225, 29, 72, 0.18);
  background: #fff;
}

.button-secondary {
  color: var(--rose);
  background: var(--rose-soft);
}

.hero-poster-card {
  position: relative;
  width: min(360px, 100%);
  justify-self: end;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.38);
  backdrop-filter: blur(16px);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
}

.hero-poster-card span {
  position: absolute;
  top: 28px;
  right: 28px;
  padding: 8px 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  border-radius: 999px;
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px !important;
  height: 10px !important;
  padding: 0;
  background: rgba(255, 255, 255, 0.42) !important;
}

.hero-dot.is-active {
  width: 28px !important;
  background: #fff !important;
}

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

.section-tight {
  padding-top: 62px;
}

.gradient-section {
  width: 100%;
  padding-inline: max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, rgba(255, 241, 242, 0.88), rgba(255, 247, 237, 0.95));
}

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

.section-heading.centered {
  display: block;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.section-heading h2,
.detail-article h2,
.related-panel h2,
.detail-side-card h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 12px auto 0;
  color: var(--muted);
}

.section-link,
.text-link {
  color: var(--rose);
  background: var(--rose-soft);
}

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

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

.movie-card,
.category-overview-card,
.rank-card,
.detail-side-card,
.player-card,
.detail-article,
.related-panel,
.filter-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(225, 29, 72, 0.08);
  box-shadow: var(--shadow);
}

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 60px rgba(127, 29, 29, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rose-soft), var(--orange-soft));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.play-glow,
.rank-number,
.tiny-rank {
  position: absolute;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.3);
}

.play-glow {
  left: 50%;
  top: 50%;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: 0.25s ease;
}

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

.rank-number,
.tiny-rank {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 12px;
  font-weight: 900;
}

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

.movie-card-body h3,
.rank-card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.movie-card-body h3 a:hover,
.rank-card h3 a:hover,
.category-overview-card h2 a:hover {
  color: var(--rose);
}

.movie-card-body p,
.rank-card p,
.detail-side-card p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
}

.card-tags {
  margin-top: 14px;
}

.card-tags span {
  color: #9f1239;
  background: var(--rose-soft);
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  padding: 22px;
  color: #fff;
  border-radius: 28px;
  background: #7f1d1d;
  box-shadow: var(--shadow);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(127, 29, 29, 0.88));
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s ease;
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
}

.category-tile span {
  display: block;
  margin-top: 90px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
}

.rank-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
}

.rank-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: 0.35s ease;
}

.cta-band {
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 46px;
  color: #fff;
  border-radius: 34px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 25px 70px rgba(225, 29, 72, 0.28);
}

.cta-band h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 46px);
}

.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  align-items: center;
  padding: 74px max(24px, calc((100vw - 1180px) / 2));
  color: #fff;
  background:
    linear-gradient(135deg, rgba(225, 29, 72, 0.94), rgba(249, 115, 22, 0.88)),
    var(--hero-image, none) center / cover;
}

.slim-hero {
  min-height: 300px;
}

.category-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.16);
}

.page-hero > div {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.overview-grid {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 22px;
  border-radius: 30px;
}

.category-thumb-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 22px;
}

.category-thumb-stack img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 26px;
}

.filter-panel.advanced {
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(140px, 0.7fr)) auto;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid rgba(225, 29, 72, 0.16);
  border-radius: 16px;
  background: #fff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.1);
}

.empty-state {
  display: none;
  padding: 48px;
  color: var(--muted);
  text-align: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.8);
}

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

.detail-top {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 24px;
}

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

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

.detail-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.detail-title-row p {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.watch-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.player-card,
.detail-side-card,
.detail-article,
.related-panel {
  border-radius: 30px;
}

.player-card {
  overflow: hidden;
  padding: 12px;
  background: #140713;
}

.video-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #030712;
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #030712;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.15), rgba(17, 24, 39, 0.5));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-icon {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
  font-size: 34px;
}

.detail-side-card {
  overflow: hidden;
}

.detail-side-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-side-card > div {
  padding: 20px;
}

.side-meta {
  margin-top: 16px;
}

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

.detail-article,
.related-panel {
  padding: 28px;
}

.detail-article h2:not(:first-child) {
  margin-top: 32px;
}

.detail-article p {
  margin: 14px 0 0;
  color: #374151;
  font-size: 17px;
}

.detail-tags {
  margin-top: 16px;
}

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

.related-grid .movie-card-body p,
.related-grid .card-tags,
.related-grid .meta-line span:nth-child(3) {
  display: none;
}

.site-footer {
  margin-top: 48px;
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #9a3412);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 0;
}

.footer-inner p {
  max-width: 520px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.22);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

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

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

  .watch-layout,
  .detail-content-section {
    grid-template-columns: 1fr;
  }

  .detail-side-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .main-nav {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero {
    min-height: 760px;
    height: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px 18px 110px;
  }

  .hero-poster-card {
    justify-self: start;
    width: min(260px, 76vw);
  }

  .section-heading,
  .cta-band,
  .detail-title-row,
  .footer-inner {
    align-items: start;
    flex-direction: column;
  }

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

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

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

  .rank-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .header-inner,
  .section,
  .detail-top,
  .watch-layout,
  .detail-content-section,
  .cta-band,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 17px;
  }

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

  .rank-grid,
  .movie-grid,
  .compact-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .category-thumb-stack img {
    height: 140px;
  }
}
