/**
 * Subtle Atmosphere Effects
 * Professional, understated environmental effects for SaaS
 */

/* ========================================
   Subtle Gradient Background
   ======================================== */

.subtle-gradient-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99, 102, 241, 0.03), transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(168, 85, 247, 0.02), transparent 50%);
  opacity: 0.8;
}

/* ========================================
   Minimal Particle Dust
   ======================================== */

.minimal-dust {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.minimal-dust-particle {
  position: absolute;
  width: 1px;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  animation: minimalFloat var(--duration, 30s) linear infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes minimalFloat {
  0% {
    transform: translateY(12px) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-24px) translateX(var(--drift, 20px));
    opacity: 0;
  }
}

/* ========================================
   Soft Ambient Glow
   ======================================== */

.soft-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.soft-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  animation: softPulse var(--duration, 20s) ease-in-out infinite;
}

.soft-glow-orb-1 {
  width: 600px;
  height: 600px;
  background: rgba(99, 102, 241, 0.15);
  top: -10%;
  left: -8%;
  --duration: 25s;
}

.soft-glow-orb-2 {
  width: 500px;
  height: 500px;
  background: rgba(168, 85, 247, 0.1);
  bottom: -10%;
  right: -8%;
  --duration: 30s;
  animation-delay: -10s;
}

@keyframes softPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.2;
  }
}

/* ========================================
   Subtle Grid Pattern
   ======================================== */

.subtle-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.02;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 100px 100px;
}

body.app-theme-light .subtle-grid {
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
}

body.app-theme-light .minimal-dust-particle {
  background: rgba(99, 102, 241, 0.08);
}

/* ========================================
   Noise Texture Overlay
   ======================================== */

.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  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");
}

/* ========================================
   Professional Color Palette for Editor
   ======================================== */

/* Editor Theme - Professional Blue-Gray (dark default) */
.editor-theme {
  --editor-bg: #0f172a;
  --editor-surface: #1e293b;
  --editor-surface-hover: #334155;
  --editor-border: #334155;
  --editor-text: #f1f5f9;
  --editor-text-muted: #94a3b8;
  --editor-accent: #3b82f6;
  --editor-accent-soft: rgba(59, 130, 246, 0.1);
  --editor-success: #10b981;
  --editor-warning: #f59e0b;
  --editor-error: #ef4444;
}

body.app-theme-light .editor-theme {
  --editor-bg: #f8fafc;
  --editor-surface: #ffffff;
  --editor-surface-hover: #f1f5f9;
  --editor-border: #e2e8f0;
  --editor-text: #0f172a;
  --editor-text-muted: #64748b;
}

/* Speaker Colors - Professional Palette */
.speaker-color-0 { --speaker-bg: #3b82f6; --speaker-soft: rgba(59, 130, 246, 0.15); }
.speaker-color-1 { --speaker-bg: #8b5cf6; --speaker-soft: rgba(139, 92, 246, 0.15); }
.speaker-color-2 { --speaker-bg: #06b6d4; --speaker-soft: rgba(6, 182, 212, 0.15); }
.speaker-color-3 { --speaker-bg: #10b981; --speaker-soft: rgba(16, 185, 129, 0.15); }
.speaker-color-4 { --speaker-bg: #f59e0b; --speaker-soft: rgba(245, 158, 11, 0.15); }
.speaker-color-5 { --speaker-bg: #ef4444; --speaker-soft: rgba(239, 68, 68, 0.15); }

/* ========================================
   Reduced Motion Support
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .minimal-dust-particle,
  .soft-glow-orb {
    animation: none !important;
  }
}
