* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: #fff7fb;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #fbcfe8;
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.12);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 22px;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: #6b7280;
  font-size: 12px;
  margin-top: 3px;
}

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

.nav-link {
  position: relative;
  color: #374151;
  font-weight: 650;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ec4899, #fb7185);
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #db2777;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

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

.header-search input,
.mobile-search input,
.filter-toolbar input,
.filter-toolbar select,
.search-hero input,
.search-hero select {
  border: 2px solid #fbcfe8;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.header-search input {
  width: 220px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-toolbar input:focus,
.filter-toolbar select:focus,
.search-hero input:focus,
.search-hero select:focus {
  border-color: #f472b6;
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.16);
}

.header-search button,
.mobile-search button,
.btn-primary,
.btn-secondary,
.play-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.btn-primary:hover,
.play-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 36px rgba(244, 63, 94, 0.32);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  color: #db2777;
  background: #fff;
  border: 1px solid #fbcfe8;
  transition: transform 0.25s ease, background 0.25s ease;
}

.btn-light:hover {
  transform: translateY(-2px);
  background: #fdf2f8;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  color: #374151;
  background: #fdf2f8;
  padding: 9px 12px;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #fbcfe8;
  padding: 16px;
  background: #fff;
}

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

.mobile-nav {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #fce7f3, #fff1f2);
}

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

.hero-slide {
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.42) 52%, rgba(17, 24, 39, 0.22));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  padding: 64px 0;
  animation: fadeUp 0.7s ease both;
}

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

.hero-tags span,
.meta-pills span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  backdrop-filter: blur(12px);
}

.hero-tags span:first-child {
  background: #ec4899;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 30px;
  color: #ffe4ee;
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translateX(-50%);
}

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

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

.section {
  padding: 64px 0;
}

.section.tinted {
  background: linear-gradient(90deg, #fdf2f8, #fff1f2);
}

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

.section-title {
  margin: 0;
  color: #1f2937;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.section-subtitle {
  margin: 8px 0 0;
  color: #6b7280;
}

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

.feature-card,
.category-tile,
.info-card {
  background: #fff;
  border: 1px solid #fbcfe8;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover,
.category-tile:hover,
.info-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(236, 72, 153, 0.16);
}

.feature-icon,
.category-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 18px;
  color: #fff;
  font-size: 24px;
  background: linear-gradient(135deg, #f472b6, #fb7185);
}

.feature-card h3,
.category-tile h2,
.info-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.feature-card p,
.category-tile p,
.info-card p {
  margin: 0;
  color: #6b7280;
}

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #fce7f3;
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: #f9a8d4;
  box-shadow: 0 22px 52px rgba(236, 72, 153, 0.18);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at top, #fbcfe8, #fb7185 46%, #881337);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.38), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-frame::after {
  opacity: 1;
}

.poster-frame img,
.rank-poster img,
.detail-cover img,
.related-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.08);
}

.image-missing {
  opacity: 0;
}

.card-badge,
.card-year {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(236, 72, 153, 0.95);
}

.card-badge.hot {
  background: #ef4444;
}

.card-year {
  left: auto;
  right: 10px;
  background: rgba(17, 24, 39, 0.72);
}

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

.card-body strong {
  overflow: hidden;
  color: #1f2937;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-body span {
  overflow: hidden;
  color: #6b7280;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-body em {
  display: -webkit-box;
  overflow: hidden;
  color: #9ca3af;
  font-size: 12px;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
}

.category-tile::before {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: rgba(244, 114, 182, 0.12);
}

.category-tile h2 {
  position: relative;
}

.category-tile p {
  position: relative;
  min-height: 48px;
}

.category-link {
  position: relative;
  display: inline-flex;
  margin-top: 18px;
  color: #db2777;
  font-weight: 800;
}

.filter-toolbar,
.search-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 24px 0 30px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #fbcfe8;
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.1);
}

