:root {
  --background: 228 30% 8%;
  --foreground: 210 40% 96%;
  --primary: 184 100% 54%;
  --secondary: 281 89% 68%;
  --muted: 224 20% 18%;
  --destructive: 0 84% 64%;
  --border: 220 28% 24%;
  --card: 228 28% 12%;
  --shadow-sm: 0 8px 20px hsla(184, 100%, 54%, 0.08);
  --shadow-md: 0 20px 60px hsla(184, 100%, 54%, 0.14);
  --shadow-lg: 0 30px 100px hsla(281, 89%, 68%, 0.18);
  --transition-fast: 160ms ease;
  --transition-smooth: 320ms cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

.dark {
  --background: 228 30% 8%;
  --foreground: 210 40% 96%;
  --primary: 184 100% 54%;
  --secondary: 281 89% 68%;
  --muted: 224 20% 18%;
  --destructive: 0 84% 64%;
  --border: 220 28% 24%;
  --card: 228 28% 12%;
}

* {
  box-sizing: border-box;
}

html, body, #root {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, hsla(184, 100%, 54%, 0.15), transparent 30%),
    radial-gradient(circle at top right, hsla(281, 89%, 68%, 0.14), transparent 35%),
    linear-gradient(180deg, hsla(228, 30%, 8%, 1) 0%, hsla(231, 30%, 7%, 1) 100%);
}

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

button, input, select, textarea {
  font: inherit;
}

::selection {
  background: hsla(184, 100%, 54%, 0.22);
}

.glass {
  background: linear-gradient(180deg, hsla(228, 28%, 18%, 0.72), hsla(228, 28%, 12%, 0.56));
  border: 1px solid hsla(var(--border) / 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
}

.neon-border {
  position: relative;
}

.neon-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, hsla(184, 100%, 54%, 0.65), hsla(281, 89%, 68%, 0.5), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.grid-bg {
  background-image:
    linear-gradient(hsla(var(--border) / 0.22) 1px, transparent 1px),
    linear-gradient(90deg, hsla(var(--border) / 0.22) 1px, transparent 1px);
  background-size: 30px 30px;
}

.code-rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.code-line {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  color: hsla(184, 100%, 54%, 0.16);
  white-space: nowrap;
  animation: floaty 7s ease-in-out infinite;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: hsla(var(--border) / 0.9);
  border-radius: 999px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.text-gradient {
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--secondary)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card-hover {
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: hsla(var(--primary) / 0.4);
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.focus-ring:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

.skeleton {
  background: linear-gradient(90deg, hsla(var(--muted) / 0.85) 25%, hsla(var(--border) / 0.95) 37%, hsla(var(--muted) / 0.85) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

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

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 16px;
  border-radius: 999px;
}

.stat-ring {
  background: conic-gradient(hsl(var(--primary)) var(--progress), hsla(var(--muted) / 0.8) 0);
}
