* {
  box-sizing: border-box;
}

:root {
  --pink: #ec4899;
  --purple: #8b5cf6;
  --blue: #3b82f6;
  --yellow: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f7f1ff;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(139, 92, 246, 0.16);
  --shadow: 0 18px 45px rgba(78, 45, 136, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(236, 72, 153, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 8%, rgba(59, 130, 246, 0.17), transparent 32rem),
    linear-gradient(135deg, #fff1f7 0%, #f6f0ff 48%, #eff6ff 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.96), rgba(139, 92, 246, 0.96), rgba(59, 130, 246, 0.96));
  box-shadow: 0 12px 30px rgba(76, 29, 149, 0.22);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff7ad;
  text-shadow: 0 0 18px rgba(250, 204, 21, 0.9);
  animation: pulse-glow 1.8s ease-in-out infinite;
}

.brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fef3c7, #ffe4f3);
  -webkit-background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px;
  white-space: nowrap;
  flex: 1;
}

.desktop-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
  color: #fef08a;
  transform: translateY(-1px);
}

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

.header-search input {
  width: 220px;
  border: 0;
  outline: none;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.header-search button,
.primary-button,
.secondary-button,
.filter-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button {
  padding: 10px 16px;
  color: #5b21b6;
  background: #fde047;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  color: #5b21b6;
  background: #fde047;
  box-shadow: 0 12px 26px rgba(250, 204, 21, 0.3);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.header-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.filter-button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
}

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

.mobile-panel.open {
  display: grid;
  gap: 12px;
}

.mobile-panel a {
  color: #fff;
  padding: 8px 0;
}

.hero-banner {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(236, 72, 153, 0.9), rgba(139, 92, 246, 0.86), rgba(59, 130, 246, 0.88)),
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.35), transparent 16rem);
  z-index: -3;
}