.filter-toolbar input,
.search-hero input {
  min-width: min(340px, 100%);
  flex: 1;
}

.filter-toolbar select,
.search-hero select {
  min-width: 140px;
}

.page-hero {
  padding: 58px 0 36px;
  background: linear-gradient(135deg, #fdf2f8, #fff1f2 58%, #ffe4e6);
  border-bottom: 1px solid #fbcfe8;
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #6b7280;
  font-size: 18px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: auto 86px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #fce7f3;
  box-shadow: 0 10px 26px rgba(31, 41, 55, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-card:hover {
  transform: translateX(4px);
  box-shadow: 0 16px 34px rgba(236, 72, 153, 0.14);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
}

.rank-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #fce7f3;
}

.rank-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-content strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 18px;
}

.rank-content small {
  overflow: hidden;
  color: #6b7280;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-content em {
  display: -webkit-box;
  overflow: hidden;
  color: #9ca3af;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-score {
  color: #db2777;
  font-size: 28px;
  font-weight: 900;
}

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

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

.detail-page {
  background: linear-gradient(180deg, #fff7fb, #fff);
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(280px, 0.72fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-side,
.detail-text,
.related-section {
  border-radius: 26px;
  background: #fff;
  border: 1px solid #fbcfe8;
  box-shadow: 0 14px 36px rgba(31, 41, 55, 0.09);
}

.player-card {
  overflow: hidden;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  background: #111827;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: #111827;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.64), rgba(17, 24, 39, 0.18));
}

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

.play-circle {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  box-shadow: 0 18px 42px rgba(244, 63, 94, 0.36);
}

.player-meta {
  padding: 22px;
}

.player-meta h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.player-meta p {
  margin: 0;
  color: #6b7280;
}

.detail-side {
  padding: 22px;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 20px;
  background: #fce7f3;
}

.detail-side h2,
.detail-text h2,
.related-section h2 {
  margin: 20px 0 12px;
  font-size: 24px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
  margin: 18px 0 0;
}

.detail-side dt {
  color: #9ca3af;
}

.detail-side dd {
  margin: 0;
  color: #374151;
  font-weight: 700;
}

.detail-text {
  margin-top: 28px;
  padding: 26px;
}

.detail-text p {
  color: #4b5563;
  font-size: 17px;
}

.related-section {
  margin: 28px 0 64px;
  padding: 26px;
}

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

.no-results {
  display: none;
  padding: 28px;
  text-align: center;
  color: #6b7280;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #fbcfe8;
}

.no-results.show {
  display: block;
}

.site-footer {
  background: linear-gradient(135deg, #fdf2f8, #ffe4e6);
  border-top: 1px solid #fbcfe8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-brand {
  color: #db2777;
  font-size: 22px;
}

.site-footer p {
  max-width: 420px;
  color: #6b7280;
}

.site-footer h3 {
  margin: 0 0 14px;
}

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

.footer-links a {
  color: #6b7280;
}

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

.footer-bottom {
  padding: 16px;
  text-align: center;
  color: #6b7280;
  border-top: 1px solid #fbcfe8;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .nav-shell {
    min-height: 68px;
  }

  .hero,
  .hero-content {
    min-height: 520px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .detail-side {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
  }

  .detail-side h2 {
    margin-top: 0;
  }
}

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

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero,
  .hero-content {
    min-height: 500px;
  }

  .hero h1 {
    font-size: 38px;
  }

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

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

  .section {
    padding: 44px 0;
  }

  .rank-card {
    grid-template-columns: 40px 68px 1fr;
  }

  .rank-score {
    display: none;
  }

  .rank-content em {
    display: none;
  }

  .detail-side {
    display: block;
  }

  .detail-cover {
    max-width: 220px;
  }

  .filter-toolbar,
  .search-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-toolbar input,
  .filter-toolbar select,
  .search-hero input,
  .search-hero select {
    width: 100%;
  }
}
