
:root {
  color-scheme: dark;
  --twilight-950: #3b0764;
  --twilight-900: #4c0d78;
  --twilight-800: #581c87;
  --twilight-700: #6b21a8;
  --twilight-600: #9333ea;
  --twilight-500: #a855f7;
  --twilight-400: #c084fc;
  --dusk-600: #c026d3;
  --dusk-500: #d946ef;
  --sunset-400: #fb923c;
  --sunset-300: #fdba74;
  --ink: #0f0218;
  --white-90: rgba(255, 255, 255, 0.9);
  --white-70: rgba(255, 255, 255, 0.7);
  --white-60: rgba(255, 255, 255, 0.6);
  --white-40: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.12);
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --shadow-purple: 0 28px 90px rgba(32, 4, 55, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 8%, rgba(217, 70, 239, 0.25), transparent 36rem),
    radial-gradient(circle at 88% 18%, rgba(249, 115, 22, 0.15), transparent 32rem),
    linear-gradient(135deg, #3b0764 0%, #581c87 46%, #4a044e 100%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 75%);
  z-index: -1;
}

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

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

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gradient-text {
  background: linear-gradient(90deg, #d8b4fe 0%, #f0abfc 48%, #fdba74 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-text {
  text-shadow: 0 0 28px rgba(167, 139, 250, 0.5);
}

.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.9rem;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 16px 42px rgba(139, 92, 246, 0.42);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 28px rgba(167, 139, 250, 0.48);
}

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

.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  border-width: 0 0 1px;
}

.nav-container {
  width: min(1280px, calc(100% - 2rem));
  height: 4.75rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
  font-weight: 800;
}

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 12px 30px rgba(147, 51, 234, 0.35);
  color: #fff;
  font-size: 0.9rem;
}

.brand-mark.small {
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
}

.brand-text {
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  min-width: 0;
  flex: 1;
}

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

.search-form {
  width: min(18rem, 24vw);
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.8rem;
  overflow: hidden;
}

.search-form input,
.mobile-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 0.68rem 0.2rem 0.68rem 0.85rem;
}

.search-form input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.search-form button,
.mobile-search button,
.mobile-toggle {
  border: 0;
  color: #fff;
  background: transparent;
}

.search-form button {
  width: 2.5rem;
  height: 2.4rem;
  color: rgba(255, 255, 255, 0.65);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto 1rem;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-panel.open {
  display: grid;
  gap: 0.75rem;
}

.mobile-panel a {
  color: rgba(255, 255, 255, 0.82);
  padding: 0.35rem 0;
}

.mobile-search {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.8rem;
  overflow: hidden;
}

.mobile-search button {
  padding: 0 0.85rem;
  color: #d8b4fe;
}

.page-main {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 7rem 0 5rem;
}

.hero {
  position: relative;
  min-height: 78vh;
  margin-top: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(to top, #3b0764 0%, rgba(59, 7, 100, 0.92) 16%, rgba(59, 7, 100, 0.58) 50%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(135deg, rgba(167, 139, 250, 0.14) 0%, rgba(139, 92, 246, 0.12) 46%, transparent 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 20% 65%, rgba(192, 38, 211, 0.28), transparent 28rem);
}

.hero-inner {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 8rem 0 5.4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 27rem);
  gap: 2rem;
  align-items: end;
}

.hero-copy {
  max-width: 48rem;
}

.hero-labels,
.meta-line,
.hero-actions,
.breadcrumbs,
.detail-meta,
.tag-list,
.stat-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.hero-label,
.pill,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(147, 51, 234, 0.78);
  backdrop-filter: blur(10px);
}

.hero-score,
.score-text {
  color: var(--sunset-300);
  font-weight: 800;
}

.hero h1 {
  margin: 1rem 0 1rem;
  font-size: clamp(2.65rem, 7vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 45rem;
  margin: 0 0 1.6rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.8;
}

.hero-card {
  align-self: stretch;
  display: grid;
  align-content: end;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-purple);
  backdrop-filter: blur(18px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 1rem;
}

.hero-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.hero-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.95rem;
  line-height: 1.7;
}

.category-pills {
  width: min(1280px, calc(100% - 2rem));
  margin: -2.4rem auto 4rem;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0.85rem;
}

.category-pill {
  min-height: 5.2rem;
  display: grid;
  align-content: center;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.category-pill:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 38px rgba(15, 2, 24, 0.34);
}

.category-pill strong {
  font-size: 1.05rem;
}

.category-pill span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.86rem;
}

.home-sections,
.content-stack {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 5rem;
  display: grid;
  gap: 4.5rem;
}

.content-section {
  display: grid;
  gap: 1.4rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.15;
}

.section-more {
  color: #d8b4fe;
  font-weight: 700;
  white-space: nowrap;
}

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

