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

:root {
  --bg-deep: #080810;
  --bg-primary: #0f0f1f;
  --bg-panel: #13132a;
  --bg-card: #1a1a3e;
  --accent-blue: #00d4ff;
  --accent-purple: #b44dff;
  --accent-green: #00ff88;
  --accent-red: #ff4466;
  --accent-yellow: #ffcc00;
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-dim: #555577;
  --glow-blue: 0 0 20px rgba(0, 212, 255, 0.3);
  --glow-purple: 0 0 20px rgba(180, 77, 255, 0.3);
  --glow-green: 0 0 20px rgba(0, 255, 136, 0.3);
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

#root {
  position: relative;
  z-index: 1;
}

.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-display { font-family: 'Space Grotesk', sans-serif; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue), var(--accent-green));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradShift 4s ease infinite;
}

@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 136, 0.4), 0 0 15px rgba(0, 255, 136, 0.2); }
  50% { box-shadow: 0 0 15px rgba(0, 255, 136, 0.7), 0 0 40px rgba(0, 255, 136, 0.3); }
}

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

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

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

.animate-fadeIn { animation: fadeIn 0.4s ease forwards; }
.animate-slideUp { animation: slideUp 0.5s ease forwards; }

.glow-btn {
  animation: pulseGlow 2s ease infinite;
}

.shimmer-bar {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.drop-zone {
  border: 2px dashed rgba(0, 212, 255, 0.4);
  transition: all 0.3s ease;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent-blue);
  background: rgba(0, 212, 255, 0.05);
  box-shadow: var(--glow-blue);
}

.panel {
  background: var(--bg-panel);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}

.card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.card:hover {
  border-color: rgba(0, 212, 255, 0.3);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

select, input[type="number"] {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
select:focus, input[type="number"]:focus {
  border-color: var(--accent-blue);
}

.console-bar {
  background: #050510;
  border-top: 1px solid rgba(0, 212, 255, 0.15);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.6;
}

.console-bar .log-info { color: #44cc88; }
.console-bar .log-warn { color: var(--accent-yellow); }
.console-bar .log-error { color: var(--accent-red); }

.toast {
  animation: slideUp 0.3s ease forwards;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.pixelated { image-rendering: pixelated; image-rendering: crisp-edges; }

.step-tab {
  position: relative;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}
.step-tab.active {
  border-bottom-color: var(--accent-blue);
  color: var(--accent-blue);
}
.step-tab:hover:not(.active) {
  color: var(--text-primary);
}

.arch-block {
  background: linear-gradient(135deg, rgba(180,77,255,0.15), rgba(0,212,255,0.15));
  border: 1px solid rgba(180,77,255,0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  text-align: center;
  position: relative;
}

.arch-arrow {
  color: var(--accent-blue);
  font-size: 20px;
  line-height: 1;
}