.stars-background {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  background-image:
    radial-gradient(#fff 1px, transparent 1px),
    radial-gradient(#fff 1px, transparent 1px);
  background-size: 38px 38px, 74px 74px;
  background-position: 0 0, 22px 28px;
  animation: star-move 18s linear infinite;
  z-index: -2;
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  padding: 68px 0 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  align-items: center;
  gap: 42px;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  gap: 8px;
  align-items: center;
  padding: 9px 15px;
  border-radius: 999px;
  margin-bottom: 18px;
  color: #fff7ad;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 28px rgba(67, 24, 121, 0.3);
}

.hero-subtitle {
  max-width: 680px;
  margin: 0 0 26px;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
}

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

.hero-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-category-row a,
.tag-row span,
.detail-tag,
.rank-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-category-row a {
  color: #fff;
  padding: 9px 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero-panel {
  position: relative;
  min-height: 430px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  overflow: hidden;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 32px 70px rgba(31, 41, 55, 0.3);
  opacity: 0;
  transform: scale(0.96) translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.active,
.hero-slide:first-child {
  opacity: 1;
  transform: scale(1) translateY(0);
}

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

.poster-bg,
.hero-slide::before,
.player-poster-bg {
  background:
    linear-gradient(135deg, rgba(236, 72, 153, 0.62), rgba(139, 92, 246, 0.7), rgba(59, 130, 246, 0.62)),
    radial-gradient(circle at 26% 20%, rgba(255, 255, 255, 0.5), transparent 10rem);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(15, 23, 42, 0.76) 100%);
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  padding: 32px;
}

.hero-slide-content h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.hero-slide-content p {
  margin: 0 0 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.hero-dots {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

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

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

.main-content {
  padding: 52px 0 72px;
}

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

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

.section-head h2,
.page-head h1,
.detail-copy h1 {
  margin: 0;
  color: #111827;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 34px);
}

.page-head h1,
.detail-copy h1 {
  font-size: clamp(34px, 5vw, 52px);
}

.section-more {
  color: var(--pink);
  font-weight: 800;
}

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

.movie-card,
.category-card,
.rank-card,
.detail-box,
.search-box {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.movie-card {
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 55px rgba(78, 45, 136, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #f9a8d4, #c4b5fd, #93c5fd);
}

.poster-bg {
  position: absolute;
  inset: 0;
}

.poster-image {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-image.image-error {
  display: none;
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  padding: 7px 11px;
  border-radius: 999px;
  color: #5b21b6;
  font-size: 13px;
  font-weight: 800;
  background: #fde047;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-body h3 {
  margin: 9px 0 9px;
  font-size: 19px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--pink);
}

.card-body p {
  min-height: 46px;
  margin: 0 0 13px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.detail-tag {
  padding: 5px 9px;
  color: #7e22ce;
  font-size: 12px;
  font-weight: 700;
  background: rgba(216, 180, 254, 0.32);
}

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

.category-card {
  min-height: 164px;
  padding: 24px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

.category-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(59, 130, 246, 0.2));
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 26px;
}

.category-card p {
  margin: 0 0 18px;
  color: #4b5563;
  line-height: 1.7;
}

.category-card a {
  color: var(--pink);
  font-weight: 800;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 74px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
}

.rank-num {
  color: var(--pink);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #f9a8d4, #c4b5fd, #93c5fd);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-thumb img.image-error {
  display: none;
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  color: #4b5563;
  line-height: 1.65;
}

.rank-pill {
  padding: 8px 12px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(90deg, var(--pink), var(--purple));
}

.search-box {
  padding: 22px;
  border-radius: 28px;
  margin-bottom: 28px;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.search-controls input,
.filter-select {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.18);
  font-size: 16px;
}

.filter-button {
  padding: 14px 22px;
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--purple));
}

.detail-hero {
  padding: 46px 0 38px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(236, 72, 153, 0.92), rgba(139, 92, 246, 0.88), rgba(59, 130, 246, 0.9)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 22rem);
}

.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: center;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 32px 70px rgba(31, 41, 55, 0.34);
  background: #111827;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
}

.player-poster-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #5b21b6;
  background: rgba(17, 24, 39, 0.24);
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  font-size: 34px;
  background: #fde047;
  box-shadow: 0 18px 40px rgba(250, 204, 21, 0.35);
}

.player-shell.playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-copy {
  min-width: 0;
}

.detail-copy h1 {
  color: #fff;
  margin-bottom: 16px;
  text-shadow: 0 8px 24px rgba(67, 24, 121, 0.26);
}

.detail-copy .detail-meta {
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 16px;
}

.detail-copy p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.75;
}

.detail-main {
  padding: 46px 0 72px;
}

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

.detail-box {
  padding: 26px;
  border-radius: 28px;
  margin-bottom: 24px;
}

.detail-box h2 {
  margin: 0 0 16px;
  font-size: 27px;
}

.detail-box p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
  font-size: 16px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-item .rank-thumb {
  border-radius: 14px;
}

.side-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.4;
}

.side-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.site-footer {
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(90deg, #831843, #4c1d95, #1d4ed8);
  padding: 36px 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-content: start;
}

.hidden-by-search {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.empty-state.show {
  display: block;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes star-move {
  from {
    background-position: 0 0, 22px 28px;
  }

  to {
    background-position: 76px 76px, 170px 176px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .header-search {
    margin-left: auto;
  }

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

  .hero-panel {
    min-height: 380px;
  }

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

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

  .rank-card {
    grid-template-columns: 54px 86px minmax(0, 1fr);
  }

  .rank-pill {
    display: none;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .brand-name {
    font-size: 20px;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .header-search input {
    width: 100%;
  }

  .hero-banner,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 48px 0;
  }

  .hero-panel {
    min-height: 360px;
  }

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

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

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

  .section-head,
  .page-head,
  .footer-grid {
    display: block;
  }

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

  .rank-card {
    grid-template-columns: 42px 72px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-info h2,
  .rank-info h3 {
    font-size: 17px;
  }

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

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

  .detail-box {
    padding: 20px;
  }
}
