:root {
  --page: #fff7fb;
  --surface: #ffffff;
  --surface-soft: #fff1f7;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #fbcfe8;
  --pink: #ec4899;
  --rose: #f43f5e;
  --orange: #f97316;
  --gold: #f59e0b;
  --shadow: 0 20px 50px rgba(244, 63, 94, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #fff1f7 0%, #fff7ed 45%, #fff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(251, 207, 232, 0.9);
  box-shadow: 0 8px 30px rgba(236, 72, 153, 0.08);
}

.nav-shell {
  max-width: 1220px;
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 22px;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--rose), var(--orange));
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(236, 72, 153, 0.28);
}

.brand-text {
  background: linear-gradient(90deg, var(--pink), var(--rose), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #374151;
  font-weight: 700;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--pink);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 270px;
}

.header-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  background: white;
  color: var(--ink);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.13);
}

.icon-button,
.search-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, var(--pink), var(--rose));
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.22);
}

.search-button {
  padding: 11px 18px;
  font-weight: 800;
}

.icon-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.mobile-nav {
  display: none;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

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

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  color: #374151;
  font-weight: 700;
}

.mobile-nav a:hover {
  color: var(--pink);
  background: #fff1f7;
}

.page-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 44px 20px 72px;
}

.home-shell {
  padding-bottom: 72px;
}

.hero-carousel {
  position: relative;
  height: min(650px, calc(100vh - 70px));
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

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

.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(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.64) 48%, rgba(17, 24, 39, 0.08) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-panel {
  max-width: 680px;
  color: white;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.hero-title {
  margin: 22px 0 16px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-desc {
  margin: 0 0 24px;
  font-size: clamp(17px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.86);
  max-width: 620px;
}

.hero-meta,
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta span,
.meta-pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 700;
}

.hero-meta span {
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
}

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

.button-primary,
.button-soft,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
  color: white;
  background: linear-gradient(90deg, var(--pink), var(--rose));
  box-shadow: 0 18px 38px rgba(244, 63, 94, 0.34);
}

.button-soft {
  color: #be123c;
  background: #ffe4ef;
}

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

.button-primary:hover,
.button-soft:hover,
.button-ghost:hover {
  transform: translateY(-2px) scale(1.02);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: white;
}

.section {
  margin-top: 64px;
}

.section.alt {
  padding: 44px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff1f7, #ffedd5);
  box-shadow: var(--shadow);
}

.section.cool {
  padding: 44px 0;
  background: linear-gradient(135deg, #eff6ff, #faf5ff);
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

.link-more {
  color: var(--pink);
  font-weight: 900;
  white-space: nowrap;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 10px 32px rgba(31, 41, 55, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #fce7f3, #ffedd5);
}

.poster.tall {
  aspect-ratio: 3 / 4;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s ease;
}

.movie-card:hover .poster img,
.rank-row:hover .rank-thumb img {
  transform: scale(1.07);
}

.play-badge,
.play-circle {
  display: grid;
  place-items: center;
  color: white;
  background: rgba(236, 72, 153, 0.92);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(236, 72, 153, 0.34);
}

.play-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
}

.poster-label {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(17, 24, 39, 0.66);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: #6b7280;
  font-size: 13px;
}

.meta-pill {
  padding: 5px 9px;
  color: #be123c;
  background: #ffe4ef;
  font-size: 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 10px;
  color: #9f1239;
  background: #fff1f7;
  font-size: 13px;
}

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

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

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

.category-tile {
  position: relative;
  min-height: 148px;
  padding: 22px;
  border-radius: 26px;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--rose), var(--orange));
  box-shadow: var(--shadow);
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 170px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 8px 26px rgba(31, 41, 55, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  font-size: 22px;
  font-weight: 900;
}

.rank-row:nth-child(1) .rank-num {
  background: linear-gradient(135deg, #facc15, #f97316);
}

.rank-row:nth-child(2) .rank-num {
  background: linear-gradient(135deg, #d1d5db, #9ca3af);
}

.rank-row:nth-child(3) .rank-num {
  background: linear-gradient(135deg, #fdba74, #ea580c);
}

.rank-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #fff1f7;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-meta {
  color: #be123c;
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 54px;
  border-radius: 34px;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--rose), var(--orange));
  box-shadow: var(--shadow);
}

.page-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -60px;
  top: -80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.page-hero p {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 180px 180px 180px;
  gap: 12px;
  margin: 28px 0;
  padding: 18px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 10px 30px rgba(31, 41, 55, 0.07);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 700;
}

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

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

.player-card,
.info-card,
.side-card {
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video-frame {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: white;
  background: #000;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

.player-cover .play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%);
  font-size: 36px;
}

.video-frame.is-playing .player-cover {
  display: none;
}

.info-card {
  padding: 28px;
}

.info-card h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

.info-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.info-card p {
  margin: 0 0 16px;
  color: #4b5563;
}

.side-card {
  padding: 20px;
}

.side-poster {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  margin-bottom: 18px;
  background: #fff1f7;
}

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

.side-meta {
  display: grid;
  gap: 10px;
  color: #4b5563;
}

.side-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #fee2f0;
  padding-bottom: 10px;
}

.side-meta strong {
  color: #111827;
}

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

.site-footer {
  color: white;
  background: linear-gradient(135deg, #831843, #9f1239, #9a3412);
  margin-top: 72px;
}

.footer-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-shell h2,
.footer-shell h3 {
  margin: 0 0 12px;
}

.footer-shell p,
.footer-shell a {
  color: rgba(255, 255, 255, 0.78);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.hidden-card {
  display: none;
}

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

  .icon-button {
    display: inline-flex;
  }

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

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

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

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

  .rank-row {
    grid-template-columns: 48px 130px 1fr;
  }

  .rank-meta {
    grid-column: 3;
  }
}

@media (max-width: 720px) {
  .nav-shell {
    min-height: 64px;
  }

  .brand {
    font-size: 18px;
  }

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

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

  .hero-shade {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.28), rgba(17, 24, 39, 0.92));
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 84px;
  }

  .hero-title {
    font-size: 42px;
  }

  .section {
    margin-top: 42px;
  }

  .section.alt,
  .page-hero {
    padding: 28px;
    border-radius: 26px;
  }

  .section-head {
    display: block;
  }

  .link-more {
    display: inline-block;
    margin-top: 10px;
  }

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

  .rank-row {
    grid-template-columns: 44px 96px 1fr;
    gap: 10px;
  }

  .rank-info h3 {
    font-size: 16px;
  }

  .rank-info p,
  .rank-meta {
    font-size: 13px;
  }

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

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