/* CSS variables, reset, and global page foundation */
:root {
  /* Core palette */
  --bg: #080810;
  --bg2: #0c0c18;
  --bg-grad: radial-gradient(ellipse 80% 60% at 20% 10%, rgba(120,80,255,0.12) 0%, transparent 60%),
             radial-gradient(ellipse 60% 50% at 80% 80%, rgba(232,244,77,0.07) 0%, transparent 60%),
             #080810;

  /* Glass surfaces */
  --glass: rgba(255,255,255,0.04);
  --glass2: rgba(255,255,255,0.07);
  --glass3: rgba(255,255,255,0.10);
  --glass-border: rgba(255,255,255,0.10);
  --glass-border2: rgba(255,255,255,0.16);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
  --glass-shadow-hover: 0 12px 48px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.18);
  --blur: blur(50px) saturate(1.8);
  --blur-sm: blur(20px) saturate(1.5);

  /* Legacy compat */
  --card: rgba(255,255,255,0.04);
  --card2: rgba(255,255,255,0.07);
  --card3: rgba(255,255,255,0.10);
  --card4: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.11);
  --border3: rgba(255,255,255,0.16);

  --text: rgba(255,255,255,0.95);
  --text2: rgba(255,255,255,0.70);
  --muted: rgba(255,255,255,0.30);
  --muted2: rgba(255,255,255,0.45);

  --accent: #e8f44d;
  --accent-dim: rgba(232,244,77,0.12);
  --accent-glow: 0 0 20px rgba(232,244,77,0.35);
  --red: #ff5c3a;
  --green: #4dffa0;
  --blue: #60d4f4;
  --purple: #c460f4;

  --nav-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Spring physics timing */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-soft: cubic-bezier(0.25, 1.2, 0.5, 1);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

button:active, [onclick]:active {
  filter: brightness(0.88);
}
body {
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

* { -webkit-tap-highlight-color: transparent !important; }
input, button, select, textarea { outline: none !important; }
input[type="text"]:focus, input[type="number"]:focus,
input[type="password"]:focus, input[type="email"]:focus {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(232,244,77,0.22) !important;
}
button:focus { outline: none !important; box-shadow: none !important; }
button:focus-visible { outline: 2px solid rgba(232,244,77,0.4) !important; outline-offset: 2px; }
