* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 42%, #fef2f2 100%);
  color: #3f1d13;
  font-family: "Noto Serif SC", "Songti SC", "Microsoft YaHei", serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 235, 0.92);
  border-bottom: 1px solid rgba(185, 28, 28, 0.16);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(127, 29, 29, 0.08);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
  color: #fff7ed;
  box-shadow: 0 16px 30px rgba(185, 28, 28, 0.28);
  transform: rotate(-4deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong,
.footer-brand strong {
  color: #7f1d1d;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-text em {
  margin-top: 4px;
  color: #b91c1c;
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.mobile-nav-link {
  color: #7f1d1d;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #dc2626;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.2);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #7f1d1d;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid rgba(185, 28, 28, 0.12);
}

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

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 12px;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  background: rgba(254, 226, 226, 0.85);
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #450a0a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 96px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 0.8s ease, transform 1.4s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(69, 10, 10, 0.82));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  color: #fff7ed;
  text-align: center;
  text-shadow: 0 18px 38px rgba(0, 0, 0, 0.5);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-title {
  margin: 22px auto 0;
  color: #fde68a;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 800;
}

.hero-desc {
  max-width: 760px;
  margin: 18px auto 0;
  color: #fff7ed;
  font-size: clamp(16px, 2vw, 21px);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  justify-content: center;
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.card-meta em {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(254, 226, 226, 0.18);
  color: #fee2e2;
  font-size: 13px;
  font-style: normal;
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  background: #b91c1c;
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(185, 28, 28, 0.28);
}

.btn-primary:hover {
  background: #991b1b;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: #fbbf24;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section-lift {
  margin-top: -48px;
  position: relative;
  z-index: 5;
}

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

.section-head h2,
.sub-hero h1,
.detail-content h1,
.related-panel h2,
.text-block h2,
.note-panel h2 {
  margin: 0;
  color: #7f1d1d;
  font-weight: 900;
  line-height: 1.16;
}

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

.section-head.light h2,
.section-head.light .section-kicker,
.more-link.light {
  color: #fffbeb;
}

.more-link {
  color: #b91c1c;
  font-weight: 800;
  white-space: nowrap;
}

.featured-grid,
.movie-grid,
.category-grid,
.category-overview-grid,
.compact-showcase {
  display: grid;
  gap: 24px;
}

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

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

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(127, 29, 29, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card.featured {
  border-radius: 24px;
  box-shadow: 0 26px 60px rgba(69, 10, 10, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #7f1d1d;
}

.movie-card.vertical .poster-wrap,
.movie-card.compact .poster-wrap {
  aspect-ratio: 3 / 4;
}

.movie-card img,
.rank-row img,
.mini-poster-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img,
.rank-row:hover img,
.mini-poster-row a:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72));
  opacity: 0.75;
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.88);
  color: #ffffff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  min-height: 48px;
  color: #7f1d1d;
  font-size: 17px;
  line-height: 1.4;
}

.card-desc {
  min-height: 44px;
  color: #6b4b42;
  font-size: 14px;
}

.card-meta em {
  background: #fee2e2;
  color: #991b1b;
}

.dark-band {
  max-width: none;
  margin: 0;
  padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  background: linear-gradient(100deg, #450a0a, #7f1d1d 48%, #991b1b);
}

.dark-band .movie-card {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.dark-band .card-body strong,
.dark-band .card-desc {
  color: #fff7ed;
}

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

.category-tile {
  min-height: 184px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px;
  border-radius: 24px;
  background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.42), transparent 30%), linear-gradient(135deg, #7f1d1d, #b91c1c);
  color: #fff7ed;
  box-shadow: 0 22px 48px rgba(127, 29, 29, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(127, 29, 29, 0.28);
}

.category-tile span {
  color: #fde68a;
  font-size: 14px;
  font-weight: 800;
}

.category-tile strong {
  font-size: 24px;
}

.category-tile em {
  font-style: normal;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 24px;
}

.ranking-panel,
.note-panel,
.search-panel,
.category-overview-card,
.watch-card,
.related-panel {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(127, 29, 29, 0.11);
}

.ranking-panel,
.note-panel,
.category-overview-card,
.related-panel {
  padding: 24px;
}

.note-panel {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: linear-gradient(145deg, #fff7ed, #fee2e2);
}

.note-panel p {
  color: #6b4b42;
  font-size: 17px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 82px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 16px;
  background: #fff7ed;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  background: #fee2e2;
}

.rank-number {
  color: #b91c1c;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
}

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

.rank-info strong {
  overflow: hidden;
  color: #7f1d1d;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em,
.rank-arrow {
  color: #8a5d4e;
  font-size: 13px;
  font-style: normal;
}

.rank-arrow {
  font-size: 26px;
}

.search-panel {
  margin-bottom: 28px;
  padding: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  background: #fff7ed;
  padding: 0 16px;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.16);
}

.search-box span {
  color: #b91c1c;
  font-size: 24px;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #3f1d13;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  background: #b91c1c;
  color: #ffffff;
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 18px;
  background: #fff7ed;
  color: #7f1d1d;
  text-align: center;
  font-weight: 800;
}

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

.sub-hero {
  padding: 92px 24px;
  background: linear-gradient(110deg, #450a0a, #7f1d1d, #b91c1c);
  color: #fff7ed;
  text-align: center;
}

.sub-hero h1 {
  color: #fff7ed;
  font-size: clamp(40px, 6vw, 70px);
}

.sub-hero p {
  max-width: 760px;
  margin: 18px auto 0;
  color: #fde68a;
  font-size: 18px;
}

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

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

.category-overview-head span {
  color: #7f1d1d;
  font-size: 24px;
  font-weight: 900;
}

.category-overview-head a {
  color: #b91c1c;
  font-weight: 800;
}

.category-overview-card p {
  margin: 0 0 18px;
  color: #6b4b42;
}

.mini-poster-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mini-poster-row a {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #7f1d1d;
  aspect-ratio: 4 / 5;
}

.mini-poster-row span {
  position: absolute;
  inset: auto 8px 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
  white-space: nowrap;
}

.detail-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #8a5d4e;
  font-size: 14px;
}

.breadcrumb a {
  color: #b91c1c;
  font-weight: 800;
}

.breadcrumb em {
  font-style: normal;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
  gap: 26px;
}

.watch-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 24px 24px 0 0;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  background: radial-gradient(circle, rgba(185, 28, 28, 0.26), rgba(0, 0, 0, 0.44));
  color: #ffffff;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.25s ease;
}

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

.player-play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 16px 36px rgba(220, 38, 38, 0.35);
  font-size: 34px;
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-one-line {
  margin: 16px 0 0;
  color: #6b4b42;
  font-size: 18px;
}

.detail-meta {
  margin: 20px 0;
}

.detail-meta span {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
}

.tag-row,
.genre-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tag-row span,
.genre-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.12);
}

.genre-row span {
  background: #fef3c7;
}

.text-block {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(185, 28, 28, 0.14);
}

.text-block h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.text-block p {
  margin: 0;
  color: #56362c;
  font-size: 16px;
  line-height: 1.9;
}

.related-panel {
  align-self: start;
  position: sticky;
  top: 92px;
}

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

.movie-card.related {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  border-radius: 16px;
  box-shadow: none;
  background: #fff7ed;
}

.movie-card.related .poster-wrap {
  aspect-ratio: 16 / 10;
  height: 100%;
}

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

.movie-card.related .card-body strong {
  min-height: auto;
  font-size: 14px;
}

.movie-card.related .card-desc {
  display: none;
}

.movie-card.related .card-meta {
  gap: 5px;
}

.movie-card.related .card-meta em {
  padding: 3px 7px;
  font-size: 11px;
}

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

.full-rank .rank-row {
  grid-template-columns: 68px 112px minmax(0, 1fr) 26px;
  padding: 12px;
}

.full-rank .rank-number {
  font-size: 28px;
}

.site-footer {
  background: #450a0a;
  color: #fff7ed;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: center;
}

.footer-brand strong {
  color: #fff7ed;
}

.footer-brand p {
  margin: 6px 0 0;
  color: #fde68a;
}

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

.footer-links a {
  color: #fde68a;
  font-weight: 700;
}

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

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

  .menu-toggle {
    display: block;
  }

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

  .category-grid,
  .category-overview-grid,
  .split-section,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .related-panel {
    position: static;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .brand-mark {
    width: 40px;
    height: 40px;
  }

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

  .hero {
    min-height: 620px;
  }

  .hero-slide {
    padding-top: 88px;
  }

  .section {
    padding: 48px 16px;
  }

  .featured-grid,
  .movie-grid,
  .vertical-grid,
  .all-grid,
  .compact-showcase,
  .category-grid,
  .mini-poster-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-row,
  .full-rank .rank-row {
    grid-template-columns: 46px 74px minmax(0, 1fr) 16px;
  }

  .rank-number,
  .full-rank .rank-number {
    font-size: 20px;
  }

  .detail-wrap {
    padding: 22px 14px 56px;
  }

  .detail-content,
  .related-panel,
  .ranking-panel,
  .note-panel,
  .category-overview-card {
    padding: 18px;
  }

  .movie-card.related {
    grid-template-columns: 110px minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .featured-grid,
  .movie-grid,
  .vertical-grid,
  .all-grid,
  .compact-showcase,
  .category-grid,
  .mini-poster-row {
    grid-template-columns: 1fr;
  }

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

  .btn {
    width: 100%;
  }

  .movie-card.related {
    grid-template-columns: 1fr;
  }
}
