:root {
  --bg-primary: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a2e;
  --text-primary: #e0e0e0;
  --text-muted: #6b7280;
  --cyan: #00f0ff;
  --magenta: #ff00aa;
  --neon-green: #00ff88;
  --purple: #8b5cf6;
  --cyan-glow: rgba(0, 240, 255, 0.15);
  --magenta-glow: rgba(255, 0, 170, 0.15);
  --green-glow: rgba(0, 255, 136, 0.15);
  --purple-glow: rgba(139, 92, 246, 0.15);
}

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

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

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

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

.glass-card {
  background: rgba(18, 18, 26, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.glass-card-cyan {
  border-color: rgba(0, 240, 255, 0.15);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.05), inset 0 0 30px rgba(0, 240, 255, 0.02);
}

.glass-card-magenta {
  border-color: rgba(255, 0, 170, 0.15);
  box-shadow: 0 0 30px rgba(255, 0, 170, 0.05), inset 0 0 30px rgba(255, 0, 170, 0.02);
}

.glass-card-green {
  border-color: rgba(0, 255, 136, 0.15);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.05), inset 0 0 30px rgba(0, 255, 136, 0.02);
}

.glass-card-purple {
  border-color: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.05), inset 0 0 30px rgba(139, 92, 246, 0.02);
}

.neon-btn {
  position: relative;
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.neon-btn-green {
  background: linear-gradient(135deg, #00ff88, #00cc6a);
  color: #0a0a0f;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), 0 0 60px rgba(0, 255, 136, 0.1);
}
.neon-btn-green:hover {
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.5), 0 0 80px rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
}
.neon-btn-green:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.neon-btn-purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3), 0 0 60px rgba(139, 92, 246, 0.1);
}
.neon-btn-purple:hover {
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.5), 0 0 80px rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}
.neon-btn-purple:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.neon-btn-cyan {
  background: linear-gradient(135deg, #00f0ff, #00b8d4);
  color: #0a0a0f;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}
.neon-btn-cyan:hover {
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
  transform: translateY(-2px);
}

.drop-zone {
  border: 2px dashed rgba(0, 240, 255, 0.4);
  border-radius: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.05);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.1);
}

.progress-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
  background: linear-gradient(90deg, var(--cyan), var(--neon-green));
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.console-log {
  background: #0d0d12;
  border: 1px solid rgba(0, 255, 136, 0.1);
  border-radius: 8px;
  padding: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--neon-green);
  max-height: 160px;
  overflow-y: auto;
  line-height: 1.6;
}

.slider-cyan::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}
.slider-cyan::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(0, 240, 255, 0.2);
  border-radius: 2px;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

select {
  background: #1a1a2e;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}
select:focus {
  border-color: var(--cyan);
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes scan-line {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.noise-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 768px) {
  .thumbnail-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.generated-grid-1 { grid-template-columns: 1fr; }
.generated-grid-4 { grid-template-columns: repeat(2, 1fr); }
.generated-grid-9 { grid-template-columns: repeat(3, 1fr); }
.generated-grid-16 { grid-template-columns: repeat(4, 1fr); }

.step-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.step-active {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #0a0a0f;
}
.step-complete {
  background: var(--neon-green);
  color: #0a0a0f;
}
.step-inactive {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.arch-diagram {
  position: relative;
  padding: 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
}

.node-box {
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}