:root {
  --sakura-50: #fff1f6;
  --sakura-100: #ffe3ee;
  --sakura-300: #f9a8c5;
  --sakura-500: #ec5f9f;
  --sakura-600: #d94686;
  --cream-50: #fff9ed;
  --cream-500: #f5b45b;
  --ink: #1f2937;
  --muted: #6b7280;
  --panel: rgba(255, 255, 255, 0.88);
  --shadow: 0 18px 45px rgba(211, 86, 137, 0.16);
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, #fef6f9 0%, #fffaf0 48%, #f7fff7 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(236, 95, 159, 0.16);
}

.nav-shell {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sakura-600);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--sakura-500), var(--cream-500));
  box-shadow: 0 10px 24px rgba(236, 95, 159, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-links a {
  color: #4b5563;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--sakura-600);
}

.top-search {
  width: min(320px, 32vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(236, 95, 159, 0.22);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(236, 95, 159, 0.08);
}

.top-search input,
.search-box-main input,
.search-box-main select,
.filter-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.top-search input {
  padding: 7px 8px 7px 14px;
}

.top-search button,
.btn-primary,
.btn-ghost,
.filter-chip,
.search-box-main select {
  border: 0;
  border-radius: 999px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.top-search button,
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--sakura-500), var(--sakura-600));
  box-shadow: 0 12px 28px rgba(236, 95, 159, 0.28);
}

.top-search button {
  padding: 8px 14px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
}

.btn-primary:hover,
.top-search button:hover,
.filter-chip:hover {
  transform: translateY(-2px);
}

.btn-primary.full {
  width: 100%;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.14);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border-radius: 12px;
  background: var(--sakura-50);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--sakura-600);
}

.hero-carousel {
  position: relative;
  min-height: clamp(520px, 68vw, 680px);
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.86) 0%, rgba(17, 24, 39, 0.56) 48%, rgba(236, 95, 159, 0.18) 100%), linear-gradient(0deg, rgba(17, 24, 39, 0.86), rgba(17, 24, 39, 0.16));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 154px 20px 120px;
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  margin-bottom: 18px;
  color: #ffd5e5;
  border-radius: 999px;
  background: rgba(236, 95, 159, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.06;
  font-weight: 900;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.hero-content p {
  max-width: 720px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.rank-meta,
.card-meta,
.card-bottom,
.hero-actions,
.tag-row,
.detail-tags,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

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

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

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

.page-shell {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 56px;
}

.content-section {
  margin-bottom: 54px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.section-heading > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 24px;
}

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  color: var(--ink);
}

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

.movie-grid,
.featured-grid,
.category-grid,
.category-overview-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card,
.rank-card,
.detail-card,
.side-card,
.category-tile,
.category-card-large,
.search-box-main,
.filter-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.movie-card {
  border-radius: 20px;
}

.movie-card-link {
  display: block;
  height: 100%;
}

.card-poster {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sakura-100), var(--cream-50));
}

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

.movie-card:hover .card-poster img,
.rank-card:hover .rank-poster img,
.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
}

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

.card-duration,
.rank-num {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
}

