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

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0a0a1a; }
::-webkit-scrollbar-thumb { background: #2a2a5a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #8b5cf6; }

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 4px #8b5cf6); opacity: 1; }
  50% { filter: drop-shadow(0 0 12px #8b5cf6) drop-shadow(0 0 20px #06b6d4); opacity: 0.85; }
}

@keyframes noise-flicker {
  0%, 100% { opacity: 0.03; }
  50% { opacity: 0.06; }
}

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

@keyframes confetti-fall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

@keyframes sparkle {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px #ec4899, 0 0 8px #8b5cf6; }
  50% { opacity: 0.7; box-shadow: 0 0 8px #ec4899, 0 0 16px #8b5cf6, 0 0 24px #06b6d4; }
}

@keyframes gen-reveal {
  from { opacity: 0; transform: scale(0.95); filter: blur(8px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(236, 72, 153, 0.3), 0 0 8px rgba(139, 92, 246, 0.2); }
  50% { box-shadow: 0 0 8px rgba(236, 72, 153, 0.5), 0 0 16px rgba(139, 92, 246, 0.3); }
}

@keyframes sparkle-dot {
  0%, 100% { box-shadow: 0 0 2px currentColor; }
  50% { box-shadow: 0 0 6px currentColor, 0 0 12px currentColor; }
}

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

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

.gradient-border-bottom {
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #8b5cf6, #06b6d4, #ec4899) 1;
}

.real-ai-badge {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #ec4899;
  animation: badge-glow 2s ease-in-out infinite;
}

.sim-label {
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(100, 100, 180, 0.15);
  border: 1px solid rgba(100, 100, 180, 0.3);
  color: #6a6a8a;
  font-family: 'JetBrains Mono', monospace;
  margin-left: 4px;
}

.real-label {
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #ec4899;
  font-family: 'JetBrains Mono', monospace;
  margin-left: 4px;
}

.sparkle-dot {
  animation: sparkle-dot 1.5s ease-in-out infinite;
}

.drop-zone {
  border: 2px dashed #2a2a5a;
  transition: all 0.3s ease;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: #8b5cf6;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2), inset 0 0 20px rgba(139, 92, 246, 0.05);
  background: rgba(139, 92, 246, 0.05);
}

.train-btn {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  transition: all 0.3s ease;
}
.train-btn:hover:not(:disabled) {
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.5), 0 0 50px rgba(236, 72, 153, 0.3);
  transform: translateY(-1px);
}
.train-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.generate-btn {
  background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6);
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
  transition: all 0.3s ease;
}
.generate-btn:hover:not(:disabled) {
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4), 0 0 50px rgba(236, 72, 153, 0.3), 0 0 75px rgba(139, 92, 246, 0.2);
  transform: translateY(-1px);
}
.generate-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  animation: none;
}

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

.pause-btn {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.panel-bg {
  background: linear-gradient(180deg, #0f0f24 0%, #0a0a1a 100%);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.generate-panel {
  border: 1px solid rgba(236, 72, 153, 0.15);
  background: linear-gradient(180deg, #120f24 0%, #0a0a1a 100%);
}

.terminal-log {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  line-height: 1.6;
  color: #06b6d4;
}

.prompt-input {
  background: #0a0a1a;
  border: 1px solid #2a2a5a;
  color: #e2e8f0;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.prompt-input:focus {
  border-color: #ec4899;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.2);
}
.prompt-input::placeholder {
  color: #3a3a5a;
}

.noise-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  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)'/%3E%3C/svg%3E");
  animation: noise-flicker 3s infinite;
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  z-index: 9999;
  animation: confetti-fall 3s ease-in forwards;
}

.gen-canvas-glow {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15), 0 0 40px rgba(236, 72, 153, 0.1);
}

.gen-image-reveal {
  animation: gen-reveal 0.6s ease-out forwards;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #1a1a3a;
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #8b5cf6;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

select, input[type="number"] {
  background: #0f0f24;
  border: 1px solid #2a2a5a;
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
}
select:focus, input[type="number"]:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.2);
}

.progress-ring circle {
  transition: stroke-dashoffset 0.5s ease;
}

/* Mobile responsive adjustments */
@media (max-width: 1024px) {
  .generate-panel {
    order: -1;
  }
}