:root {
  color-scheme: light;
  --primary: #ec4899;
  --secondary: #8b5cf6;
  --accent: #3b82f6;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #fdf2f8;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(78, 27, 128, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fff1f8 0%, #f5f3ff 46%, #eff6ff 100%);
}

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

img {
  max-width: 100%;
}

.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 34px rgba(91, 33, 182, 0.22);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.02em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.mobile-panel a {
  color: rgba(255, 255, 255, 0.84);
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 24px;
}

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

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

.main-surface {
  overflow: hidden;
}

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

.hero-slider {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 8s ease;
}

.hero-slide.is-active .hero-image {
  transform: scale(1.1);
}

.hero-image.cover-missing,
.movie-poster.cover-missing,
.detail-poster.cover-missing {
  opacity: 0;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.28), transparent 30%), radial-gradient(circle at 86% 24%, rgba(59, 130, 246, 0.3), transparent 32%), linear-gradient(135deg, #831843 0%, #581c87 48%, #1e3a8a 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.94), rgba(131, 24, 67, 0.78), rgba(30, 58, 138, 0.88));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 540px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 340px;
  align-items: center;
  gap: 48px;
  color: #ffffff;
}

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

.hero-badge,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-title {
  margin: 20px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero-desc {
  max-width: 650px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

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

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.9), rgba(139, 92, 246, 0.9));
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  box-shadow: 0 18px 34px rgba(236, 72, 153, 0.28);
}

.btn-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.btn-light {
  color: #7c3aed;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(124, 58, 237, 0.16);
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 24px 45px rgba(91, 33, 182, 0.24);
}

.hero-side {
  align-self: center;
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-side-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
}

.hero-mini-list {
  display: grid;
  gap: 12px;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  transition: 0.25s ease;
}

.hero-mini-card:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateX(4px);
}

.hero-mini-thumb {
  width: 74px;
  height: 50px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #f472b6, #8b5cf6);
}

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

.hero-mini-card strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-mini-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 32px;
  transform: translateY(-50%);
  transition: 0.25s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.section {
  padding: 70px 0;
}

.section-white {
  background: rgba(255, 255, 255, 0.84);
}

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

.section-title {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 950;
  color: #111827;
}

.section-desc {
  margin: 10px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(circle at top left, #f9a8d4, transparent 38%), linear-gradient(135deg, #4c1d95, #1d4ed8);
}

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

.movie-card:hover .movie-poster {
  transform: scale(1.1);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
  opacity: 0.88;
}

.play-chip {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 13px;
  font-weight: 900;
}

.duration-chip,
.score-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.score-chip {
  top: 12px;
  bottom: auto;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.movie-info {
  display: grid;
  gap: 10px;
  padding: 17px;
}

.movie-title {
  margin: 0;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  font-weight: 950;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.card-meta {
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 26px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899, #8b5cf6 52%, #3b82f6);
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6 52%, #06b6d4);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #f97316, #ec4899 52%, #8b5cf6);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 70px rgba(91, 33, 182, 0.24);
}

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

.category-card p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 116px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  font-weight: 950;
}

.rank-thumb {
  width: 116px;
  height: 74px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #f9a8d4, #8b5cf6);
}

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

.rank-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 950;
}

.rank-desc {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin: 26px 0 30px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.08);
}

.search-input {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  color: #111827;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.18);
  outline: none;
}

.search-input:focus {
  box-shadow: inset 0 0 0 2px rgba(236, 72, 153, 0.36);
}

.empty-state {
  display: none;
  padding: 34px;
  border-radius: 24px;
  text-align: center;
  color: #6b7280;
  background: #ffffff;
}

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

.page-hero {
  padding: 82px 0 58px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.25), transparent 28%), linear-gradient(135deg, #831843, #581c87 50%, #1e3a8a);
}

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

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.9;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 42px;
  color: #ffffff;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.36), transparent 28%), linear-gradient(135deg, #111827, #581c87 55%, #0f172a);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster-wrap {
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #f9a8d4, #8b5cf6);
  box-shadow: var(--shadow);
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-title {
  margin: 16px 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-lead {
  max-width: 860px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.9;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(236, 72, 153, 0.32), rgba(2, 6, 23, 0.82));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #ec4899;
  background: #ffffff;
  font-size: 34px;
  box-shadow: 0 22px 48px rgba(236, 72, 153, 0.34);
}

.player-overlay strong {
  font-size: 22px;
  font-weight: 950;
}

.content-card {
  margin-top: 26px;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.08);
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 950;
}

.content-card p {
  margin: 0 0 16px;
  color: #374151;
  line-height: 2;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(90deg, #111827, #581c87, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding: 46px 0;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-weight: 950;
}

.footer-grid p,
.footer-grid a {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.8;
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 14px;
}

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 50px 0 80px;
  }

  .hero-side {
    max-width: 580px;
  }

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

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .logo {
    font-size: 20px;
  }

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

  .hero-side {
    display: none;
  }

  .hero-control {
    display: none;
  }

  .section-head,
  .search-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .rank-item {
    grid-template-columns: 42px 90px 1fr;
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }

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

  .detail-poster-wrap {
    max-width: 260px;
  }

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

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .mobile-panel,
  .hero-content {
    width: min(100% - 22px, 1180px);
  }

  .hero-title,
  .detail-title {
    letter-spacing: -0.03em;
  }

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

  .rank-item {
    grid-template-columns: 38px 1fr;
  }

  .rank-thumb {
    display: none;
  }

  .section {
    padding: 50px 0;
  }
}
