:root {
  --rose: #f43f5e;
  --rose-dark: #be123c;
  --orange: #f97316;
  --yellow: #fde68a;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: rgba(17, 24, 39, .08);
  --shadow: 0 20px 45px rgba(17, 24, 39, .12);
  --shadow-soft: 0 12px 30px rgba(190, 18, 60, .16);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  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, .14), transparent 34rem), linear-gradient(180deg, #fff7ed 0%, #ffffff 38%, #fff 100%);
  line-height: 1.6;
}

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

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(244, 63, 94, .96), rgba(236, 72, 153, .94), rgba(249, 115, 22, .94));
  box-shadow: 0 12px 28px rgba(190, 18, 60, .24);
  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: 72px;
  gap: 20px;
}

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

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: var(--rose-dark);
  background: #fff;
  box-shadow: inset 0 -2px 0 rgba(190, 18, 60, .12);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .88);
  font-weight: 700;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  transition: .24s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .18);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
}

.menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 10px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .7s ease, transform .7s ease;
  background-position: center;
  background-size: cover;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: #fff;
  padding: 88px 0 108px;
  max-width: 760px;
  justify-self: center;
  text-align: center;
}

.hero-content h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -.04em;
  text-shadow: 0 14px 36px rgba(0, 0, 0, .32);
}

.hero-content h2 {
  margin: 22px 0 10px;
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 900;
}

.hero-content p,
.page-hero p {
  margin: 18px auto 0;
  max-width: 760px;
  color: rgba(255, 255, 255, .9);
  font-size: clamp(16px, 2vw, 22px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--rose-dark);
  background: rgba(244, 63, 94, .1);
}

.hero-tags,
.tag-list,
.filter-row,
.hero-actions,
.detail-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  justify-content: center;
  margin: 22px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: rgba(244, 63, 94, .1);
  font-size: 13px;
  font-weight: 800;
}

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

.hero-actions {
  justify-content: center;
  margin-top: 26px;
}

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

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: var(--shadow-soft);
}

.primary-button:hover,
.movie-card:hover,
.category-tile:hover,
.compact-card:hover,
.ranking-card:hover {
  transform: translateY(-4px);
}

.primary-button.small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .44);
  background: rgba(255, 255, 255, .14);
}

.ghost-button.dark {
  color: var(--rose-dark);
  border-color: rgba(244, 63, 94, .24);
  background: #fff;
}

.ghost-button.light {
  color: #fff;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  font-size: 38px;
  line-height: 1;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

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

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

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

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

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

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

.elevated-section {
  margin-top: -48px;
  padding: 32px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 5;
}

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

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -.03em;
}

.section-heading p:not(.eyebrow) {
  margin: 12px auto 0;
  max-width: 720px;
  color: var(--muted);
}

.small-heading h2 {
  font-size: 28px;
}

.section-link {
  min-height: 40px;
  color: var(--rose-dark);
  background: rgba(244, 63, 94, .1);
}

.search-panel {
  display: grid;
  gap: 16px;
  margin: 24px 0 34px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(244, 63, 94, .18);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(190, 18, 60, .08);
}

.search-box span {
  color: var(--rose);
  font-size: 28px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
}

.filter-row {
  justify-content: center;
}

.filter-chip {
  border: 0;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: rgba(244, 63, 94, .1);
  font-weight: 850;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

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

.category-tile {
  min-height: 190px;
  padding: 22px;
  border-radius: 22px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 12px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: .24s ease;
}

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

.category-tile strong {
  font-size: 14px;
  color: rgba(255, 255, 255, .88);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 28px rgba(17, 24, 39, .08);
  transition: .24s ease;
}

.large-card {
  min-height: 100%;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(244, 63, 94, .18), rgba(249, 115, 22, .18));
  overflow: hidden;
}

.poster-wrap img,
.rank-poster img,
.compact-card img,
.detail-cover,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img {
  transition: transform .35s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
}

.poster-badge,
.score-pill {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(190, 18, 60, .28);
}

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

.movie-title {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 950;
  color: var(--ink);
}

.movie-title:hover,
.ranking-copy a:hover,
.compact-card:hover strong {
  color: var(--rose-dark);
}

.movie-line {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 800;
}

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

