:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --fg: #f5f5f5;
  --muted: #a3a3a3;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #e8ff6a;
  --accent-ink: #111111;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Noto Sans SC', system-ui, sans-serif;
  color: var(--fg);
  background: #121212;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Background stage */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #121212;
}

.bg-fx__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
  will-change: transform, opacity;
}

.bg-fx__glow--a {
  width: min(52vw, 640px);
  height: min(52vw, 640px);
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.55), transparent 68%);
  animation: glowDriftA 18s ease-in-out infinite;
}

.bg-fx__glow--b {
  width: min(48vw, 580px);
  height: min(48vw, 580px);
  top: -6%;
  right: -10%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.42), transparent 70%);
  animation: glowDriftB 22s ease-in-out infinite;
}

.bg-fx__glow--c {
  width: min(42vw, 480px);
  height: min(28vw, 320px);
  left: 50%;
  top: 38%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(232, 255, 106, 0.12), transparent 70%);
  animation: glowPulse 10s ease-in-out infinite;
}

.bg-fx__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg-fx__frame {
  fill: none;
  stroke: url(#frameGrad);
  stroke-width: 1.25;
  opacity: 0.55;
}

.bg-fx__frame--soft {
  opacity: 0.28;
  stroke-dasharray: 10 14;
  animation: dashTravel 28s linear infinite;
}

.bg-fx__net {
  fill: none;
  stroke: url(#netGrad);
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0.7;
}

.bg-fx__net--flow {
  stroke: url(#flowGrad);
  stroke-width: 1.4;
  stroke-dasharray: 48 220;
  animation: dashTravel 7s linear infinite;
  opacity: 0.85;
}

.bg-fx__net--flow-slow {
  animation-duration: 11s;
  animation-direction: reverse;
  opacity: 0.45;
}

.bg-fx__star {
  fill: #c4b5fd;
  opacity: 0.35;
  animation: starTwinkle 3.6s ease-in-out infinite;
}

.bg-fx__star:nth-child(3n) {
  animation-duration: 4.8s;
  animation-delay: 0.6s;
}

.bg-fx__star:nth-child(4n) {
  animation-duration: 2.8s;
  animation-delay: 1.2s;
  fill: #e8ff6a;
}

.bg-fx__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 28%, transparent 20%, rgba(18, 18, 18, 0.35) 70%, #121212 100%),
    linear-gradient(180deg, transparent 55%, #121212 92%);
}

@keyframes glowDriftA {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(6%, 8%) scale(1.08);
    opacity: 0.72;
  }
}

@keyframes glowDriftB {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.42;
  }
  50% {
    transform: translate(-8%, 10%) scale(1.12);
    opacity: 0.65;
  }
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.25;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.45;
    transform: translateX(-50%) scale(1.15);
  }
}

@keyframes dashTravel {
  to {
    stroke-dashoffset: -520;
  }
}

@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.9;
  }
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

/* Nav */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0 0.5rem;
}

.logo {
  font-family: Syne, 'Noto Sans SC', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.nav-links {
  display: none;
  gap: 1.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--fg);
}

.nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 255, 106, 0.55);
  background: rgba(232, 255, 106, 0.12);
  color: #f8ffe0;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 0 0 0 rgba(232, 255, 106, 0.4);
  animation: navCtaPulse 1.8s ease-in-out infinite;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-cta::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 1px solid rgba(232, 255, 106, 0.45);
  opacity: 0;
  animation: navCtaRing 1.8s ease-out infinite;
  pointer-events: none;
}

.nav-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  animation: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232, 255, 106, 0.28);
}

.nav-cta:hover::after {
  animation: none;
  opacity: 0;
}

@keyframes navCtaPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(232, 255, 106, 0.35);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 18px 2px rgba(232, 255, 106, 0.28);
    transform: scale(1.04);
  }
}

@keyframes navCtaRing {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@media (min-width: 800px) {
  .nav-links {
    display: flex;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  background: #f5f5f5;
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.95rem;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.foot {
  padding: 1.5rem 0 2.5rem;
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
}

.foot a:hover {
  color: var(--fg);
}

/* Inner pages (about / faq / guide) */
.page {
  padding: 2.5rem 0 1rem;
  max-width: 720px;
}

.page h1 {
  margin: 0;
  font-family: Syne, 'Noto Sans SC', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.page .lead {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.page .lead a {
  color: #e5e5e5;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.page h2 {
  margin: 2.25rem 0 0.75rem;
  font-family: Syne, 'Noto Sans SC', sans-serif;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.page p,
.page li {
  color: var(--muted);
}

.page ul {
  padding-left: 1.15rem;
}

.page a:not(.btn-primary):not(.btn-ghost):not(.nav-cta):not(.logo) {
  color: #e5e5e5;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.page code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: #d4d4d4;
}

.card {
  margin-top: 1.15rem;
  padding: 1.2rem 1.25rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.card h2 {
  margin-top: 0;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.faq-q {
  margin: 0 0 0.4rem;
  color: var(--fg);
  font-weight: 600;
  font-family: Syne, 'Noto Sans SC', sans-serif;
  letter-spacing: -0.02em;
}

.faq-a {
  margin: 0;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (prefers-reduced-motion: reduce) {
  .bg-fx__glow,
  .bg-fx__frame--soft,
  .bg-fx__net--flow,
  .bg-fx__star,
  .nav-cta,
  .nav-cta::after {
    animation: none;
  }
}
