/* base.css — design tokens, reset, shared animation keyframes */

:root {
  /* Surfaces — higher contrast, modern deep slate */
  --bg:    #0a0d14;
  --bg2:   #121624;
  --bg3:   #1c2236;
  --bg4:   #28324e;
  --bg-glass: rgba(18, 22, 36, .85);

  /* Text — crisp high contrast */
  --fg:  #f8fafc;
  --fg2: #cbd5e1;
  --fg3: #8492a6;

  /* Accent + status */
  --acc:  #6366f1;
  --acc2: #818cf8;
  --acc3: #a5b4fc;
  --cyan: #06b6d4;
  --g: #10b981;
  --r: #f43f5e;
  --y: #f59e0b;

  /* Glow colours */
  --glow-acc:  rgba(99, 102, 241, .35);
  --glow-g:    rgba(16, 185, 129, .30);
  --glow-r:    rgba(244, 63, 94, .30);

  --rad:  8px;
  --rad2: 12px;
  --rad3: 16px;

  --tr: 180ms cubic-bezier(.4, 0, .2, 1);
  --tr-slow: 380ms cubic-bezier(.4, 0, .2, 1);

  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background: two slow-drifting aurora blobs plus a faint grid.
   Fixed and pointer-events:none so it never interferes with the UI. */
body::before {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38rem 38rem at 15% 12%, rgba(99, 102, 241, .13), transparent 62%),
    radial-gradient(32rem 32rem at 85% 78%, rgba(34, 211, 238, .09), transparent 62%);
  animation: aurora 26s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .35;
  background-image:
    linear-gradient(rgba(99, 102, 241, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 0%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 25%, transparent 75%);
}

.mono { font-family: var(--mono); }

/* ── Keyframes ─────────────────────────────────────────────── */

@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -1.5%, 0) scale(1.06); }
  100% { transform: translate3d(-1.5%, 2%, 0) scale(1.02); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes popIn {
  0%   { opacity: 0; transform: translateY(14px) scale(.97); }
  100% { opacity: 1; transform: none; }
}

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 var(--glow-g); }
  70%  { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

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

/* Scanning sweep used on active rows / progress bars */
@keyframes sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes countUp {
  from { opacity: .35; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* Respect reduced-motion: keep the UI usable, drop the decoration. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ── Scrollbars ────────────────────────────────────────────── */

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--bg4);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #2e2e40; background-clip: content-box; }

::selection { background: rgba(99, 102, 241, .32); color: #fff; }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  border-radius: 4px;
}
