:root {
  --background: 258 50% 8%;
  --foreground: 210 40% 98%;
  --primary: 274 95% 68%;
  --secondary: 192 100% 62%;
  --accent: 309 96% 69%;
  --muted: 257 28% 16%;
  --destructive: 0 84% 64%;
  --border: 258 32% 25%;
  --card: 257 36% 12%;

  --shadow-sm: 0 10px 24px rgba(21, 8, 52, 0.34), 0 0 18px rgba(120, 119, 255, 0.18);
  --shadow-md: 0 24px 54px rgba(13, 5, 36, 0.5), 0 0 34px rgba(188, 19, 254, 0.14);
  --shadow-lg: 0 35px 90px rgba(10, 4, 30, 0.6), 0 0 50px rgba(34, 211, 238, 0.15);

  --transition-fast: 160ms ease;
  --transition-smooth: 280ms cubic-bezier(0.22, 1, 0.36, 1);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

.dark {
  --background: 258 52% 6%;
  --foreground: 210 40% 98%;
  --primary: 277 100% 72%;
  --secondary: 189 99% 63%;
  --accent: 317 100% 72%;
  --muted: 257 24% 14%;
  --destructive: 0 90% 67%;
  --border: 258 30% 21%;
  --card: 258 32% 10%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, hsla(var(--primary), 0.35), transparent 24%),
    radial-gradient(circle at 86% 12%, hsla(var(--accent), 0.28), transparent 22%),
    radial-gradient(circle at 50% 78%, hsla(var(--secondary), 0.16), transparent 28%),
    radial-gradient(circle at 76% 62%, hsla(var(--primary), 0.12), transparent 20%),
    linear-gradient(140deg, hsl(258 55% 7%), hsl(265 48% 11%) 42%, hsl(244 44% 8%) 100%);
  color: hsl(var(--foreground));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(hsla(var(--foreground), 0.04) 1px, transparent 1px),
    linear-gradient(90deg, hsla(var(--foreground), 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 48%, transparent 100%);
  opacity: 0.28;
}

body::after {
  inset: -12%;
  background:
    radial-gradient(circle at 20% 26%, hsla(var(--primary), 0.22), transparent 26%),
    radial-gradient(circle at 76% 30%, hsla(var(--accent), 0.2), transparent 28%),
    radial-gradient(circle at 54% 76%, hsla(var(--secondary), 0.16), transparent 24%);
  filter: blur(48px);
  opacity: 0.95;
  animation: neonGlowShift 14s ease-in-out infinite alternate;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.07) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 24%, rgba(255, 255, 255, 0.06) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 72%, rgba(255, 255, 255, 0.05) 0 2px, transparent 3px);
  background-size: 220px 220px, 260px 260px, 300px 300px;
  opacity: 0.6;
}

.card-surface {
  background: linear-gradient(180deg, hsla(var(--card), 0.8), hsla(var(--card), 0.95));
  border: 1px solid hsla(var(--border), 0.95);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  backdrop-filter: blur(18px);
}

.hero-panel {
  position: relative;
  border-radius: 30px;
  border: 1px solid hsla(var(--border), 0.9);
  background:
    radial-gradient(circle at top left, hsla(var(--primary), 0.26), transparent 28%),
    radial-gradient(circle at bottom right, hsla(var(--secondary), 0.18), transparent 30%),
    linear-gradient(135deg, hsla(var(--card), 0.86), hsla(var(--muted), 0.72));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  background: radial-gradient(circle, hsla(var(--accent), 0.34), transparent 66%);
  filter: blur(8px);
}

.logo-orb {
  background: linear-gradient(135deg, hsla(var(--primary), 1), hsla(var(--accent), 1));
}

.nav-ribbon {
  border: 1px solid hsla(var(--border), 0.74);
  background: hsla(var(--card), 0.48);
  backdrop-filter: blur(18px);
}

.game-stat {
  border: 1px solid hsla(var(--border), 0.75);
  background: linear-gradient(135deg, hsla(var(--card), 0.82), hsla(var(--muted), 0.66));
  box-shadow: var(--shadow-sm);
}

.game-stat-violet {
  box-shadow: var(--shadow-sm), inset 0 0 0 1px hsla(var(--primary), 0.18);
}

.game-stat-cyan {
  box-shadow: var(--shadow-sm), inset 0 0 0 1px hsla(var(--secondary), 0.18);
}

.game-stat-pink {
  box-shadow: var(--shadow-sm), inset 0 0 0 1px hsla(var(--accent), 0.18);
}

.quest-strip {
  position: relative;
}

.quest-card {
  border: 1px solid hsla(var(--border), 0.8);
  background: linear-gradient(135deg, hsla(var(--card), 0.82), hsla(var(--muted), 0.62));
  box-shadow: var(--shadow-sm);
}

.progress-track {
  background: hsla(var(--foreground), 0.1);
  border: 1px solid hsla(var(--border), 0.65);
}

.progress-fill {
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)), hsl(var(--secondary)));
  box-shadow: 0 0 24px hsla(var(--primary), 0.35);
}

.glass-panel {
  background: linear-gradient(135deg, hsla(var(--card), 0.72), hsla(var(--muted), 0.5));
  border: 1px solid hsla(var(--border), 0.85);
  backdrop-filter: blur(16px);
}

.token-ring {
  box-shadow: 0 0 0 1px hsla(var(--border), 0.9), 0 0 0 6px hsla(var(--primary), 0.14), 0 0 30px hsla(var(--secondary), 0.14);
}

.section-title {
  letter-spacing: -0.02em;
}

.badge-soft {
  background: linear-gradient(135deg, hsla(var(--primary), 0.18), hsla(var(--accent), 0.14));
  color: hsl(var(--foreground));
  border: 1px solid hsla(var(--primary), 0.26);
}

.badge-secondary {
  background: linear-gradient(135deg, hsla(var(--secondary), 0.18), hsla(var(--primary), 0.1));
  color: hsl(var(--foreground));
  border: 1px solid hsla(var(--secondary), 0.24);
}

.badge-muted {
  background: hsla(var(--foreground), 0.06);
  color: hsl(var(--foreground));
  border: 1px solid hsla(var(--border), 0.92);
}

.resume-sheet {
  background: white;
  color: #111827;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

.animated-rise {
  transform: translateY(0);
  transition: transform var(--transition-fast), box-shadow var(--transition-smooth), border-color var(--transition-fast), background-color var(--transition-fast);
}

.animated-rise:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

input,
textarea,
select {
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: hsl(var(--secondary));
  box-shadow: 0 0 0 4px hsla(var(--secondary), 0.16), 0 0 28px hsla(var(--primary), 0.12);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: hsl(var(--muted));
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, hsla(var(--card), 0.6), transparent);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes neonGlowShift {
  0% {
    transform: translate3d(-1%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(1.5%, 1%, 0) scale(1.04);
  }
}

@media (max-width: 640px) {
  .hero-panel::after {
    width: 220px;
    height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body::after {
    animation: none;
  }
}

@media print {
  body {
    background: white !important;
  }

  body::before,
  body::after,
  .app-shell::before {
    display: none !important;
  }

  .no-print {
    display: none !important;
  }
}
