:root {
  --background: 225 37% 7%;
  --foreground: 220 25% 94%;
  --primary: 282 92% 70%;
  --secondary: 205 96% 68%;
  --muted: 224 22% 16%;
  --muted-foreground: 220 14% 70%;
  --destructive: 0 84% 64%;
  --border: 223 20% 24%;
  --card: 224 28% 11%;
  --shadow-sm: 0 10px 30px hsla(282, 90%, 70%, 0.08);
  --shadow-md: 0 20px 50px hsla(282, 90%, 70%, 0.14);
  --shadow-lg: 0 25px 80px hsla(205, 95%, 65%, 0.16);
  --transition-fast: 180ms ease;
  --transition-smooth: 380ms cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.75rem;
}

.dark {
  --background: 225 37% 7%;
  --foreground: 220 25% 94%;
  --primary: 282 92% 70%;
  --secondary: 205 96% 68%;
  --muted: 224 22% 16%;
  --muted-foreground: 220 14% 70%;
  --destructive: 0 84% 64%;
  --border: 223 20% 24%;
  --card: 224 28% 11%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(circle at top, hsla(282, 90%, 70%, 0.08), transparent 30%),
    radial-gradient(circle at 20% 20%, hsla(205, 95%, 65%, 0.08), transparent 22%),
    linear-gradient(180deg, hsl(var(--background)), hsl(228 40% 5%));
}

.glass {
  background: linear-gradient(180deg, hsla(224, 28%, 14%, 0.72), hsla(224, 28%, 10%, 0.56));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}

.gradient-text {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)), hsl(325 95% 68%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-ring {
  box-shadow:
    0 0 0 1px hsla(282, 92%, 70%, 0.1),
    0 0 30px hsla(205, 96%, 68%, 0.12),
    inset 0 0 20px hsla(282, 92%, 70%, 0.06);
}

.progress-fill {
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--secondary)), hsl(325 95% 68%));
  transition: width var(--transition-smooth);
  box-shadow: 0 0 20px hsla(282, 92%, 70%, 0.35);
}

.skeleton {
  background: linear-gradient(90deg, hsla(220, 18%, 20%, 0.8), hsla(220, 18%, 28%, 0.9), hsla(220, 18%, 20%, 0.8));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

.particle {
  position: absolute;
  bottom: -20px;
  border-radius: 9999px;
  background: radial-gradient(circle, hsla(282, 92%, 70%, 0.85), hsla(205, 96%, 68%, 0.25));
  box-shadow: 0 0 18px hsla(282, 92%, 70%, 0.4);
  animation-name: floatUp;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  opacity: 0.7;
}

.xp-burst {
  position: absolute;
  right: 0;
  top: -1.5rem;
  color: hsl(var(--primary));
  font-weight: 700;
  animation: burst 1.2s ease forwards;
  pointer-events: none;
}

textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 0.75;
  }
  100% {
    transform: translateY(-110vh) scale(1.15);
    opacity: 0;
  }
}

@keyframes burst {
  0% {
    transform: translateY(0) scale(0.85);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(-24px) scale(1.05);
    opacity: 0;
  }
}

pre, code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
}

* {
  scrollbar-width: thin;
  scrollbar-color: hsla(282, 92%, 70%, 0.55) hsla(224, 28%, 14%, 0.5);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: hsla(224, 28%, 14%, 0.5);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, hsla(282, 92%, 70%, 0.75), hsla(205, 96%, 68%, 0.75));
  border-radius: 9999px;
}