.movie-card {
  display: grid;
  min-width: 0;
  gap: 0.55rem;
  color: #fff;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 1.05rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 40px rgba(15, 2, 24, 0.28);
}

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 45%, rgba(0, 0, 0, 0.06));
}

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
  filter: saturate(1.18);
}

.card-badge,
.score-badge,
.rank-badge,
.card-meta {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 0.55rem;
  color: #fff;
  backdrop-filter: blur(10px);
}

.card-badge {
  top: 0.55rem;
  left: 0.55rem;
  padding: 0.3rem 0.55rem;
  background: rgba(147, 51, 234, 0.82);
  font-size: 0.78rem;
  font-weight: 750;
}

.score-badge {
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.3rem 0.45rem;
  color: #fed7aa;
  background: rgba(0, 0, 0, 0.58);
  font-size: 0.78rem;
  font-weight: 800;
}

.rank-badge {
  left: 0.55rem;
  bottom: 2.1rem;
  width: 2.1rem;
  height: 2.1rem;
  justify-content: center;
  background: linear-gradient(135deg, var(--sunset-400), var(--dusk-600));
  font-weight: 900;
}

.card-meta {
  right: 0.55rem;
  bottom: 0.55rem;
  left: 0.55rem;
  justify-content: space-between;
  padding: 0.32rem 0.45rem;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.76rem;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 750;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: #d8b4fe;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  line-height: 1.55;
}

.card-tags {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-title {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-title p {
  max-width: 54rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.9;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
}

.stat-card,
.category-list-card,
.info-panel,
.text-panel,
.related-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.09);
  border-radius: 1.2rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 55px rgba(15, 2, 24, 0.22);
}

.stat-card {
  padding: 1.15rem;
}

.stat-card strong {
  display: block;
  font-size: 1.7rem;
}

.stat-card span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
}

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

.category-list-card {
  padding: 1.05rem;
  transition: transform 0.22s ease, background 0.22s ease;
}

.category-list-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.14);
}

.category-list-card strong {
  display: block;
  margin-bottom: 0.4rem;
}

.category-list-card span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
}

.breadcrumbs {
  margin: 0 0 1.2rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.92rem;
}

.breadcrumbs a:hover {
  color: #d8b4fe;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21rem;
  gap: 1.4rem;
  align-items: start;
}

.player-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.35rem;
  background: rgba(0, 0, 0, 0.36);
  box-shadow: var(--shadow-purple);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  border: 0;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(147, 51, 234, 0.28), rgba(0, 0, 0, 0.52)),
    linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
  transition: opacity 0.25s ease;
}

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

.play-icon {
  width: 5rem;
  height: 5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 0 36px rgba(167, 139, 250, 0.48);
  font-size: 1.8rem;
  padding-left: 0.2rem;
}

.player-caption {
  display: grid;
  gap: 0.65rem;
  padding: 1.1rem;
}

.player-caption h1 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.75rem);
}

.player-caption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.8;
}

.info-panel {
  padding: 1.05rem;
  display: grid;
  gap: 0.9rem;
}

.info-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.95rem;
}

.detail-meta {
  gap: 0.5rem;
}

.meta-pill {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.88rem;
}

.text-panel,
.related-panel {
  padding: 1.25rem;
}

.text-panel h2,
.related-panel h2,
.info-panel h2 {
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
}

.text-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 2;
  white-space: pre-line;
}

.tag-list a,
.tag-list span {
  display: inline-flex;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.1);
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.prev-next a {
  min-height: 4.5rem;
  display: grid;
  gap: 0.3rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.prev-next span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
}

.search-results-note {
  color: rgba(255, 255, 255, 0.64);
  margin-bottom: 1rem;
}

.site-footer {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(59, 7, 100, 0.46);
  backdrop-filter: blur(12px);
}

.footer-inner {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-weight: 800;
  font-size: 1.1rem;
}

.site-footer h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.site-footer p,
.site-footer a,
.site-footer li,
.footer-bottom {
  color: rgba(255, 255, 255, 0.56);
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
}

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

.fade-in {
  animation: fadeIn 0.6s ease both;
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 0.72rem;
  }

  .search-form {
    display: none;
  }

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

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

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

  .info-panel {
    grid-template-columns: 10rem 1fr;
  }
}

@media (max-width: 860px) {
  .nav-container {
    height: 4.15rem;
  }

  .desktop-nav {
    display: none;
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 7rem;
  }

  .hero-card {
    display: none;
  }

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

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

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

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .brand-text {
    display: none;
  }

  .hero {
    min-height: 72vh;
  }

  .hero-inner {
    padding-bottom: 3.5rem;
  }

  .category-pills,
  .movie-grid,
  .category-list,
  .stats-row,
  .footer-grid,
  .prev-next {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-sections,
  .content-stack {
    gap: 3rem;
  }

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

  .info-panel {
    grid-template-columns: 1fr;
  }
}
