:root {
  --background: 232 38% 7%;
  --foreground: 210 40% 96%;
  --primary: 166 92% 48%;
  --primary-foreground: 232 38% 7%;
  --secondary: 262 88% 64%;
  --secondary-foreground: 210 40% 98%;
  --muted: 232 22% 18%;
  --muted-foreground: 218 18% 72%;
  --destructive: 0 86% 62%;
  --destructive-foreground: 0 0% 100%;
  --border: 228 24% 24%;
  --card: 232 32% 11%;
  --shadow-sm: 0 8px 18px rgba(0,0,0,.22);
  --shadow-md: 0 18px 50px rgba(0,0,0,.34);
  --shadow-lg: 0 30px 90px rgba(19,242,197,.14);
  --transition-fast: 140ms ease;
  --transition-smooth: 260ms cubic-bezier(.4, 0, .2, 1);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
}
.dark {
  --background: 232 38% 7%;
  --foreground: 210 40% 96%;
  --primary: 166 92% 48%;
  --secondary: 262 88% 64%;
  --muted: 232 22% 18%;
  --destructive: 0 86% 62%;
  --border: 228 24% 24%;
  --card: 232 32% 11%;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: hsl(var(--foreground));
  background:
    radial-gradient(circle at 10% 10%, hsla(var(--secondary), .12), transparent 40rem),
    radial-gradient(circle at 90% 90%, hsla(var(--primary), .1), transparent 40rem),
    hsl(var(--background));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
input, textarea, select { font-size: max(16px, 1rem); }
button, .tap-target { min-height: 48px; min-width: 48px; }

.glass {
  background: linear-gradient(135deg, hsla(var(--card), .85), hsla(var(--muted), .6));
  border: 1px solid hsla(var(--border), .8);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.neon {
  box-shadow: 0 0 0 1px hsla(var(--primary), .15), 0 0 40px hsla(var(--primary), .2);
}
.safe-bottom { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
.safe-top { padding-top: env(safe-area-inset-top); }

.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: hsla(var(--primary), .25); border-radius: 99px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: hsla(var(--primary), .45); }

@keyframes bounce-slow {
  0%, 100% { transform: translateY(-8%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
  50% { transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); }
}
.animate-bounce-slow { animation: bounce-slow 3.5s infinite; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.animate-shake { animation: shake 0.2s cubic-bezier(.36,.07,.19,.97) both; }

button:active { transform: scale(0.96); transition: transform 0.1s; }
button:hover { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }

/* Animation Utils */
.fade-in { opacity: 0; animation: fadeIn 0.5s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.slide-up { transform: translateY(20px); opacity: 0; animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Legibility fixes */
strong { color: inherit; }
pre, code { font-family: 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace; }
