:root {
  --bg-deep: #08070e;
  --bg-card: rgba(22, 18, 38, 0.7);
  --purple: #8B5CF6;
  --pink: #EC4899;
  --orange: #F59E0B;
  --border-glow: rgba(139, 92, 246, 0.3);
}

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

body {
  background: var(--bg-deep);
  font-family: 'Bricolage Grotesque', sans-serif;
  color: #e2e0ea;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(139, 92, 246, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(236, 72, 153, 0.06), transparent),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(245, 158, 11, 0.03), transparent);
  pointer-events: none;
  z-index: 0;
}

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

.gradient-text {
  background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 50%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-input:focus {
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.4), 0 0 30px rgba(139, 92, 246, 0.15);
  border-color: var(--purple);
}

.btn-generate {
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.btn-generate:hover:not(:disabled) {
  transform: scale(1.04);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.4), 0 0 60px rgba(236, 72, 153, 0.2);
}

.btn-generate:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-generate::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn-generate:hover:not(:disabled)::after {
  transform: translateX(100%);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.12);
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(139, 92, 246, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.chip {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  transition: all 0.25s ease;
  cursor: pointer;
}

.chip:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

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

.skeleton {
  background: linear-gradient(90deg, 
    rgba(139, 92, 246, 0.05) 25%, 
    rgba(139, 92, 246, 0.12) 50%, 
    rgba(139, 92, 246, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(139, 92, 246, 0.2); }
  50% { border-color: rgba(236, 72, 153, 0.4); }
}

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

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

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

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

.confetti-piece {
  position: fixed;
  top: 0;
  width: 8px;
  height: 8px;
  z-index: 9999;
  pointer-events: none;
  animation: confetti-fall 2.5s ease-in forwards;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  animation: spin 1s linear infinite;
}

.modal-overlay {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238B5CF6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.5); }

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr !important;
  }
}