.card-duration {
  right: 12px;
  bottom: 12px;
  padding: 4px 9px;
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #fff;
  background: rgba(236, 95, 159, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.78);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-meta,
.card-bottom,
.rank-meta {
  color: var(--muted);
  font-size: 12px;
}

.movie-card h3,
.rank-body h3,
.side-card h2 {
  color: var(--ink);
  font-weight: 850;
}

.movie-card h3 {
  min-height: 48px;
  margin: 8px 0;
  font-size: 17px;
  line-height: 1.42;
}

.movie-card p,
.rank-body p,
.detail-card p,
.side-card p {
  color: #5f6675;
  line-height: 1.7;
}

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

.card-bottom {
  justify-content: space-between;
  margin-top: 14px;
}

.score {
  color: #d97706;
  font-weight: 850;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.detail-tags span,
.detail-meta span {
  color: var(--sakura-600);
  background: var(--sakura-50);
}

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

.category-tile,
.category-card-large {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 156px;
  padding: 22px;
  border-radius: 22px;
  isolation: isolate;
  flex-direction: column;
  justify-content: flex-end;
  background-image: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.76)), var(--tile-image);
  background-size: cover;
  background-position: center;
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile span,
.category-card-large strong {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small,
.category-card-large em {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

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

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

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

.rank-card {
  border-radius: 18px;
}

.rank-link {
  display: flex;
  min-height: 150px;
}

.rank-poster {
  position: relative;
  width: 180px;
  flex: 0 0 180px;
  overflow: hidden;
  background: var(--sakura-50);
}

.rank-num {
  left: 10px;
  top: 10px;
  padding: 6px 10px;
  background: linear-gradient(135deg, var(--sakura-500), var(--cream-500));
}

.rank-body {
  padding: 18px;
}

.rank-body h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.rank-body p {
  display: -webkit-box;
  margin-bottom: 12px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-hero {
  position: relative;
  margin-bottom: 38px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(236, 95, 159, 0.92), rgba(245, 180, 91, 0.72)), var(--page-hero-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.page-hero > div {
  max-width: 820px;
  padding: 58px 42px;
  color: #fff;
}

.page-hero p {
  margin-bottom: 10px;
  font-weight: 850;
}

.page-hero h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 950;
  line-height: 1.08;
}

.page-hero span {
  display: block;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.75;
}

.compact-hero {
  background: linear-gradient(135deg, var(--sakura-500), var(--cream-500));
}

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

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

.filter-panel,
.search-box-main {
  margin-bottom: 22px;
  padding: 12px;
  border-radius: 20px;
}

.filter-panel input,
.search-box-main input,
.search-box-main select {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
}

.search-box-main {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
}

.chip-row {
  margin-bottom: 22px;
}

.filter-chip {
  padding: 9px 14px;
  color: var(--sakura-600);
  background: var(--sakura-50);
}

.filter-chip.is-active {
  color: #fff;
  background: var(--sakura-500);
}

.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border-radius: 20px;
  background: #fff;
}

.detail-shell {
  width: min(1240px, calc(100% - 40px));
}

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

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 24px 58px rgba(17, 24, 39, 0.26);
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #fff;
  background: radial-gradient(circle at center, rgba(236, 95, 159, 0.32), rgba(17, 24, 39, 0.68));
}

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

.player-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sakura-500), var(--sakura-600));
  box-shadow: 0 18px 40px rgba(236, 95, 159, 0.35);
  font-size: 34px;
}

.player-mask strong {
  font-size: 18px;
}

.detail-card,
.side-card {
  margin-top: 24px;
  padding: 26px;
  border-radius: 22px;
}

.detail-card h1 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 950;
  line-height: 1.15;
}

.detail-card h2 {
  margin: 28px 0 12px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.detail-one-line {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  background: var(--cream-50);
  color: #7c4a03;
  font-weight: 650;
}

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

.side-card {
  position: sticky;
  top: 96px;
}

.side-card img {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: var(--sakura-50);
}

.side-card h2 {
  margin: 18px 0 8px;
}

.side-card p {
  margin-bottom: 18px;
}

.site-footer {
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(236, 95, 159, 0.14);
}

.footer-inner {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  max-width: 640px;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 14px;
}

.footer-links a {
  color: #4b5563;
  font-weight: 650;
}

.footer-links a:hover {
  color: var(--sakura-600);
}

@media (max-width: 980px) {
  .nav-shell {
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 20px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links,
  .top-search {
    display: none;
    width: 100%;
  }

  .site-header.is-open .nav-links,
  .site-header.is-open .top-search {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-search {
    max-width: none;
  }

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

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

  .side-card {
    position: static;
  }

  .search-box-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell,
  .detail-shell,
  .footer-inner {
    width: min(100% - 24px, 1200px);
  }

  .hero-content {
    padding: 126px 16px 90px;
  }

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

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

  .rank-link {
    flex-direction: column;
  }

  .rank-poster {
    width: 100%;
    flex-basis: auto;
    aspect-ratio: 16 / 10;
  }

  .page-hero > div {
    padding: 36px 24px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
