:root {
  --pink: #ec4899;
  --rose: #fb7185;
  --orange: #fb923c;
  --dark: #111827;
  --muted: #6b7280;
  --soft: #fff1f2;
  --line: #ffe4e6;
  --shadow: 0 18px 45px rgba(190, 24, 93, 0.15);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--dark);
  background: linear-gradient(135deg, #fff1f2 0%, #fff7ed 44%, #fff 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--rose), var(--orange));
  box-shadow: 0 15px 35px rgba(225, 29, 72, 0.24);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: transform 0.25s ease;
}

.site-logo:hover {
  transform: scale(1.04);
}

.site-logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  overflow: hidden;
}

.nav-link {
  font-weight: 600;
  opacity: 0.96;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff1f2;
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-panel input,
.filter-bar input,
.search-page-form input {
  border: 1px solid rgba(255, 255, 255, 0.36);
  outline: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  min-width: 250px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.header-search input::placeholder,
.mobile-panel input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

.header-search button,
.mobile-panel button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--pink);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-panel input {
  min-width: 0;
  width: 100%;
}

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

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  color: #fff;
  padding-top: 10px;
}

.hero-tag,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 16px;
  margin-bottom: 18px;
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--rose));
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.34);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  font-size: clamp(30px, 4vw, 50px);
}

.hero-copy p {
  margin: 0 0 22px;
  max-width: 620px;
  color: #f3f4f6;
  font-size: 20px;
  line-height: 1.8;
}

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

.hero-meta span,
.card-stats em,
.movie-meta span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-style: normal;
  font-size: 14px;
}

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

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--rose));
  box-shadow: 0 14px 30px rgba(225, 29, 72, 0.28);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  font-size: 36px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 28px;
  transform: translateY(-50%);
}

.hero-next {
  right: 28px;
  transform: translateY(-50%);
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: var(--pink);
}

.page-sections {
  padding: 54px 0;
  display: grid;
  gap: 64px;
}

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

.section-heading div {
  width: 100%;
}

.section-heading span {
  display: inline-block;
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.2;
}

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

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

.movie-card,
.featured-card,
.rank-row,
.rank-card,
.category-tile,
.category-overview-card,
.detail-main-card {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.movie-card-link,
.featured-card a,
.category-tile a,
.category-overview-card a {
  display: block;
  height: 100%;
}

.movie-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

.movie-thumb img,
.featured-card img,
.category-covers img,
.category-stack img,
.detail-aside img,
.rank-row img,
.rank-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-thumb img,
.featured-card img {
  transition: transform 0.5s ease;
}

.movie-card:hover .movie-thumb img,
.featured-card:hover img {
  transform: scale(1.08);
}

.movie-badge,
.movie-duration {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

.movie-badge {
  top: 12px;
  left: 12px;
  color: #fff;
  background: var(--pink);
}

.movie-duration {
  right: 12px;
  bottom: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
}

.movie-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 44px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.34);
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-play {
  opacity: 1;
}

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

.movie-card-body h3,
.rank-row h3,
.rank-card h3 {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.rank-row:hover h3,
.rank-card:hover h3 {
  color: var(--pink);
}

.movie-card-body p,
.rank-row p,
.rank-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta span {
  color: var(--pink);
  background: #fdf2f8;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 6px 0 16px;
  scroll-snap-type: x mandatory;
}

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

.featured-section {
  padding: 32px;
  border-radius: 30px;
  background: linear-gradient(120deg, #ffe4e6, #ffedd5);
}

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

.featured-card {
  position: relative;
  min-height: 360px;
}

.featured-card a,
.featured-card img {
  height: 100%;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.08));
}

.featured-overlay > span {
  align-self: flex-start;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--pink);
  font-weight: 700;
}

.featured-overlay h3 {
  margin: 14px 0 10px;
  font-size: 26px;
}

.featured-overlay p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

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

.category-tile,
.category-overview-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 52px rgba(190, 24, 93, 0.22);
}

.category-covers,
.category-stack {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 6px;
  height: 150px;
  padding: 8px;
  background: #111827;
}

.category-covers img,
.category-stack img {
  border-radius: 16px;
}

