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

body {
  background: #06060f;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0a0a1a; }
::-webkit-scrollbar-thumb { background: #8B5CF630; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #8B5CF660; }

/* Animated gradient background */
.bg-mesh {
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, #8B5CF610 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% 80%, #3B82F610 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, #06B6D408 0%, transparent 70%);
}

/* Glass card */
.glass {
  background: rgba(19, 19, 43, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.12);
}

.glass-light {
  background: rgba(26, 26, 62, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 92, 246, 0.08);
}

/* Neon glow text */
.neon-text {
  text-shadow:
    0 0 7px #8B5CF680,
    0 0 20px #8B5CF640,
    0 0 42px #8B5CF620;
}

/* Pulsing credit badge */
@keyframes creditPulse {
  0%, 100% { box-shadow: 0 0 8px #f43f5e40; }
  50% { box-shadow: 0 0 20px #f43f5e80, 0 0 40px #f43f5e30; }
}

.credit-low {
  animation: creditPulse 1.5s ease-in-out infinite;
}

/* Generate button gradient animation */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn-generate {
  background: linear-gradient(135deg, #8B5CF6, #3B82F6, #06B6D4, #8B5CF6);
  background-size: 300% 300%;
  animation: gradientShift 4s ease infinite;
  transition: all 0.3s ease;
}

.btn-generate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.btn-generate:disabled {
  background: #1a1a3e;
  animation: none;
  opacity: 0.5;
  cursor: not-allowed;
}

/* Shimmer loading */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, #13132b 25%, #1a1a3e 50%, #13132b 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* Fade in */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* Style card hover */
.style-card {
  transition: all 0.25s ease;
}

.style-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.5);
}

.style-card.active {
  border-color: #8B5CF6;
  box-shadow: 0 0 16px #8B5CF630;
}

/* Textarea glow */
.prompt-area:focus {
  box-shadow: 0 0 0 2px #8B5CF630, 0 0 20px #8B5CF615;
}

/* Waveform bars */
@keyframes waveBar {
  0%, 100% { height: 20%; }
  50% { height: 80%; }
}

/* Progress ring */
.progress-ring-circle {
  transition: stroke-dashoffset 0.6s ease;
}

/* Gallery card hover */
.gallery-card {
  transition: all 0.3s ease;
}

.gallery-card:hover {
  transform: scale(1.02);
  border-color: rgba(139, 92, 246, 0.35);
}

/* Mode toggle */
.mode-toggle-active {
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
}

/* Toast animation */
@keyframes toastIn {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-100%); opacity: 0; }
}

.toast-in { animation: toastIn 0.4s ease forwards; }
.toast-out { animation: toastOut 0.3s ease forwards; }

/* Audio waveform viz */
.wave-bar {
  display: inline-block;
  width: 3px;
  margin: 0 1px;
  border-radius: 2px;
  background: linear-gradient(to top, #8B5CF6, #06B6D4);
  transition: height 0.1s ease;
}