:root {
  --bg: #fff7fb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --text: #161827;
  --muted: #6b7280;
  --line: rgba(148, 163, 184, 0.22);
  --pink: #ec4899;
  --purple: #8b5cf6;
  --blue: #3b82f6;
  --orange: #f97316;
  --shadow: 0 18px 55px rgba(30, 41, 59, 0.14);
  --soft-shadow: 0 10px 30px rgba(30, 41, 59, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(236, 72, 153, 0.18), transparent 28rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 26rem),
    linear-gradient(180deg, #fff7fb 0%, #ffffff 36%, #f8fbff 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #ec4899, #8b5cf6 52%, #3b82f6);
  box-shadow: 0 14px 35px rgba(91, 33, 182, 0.26);
}

.nav-wrap {
  width: min(1220px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #7c2d12;
  background: linear-gradient(135deg, #fde047, #fb923c);
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(251, 146, 60, 0.35);
}

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

.desktop-nav a,
.mobile-panel a {
  color: rgba(255, 255, 255, 0.93);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: #fde047;
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  min-width: 260px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(16px);
}

.top-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 14px;
  color: #ffffff;
  border: 0;
  outline: 0;
  background: transparent;
}

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

.top-search button {
  padding: 10px 16px;
  color: #ffffff;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  flex-direction: column;
  gap: 12px;
}

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

main,
.page-main,
.detail-main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-carousel {
  margin-top: 28px;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  padding: 64px;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.7s ease, transform 0.9s ease;
  pointer-events: none;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.42) 54%, rgba(15, 23, 42, 0.16)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  color: #ffffff;
}

.hero-label,
.section-kicker {
  margin: 0 0 12px;
  color: #f59e0b;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero-content h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 48px);
}

.hero-content p:not(.hero-label) {
  max-width: 640px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.card-meta,
.tag-cloud {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-meta span,
.tag-cloud span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899, #8b5cf6 58%, #3b82f6);
  box-shadow: 0 16px 32px rgba(139, 92, 246, 0.32);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.ghost-btn.dark {
  color: var(--text);
  border-color: rgba(99, 102, 241, 0.22);
  background: rgba(255, 255, 255, 0.78);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(30, 41, 59, 0.16);
}

.small-btn {
  min-height: 40px;
  padding: 0 16px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(14px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

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

.section-block,
.filter-panel,
.page-hero,
.category-overview-block,
.detail-hero,
.player-section,
.detail-content,
.breadcrumb {
  margin-top: 34px;
}

.section-block,
.filter-panel,
.page-hero,
.category-overview-block,
.detail-hero,
.detail-content {
  padding: clamp(22px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.section-title-row,
.category-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-title-row h2,
.category-overview-head h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.04em;
  color: transparent;
  background: linear-gradient(90deg, #ec4899, #8b5cf6 52%, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
}

.text-link {
  min-height: 40px;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) 1.3fr;
  align-items: center;
  gap: 22px;
}

.filter-panel h2 {
  margin: 0;
  font-size: 30px;
}

.filter-controls {
  display: grid;
  gap: 14px;
}

.card-search,
.search-page-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 16px;
  background: #ffffff;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  min-height: 36px;
  padding: 0 14px;
  color: #475569;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fdf2f8, #eff6ff);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border-radius: 999px;
  box-shadow: 0 14px 24px rgba(139, 92, 246, 0.28);
}

.card-body {
  padding: 16px;
}

.card-meta {
  gap: 6px;
  margin-bottom: 10px;
}

.card-meta span {
  min-height: 24px;
  color: #7c3aed;
  background: #f5f3ff;
  border-color: rgba(124, 58, 237, 0.12);
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

.tag-line {
  margin-top: 12px;
  color: #db2777;
  font-size: 13px;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 20px;
  color: #ffffff;
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
  isolation: isolate;
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(139, 92, 246, 0.38));
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span {
  display: block;
  font-size: 26px;
  font-weight: 950;
}

.category-tile p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 70px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--soft-shadow);
}

.rank-num {
  color: transparent;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 24px;
  font-weight: 950;
}

.rank-row img {
  width: 70px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info {
  display: grid;
  gap: 6px;
}

.rank-info strong {
  font-size: 17px;
}

.rank-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-hot,
.hot-score {
  color: #ffffff;
  padding: 7px 10px;
  background: linear-gradient(135deg, #f97316, #ec4899);
  border-radius: 999px;
  font-weight: 900;
}

.page-hero {
  min-height: 240px;
  display: grid;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.24), transparent 22rem),
    radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.2), transparent 20rem);
}

.page-hero p:not(.section-kicker) {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.search-page-form {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 720px;
  margin-top: 22px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.ranking-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
}

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

.ranking-number {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 6px 9px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;
  font-weight: 950;
}

.ranking-body h2 {
  margin: 10px 0;
  font-size: 24px;
  line-height: 1.25;
}

.ranking-body p {
  color: var(--muted);
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
}

.detail-poster img {
  width: 100%;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.detail-one-line {
  margin: 18px 0 0;
  color: #334155;
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta {
  margin-top: 18px;
}

.detail-meta span,
.tag-cloud span {
  color: #7c3aed;
  background: #f5f3ff;
  border-color: rgba(124, 58, 237, 0.12);
}

.tag-cloud {
  margin-top: 18px;
}

.player-section {
  overflow: hidden;
  background: #020617;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.video-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.2));
  cursor: pointer;
}

.video-start span {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  padding-left: 6px;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899, #8b5cf6 58%, #3b82f6);
  border-radius: 999px;
  box-shadow: 0 24px 55px rgba(139, 92, 246, 0.45);
  font-size: 42px;
}

.video-player.playing .video-start {
  opacity: 0;
  pointer-events: none;
}

.video-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #ffffff;
  font-size: 14px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-content article {
  padding: 24px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.detail-content h2 {
  font-size: 28px;
}

.detail-content p {
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.site-footer {
  margin-top: 54px;
  color: rgba(255, 255, 255, 0.84);
  background: linear-gradient(90deg, #111827, #1f2937 48%, #111827);
}

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

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  color: rgba(255, 255, 255, 0.54);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

[data-card].is-hidden {
  display: none;
}

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

  .menu-toggle {
    display: block;
  }

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

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

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

  .brand {
    font-size: 20px;
  }

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

  .hero-stage {
    min-height: 560px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 34px 24px 74px;
  }

  .hero-dots {
    left: 24px;
  }

  .hero-control {
    display: none;
  }

  .filter-panel,
  .detail-content,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-card {
    grid-template-columns: 120px 1fr;
  }

  .detail-poster {
    max-width: 360px;
  }
}

@media (max-width: 560px) {
  main,
  .page-main,
  .detail-main,
  .nav-wrap,
  .mobile-panel,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1220px);
  }

  .movie-grid,
  .preview-grid,
  .category-grid,
  .rank-list,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-hot {
    grid-column: 3;
    justify-self: start;
  }

  .ranking-card {
    grid-template-columns: 96px 1fr;
  }

  .section-block,
  .filter-panel,
  .page-hero,
  .category-overview-block,
  .detail-hero,
  .detail-content {
    border-radius: 22px;
    padding: 18px;
  }

  .search-page-form {
    flex-direction: column;
    align-items: stretch;
  }

  .video-start span {
    width: 74px;
    height: 74px;
    font-size: 32px;
  }
}

.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  color: #64748b;
  background: #ffffff;
  border-radius: 20px;
  text-align: center;
}