.category-covers img:first-child,
.category-stack img:first-child {
  grid-row: span 2;
}

.category-tile div:last-child,
.category-overview-body {
  padding: 20px;
}

.category-tile h3,
.category-overview-body h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p,
.category-overview-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-body span {
  display: inline-flex;
  margin-top: 16px;
  color: var(--pink);
  font-weight: 800;
}

.ranking-panel {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.ranking-main,
.ranking-side {
  border-radius: 28px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ranking-side {
  position: sticky;
  top: 96px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--rose), var(--orange));
}

.ranking-side h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.ranking-side p {
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}

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

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

.rank-row a {
  display: grid;
  grid-template-columns: 42px 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  font-weight: 900;
}

.rank-row img {
  height: 74px;
  border-radius: 16px;
}

.rank-row em,
.rank-card span {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.cta-section,
.page-hero,
.detail-hero {
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--rose), var(--orange));
}

.cta-section {
  border-radius: 30px;
  padding: 44px;
  text-align: center;
}

.cta-section h2 {
  margin: 0 0 12px;
  font-size: 38px;
}

.cta-section p {
  margin: 0 auto 26px;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
}

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

.cta-tags a,
.filter-links a,
.tag-list span {
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
}

.cta-tags a {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.page-hero {
  padding: 58px 0;
}

.page-hero h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 52px);
}

.page-hero p {
  margin: 0;
  max-width: 780px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, 0.86);
}

.breadcrumb a:hover {
  color: #fff;
}

.filter-bar {
  display: grid;
  gap: 16px;
  border-radius: 24px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.filter-bar input,
.search-page-form input {
  width: 100%;
  min-width: 0;
  color: #111827;
  border: 1px solid var(--line);
  background: #fff7ed;
}

.filter-links a {
  color: #be185d;
  background: #fdf2f8;
}

.filter-links a.is-active,
.filter-links a:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--rose));
}

.empty-filter-message,
.search-status {
  padding: 22px;
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-page-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-hero {
  padding: 34px 0 54px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 380px;
  gap: 28px;
  align-items: stretch;
  margin-top: 24px;
}

.player-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding-left: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--rose));
  font-size: 38px;
  box-shadow: 0 18px 45px rgba(236, 72, 153, 0.42);
}

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

.detail-aside {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  border-radius: 28px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.detail-aside img {
  height: 210px;
  border-radius: 20px;
}

.detail-aside h1 {
  margin: 8px 0 12px;
  font-size: 30px;
  line-height: 1.2;
}

.detail-aside p {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

.detail-main-card {
  padding: 32px;
}

.detail-main-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.detail-main-card h2:not(:first-child) {
  margin-top: 30px;
}

.detail-main-card p {
  color: #374151;
  line-height: 1.95;
  font-size: 17px;
}

.lead-text {
  font-size: 19px;
  color: #111827;
}

.detail-meta-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 26px 0;
  list-style: none;
}

.detail-meta-list li {
  border-radius: 18px;
  padding: 14px 16px;
  background: #fff7ed;
}

.detail-meta-list strong {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.detail-meta-list span {
  color: #111827;
  font-weight: 800;
}

.tag-list span {
  color: var(--pink);
  background: #fdf2f8;
}

.site-footer {
  margin-top: 52px;
  color: #fff;
  background: linear-gradient(90deg, #db2777, #f43f5e, #f97316);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.site-footer p,
.site-footer a,
.footer-bottom {
  color: rgba(255, 255, 255, 0.86);
}

.site-footer p {
  line-height: 1.8;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  padding: 18px 0;
  text-align: center;
}

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

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

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

  .detail-layout,
  .ranking-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-side {
    position: static;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .site-logo {
    font-size: 20px;
  }

  .hero-carousel {
    height: 680px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-overview-grid,
  .full-rank-list {
    grid-template-columns: 1fr;
  }

  .featured-section,
  .cta-section,
  .ranking-main,
  .ranking-side,
  .detail-main-card {
    padding: 22px;
    border-radius: 24px;
  }

  .rank-row a {
    grid-template-columns: 34px 92px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-row img {
    height: 68px;
  }

  .search-page-form {
    grid-template-columns: 1fr;
  }

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

  .detail-aside img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

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