* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #1f2937;
  background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 46%, #eff6ff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, #ec4899 0%, #a855f7 48%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(147, 51, 234, 0.28);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.mobile-menu a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-menu a:hover {
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-menu.is-open {
  display: flex;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 56px;
  padding: 72px max(32px, calc((100vw - 1180px) / 2)) 110px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.48;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.45), transparent 34%),
    radial-gradient(circle at 80% 30%, rgba(59, 130, 246, 0.4), transparent 28%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.68) 52%, rgba(17, 24, 39, 0.42));
}

.hero-content,
.hero-poster,
.hero-tools,
.page-hero > * {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 720px;
}

.hero-content.narrow {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #f9a8d4;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #7e22ce;
  background: rgba(250, 245, 255, 0.88);
  font-size: 12px;
  font-weight: 800;
}

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

.primary-button,
.ghost-button,
.small-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.small-button {
  color: #fff;
  background: linear-gradient(90deg, #ec4899, #a855f7);
  box-shadow: 0 18px 34px rgba(236, 72, 153, 0.32);
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
}

.small-button {
  min-height: 38px;
  padding: 0 18px;
  white-space: nowrap;
}

.ghost-button {
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.primary-button:hover,
.ghost-button:hover,
.small-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-tools {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.54);
  backdrop-filter: blur(14px);
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 28px;
  background: #f9a8d4;
}

.home-search-panel,
.section-wrap,
.split-section,
.category-list-section,
.ranking-page-section,
.detail-layout,
.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.home-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 24px;
  align-items: center;
  margin-top: -58px;
  position: relative;
  z-index: 3;
  padding: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(147, 51, 234, 0.2);
  backdrop-filter: blur(20px);
}

.home-search-panel h2,
.section-heading h2,
.compact-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.wide-search input,
.search-box input,
.select-box select {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  outline: none;
  color: #111827;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.18), 0 12px 28px rgba(17, 24, 39, 0.08);
}

.wide-search input {
  padding: 0 22px;
}

.category-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chips a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #7e22ce;
  background: #faf5ff;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.18);
}

.section-wrap,
.split-section,
.category-list-section,
.ranking-page-section {
  margin-top: 72px;
}

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

.section-heading.on-dark h2,
.section-heading.on-dark .eyebrow {
  color: #fff;
}

.text-link {
  color: #db2777;
  gap: 8px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(147, 51, 234, 0.22);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fce7f3, #e0e7ff);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-meta {
  margin-bottom: 7px;
  color: #8b5cf6;
  font-size: 12px;
  font-weight: 900;
}

.movie-card h3,
.ranking-info h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card p,
.category-card p,
.ranking-info p,
.content-block p,
.footer-grid p {
  color: #4b5563;
  line-height: 1.72;
}

.movie-card p {
  margin: 10px 0 0;
  font-size: 14px;
}

.movie-card.compact .card-body {
  padding: 14px;
}

.movie-card.compact h3 {
  font-size: 15px;
}

.movie-card.compact p {
  display: none;
}

.movie-card.compact .tag-row {
  display: none;
}

.rank-section {
  margin-top: 76px;
  padding: 72px max(24px, calc((100vw - 1180px) / 2));
  background:
    radial-gradient(circle at 10% 20%, rgba(236, 72, 153, 0.36), transparent 28%),
    radial-gradient(circle at 90% 25%, rgba(59, 130, 246, 0.32), transparent 28%),
    linear-gradient(135deg, #111827 0%, #1f2937 100%);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.rank-number {
  color: #f9a8d4;
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.rank-meta {
  grid-column: 3;
  margin-top: -18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 84px max(32px, calc((100vw - 1180px) / 2));
  color: #fff;
  background: linear-gradient(135deg, #111827, #312e81);
}

.simple-hero::before,
.listing-hero::before {
  background:
    radial-gradient(circle at 15% 10%, rgba(236, 72, 153, 0.35), transparent 32%),
    radial-gradient(circle at 82% 20%, rgba(59, 130, 246, 0.35), transparent 30%);
  filter: none;
  transform: none;
  opacity: 1;
}

.page-hero p {
  max-width: 780px;
}

.page-chips {
  margin-top: 26px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 54px rgba(17, 24, 39, 0.1);
}

.category-cover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 22px;
}

.category-cover-grid img {
  width: 100%;
  height: 116px;
  object-fit: cover;
}

.control-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  margin-bottom: 24px;
}

.search-box span,
.select-box span {
  display: block;
  margin: 0 0 8px 4px;
  color: #7e22ce;
  font-size: 12px;
  font-weight: 900;
}

.search-box input,
.select-box select {
  padding: 0 18px;
}

.empty-state {
  display: none;
  padding: 24px;
  border-radius: 20px;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.85);
  text-align: center;
}

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

.ranking-hero {
  min-height: 430px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 62px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.08);
}

.ranking-index {
  color: #db2777;
  font-size: 28px;
  font-weight: 900;
}

.ranking-poster img {
  width: 92px;
  height: 124px;
  border-radius: 16px;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  color: #6b7280;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin-top: 24px;
}

.detail-hero-card,
.player-section,
.content-block,
.aside-card {
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.1);
}

.detail-hero-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
}

.detail-poster img {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.detail-one-line {
  color: #4b5563;
}

.detail-meta-grid {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  color: #374151;
  font-weight: 700;
}

.detail-tags span {
  color: #fff;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
}

.player-section {
  margin-top: 24px;
  padding: 16px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-shell video,
.play-overlay,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-shell video {
  object-fit: contain;
  z-index: 1;
}

.play-overlay {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover {
  object-fit: cover;
  filter: brightness(0.62);
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
  font-size: 32px;
  text-indent: 5px;
}

.player-section.is-playing .play-overlay {
  display: none;
}

.content-block {
  margin-top: 24px;
  padding: 28px;
}

.content-block h2,
.aside-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 26px;
}

.content-block p {
  margin: 0;
  font-size: 17px;
}

.aside-card {
  position: sticky;
  top: 96px;
  padding: 18px;
}

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

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

.aside-related .poster-link img {
  height: 138px;
}

.aside-related .poster-badge {
  display: none;
}

.site-footer {
  margin-top: 86px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: #fff;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #9ca3af;
}

@media (max-width: 1080px) {
  .movie-grid,
  .movie-grid.small-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .aside-card {
    position: static;
  }
}

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

  .nav-toggle {
    display: block;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding-top: 64px;
  }

  .hero-poster {
    width: min(280px, 72vw);
    margin: 0 auto;
    transform: none;
  }

  .home-search-panel {
    grid-template-columns: 1fr;
    margin-top: -30px;
  }

  .category-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-card,
  .detail-hero-card,
  .ranking-row {
    grid-template-columns: 1fr;
  }

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

  .control-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 18px;
  }

  .movie-grid,
  .movie-grid.small-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .card-body {
    padding: 13px;
  }

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p,
  .tag-row {
    display: none;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .hero-summary,
  .page-hero p {
    font-size: 16px;
  }
}
