:root {
  --bg-deep: #080810;
  --bg-card: #0e0e1a;
  --bg-card-hover: #141428;
  --border-glass: rgba(100, 120, 255, 0.12);
  --accent-blue: #00d4ff;
  --accent-purple: #a855f7;
  --accent-magenta: #ec4899;
  --accent-green: #22d3ee;
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-dim: #555570;
}

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

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(100,120,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,120,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

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

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

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

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.3), 0 0 40px rgba(168, 85, 247, 0.15); }
  50% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.5), 0 0 60px rgba(168, 85, 247, 0.3); }
}

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

@keyframes spin-slow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.spin-slow { animation: spin-slow 2s linear infinite; }

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

.glass-card-hover:hover {
  border-color: rgba(100, 120, 255, 0.25);
  background: rgba(20, 20, 40, 0.9);
}

.drop-zone {
  border: 2px dashed rgba(100, 120, 255, 0.3);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent-blue);
  background: rgba(0, 212, 255, 0.05);
  box-shadow: inset 0 0 30px rgba(0, 212, 255, 0.05);
}

.scrollbar-thin::-webkit-scrollbar { width: 6px; height: 6px; }
.scrollbar-thin::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(100,120,255,0.3); border-radius: 3px; }

.terminal-log {
  background: #05050d;
  border: 1px solid rgba(100, 120, 255, 0.1);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
  color: #7fdbca;
}

.canvas-frame {
  border-radius: 8px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
  image-rendering: pixelated;
}

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-enter { animation: toast-in 0.3s ease forwards; }

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

.fade-in { animation: fadeIn 0.4s ease forwards; }

.tab-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border-radius: 1px;
  transition: all 0.3s ease;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(100, 120, 255, 0.2);
  border-radius: 2px;
  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.4);
}

select, input[type="number"] {
  background: rgba(14, 14, 26, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: 'Space Grotesk', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

select:focus, input[type="number"]:focus {
  border-color: var(--accent-blue);
}

.progress-bar-bg {
  background: rgba(100, 120, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  transition: width 0.3s ease;
}

@media (max-width: 768px) {
  .mobile-warning { display: flex !important; }
}