:root {
  color-scheme: dark;
  --bg: #080a18;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(168, 85, 247, 0.22);
  --text: #f8fafc;
  --muted: #c4b5fd;
  --soft: #94a3b8;
  --purple: #a855f7;
  --pink: #ec4899;
  --amber: #f59e0b;
  --cyan: #22d3ee;
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 8%, rgba(168, 85, 247, 0.24), transparent 32rem),
    radial-gradient(circle at 84% 0%, rgba(236, 72, 153, 0.18), transparent 30rem),
    linear-gradient(135deg, #0f172a 0%, #35105a 46%, #080a18 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 80%);
  z-index: -1;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.nav-shell,
.page-shell,
.footer-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f472b6 55%, #a855f7);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.38);
}

.brand-text {
  font-size: 20px;
  color: #fff;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  padding: 9px 0;
  color: #ddd6fe;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.72);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(168, 85, 247, 0.28);
  background: rgba(15, 23, 42, 0.62);
  border-radius: 999px;
}

.search-form input {
  width: 210px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 8px 10px;
}

.search-form input::placeholder {
  color: rgba(221, 214, 254, 0.62);
}

.search-form button,
.primary-btn,
.secondary-btn,
.filter-btn,
.play-overlay button {
  border: 0;
  cursor: pointer;
  color: #111827;
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #fbbf24, #f472b6);
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-form button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.filter-btn:hover,
.play-overlay button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(236, 72, 153, 0.34);
}

.secondary-btn {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #f8fafc;
  background: transparent;
  font-size: 24px;
}

.page-shell {
  padding: 34px 0 64px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 92px);
  display: grid;
  align-items: center;
  overflow: hidden;
  border-radius: 0 0 42px 42px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 6% 6% 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.52), transparent);
}

.hero-slide {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.78fr);
  align-items: center;
  gap: 40px;
  padding: 64px 0 82px;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.7s ease both;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(135deg, #fff, #fde68a 44%, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero p {
  max-width: 760px;
  color: #ddd6fe;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

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

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-list span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #ede9fe;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.26);
}

.hero-art {
  position: relative;
  min-height: 500px;
}

.hero-card-main {
  position: absolute;
  inset: 22px 42px 52px 0;
  overflow: hidden;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.42);
}

.hero-card-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.hero-card-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.82), transparent 55%);
}

.hero-rank-card {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(310px, 76%);
  padding: 22px;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(251, 191, 36, 0.32);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.hero-rank-card strong {
  display: block;
  margin: 8px 0;
  font-size: 24px;
}

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

.hero-dots button {
  width: 36px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.hero-dots button.active {
  background: #fbbf24;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 54px 0 22px;
}

.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: #c4b5fd;
  line-height: 1.7;
}

.section-head a {
  color: #fbbf24;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(168, 85, 247, 0.18);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.44);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(251, 191, 36, 0.34), transparent 36%),
    linear-gradient(135deg, rgba(168, 85, 247, 0.36), rgba(15, 23, 42, 0.9));
}

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

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

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 46px;
  text-align: center;
  padding: 6px 9px;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #f472b6);
}

.card-info {
  padding: 18px;
}

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

.card-info p {
  min-height: 48px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #c4b5fd;
  font-size: 13px;
}

.meta-row span,
.meta-row a {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

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

.category-tile {
  min-height: 170px;
  padding: 22px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 24% 18%, rgba(251, 191, 36, 0.22), transparent 36%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(88, 28, 135, 0.62));
  border: 1px solid rgba(168, 85, 247, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-tile h3 {
  margin: 0;
  font-size: 22px;
}

.category-tile p {
  color: #ddd6fe;
  line-height: 1.6;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(168, 85, 247, 0.16);
}

.rank-num {
  font-size: 28px;
  font-weight: 900;
  color: #fbbf24;
  text-align: center;
}

.rank-thumb {
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(15, 23, 42, 0.8));
}

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

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.rank-score {
  min-width: 108px;
  text-align: center;
  color: #fbbf24;
  font-size: 24px;
  font-weight: 900;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  padding: 16px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(168, 85, 247, 0.18);
}

.filter-panel input,
.filter-panel select {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.24);
  color: var(--text);
  background: rgba(8, 10, 24, 0.62);
  padding: 0 14px;
  outline: none;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.52fr) minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  padding: 30px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 12% 14%, rgba(251, 191, 36, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(88, 28, 135, 0.46));
  border: 1px solid rgba(168, 85, 247, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.32), rgba(15, 23, 42, 0.9));
  min-height: 420px;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #c4b5fd;
  font-size: 14px;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.detail-lead {
  color: #ddd6fe;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span,
.detail-meta a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ede9fe;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-box {
  margin-top: 34px;
  overflow: hidden;
  border-radius: 30px;
  background: #030712;
  border: 1px solid rgba(168, 85, 247, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.32), transparent 38%),
    #020617;
}

.player-stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.08));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-stage.ready .play-overlay {
  opacity: 0;
  visibility: hidden;
}

.player-note {
  min-height: 24px;
  padding: 14px 18px;
  color: #cbd5e1;
}

.content-panel {
  margin-top: 28px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(168, 85, 247, 0.16);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

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

.site-footer {
  border-top: 1px solid rgba(168, 85, 247, 0.18);
  background: rgba(2, 6, 23, 0.62);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 34px;
  padding: 38px 0;
}

.footer-shell p {
  color: #c4b5fd;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  color: #ddd6fe;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.empty-state {
  padding: 32px;
  border-radius: 24px;
  color: #c4b5fd;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(168, 85, 247, 0.18);
}

@media (max-width: 1080px) {
  .search-form input {
    width: 150px;
  }

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

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

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .main-nav {
    order: 4;
    width: 100%;
    display: none;
    padding: 10px 0 4px;
  }

  .main-nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .search-form {
    order: 3;
    flex: 1 1 100%;
  }

  .search-form input {
    width: 100%;
    flex: 1 1 auto;
  }

  .hero {
    min-height: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 42px 0 80px;
  }

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

  .hero-card-main {
    inset: 0 42px 42px 0;
  }

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

  .rank-item {
    grid-template-columns: 52px 76px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 2 / -1;
    text-align: left;
    font-size: 18px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .page-shell,
  .footer-shell,
  .hero-slide {
    width: min(100% - 20px, 1280px);
  }

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

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

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

  .hero-rank-card {
    width: 86%;
  }
}
