:root {
  --primary:          #00d4ff;
  --primary-rgb:      0, 212, 255;
  --secondary:        #a855f7;
  --secondary-rgb:    168, 85, 247;
  --accent:           #f43f5e;
  --accent-rgb:       244, 63, 94;

  --bg:               #080c14;
  --glass-bg:         rgba(13, 20, 36, 0.88);
  --glass-border:     rgba(255, 255, 255, 0.06);

  --surface-1:        rgba(255, 255, 255, 0.02);
  --surface-2:        rgba(255, 255, 255, 0.04);
  --surface-3:        rgba(255, 255, 255, 0.08);
  --border-faint:     rgba(255, 255, 255, 0.04);
  --border:           rgba(255, 255, 255, 0.07);
  --border-strong:    rgba(255, 255, 255, 0.12);

  --text-strong:      #f1f5f9;
  --text:             #e2e8f0;
  --text-muted:       #94a3b8;
  --text-subtle:      #64748b;
  --text-faint:       #334155;
  --text-on-primary:  #080c14;

  --glow-1:           rgba(0, 212, 255, 0.045);
  --glow-2:           rgba(168, 85, 247, 0.045);

  --font-body:        'Inter', system-ui, sans-serif;
  --font-heading:     'Inter', system-ui, sans-serif;
  --font-mono:        'Geist Mono', 'SF Mono', Menlo, monospace;
  --font-display:     'Inter', system-ui, sans-serif;
  --font-micro:       'Inter', system-ui, sans-serif;

  --radius-panel:     18px;
  --radius-btn:       12px;
  --radius-card:      12px;

  --card-blur:        18px;
  --shadow-card:      0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lift:      0 0 36px rgba(var(--primary-rgb), 0.28);
  --accent-wash:      rgba(var(--primary-rgb), 0.18);
  --accent-ring:      rgba(var(--primary-rgb), 0.45);
  --letter-micro:     0.08em;
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body[data-overlay="glow"]::before,
body:not([data-overlay])::before {
  top: -200px; left: -200px; width: 600px; height: 600px;
  background: radial-gradient(circle, var(--glow-1) 0%, transparent 70%);
}

body[data-overlay="glow"]::after,
body:not([data-overlay])::after {
  bottom: -200px; right: -200px; width: 600px; height: 600px;
  background: radial-gradient(circle, var(--glow-2) 0%, transparent 70%);
}

body[data-overlay="drift"]::before {
  inset: 0;
  background:
    radial-gradient(900px 600px at 78% 10%, rgba(var(--primary-rgb), 0.10) 0%, transparent 70%),
    radial-gradient(1000px 700px at 10% 90%, rgba(var(--secondary-rgb), 0.08) 0%, transparent 70%);
  animation: gp-drift 24s ease-in-out infinite;
}

body[data-overlay="drift"]::after {
  inset: 0;
  background: radial-gradient(1200px 800px at 50% 50%, rgba(0, 0, 0, 0.45) 0%, transparent 70%);
  mix-blend-mode: multiply;
}

@keyframes gp-drift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-20px, 10px); }
}

body[data-overlay="grain"]::before {
  top: -200px; left: -200px; width: 600px; height: 600px;
  background: radial-gradient(circle, var(--glow-1) 0%, transparent 70%);
}

body[data-overlay="grain"]::after {
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  mix-blend-mode: multiply;
  opacity: 0.35;
}

body[data-overlay="scan"]::before {
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.32) 2px 3px);
  mix-blend-mode: multiply;
}

body[data-overlay="scan"]::after {
  top: -200px; left: -200px; width: 600px; height: 600px;
  background: radial-gradient(circle, var(--glow-1) 0%, transparent 70%);
}

#root {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow: hidden;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

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

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

.fade-up { animation: fadeUp 0.32s cubic-bezier(0.16,1,0.3,1) both; }
.spin { animation: spin 0.8s linear infinite; }

.grad-text {
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.grad-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: var(--text-on-primary);
  font-family: var(--font-body);
  font-weight: 800;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}

.grad-btn:hover {
  box-shadow: 0 0 36px rgba(var(--primary-rgb), 0.45);
  transform: scale(1.02);
}

.grad-btn:active { transform: scale(0.98); }

input, select {
  font-family: var(--font-body);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 9px 13px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.07);
}

input::placeholder { color: var(--text-faint); }

button {
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
}

button:active { transform: scale(0.97); }

.code-chip {
  font-family: var(--font-mono);
  letter-spacing: 0.25em;
  font-weight: 700;
  font-size: 18px;
}

.gp-page {
  flex: 1;
  min-width: 0;
}