.rank-panel,
.category-overview-card,
.text-card,
.aside-card,
.detail-title-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 32px 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #fff7ed;
  transition: .24s ease;
}

.rank-row img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
}

.rank-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--rose);
  font-weight: 950;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy small {
  color: var(--muted);
}

.rank-row em {
  color: var(--rose-dark);
  font-style: normal;
  font-weight: 950;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 0;
  padding: 72px 44px;
  border-radius: 32px;
  color: #fff;
  background: linear-gradient(135deg, rgba(190, 18, 60, .96), rgba(244, 63, 94, .9), rgba(249, 115, 22, .82));
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.compact-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

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

.category-overview-card {
  padding: 26px;
}

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

.category-overview-head h2 {
  margin: 10px 0 0;
  font-size: 24px;
  line-height: 1.3;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border-radius: 18px;
  background: #fff7ed;
  transition: .24s ease;
}

.compact-card img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
}

.compact-card strong,
.compact-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card small {
  color: var(--muted);
}

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

.ranking-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 88px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, .07);
  transition: .24s ease;
}

.rank-index {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-size: 20px;
  font-weight: 950;
}

.rank-poster {
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #fff1f2;
}

.ranking-copy a {
  font-size: 22px;
  font-weight: 950;
}

.ranking-copy p {
  margin: 8px 0 10px;
  color: var(--muted);
}

.score-pill {
  position: static;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.detail-main {
  min-width: 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #050505;
  box-shadow: 0 28px 64px rgba(17, 24, 39, .35);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 0, 0, .64), rgba(190, 18, 60, .26));
  cursor: pointer;
  transition: opacity .24s ease, visibility .24s ease;
}

.video-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--rose-dark);
  background: #fff;
  font-size: 34px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .3);
}

.video-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .46);
  font-size: 13px;
  opacity: 0;
  transform: translateY(6px);
  transition: .2s ease;
  pointer-events: none;
}

.video-message.show {
  opacity: 1;
  transform: translateY(0);
}

.detail-title-card,
.text-card,
.aside-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-title-card h1 {
  margin: 10px 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 950;
}

.detail-title-card p,
.text-card p {
  color: #374151;
  margin: 0;
  font-size: 17px;
}

.detail-meta,
.detail-tags {
  margin-top: 18px;
}

.text-card h2,
.aside-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.detail-nav-links {
  justify-content: center;
  margin: 24px 0 0;
}

.detail-aside {
  position: sticky;
  top: 96px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  background: #fff1f2;
  box-shadow: var(--shadow);
}

.info-list {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.info-list dt {
  color: var(--muted);
  font-weight: 850;
}

.info-list dd {
  margin: 0;
  font-weight: 850;
}

.related-section {
  padding-top: 38px;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 20px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  font-weight: 850;
  box-shadow: var(--shadow);
}

.empty-state.show {
  display: block;
}

.site-footer {
  margin-top: 64px;
  color: rgba(255, 255, 255, .78);
  background: #111827;
}

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

.footer-inner p {
  max-width: 520px;
  margin: 12px 0 0;
}

.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
  font-weight: 850;
}

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

[data-card].hidden {
  display: none;
}

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

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

  .rank-panel,
  .detail-aside {
    position: static;
  }

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

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

  .menu-button {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: rgba(190, 18, 60, .96);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
  }

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

  .hero-content {
    padding: 74px 0 96px;
  }

  .hero-control {
    display: none;
  }

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

  .elevated-section,
  .page-hero,
  .category-overview-card,
  .detail-title-card,
  .text-card,
  .aside-card {
    padding: 22px;
  }

  .section-heading,
  .category-overview-head,
  .footer-inner {
    display: grid;
    align-items: start;
  }

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

  .ranking-card {
    grid-template-columns: 44px 72px 1fr;
  }

  .ranking-card .score-pill {
    grid-column: 2 / 4;
    justify-self: start;
  }

  .rank-row {
    grid-template-columns: 30px 46px 1fr;
  }

  .rank-row em {
    grid-column: 2 / 4;
  }

  .detail-nav-links,
  .hero-actions {
    align-items: stretch;
  }

  .detail-nav-links a,
  .hero-actions a {
    width: 100%;
  }
}
