/* ═══════════════════════════════════════════════════════════════════════════
   🚀 ULTIMATE KILLER CSS - NEXT LEVEL DESIGN
   ═══════════════════════════════════════════════════════════════════════════
   
   ✨ Features:
   - Advanced Neumorphism
   - Cutting-edge Glassmorphism
   - 3D Transforms & Depth
   - Micro-interactions
   - Premium Animations
   - Particle Effects
   - Smooth Scrolling
   - Killer Hover States
   
   Combined from:
   - Original styles.css (3,022 lines)
   - styles-FIXED.css (420 lines)
   - ULTIMATE enhancements (800+ lines)
   
   Total: 4,200+ lines of pure awesomeness!
   
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   ⚡ ENHANCED ROOT VARIABLES - NEUMORPHISM & 3D
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* 🎨 Enhanced Color Palette */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-glow: 0 0 40px rgba(99, 102, 241, 0.6);
  
  --secondary: #ec4899;
  --secondary-light: #f472b6;
  --secondary-dark: #db2777;
  --secondary-gradient: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  
  --accent: #10b981;
  --accent-light: #34d399;
  --accent-dark: #059669;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  
  /* 🌈 Gradient Collection */
  --gradient-purple-pink: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ec4899 100%);
  --gradient-blue-purple: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
  --gradient-green-blue: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #3b82f6 100%);
  --gradient-sunset: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #ec4899 100%);
  --gradient-ocean: linear-gradient(135deg, #0ea5e9 0%, #2563eb 50%, #4f46e5 100%);
  --gradient-fire: linear-gradient(135deg, #f97316 0%, #ef4444 50%, #dc2626 100%);
  
  /* 🎭 Background & Surface */
  --background: #f0f4f8;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --surface-elevation-1: #ffffff;
  --surface-elevation-2: #fafbfc;
  --surface-elevation-3: #f5f7fa;
  
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  
  /* 💎 NEUMORPHISM SHADOWS - THE KILLER FEATURE */
  --neu-shadow-light: 8px 8px 16px rgba(163, 177, 198, 0.6),
                      -8px -8px 16px rgba(255, 255, 255, 0.5);
  --neu-shadow-medium: 12px 12px 24px rgba(163, 177, 198, 0.6),
                       -12px -12px 24px rgba(255, 255, 255, 0.5);
  --neu-shadow-large: 20px 20px 40px rgba(163, 177, 198, 0.6),
                      -20px -20px 40px rgba(255, 255, 255, 0.5);
  --neu-shadow-inset: inset 4px 4px 8px rgba(163, 177, 198, 0.5),
                      inset -4px -4px 8px rgba(255, 255, 255, 0.5);
  --neu-shadow-pressed: inset 8px 8px 16px rgba(163, 177, 198, 0.6),
                        inset -8px -8px 16px rgba(255, 255, 255, 0.3);
  
  /* ✨ Glassmorphism Enhanced */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-bg-strong: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
  --glass-glow: 0 0 60px rgba(99, 102, 241, 0.3);
  
  /* 🌟 Regular Shadows Enhanced */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-3xl: 0 35px 60px -15px rgb(0 0 0 / 0.3);
  --shadow-glow: 0 0 50px rgba(99, 102, 241, 0.4);
  --shadow-glow-strong: 0 0 80px rgba(99, 102, 241, 0.6);
  
  /* ⚡ Transitions Enhanced */
  --transition-ultra-fast: 100ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-ultra-slow: 800ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-elastic: 800ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* 📐 Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;
  
  /* 🔲 Border Radius Enhanced */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-2xl: 48px;
  --radius-full: 9999px;
  
  /* 🎬 Z-Index Scale */
  --z-below: -1;
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-fixed: 1200;
  --z-modal-backdrop: 1300;
  --z-modal: 1400;
  --z-popover: 1500;
  --z-tooltip: 1600;
  --z-notification: 1700;
  --z-maximum: 9999;
  
  /* 🎆 Special Effects */
  --blur-sm: 4px;
  --blur-md: 8px;
  --blur-lg: 16px;
  --blur-xl: 24px;
  --blur-2xl: 40px;
  --blur-3xl: 64px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🌙 DARK THEME ENHANCED
   ═══════════════════════════════════════════════════════════════════════════ */

body.dark-theme {
  --background: #0a0e1a;
  --surface: #121827;
  --surface-hover: #1e293b;
  --surface-elevation-1: #1a2332;
  --surface-elevation-2: #243046;
  --surface-elevation-3: #2d3d59;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --border: #2d3d59;
  --border-hover: #3d506d;
  
  /* Dark Neumorphism */
  --neu-shadow-light: 8px 8px 16px rgba(0, 0, 0, 0.4),
                      -8px -8px 16px rgba(255, 255, 255, 0.02);
  --neu-shadow-medium: 12px 12px 24px rgba(0, 0, 0, 0.5),
                       -12px -12px 24px rgba(255, 255, 255, 0.02);
  --neu-shadow-large: 20px 20px 40px rgba(0, 0, 0, 0.6),
                      -20px -20px 40px rgba(255, 255, 255, 0.02);
  --neu-shadow-inset: inset 4px 4px 8px rgba(0, 0, 0, 0.5),
                      inset -4px -4px 8px rgba(255, 255, 255, 0.02);
  --neu-shadow-pressed: inset 8px 8px 16px rgba(0, 0, 0, 0.6),
                        inset -8px -8px 16px rgba(255, 255, 255, 0.02);
  
  --glass-bg: rgba(18, 24, 39, 0.75);
  --glass-bg-strong: rgba(18, 24, 39, 0.9);
  --glass-border: rgba(148, 163, 184, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --glass-glow: 0 0 60px rgba(129, 140, 248, 0.3);
  
  --shadow-glow: 0 0 50px rgba(129, 140, 248, 0.4);
  --shadow-glow-strong: 0 0 80px rgba(129, 140, 248, 0.6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   🎯 BASE STYLES ENHANCED
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 🎨 Custom Scrollbar - Neumorphic Style */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: var(--radius-full);
  box-shadow: var(--neu-shadow-inset);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  box-shadow: var(--neu-shadow-light);
  transition: all var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
  box-shadow: var(--neu-shadow-medium), var(--shadow-glow);
  transform: scale(1.05);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--surface);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

body.hindi-mode {
  font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
}

/* ✨ Selection Style */
::selection {
  background: var(--primary);
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

::-moz-selection {
  background: var(--primary);
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   🌌 ENHANCED BACKGROUND ANIMATION WITH PARTICLES
   ═══════════════════════════════════════════════════════════════════════════ */

.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-below);
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
              radial-gradient(ellipse at bottom, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
}

.gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  animation: float 25s ease-in-out infinite, pulse-sphere 8s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes pulse-sphere {
  0%, 100% {
    opacity: 0.4;
    filter: blur(80px);
  }
  50% {
    opacity: 0.7;
    filter: blur(120px);
  }
}

.sphere-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  top: -350px;
  left: -350px;
  animation-duration: 30s;
}

.sphere-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--secondary-light) 0%, transparent 70%);
  bottom: -250px;
  right: -250px;
  animation-duration: 25s;
  animation-delay: -5s;
}

.sphere-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 35s;
  animation-delay: -10s;
}

.sphere-4 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  top: 20%;
  right: 10%;
  animation-duration: 40s;
  animation-delay: -15s;
}

.sphere-5 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  bottom: 20%;
  left: 20%;
  animation-duration: 33s;
  animation-delay: -20s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  25% {
    transform: translate(60px, -120px) scale(1.15) rotate(90deg);
  }
  50% {
    transform: translate(-60px, 60px) scale(0.85) rotate(180deg);
  }
  75% {
    transform: translate(120px, 120px) scale(1.05) rotate(270deg);
  }
}

/* 🌟 Floating Particles */
.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  opacity: 0.15;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morph 20s ease-in-out infinite, drift 30s ease-in-out infinite;
  backdrop-filter: blur(2px);
}

.shape-1 {
  width: 250px;
  height: 250px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 180px;
  height: 180px;
  bottom: 20%;
  right: 15%;
  animation-delay: -7s;
}

.shape-3 {
  width: 120px;
  height: 120px;
  top: 60%;
  left: 65%;
  animation-delay: -14s;
}

@keyframes morph {
  0%, 100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  25% {
    border-radius: 70% 30% 50% 50% / 60% 60% 40% 40%;
  }
  50% {
    border-radius: 40% 60% 60% 40% / 50% 70% 30% 50%;
  }
  75% {
    border-radius: 60% 40% 30% 70% / 40% 50% 50% 60%;
  }
}

@keyframes drift {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(50px, -30px) rotate(90deg);
  }
  50% {
    transform: translate(-30px, 50px) rotate(180deg);
  }
  75% {
    transform: translate(40px, 40px) rotate(270deg);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   🎯 NEUMORPHIC UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

.neu-flat {
  background: var(--surface);
  box-shadow: var(--neu-shadow-light);
  transition: all var(--transition-base);
}

.neu-flat:hover {
  box-shadow: var(--neu-shadow-medium);
  transform: translateY(-2px);
}

.neu-raised {
  background: var(--surface);
  box-shadow: var(--neu-shadow-medium);
  transition: all var(--transition-base);
}

.neu-raised:hover {
  box-shadow: var(--neu-shadow-large);
  transform: translateY(-4px);
}

.neu-pressed {
  background: var(--surface);
  box-shadow: var(--neu-shadow-pressed);
}

.neu-inset {
  background: var(--surface);
  box-shadow: var(--neu-shadow-inset);
}

/* 💎 Glass Utility Classes */
.glass-light {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--blur-xl));
  -webkit-backdrop-filter: blur(var(--blur-xl));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-glow);
}

/* 🌟 Glow Effects */
.glow-primary {
  box-shadow: var(--shadow-glow);
  animation: pulse-glow 3s ease-in-out infinite;
}

.glow-strong {
  box-shadow: var(--shadow-glow-strong);
  animation: pulse-glow-strong 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: var(--shadow-glow);
  }
  50% {
    box-shadow: var(--shadow-glow-strong);
  }
}

@keyframes pulse-glow-strong {
  0%, 100% {
    box-shadow: var(--shadow-glow-strong);
  }
  50% {
    box-shadow: 0 0 120px rgba(99, 102, 241, 0.8);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   🎨 ENHANCED BUTTON STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

button, .btn {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  font-weight: 600;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 💎 Neumorphic Button */
.btn-neu {
  background: var(--surface);
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--neu-shadow-light);
  transition: all var(--transition-base);
}

.btn-neu:hover {
  box-shadow: var(--neu-shadow-medium);
  transform: translateY(-2px);
}

.btn-neu:active {
  box-shadow: var(--neu-shadow-pressed);
  transform: translateY(1px);
}

/* ✨ Premium Gradient Button */
.btn-premium {
  background: var(--primary-gradient);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.btn-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left var(--transition-slower);
}

.btn-premium:hover::before {
  left: 100%;
}

.btn-premium:hover {
  box-shadow: var(--shadow-xl), var(--shadow-glow-strong);
  transform: translateY(-3px) scale(1.02);
}

.btn-premium:active {
  transform: translateY(-1px) scale(0.98);
}

/* 🔮 Glass Button */
.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-lg));
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.btn-glass:hover {
  background: var(--glass-bg-strong);
  border-color: var(--primary);
  box-shadow: var(--glass-shadow), var(--shadow-glow);
  transform: translateY(-2px);
}

/* 🎯 3D Button */
.btn-3d {
  background: var(--primary-gradient);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 0 var(--primary-dark),
              0 8px 20px rgba(99, 102, 241, 0.4);
  transform: translateY(0);
  transition: all var(--transition-fast);
}

.btn-3d:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--primary-dark),
              0 12px 25px rgba(99, 102, 241, 0.5);
}

.btn-3d:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--primary-dark),
              0 4px 10px rgba(99, 102, 241, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   🎯 ENHANCED CARD STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.card-neu {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--neu-shadow-medium);
  transition: all var(--transition-base);
}

.card-neu:hover {
  box-shadow: var(--neu-shadow-large);
  transform: translateY(-5px);
}

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-xl));
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all var(--transition-base);
}

.card-glass:hover {
  background: var(--glass-bg-strong);
  border-color: var(--primary);
  box-shadow: var(--glass-shadow), var(--glass-glow);
  transform: translateY(-5px);
}

.card-3d {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card-3d:hover {
  box-shadow: var(--shadow-2xl);
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   🎨 ENHANCED INPUT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

input, textarea, select {
  font-family: inherit;
  transition: all var(--transition-base);
}

.input-neu {
  background: var(--surface);
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  box-shadow: var(--neu-shadow-inset);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.input-neu:focus {
  box-shadow: var(--neu-shadow-inset), 0 0 0 2px var(--primary);
  outline: none;
}

.input-neu::placeholder {
  color: var(--text-muted);
}

.input-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.input-glass:focus {
  background: var(--glass-bg-strong);
  border-color: var(--primary);
  box-shadow: var(--glass-shadow), 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ⚡ MICRO-INTERACTIONS & ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* 🎯 Hover Lift */
.hover-lift {
  transition: all var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

/* 🌟 Hover Glow */
.hover-glow {
  transition: all var(--transition-base);
}

.hover-glow:hover {
  box-shadow: var(--shadow-glow-strong);
  filter: brightness(1.1);
}

/* 💫 Hover Scale */
.hover-scale {
  transition: all var(--transition-base);
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* 🎭 Hover Tilt */
.hover-tilt {
  transition: all var(--transition-base);
  transform-style: preserve-3d;
}

.hover-tilt:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

/* 🔄 Rotate on Hover */
.hover-rotate {
  transition: all var(--transition-base);
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* ✨ Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

/* 🌈 Rainbow Border */
@keyframes rainbow-border {
  0%, 100% {
    border-color: #6366f1;
  }
  25% {
    border-color: #ec4899;
  }
  50% {
    border-color: #10b981;
  }
  75% {
    border-color: #f59e0b;
  }
}

.rainbow-border {
  border: 2px solid;
  animation: rainbow-border 4s linear infinite;
}

/* 💓 Heartbeat */
@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  10%, 30% {
    transform: scale(1.1);
  }
  20%, 40% {
    transform: scale(1.05);
  }
}

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

/* 🎪 Bounce In */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.bounce-in {
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 🌊 Wave Animation */
@keyframes wave {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

/* ✨ Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* 🎯 Slide In Left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

/* 🎯 Slide In Right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

/* 🔄 Spin */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

/* 💫 Floating */
@keyframes floating {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.floating {
  animation: floating 3s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🎨 TEXT EFFECTS
   ═══════════════════════════════════════════════════════════════════════════ */

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow {
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.6),
               0 0 40px rgba(99, 102, 241, 0.4);
}

.text-3d {
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1),
               2px 2px 0 rgba(0, 0, 0, 0.1),
               3px 3px 0 rgba(0, 0, 0, 0.1),
               4px 4px 10px rgba(0, 0, 0, 0.3);
}

.text-outline {
  -webkit-text-stroke: 2px var(--primary);
  -webkit-text-fill-color: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🌟 LOADING ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.loader-dots {
  display: inline-flex;
  gap: 0.5rem;
}

.loader-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  animation: loader-bounce 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loader-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loader-bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--surface-hover);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-pulse {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-scale 1.5s ease-in-out infinite;
}

@keyframes pulse-scale {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   📱 RESPONSIVE ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  :root {
    --spacing-xs: 0.375rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1.25rem;
    --spacing-lg: 1.75rem;
    --spacing-xl: 2.5rem;
    --spacing-2xl: 3.5rem;
    --spacing-3xl: 5rem;
  }
  
  .neu-flat, .neu-raised {
    box-shadow: var(--neu-shadow-light);
  }
  
  .neu-flat:hover, .neu-raised:hover {
    box-shadow: var(--neu-shadow-medium);
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   🎯 UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Display */
.hidden { display: none !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.grid { display: grid !important; }

/* Flex utilities */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  flex-direction: column;
}

/* Position */
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.fixed { position: fixed !important; }
.sticky { position: sticky !important; }

/* Overflow */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }

/* Text alignment */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* Font weights */
.font-light { font-weight: 300 !important; }
.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-black { font-weight: 900 !important; }

/* Cursor */
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* User select */
.select-none { user-select: none !important; }
.select-text { user-select: text !important; }
.select-all { user-select: all !important; }

/* Pointer events */
.pointer-events-none { pointer-events: none !important; }
.pointer-events-auto { pointer-events: auto !important; }

/* Opacity */
.opacity-0 { opacity: 0 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* Z-index */
.z-0 { z-index: 0 !important; }
.z-10 { z-index: 10 !important; }
.z-20 { z-index: 20 !important; }
.z-30 { z-index: 30 !important; }
.z-40 { z-index: 40 !important; }
.z-50 { z-index: 50 !important; }
.z-max { z-index: var(--z-maximum) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   
   THIS IS THE ENHANCED HEADER - THE REST OF YOUR ORIGINAL styles.css 
   AND styles-FIXED.css CONTENT WILL BE APPENDED BELOW THIS LINE
   
   The file continues with all your original CSS...
   
   ═══════════════════════════════════════════════════════════════════════════ */
/* ===========================
   ULTRA-MODERN ENTERPRISE CSS
   =========================== */

/* Root Variables */
:root {
  /* Modern Color Palette */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  --secondary: #ec4899;
  --secondary-light: #f472b6;
  --secondary-dark: #db2777;
  
  --accent: #10b981;
  --accent-light: #34d399;
  --accent-dark: #059669;
  
  --background: #ffffff;
  --surface: #f8fafc;
  --surface-hover: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-glow: 0 0 50px rgba(99, 102, 241, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;
}

/* Dark Theme */
body.dark-theme {
  --background: #0f172a;
  --surface: #1e293b;
  --surface-hover: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --border-hover: #475569;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(148, 163, 184, 0.18);
  --shadow-glow: 0 0 50px rgba(129, 140, 248, 0.3);
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

body.hindi-mode {
  font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
}

/* Background Animation */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.sphere-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  top: -300px;
  left: -300px;
  animation-duration: 25s;
}

.sphere-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--secondary-light) 0%, transparent 70%);
  bottom: -200px;
  right: -200px;
  animation-duration: 20s;
  animation-delay: -5s;
}

.sphere-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 30s;
  animation-delay: -10s;
}

.sphere-4 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  top: 20%;
  right: 10%;
  animation-duration: 35s;
  animation-delay: -15s;
}

.sphere-5 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  bottom: 20%;
  left: 20%;
  animation-duration: 28s;
  animation-delay: -20s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -100px) scale(1.1);
  }
  50% {
    transform: translate(-50px, 50px) scale(0.9);
  }
  75% {
    transform: translate(100px, 100px) scale(1.05);
  }
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  opacity: 0.1;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morph 15s ease-in-out infinite;
}

.shape-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  right: 15%;
  animation-delay: -5s;
}

.shape-3 {
  width: 100px;
  height: 100px;
  top: 70%;
  left: 70%;
  animation-delay: -10s;
}

@keyframes morph {
  0%, 100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: rotate(0deg);
  }
  50% {
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    transform: rotate(180deg);
  }
}

/* Modern Header */
.modern-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-base);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.modern-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--transition-base);
}

.modern-logo:hover {
  transform: translateY(-2px);
}

.logo-icon {
  position: relative;
  width: 50px;
  height: 50px;
  background: var(--primary-gradient);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.logo-letter {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: white;
  z-index: 2;
}

.logo-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Modern Navigation */
.modern-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  position: relative;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: 12px;
  transition: all var(--transition-base);
  overflow: hidden;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 3px;
  transition: transform var(--transition-base);
}

.nav-link:hover .nav-indicator,
.nav-link.active .nav-indicator {
  transform: translateX(-50%) scaleX(1);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-toggle,
.theme-toggle {
  position: relative;
  width: 48px;
  height: 48px;
  border: none;
  background: var(--surface);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.lang-toggle:hover,
.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--surface-hover);
}

.lang-text {
  font-weight: 700;
  color: var(--primary);
  z-index: 2;
}

.lang-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 50%;
  transition: transform var(--transition-base);
}

.lang-toggle:hover .lang-bg {
  transform: translate(-50%, -50%) scale(2);
  opacity: 0.1;
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-secondary);
  transition: all var(--transition-base);
}

.theme-toggle:hover svg {
  stroke: var(--primary);
}

.sun-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.moon-icon {
  position: absolute;
  opacity: 0;
  transform: scale(0.8) rotate(180deg);
}

body.dark-theme .sun-icon {
  opacity: 0;
  transform: scale(0.8) rotate(180deg);
}

body.dark-theme .moon-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-base);
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  height: 2px;
  width: 24px;
  background: var(--text-secondary);
  transition: all var(--transition-base);
}

.menu-toggle span:nth-child(1) {
  top: 14px;
}

.menu-toggle span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.menu-toggle span:nth-child(3) {
  bottom: 14px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero-section {
  padding: 8rem 2rem 2rem;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-content {
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

.badge-icon {
  font-size: 1.2rem;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.9);
  }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.title-line-1 {
  display: block;
  color: var(--text-primary);
}

.title-line-2 {
  display: block;
  margin-top: 0.5rem;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Prompt Section */
.prompt-section {
  padding: 2rem;
  position: relative;
  animation: fadeIn 0.6s ease-out;
}

.prompt-container {
  max-width: 800px;
  margin: 0 auto;
}

.prompt-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.prompt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

.prompt-header {
  text-align: center;
  margin-bottom: 2rem;
}

.prompt-header h2 {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.prompt-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* Modern Prompt Input */
.prompt-input-wrapper {
  position: relative;
}

.prompt-input-container {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  border: 2px solid var(--border);
  transition: all var(--transition-base);
  overflow: hidden;
}

.prompt-input-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modern-prompt-input {
  width: 100%;
  padding: 1.5rem 5rem 1.5rem 1.5rem;
  background: transparent;
  border: none;
  font-size: 1.125rem;
  color: var(--text-primary);
  resize: none;
  outline: none;
  min-height: 60px;
  max-height: 200px;
  overflow-y: auto;
  font-family: inherit;
  line-height: 1.6;
}

.modern-prompt-input::placeholder {
  color: var(--text-muted);
}

/* Voice Visualization */
.voice-visualization {
  position: absolute;
  top: 50%;
  left: 1.5rem;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.voice-visualization.active {
  opacity: 1;
}

.voice-wave-container {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 30px;
}

.voice-wave {
  width: 3px;
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transform-origin: center;
  animation: wave 1s ease-in-out infinite;
}

.voice-wave:nth-child(1) { animation-delay: 0s; }
.voice-wave:nth-child(2) { animation-delay: 0.1s; }
.voice-wave:nth-child(3) { animation-delay: 0.2s; }
.voice-wave:nth-child(4) { animation-delay: 0.3s; }
.voice-wave:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
  0%, 100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1);
  }
}

/* Go/Voice Button */
.go-button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border: none;
  background: var(--primary-gradient);
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.go-button:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.go-button:active {
  transform: translateY(-50%) scale(0.95);
}

.button-state {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-base);
}

.button-state.active {
  opacity: 1;
  transform: scale(1);
}

/* Voice Mode */
.go-button.voice-mode .voice-state {
  opacity: 1;
  transform: scale(1);
}

.mic-icon {
  width: 28px;
  height: 28px;
  stroke: white;
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.voice-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Go Mode */
.go-button.go-mode .go-state {
  opacity: 1;
  transform: scale(1);
}

.go-text {
  font-weight: 800;
  font-size: 1.25rem;
  color: white;
  margin-right: 0.25rem;
}

.arrow-icon {
  width: 20px;
  height: 20px;
  stroke: white;
  stroke-width: 3;
  margin-left: -0.25rem;
}

/* Loading Mode */
.go-button.loading-mode .loading-state {
  opacity: 1;
  transform: scale(1);
}

.go-button.loading-mode {
  cursor: not-allowed;
  opacity: 0.9;
}

/* Active Voice Recording */
.go-button.recording {
  animation: recording-pulse 1.5s ease-in-out infinite;
}

@keyframes recording-pulse {
  0%, 100% {
    box-shadow: var(--shadow-lg), 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: var(--shadow-lg), 0 0 0 20px rgba(239, 68, 68, 0);
  }
}

/* Voice Transcript */
.voice-transcript {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  min-height: 40px;
  display: none;
  align-items: center;
  animation: fadeIn var(--transition-base);
}

.voice-transcript.active {
  display: flex;
}

.transcript-text {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.875rem;
}

/* Prompt Suggestions */
.prompt-footer {
  margin-top: 1.5rem;
}

.prompt-suggestions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.suggestion-chip {
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.suggestion-chip:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Features Section */
.features-section {
  padding: 4rem 2rem;
  background: var(--surface);
}

.features-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--background);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.feature-card:hover::before {
  opacity: 0.05;
}

.feature-icon-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
}

.feature-icon {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  z-index: 2;
}

.feature-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: var(--primary-gradient);
  border-radius: 20px;
  filter: blur(20px);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover .feature-glow {
  opacity: 0.3;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Modern Loading Overlay */
.modern-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modern-loading-overlay.show {
  display: flex;
}

.loading-content {
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.ai-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
}

.avatar-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: white;
  z-index: 3;
  box-shadow: var(--shadow-2xl);
}

.avatar-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.3;
  }
}

.avatar-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
}

.ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 2px solid var(--primary);
  border-radius: 50%;
  opacity: 0.3;
}

.ring-1 {
  width: 100px;
  height: 100px;
  transform: translate(-50%, -50%);
  animation: ring-expand 3s ease-out infinite;
}

.ring-2 {
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  animation: ring-expand 3s ease-out infinite 1s;
}

.ring-3 {
  width: 140px;
  height: 140px;
  transform: translate(-50%, -50%);
  animation: ring-expand 3s ease-out infinite 2s;
}

@keyframes ring-expand {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.loading-message {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin-bottom: 2rem;
}

.ai-thoughts {
  margin-bottom: 2rem;
}

.thought-bubble {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1rem 1.5rem;
  display: inline-block;
  position: relative;
}

.thought-text {
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
}

.thought-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
}

.thought-dots span {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: dot-bounce 1.4s ease-in-out infinite;
}

.thought-dots span:nth-child(1) { animation-delay: -0.32s; }
.thought-dots span:nth-child(2) { animation-delay: -0.16s; }
.thought-dots span:nth-child(3) { animation-delay: 0; }

@keyframes dot-bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.progress-container {
  position: relative;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  width: 0%;
  transition: width var(--transition-slow);
  position: relative;
}

.progress-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
  animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
  0% {
    transform: translateX(-50px);
  }
  100% {
    transform: translateX(50px);
  }
}

.progress-text {
  position: absolute;
  top: -30px;
  right: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Question & Form Sections */
.modern-question-section,
.modern-form-section {
  padding: 2rem;
  display: none;
}

.question-container,
.form-container {
  max-width: 700px;
  margin: 0 auto;
}

.question-card,
.form-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
}

.question-header,
.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.questions-wrapper,
.form-wrapper {
  margin-bottom: 2rem;
}

/* Modern Success Section */
.modern-success-section {
  padding: 4rem 2rem;
  display: none;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-container {
  max-width: 600px;
  text-align: center;
}

.success-animation {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 2rem;
}

.success-circle {
  width: 100%;
  height: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-2xl);
}

.checkmark {
  width: 80px;
  height: 80px;
  stroke-width: 3;
}

.checkmark-circle {
  stroke: var(--accent);
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  stroke: var(--accent);
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

.success-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
}

.burst-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 30px;
  background: var(--accent);
  opacity: 0;
  animation: burst 0.8s ease-out 0.5s forwards;
}

.burst-line:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg); }
.burst-line:nth-child(2) { transform: translate(-50%, -50%) rotate(60deg); }
.burst-line:nth-child(3) { transform: translate(-50%, -50%) rotate(120deg); }
.burst-line:nth-child(4) { transform: translate(-50%, -50%) rotate(180deg); }
.burst-line:nth-child(5) { transform: translate(-50%, -50%) rotate(240deg); }
.burst-line:nth-child(6) { transform: translate(-50%, -50%) rotate(300deg); }

@keyframes burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scaleY(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-40px) scaleY(0);
  }
}

.success-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.success-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.website-url-display {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.website-url-display a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  word-break: break-all;
}

.website-url-display a:hover {
  text-decoration: underline;
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Floating Action Bar */
.floating-action-bar {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 0.75rem;
  display: flex;
  gap: 0.5rem;
  box-shadow: var(--shadow-2xl);
  z-index: 100;
  transition: all var(--transition-base);
}

.floating-action-bar.hidden {
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  pointer-events: none;
}

/* Modern Notifications */
.modern-notification-container {
  position: fixed;
  top: 100px;
  right: 2rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
}

.notification {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(120%);
  opacity: 0;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.notification.success::before {
  background: var(--accent);
}

.notification.error::before {
  background: #ef4444;
}

.notification.warning::before {
  background: #f59e0b;
}

.notification.info::before {
  background: var(--primary);
}

/* ============================================================================
   🎨 NOTIFICATION ICON & MESSAGE STYLES (for enhanced notifications)
   ============================================================================ */

/* Notification Icon Styling */
.notification-icon {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
  animation: iconBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconBounce {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Notification Message Styling */
.notification-message {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 500;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .notification-icon {
    font-size: 20px;
  }
  
  .notification-message {
    font-size: 14px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .notification-icon {
    animation: none !important;
  }
}

/* WebSocket Status */
.modern-ws-status {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--transition-base);
}

.modern-ws-status.connected .status-dot {
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

.modern-ws-status.connecting .status-dot {
  background: #f59e0b;
  animation: pulse-dot 1s ease-in-out infinite;
}

.modern-ws-status.disconnected .status-dot {
  background: #ef4444;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.6;
  }
}

/* Mobile Navigation */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.mobile-nav-link {
  display: block;
  padding: 1rem 2rem;
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  transition: all var(--transition-base);
  opacity: 0;
  transform: translateY(20px);
}

.mobile-nav-overlay.active .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }

.mobile-nav-link:hover {
  color: var(--primary-light);
  transform: scale(1.05);
}

.mobile-nav-actions {
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base) 0.4s;
}

.mobile-nav-overlay.active .mobile-nav-actions {
  opacity: 1;
  transform: translateY(0);
}

.mobile-lang-toggle {
  padding: 0.75rem 2rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
}

/* PWA Install Prompt */
.pwa-install-prompt {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-2xl);
  z-index: 1000;
  transition: all var(--transition-slow);
  max-width: 90%;
  width: 400px;
}

.pwa-install-prompt.show {
  bottom: 2rem;
}

.pwa-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.pwa-install-btn {
  padding: 0.5rem 1rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.pwa-dismiss-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-base);
}

.pwa-dismiss-btn:hover {
  background: var(--surface);
  color: var(--text-primary);
}

/* Modern Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width var(--transition-slow), height var(--transition-slow);
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.btn-success {
  background: var(--accent);
  color: white;
}

.btn-info {
  background: var(--primary);
  color: white;
}

.btn-skip {
  background: transparent;
  color: var(--text-secondary);
  text-decoration: underline;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
  }
  
  .modern-nav {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .hero-section {
    padding: 6rem 1rem 1rem;
    min-height: 50vh;
  }
  
  .hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
  
  .hero-description {
    font-size: 1.125rem;
  }
  
  .prompt-card {
    padding: 1.5rem;
  }
  
  .modern-prompt-input {
    font-size: 1rem;
    padding-right: 4.5rem;
  }
  
  .go-button {
    width: 50px;
    height: 50px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .floating-action-bar {
    bottom: 1rem;
    width: calc(100% - 2rem);
    max-width: 400px;
  }
  
  .modern-notification-container {
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
  
  .modern-ws-status {
    bottom: auto;
    top: 80px;
    left: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-badge {
    font-size: 0.75rem;
    padding: 0.375rem 1rem;
  }
  
  .prompt-suggestions {
    font-size: 0.75rem;
  }
  
  .suggestion-chip {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .feature-icon-wrapper {
    width: 60px;
    height: 60px;
  }
  
  .feature-icon {
    font-size: 2rem;
  }
}

/* Print Styles */
@media print {
  .modern-header,
  .floating-action-bar,
  .modern-notification-container,
  .modern-ws-status,
  .background-animation {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Hindi Mode Adjustments */
body.hindi-mode .hero-title,
body.hindi-mode .section-title,
body.hindi-mode h2,
body.hindi-mode h3 {
  font-family: 'Noto Sans Devanagari', sans-serif;
  letter-spacing: 0;
}

/* Fix for section visibility */
section {
  opacity: 1;
  transition: opacity 0.3s ease;
}

section.hiding {
  opacity: 0;
}

/* Ensure input section is visible by default */
#inputSection {
  display: block;
}

/* Override any hidden states for initial load */
body:not(.app-initialized) #inputSection {
  display: block !important;
  opacity: 1 !important;
}

/* Add to prompt-section for proper display */
.prompt-section {
  display: block;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.prompt-section.hiding {
  opacity: 0;
}

/* ============================================
   LLM STREAM DISPLAY - PRODUCTION READY
   ============================================ */

/* ============================================================================
   🎨 ULTIMATE LLM STREAMING SYSTEM - COMPLETE CSS (PRODUCTION)
   Story Mode + Designer Coding Mode + Auto-Close Support
   Version: 2.0 - October 2025
   ============================================================================ */

/* ============================================================================
   📦 MAIN CONTAINER - DUAL MODE SUPPORT
   ============================================================================ */

.ultimate-stream-container {
  /* Positioning - Story Mode (Centered) */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  
  /* Sizing - Story Mode */
  width: 650px;
  max-width: 90vw;
  max-height: 80vh;
  
  /* Appearance */
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border-radius: 24px;
  
  /* Shadows & Borders */
  box-shadow: 
    0 25px 100px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  
  /* Layout */
  z-index: 999999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  
  /* 🔥 FIX: Start visible */
  opacity: 1;
  pointer-events: auto;
  
  /* Animation */
  transition: all 0.3s ease;
}

/* Active State - Makes container visible and interactive */
.ultimate-stream-container[style*="opacity: 1"] {
  pointer-events: auto;
}

/* ============================================================================
   🖥️ DESIGNER MODE - 90% SCREEN COVERAGE
   ============================================================================ */

.ultimate-stream-container.designer-mode {
  /* Override positioning for full-screen experience */
  top: 5vh !important;
  left: 5vw !important;
  transform: scale(0.95) !important;
  
  /* Override sizing for 90% screen */
  width: 90vw !important;
  height: 90vh !important;
  max-width: none !important;
  max-height: none !important;
  
  /* Special background for coding mode */
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  
  /* Smoother transition for large container */
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Active state for Designer Mode */
.ultimate-stream-container.designer-mode[style*="opacity: 1"] {
  transform: scale(1) !important;
}

/* ============================================================================
   🎬 ENTRANCE ANIMATIONS
   ============================================================================ */

@keyframes streamEnter {
  from {
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Story mode uses subtle scale animation - NO opacity change */
.ultimate-stream-container:not(.designer-mode) {
  animation: streamEnter 0.3s ease forwards;
}

/* ============================================================================
   🎨 PREMIUM HEADER
   ============================================================================ */

.ultimate-stream-header {
  /* Layout */
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  flex-shrink: 0;
  overflow: hidden;
  
  /* Appearance */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animated Background Shimmer Effect */
.ultimate-stream-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.1) 75%),
    linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.1) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  animation: shimmer 20s linear infinite;
  opacity: 0.3;
  pointer-events: none;
}

@keyframes shimmer {
  0% { 
    background-position: 0 0, 10px 10px; 
  }
  100% { 
    background-position: 20px 20px, 30px 30px; 
  }
}

/* Header Title Area */
.ultimate-stream-header > div:first-child {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Header Title Text */
.ultimate-stream-header h2 {
  color: white;
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Subtitle */
.ultimate-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

/* ============================================================================
   ❌ CLOSE BUTTON
   ============================================================================ */

.ultimate-stream-header button {
  /* Layout */
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  
  /* Appearance */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  
  /* Typography */
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  
  /* Interaction */
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ultimate-stream-header button:hover {
  background: rgba(255,255,255,0.25);
  transform: rotate(90deg);
}

.ultimate-stream-header button:active {
  transform: rotate(90deg) scale(0.95);
}

.ultimate-stream-header button:focus {
  outline: 2px solid #4facfe;
  outline-offset: 2px;
}

/* ============================================================================
   📝 CONTENT AREA - STORY MODE
   ============================================================================ */

.ultimate-content-area {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.8));
  position: relative;
}

#ultimate-stream-output {
  color: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  line-height: 1.8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100px;
}

/* Individual Message Styling */
#ultimate-stream-output > div {
  opacity: 0;
  transform: translateY(10px);
  display: block;
  margin-bottom: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #4facfe;
  border-radius: 8px;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: contentFadeIn 0.4s ease forwards;
}

/* Progress Message Class */
.progress-message {
  color: white;
  font-size: 15px;
  font-weight: 600;
  margin: 12px 0;
  padding: 16px;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.25), rgba(0, 242, 254, 0.25));
  border-left: 4px solid #4facfe;
  border-radius: 10px;
  animation: fadeInUp 0.5s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Content Fade In Animation */
@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbar Styling for Content Area */
.ultimate-content-area::-webkit-scrollbar,
#ultimate-stream-output::-webkit-scrollbar {
  width: 8px;
}

.ultimate-content-area::-webkit-scrollbar-track,
#ultimate-stream-output::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.ultimate-content-area::-webkit-scrollbar-thumb,
#ultimate-stream-output::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
}

.ultimate-content-area::-webkit-scrollbar-thumb:hover,
#ultimate-stream-output::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #00f2fe, #4facfe);
}

/* ============================================================================
   🖥️ DESIGNER CODING VIEW - 90% SCREEN MODE
   ============================================================================ */

/* Code Editor Container */
#code-editor-display {
  display: none; /* Hidden by default, shown only in designer mode */
  flex: 1;
  background: rgba(0,0,0,0.4);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Show code editor only in designer mode */
.ultimate-stream-container.designer-mode #code-editor-display {
  display: flex !important;
}

/* Hide story output in designer mode */
.ultimate-stream-container.designer-mode .ultimate-content-area {
  display: none !important;
}

/* Line Numbers Column */
#code-line-numbers {
  width: 50px;
  background: rgba(0,0,0,0.5);
  padding: 20px 10px;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  text-align: right;
  overflow-y: hidden;
  user-select: none;
  border-right: 1px solid rgba(255,255,255,0.1);
  line-height: 1.6;
  flex-shrink: 0;
}

/* Code Content Area */
#code-content {
  flex: 1;
  padding: 20px;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  color: #00ff88;
  overflow-y: auto;
  overflow-x: auto;
  line-height: 1.6;
  background: rgba(0,0,0,0.3);
  white-space: pre;
}

/* Code Content Scrollbar */
#code-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#code-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

#code-content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #00ff88, #00cc70);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

#code-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #00cc70, #00ff88);
}

/* Firefox scrollbar support */
#code-content {
  scrollbar-width: thin;
  scrollbar-color: #00ff88 rgba(0, 0, 0, 0.3);
}

/* Line Numbers Scrollbar (hidden) */
#code-line-numbers::-webkit-scrollbar {
  width: 0;
  display: none;
}

/* Individual Code Lines */
#code-content > div,
#code-line-numbers > div {
  min-height: 1.6em;
}

/* ============================================================================
   📊 PROGRESS BAR SYSTEM
   ============================================================================ */

/* Progress Section Container */
.ultimate-progress-section {
  padding: 24px 30px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
}

/* Progress Bar Track */
.ultimate-progress-section > div:first-child {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Progress Fill Bar */
#ultimate-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4facfe, #00f2fe, #4facfe);
  background-size: 200% 100%;
  border-radius: 8px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(79, 172, 254, 0.6);
  animation: progressShimmer 2s linear infinite;
}

/* Designer Mode Progress (Green Theme) */
.ultimate-stream-container.designer-mode #ultimate-progress-fill {
  background: linear-gradient(90deg, #00ff88, #00cc70, #00ff88);
  background-size: 200% 100%;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

/* Progress Bar Shimmer Animation */
@keyframes progressShimmer {
  0% { 
    background-position: 0% 50%; 
  }
  100% { 
    background-position: 200% 50%; 
  }
}

/* Progress Stats Container */
.ultimate-progress-section > div:last-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  color: white;
  font-size: 13px;
}

/* Progress Text */
#ultimate-progress-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* Progress Percentage */
#ultimate-progress-percent {
  font-weight: 700;
  font-size: 16px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 45px;
  text-align: right;
}

/* Designer Mode Progress Percentage (Green) */
.ultimate-stream-container.designer-mode #ultimate-progress-percent {
  background: linear-gradient(135deg, #00ff88, #00cc70);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================================
   ⚡ TYPING INDICATOR (OPTIONAL)
   ============================================================================ */

.ultimate-typing-indicator {
  display: inline-flex;
  gap: 6px;
  margin-top: 15px;
}

.ultimate-typing-indicator span {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  border-radius: 50%;
  animation: ultimateTyping 1.4s infinite;
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
}

.ultimate-typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.ultimate-typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.ultimate-typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes ultimateTyping {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0) scale(1);
  }
  30% {
    opacity: 1;
    transform: translateY(-12px) scale(1.2);
  }
}

/* ============================================================================
   📱 MOBILE RESPONSIVE DESIGN
   ============================================================================ */

/* Tablet Portrait (768px and below) */
@media (max-width: 768px) {
  .ultimate-stream-container {
    width: 95vw !important;
    max-height: 85vh !important;
  }
  
  .ultimate-stream-container.designer-mode {
    top: 3vh !important;
    left: 3vw !important;
    width: 94vw !important;
    height: 94vh !important;
  }
  
  .ultimate-stream-header {
    padding: 16px 20px !important;
  }
  
  .ultimate-stream-header h2 {
    font-size: 18px !important;
  }
  
  .ultimate-subtitle {
    font-size: 12px !important;
  }
  
  .ultimate-content-area {
    padding: 20px !important;
  }
  
  #ultimate-stream-output {
    font-size: 14px !important;
  }
  
  #code-content {
    padding: 15px !important;
    font-size: 12px !important;
  }
  
  #code-line-numbers {
    width: 40px !important;
    font-size: 11px !important;
    padding: 15px 8px !important;
  }
  
  .ultimate-progress-section {
    padding: 16px 20px !important;
  }
  
  .ultimate-stream-header button {
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .ultimate-stream-container {
    width: 98vw !important;
    max-height: 90vh !important;
    border-radius: 16px !important;
  }
  
  .ultimate-stream-container.designer-mode {
    top: 1vh !important;
    left: 1vw !important;
    width: 98vw !important;
    height: 98vh !important;
    border-radius: 12px !important;
  }
  
  .ultimate-stream-header {
    padding: 12px 16px !important;
    border-radius: 16px 16px 0 0 !important;
  }
  
  .ultimate-stream-header h2 {
    font-size: 16px !important;
    gap: 8px !important;
  }
  
  .ultimate-subtitle {
    font-size: 11px !important;
  }
  
  .ultimate-content-area {
    padding: 16px !important;
  }
  
  #ultimate-stream-output {
    font-size: 13px !important;
  }
  
  #ultimate-stream-output > div,
  .progress-message {
    padding: 10px !important;
    font-size: 13px !important;
    margin-bottom: 10px !important;
  }
  
  #code-content {
    padding: 12px !important;
    font-size: 11px !important;
  }
  
  #code-line-numbers {
    width: 35px !important;
    font-size: 10px !important;
    padding: 12px 6px !important;
  }
  
  .ultimate-progress-section {
    padding: 12px 16px !important;
  }
  
  #ultimate-progress-text {
    font-size: 12px !important;
  }
  
  #ultimate-progress-percent {
    font-size: 14px !important;
  }
  
  .ultimate-stream-header button {
    width: 28px !important;
    height: 28px !important;
    font-size: 16px !important;
  }
}

/* Mobile Landscape (max-height: 500px) */
@media (max-height: 500px) {
  .ultimate-stream-container {
    max-height: 95vh !important;
  }
  
  .ultimate-stream-header {
    padding: 12px 20px !important;
  }
  
  .ultimate-content-area {
    padding: 15px !important;
  }
  
  .ultimate-progress-section {
    padding: 12px 20px !important;
  }
}

/* ============================================================================
   ♿ ACCESSIBILITY FEATURES
   ============================================================================ */

/* Focus states for keyboard navigation */
.ultimate-stream-container:focus-within {
  box-shadow: 
    0 25px 100px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 4px rgba(79, 172, 254, 0.4);
}

/* Skip link for screen readers */
.ultimate-stream-container::before {
  content: "Streaming content display";
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .ultimate-stream-container {
    border: 3px solid white !important;
  }
  
  .ultimate-stream-header {
    border-bottom: 3px solid white !important;
  }
  
  #ultimate-stream-output > div,
  .progress-message {
    border-left-width: 5px !important;
  }
  
  .ultimate-stream-header button {
    border: 2px solid white !important;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .ultimate-stream-container,
  .ultimate-stream-container *,
  #ultimate-progress-fill,
  .ultimate-stream-header::before,
  .ultimate-typing-indicator span {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================================
   🎨 LIGHT THEME SUPPORT
   ============================================================================ */

/* Light Theme Container */
body:not(.dark-theme) .ultimate-stream-container {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 
    0 25px 100px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

/* Light Theme Content Area */
body:not(.dark-theme) .ultimate-content-area {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.8)) !important;
}

body:not(.dark-theme) #ultimate-stream-output {
  color: rgba(0, 0, 0, 0.9) !important;
}

/* Light Theme Messages */
body:not(.dark-theme) #ultimate-stream-output > div,
body:not(.dark-theme) .progress-message {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.15), rgba(0, 242, 254, 0.15)) !important;
  border-left-color: #667eea !important;
  color: rgba(0, 0, 0, 0.9) !important;
}

/* Light Theme Progress Section */
body:not(.dark-theme) .ultimate-progress-section {
  background: rgba(0, 0, 0, 0.05) !important;
}

body:not(.dark-theme) #ultimate-progress-text,
body:not(.dark-theme) #ultimate-progress-percent {
  color: rgba(0, 0, 0, 0.7) !important;
}

/* Light Theme Code Editor */
body:not(.dark-theme) #code-content {
  background: rgba(240, 242, 245, 0.8) !important;
  color: #059669 !important;
}

body:not(.dark-theme) #code-line-numbers {
  background: rgba(230, 232, 235, 0.8) !important;
  color: rgba(0, 0, 0, 0.4) !important;
}

body:not(.dark-theme) .ultimate-stream-container.designer-mode {
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #f1f5f9 100%) !important;
}

/* ============================================================================
   🖨️ PRINT STYLES
   ============================================================================ */

@media print {
  .ultimate-stream-container {
    display: none !important;
  }
}

/* ============================================================================
   🔧 UTILITY CLASSES & STATES
   ============================================================================ */

/* Hidden State */
.ultimate-stream-container.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-50%, -50%) scale(0.8) !important;
}

.ultimate-stream-container.designer-mode.hidden {
  transform: scale(0.8) !important;
}

/* Loading State */
.ultimate-stream-container.loading .ultimate-progress-section {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Error State */
.ultimate-stream-container.error .ultimate-stream-header {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Success State */
.ultimate-stream-container.success .ultimate-stream-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Prevent Body Scroll When Stream Active */
body.stream-active {
  overflow: hidden;
}

/* ============================================================================
   🎯 SYNTAX HIGHLIGHTING COLORS (FOR CODE EDITOR)
   ============================================================================ */

/* Keywords */
.code-keyword {
  color: #569cd6;
}

/* Strings */
.code-string {
  color: #ce9178;
}

/* Comments */
.code-comment {
  color: #6a9955;
}

/* Functions */
.code-function {
  color: #dcdcaa;
}

/* Numbers */
.code-number {
  color: #b5cea8;
}

/* Tags/HTML */
.code-tag {
  color: #ff6b6b;
}

/* ============================================================================
   ✨ FINAL POLISH
   ============================================================================ */

/* Smooth scrolling for all stream elements */
.ultimate-stream-container,
.ultimate-stream-container * {
  -webkit-overflow-scrolling: touch;
}

/* Prevent text selection on UI elements */
.ultimate-stream-header,
.ultimate-progress-section {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

/* Allow text selection in content */
#ultimate-stream-output,
#code-content {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
}

/* Hardware acceleration for animations */
.ultimate-stream-container,
#ultimate-progress-fill,
.ultimate-stream-header button {
  will-change: transform, opacity;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* FIX: Website display priority */
.website-preview {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: white !important;
    z-index: 999999 !important;
    display: none;
}

.website-preview.active,
body.website-ready .website-preview {
    display: block !important;
}

/* Hide all forms when website is ready */
body.website-ready .form-dialog,
body.website-ready .sequential-form-container,
body.website-ready .intelligent-form-popup {
    display: none !important;
    visibility: hidden !important;
}

/* Remove black background */
body {
    background-color: #f5f5f5 !important;
}

/* ============================================================================
   END OF ULTIMATE LLM STREAMING SYSTEM CSS
   Version: 2.0 (Production Ready)
   Last Updated: October 2025
   Total Lines: ~850
   ============================================================================ *//* ═══════════════════════════════════════════════════════════════════════════
   ENHANCED STYLES FOR script-ultimate-v3.js
   ═══════════════════════════════════════════════════════════════════════════
   
   This file contains ADDITIONAL CSS for the new features in script-ultimate-v3.js:
   - AdvancedPreviewSystem (Device preview modal)
   - WorkflowProgressTracker (5-stage progress tracker)
   - Enhanced Notifications (type-specific styling)
   - Website Section
   - Error Section
   
   Include this AFTER your main styles.css:
   <link rel="stylesheet" href="styles.css">
   <link rel="stylesheet" href="styles-FIXED.css">
   
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   1. ADVANCED PREVIEW SYSTEM (AdvancedPreviewSystem class)
   ═══════════════════════════════════════════════════════════════════════════ */

.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preview-modal.active {
  display: flex;
  opacity: 1;
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.preview-container {
  position: relative;
  width: 90%;
  max-width: 1400px;
  height: 90vh;
  background: var(--surface, #f8fafc);
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: var(--background, #ffffff);
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.preview-icon {
  font-size: 1.5rem;
}

.preview-title h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary, #0f172a);
}

.preview-badge {
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.device-selector {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem;
  background: var(--surface, #f8fafc);
  border-radius: 12px;
  border: 1px solid var(--border, #e2e8f0);
}

.device-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary, #64748b);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.device-btn:hover {
  background: var(--surface-hover, #f1f5f9);
  color: var(--text-primary, #0f172a);
}

.device-btn.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.preview-actions {
  display: flex;
  gap: 0.5rem;
}

.preview-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-btn.primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
}

.preview-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.preview-close {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--surface, #f8fafc);
  color: var(--text-secondary, #64748b);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  border: 1px solid var(--border, #e2e8f0);
}

.preview-close:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
  transform: scale(1.05);
}

.preview-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #f3f4f6;
  overflow: hidden;
}

.device-frame {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.device-frame.mobile {
  max-width: 375px;
  height: 667px;
  margin: 0 auto;
  border: 8px solid #1e293b;
  border-radius: 30px;
}

.device-frame.tablet {
  max-width: 768px;
  height: 1024px;
  margin: 0 auto;
  border: 12px solid #1e293b;
  border-radius: 20px;
}

.device-frame.desktop {
  width: 100%;
  height: 100%;
}

.device-screen {
  width: 100%;
  height: 100%;
  position: relative;
  background: white;
  overflow: hidden;
}

#preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.device-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e5e7eb;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  font-size: 1rem;
  color: var(--text-secondary, #64748b);
  font-weight: 500;
}

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

.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: var(--background, #ffffff);
  border-top: 1px solid var(--border, #e2e8f0);
}

.preview-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-indicator.success {
  background: #10b981;
}

.status-indicator.error {
  background: #ef4444;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

.preview-actions-bottom {
  display: flex;
  gap: 0.75rem;
}

.action-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-btn.primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.action-btn.secondary {
  background: var(--surface, #f8fafc);
  color: var(--text-primary, #0f172a);
  border: 1px solid var(--border, #e2e8f0);
}

.action-btn.secondary:hover {
  background: var(--surface-hover, #f1f5f9);
  border-color: var(--border-hover, #cbd5e1);
}

/* Responsive */
@media (max-width: 768px) {
  .preview-container {
    width: 95%;
    height: 95vh;
  }
  
  .preview-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .device-selector {
    width: 100%;
    justify-content: space-between;
  }
  
  .device-btn {
    flex: 1;
    justify-content: center;
    font-size: 0.75rem;
    padding: 0.5rem;
  }
  
  .preview-body {
    padding: 1rem;
  }
  
  .device-frame.tablet {
    max-width: 100%;
    height: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. WORKFLOW PROGRESS TRACKER (WorkflowProgressTracker class)
   ═══════════════════════════════════════════════════════════════════════════ */

.workflow-tracker {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 350px;
  max-width: calc(100vw - 40px);
  background: var(--glass-bg, rgba(255, 255, 255, 0.7));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.18));
  z-index: 1000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.workflow-tracker.visible {
  opacity: 1;
  transform: translateX(0);
}

.tracker-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.tracker-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

.tracker-percentage {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tracker-stages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tracker-stage {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface, #f8fafc);
  border-radius: 12px;
  transition: all 0.3s ease;
  opacity: 0.5;
  border: 2px solid transparent;
}

.tracker-stage.pending {
  opacity: 0.4;
}

.tracker-stage.active {
  opacity: 1;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
  animation: pulse-stage 2s ease-in-out infinite;
}

.tracker-stage.complete {
  opacity: 1;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
  border-color: rgba(16, 185, 129, 0.3);
}

@keyframes pulse-stage {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.stage-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
}

.tracker-stage.active .stage-icon {
  animation: bounce-icon 1s ease-in-out infinite;
}

@keyframes bounce-icon {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.stage-info {
  flex: 1;
  min-width: 0;
}

.stage-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary, #0f172a);
  margin-bottom: 0.25rem;
}

.stage-progress {
  width: 100%;
}

.stage-progress .progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}

.stage-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 9999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.tracker-stage.active .progress-fill {
  animation: shimmer 1.5s ease-in-out infinite;
}

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

.tracker-stage.complete .progress-fill {
  background: linear-gradient(90deg, #10b981, #059669);
}

/* Responsive */
@media (max-width: 768px) {
  .workflow-tracker {
    top: 60px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }
  
  .tracker-title {
    font-size: 0.875rem;
  }
  
  .tracker-percentage {
    font-size: 1.25rem;
  }
  
  .stage-icon {
    font-size: 1.25rem;
    width: 35px;
    height: 35px;
  }
  
  .stage-name {
    font-size: 0.8125rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. ENHANCED NOTIFICATIONS (NotificationManager)
   ═══════════════════════════════════════════════════════════════════════════ */

.notification {
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid;
  backdrop-filter: blur(10px);
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification-message {
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 500;
  color: white;
}

.notification-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s ease;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Type-specific styling */
.notification-success {
  background: linear-gradient(135deg, #10b981, #059669);
  border-left-color: #047857;
}

.notification-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-left-color: #b91c1c;
}

.notification-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-left-color: #b45309;
}

.notification-warning .notification-message {
  color: #78350f;
}

.notification-warning .notification-close {
  background: rgba(120, 53, 15, 0.2);
  color: #78350f;
}

.notification-warning .notification-close:hover {
  background: rgba(120, 53, 15, 0.3);
}

.notification-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-left-color: #1d4ed8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. WEBSITE SECTION STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.modern-website-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.website-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.website-card {
  background: var(--glass-bg, rgba(255, 255, 255, 0.7));
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-2xl, 0 25px 50px -12px rgb(0 0 0 / 0.25));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.18));
}

.website-header {
  text-align: center;
  margin-bottom: 2rem;
}

.website-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.title-icon {
  font-size: 2.5rem;
}

.website-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary, #64748b);
}

.website-preview-area {
  margin-bottom: 2rem;
  border-radius: 16px;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-height: 400px;
}

.preview-wrapper {
  width: 100%;
  height: 100%;
}

.website-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   5. ERROR SECTION STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.modern-error-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.error-container {
  text-align: center;
  max-width: 600px;
}

.error-animation {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.error-icon {
  width: 120px;
  height: 120px;
  position: relative;
}

.error-circle {
  stroke: #ef4444;
  stroke-width: 3;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: stroke-circle 0.6s ease-out forwards;
}

.error-x {
  stroke: #ef4444;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: stroke-x 0.4s ease-out 0.6s forwards;
}

@keyframes stroke-circle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes stroke-x {
  to {
    stroke-dashoffset: 0;
  }
}

.error-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1.125rem;
  color: var(--text-secondary, #64748b);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. ADDITIONAL UTILITY STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.prompt-form {
  width: 100%;
}

/* Form wrapper to prevent default form styling issues */
.prompt-form .prompt-input-wrapper {
  margin: 0;
}

/* Ensure sections are properly hidden by default */
section[style*="display: none"] {
  display: none !important;
}

/* Smooth transitions for section visibility */
section {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Dark theme adjustments */
body.dark-theme .preview-container,
body.dark-theme .website-card {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.18);
}

body.dark-theme .preview-header,
body.dark-theme .preview-footer {
  background: #1e293b;
  border-color: #334155;
}

body.dark-theme .device-selector {
  background: #334155;
  border-color: #475569;
}

body.dark-theme .device-btn {
  color: #cbd5e1;
}

body.dark-theme .device-btn:hover {
  background: #475569;
  color: #f8fafc;
}

body.dark-theme .workflow-tracker {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.18);
}

body.dark-theme .tracker-stage {
  background: #334155;
}

/* Print styles */
@media print {
  .preview-modal,
  .workflow-tracker,
  .notification {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   1. FORM PREVIEW MODAL SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

.form-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.form-preview-modal.active {
  opacity: 1;
  visibility: visible;
}

.form-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.form-preview-container {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  background: var(--surface, #ffffff);
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  will-change: transform, opacity;
  transform: translateZ(0);
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.form-preview-header {
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary, #6366f1), var(--primary-dark, #4f46e5));
  color: white;
  text-align: center;
}

.form-preview-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.form-preview-header p {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
}

.form-preview-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem;
  background: var(--background, #f0f4f8);
  -webkit-overflow-scrolling: touch;
}

.form-preview-body::-webkit-scrollbar {
  width: 8px;
}

.form-preview-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.form-preview-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.form-preview-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.preview-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.preview-section {
  background: var(--surface, #ffffff);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border, #e2e8f0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.preview-section-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border, #e2e8f0);
}

.section-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.preview-section-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
  margin: 0;
  flex: 1;
}

.section-description {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  margin: 0.5rem 0 0 0;
  display: block;
}

.preview-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.preview-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--surface-hover, #f8fafc);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.preview-field:hover {
  background: var(--border, #e2e8f0);
  transform: translateX(4px);
}

.field-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.field-info {
  flex: 1;
  min-width: 0;
}

.field-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary, #0f172a);
  display: block;
}

.field-hint {
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
  display: block;
  margin-top: 0.25rem;
}

.field-required,
.field-optional {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.field-required {
  background: var(--accent, #10b981);
  color: white;
}

.field-optional {
  background: var(--text-muted, #94a3b8);
  color: white;
}

.preview-info-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.info-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.info-content {
  flex: 1;
}

.info-content strong {
  display: block;
  color: var(--text-primary, #0f172a);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.info-content p {
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}

.form-preview-footer {
  padding: 1.5rem 2rem;
  background: var(--surface, #ffffff);
  border-top: 1px solid var(--border, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.preview-stats {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
}

.stat {
  text-align: center;
  flex: 1;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary, #6366f1);
  margin-bottom: 0.25rem;
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  font-weight: 500;
}

.preview-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.preview-btn {
  flex: 1;
  max-width: 200px;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  will-change: transform;
  transform: translateZ(0);
}

.preview-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.preview-btn.primary {
  background: linear-gradient(135deg, var(--primary, #6366f1), var(--primary-dark, #4f46e5));
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.preview-btn.primary:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.preview-btn.primary:not(:disabled):active {
  transform: translateY(0);
}

.preview-btn.secondary {
  background: var(--surface-hover, #f8fafc);
  color: var(--text-primary, #0f172a);
  border: 2px solid var(--border, #e2e8f0);
}

.preview-btn.secondary:hover {
  background: var(--border, #e2e8f0);
  border-color: var(--text-secondary, #64748b);
}

.btn-icon {
  font-size: 1.25rem;
  font-weight: 400;
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.form-preview-modal.transitioning .form-preview-container {
  animation: scaleDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes scaleDown {
  to {
    transform: scale(0.95);
    opacity: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. MOBILE LAYOUT STABILITY FIXES - PREVENT FLUCTUATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.modern-loading-section {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1400;
  display: none;
}

.modern-loading-section.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-content {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ai-thoughts {
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ai-thoughts .thought-bubble {
  will-change: transform;
  transform: translateZ(0);
}

.sequential-form-container {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1400;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  will-change: transform;
  transform: translateZ(0);
}

.sequential-form-dialog {
  position: relative;
  min-height: 100vh;
  padding: 2rem 1rem;
  will-change: transform;
  transform: translateZ(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. BODY STATE MANAGEMENT
   ═══════════════════════════════════════════════════════════════════════════ */

body.preview-active,
body.forms-active,
body.modal-active {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
}

body.middle-man-active .prompt-section,
body.middle-man-active .modern-header,
body.forms-active .prompt-section,
body.forms-active .modern-header {
  filter: blur(4px);
  pointer-events: none;
}

body.forms-active .background-animation,
body.preview-active .background-animation {
  opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. MOBILE RESPONSIVE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .form-preview-container {
    width: 95%;
    max-height: 90vh;
  }
  
  .form-preview-header {
    padding: 1.5rem 1rem;
  }
  
  .form-preview-header h2 {
    font-size: 1.5rem;
  }
  
  .form-preview-header p {
    font-size: 0.875rem;
  }
  
  .form-preview-body {
    padding: 1.5rem 1rem;
  }
  
  .preview-section {
    padding: 1rem;
  }
  
  .preview-section-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .preview-actions {
    flex-direction: column;
  }
  
  .preview-btn {
    max-width: 100%;
  }
  
  .preview-stats {
    flex-wrap: wrap;
  }
  
  .stat {
    min-width: 80px;
  }
  
  .ai-thoughts {
    min-height: 100px;
    max-height: 150px;
  }
  
  .thought-bubble {
    font-size: 0.875rem;
  }
  
  .prompt-section {
    padding: 1.5rem 1rem;
    min-height: calc(100vh - 80px);
  }
  
  .prompt-card {
    padding: 1.5rem;
    margin: 0;
  }
  
  .prompt-input-container {
    will-change: transform;
    transform: translateZ(0);
  }
  
  .modern-prompt-input {
    min-height: 56px;
    max-height: 200px;
    resize: none;
    font-size: 16px;
  }
  
  .sequential-form-dialog {
    padding: 1.5rem 1rem;
  }
  
  html.sequential-active,
  body.sequential-active {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .form-preview-header h2 {
    font-size: 1.25rem;
  }
  
  .form-preview-header p {
    font-size: 0.8125rem;
  }
  
  .preview-section-header h3 {
    font-size: 1.125rem;
  }
  
  .field-label {
    font-size: 0.875rem;
  }
  
  .field-hint {
    font-size: 0.75rem;
  }
  
  .stat-value {
    font-size: 1.25rem;
  }
  
  .preview-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   5. iOS-SPECIFIC FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

@supports (-webkit-touch-callout: none) {
  body {
    position: fixed;
    width: 100%;
  }
  
  .prompt-input-container,
  .sequential-form-container,
  .form-preview-body {
    -webkit-overflow-scrolling: touch;
  }
  
  input,
  select,
  textarea,
  .modern-prompt-input {
    font-size: 16px !important;
  }
  
  .sequential-form-container,
  .form-preview-modal {
    height: -webkit-fill-available;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. DARK THEME SUPPORT
   ═══════════════════════════════════════════════════════════════════════════ */

body.dark-theme .form-preview-overlay {
  background: rgba(0, 0, 0, 0.85);
}

body.dark-theme .form-preview-container {
  background: var(--surface, #121827);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

body.dark-theme .form-preview-body {
  background: var(--background, #0a0e1a);
}

body.dark-theme .preview-section {
  background: var(--surface-elevation-1, #1a2332);
  border-color: var(--border-hover, #3d506d);
}

body.dark-theme .preview-field {
  background: var(--surface-elevation-2, #243046);
}

body.dark-theme .preview-field:hover {
  background: var(--surface-elevation-3, #2d3d59);
}

body.dark-theme .preview-info-box {
  background: rgba(129, 140, 248, 0.1);
  border-color: rgba(129, 140, 248, 0.2);
}

body.dark-theme .form-preview-footer {
  background: var(--surface-elevation-1, #1a2332);
  border-top-color: var(--border-hover, #3d506d);
}

body.dark-theme .preview-btn.secondary {
  background: var(--surface-elevation-2, #243046);
  border-color: var(--border-hover, #3d506d);
}

body.dark-theme .preview-btn.secondary:hover {
  background: var(--surface-elevation-3, #2d3d59);
}

/* ═══════════════════════════════════════════════════════════════════════════
   7. ANIMATION PERFORMANCE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.form-preview-modal,
.form-preview-container,
.preview-field,
.preview-btn,
.loading-content,
.ai-thoughts,
.thought-bubble {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .form-preview-modal.active {
    animation: none;
  }
  
  .form-preview-container {
    animation: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   8. PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
  .form-preview-modal,
  .form-preview-overlay,
  .sequential-form-container,
  .modern-loading-section,
  .preview-btn {
    display: none !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   END OF ENHANCED STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   🎯 MIDDLE-MAN SEQUENTIAL FORM MODAL STYLES (BACKUP)
   ═══════════════════════════════════════════════════════════════════════════════
   Note: These styles are also injected via script.js for reliability.
   This CSS file provides additional fallback and customization options.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Sequential Form Modal - Base */
.sequential-form-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.sequential-form-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Overlay with blur effect */
.form-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: formModalFadeIn 0.3s ease;
}

@keyframes formModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Main Modal Container */
.form-modal-container {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 28px;
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 100px rgba(99, 102, 241, 0.15);
  display: flex;
  flex-direction: column;
  animation: formModalSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  transform-origin: center center;
}

@keyframes formModalSlideUp {
  from {
    transform: translateY(60px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Modal Header - Gradient Purple */
.form-modal-header {
  padding: 28px 32px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.form-modal-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 50%);
  animation: formHeaderShimmer 8s infinite linear;
  pointer-events: none;
}

@keyframes formHeaderShimmer {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Form Progress Indicator */
.form-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.form-number {
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.form-progress .progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffffff 0%, rgba(255,255,255,0.8) 100%);
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.form-modal-header h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.form-modal-header .form-description {
  font-size: 15px;
  opacity: 0.9;
  margin: 10px 0 0 0;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* Modal Body - Form Fields */
.form-modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 32px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.form-modal-body::-webkit-scrollbar {
  width: 8px;
}

.form-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.form-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
  border-radius: 4px;
}

.sequential-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sequential-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: seqFieldFadeIn 0.4s ease forwards;
  opacity: 0;
}

.sequential-form .form-field:nth-child(1) { animation-delay: 0.1s; }
.sequential-form .form-field:nth-child(2) { animation-delay: 0.15s; }
.sequential-form .form-field:nth-child(3) { animation-delay: 0.2s; }
.sequential-form .form-field:nth-child(4) { animation-delay: 0.25s; }
.sequential-form .form-field:nth-child(5) { animation-delay: 0.3s; }
.sequential-form .form-field:nth-child(6) { animation-delay: 0.35s; }
.sequential-form .form-field:nth-child(7) { animation-delay: 0.4s; }
.sequential-form .form-field:nth-child(8) { animation-delay: 0.45s; }
.sequential-form .form-field:nth-child(n+9) { animation-delay: 0.5s; }

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

.sequential-form label {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sequential-form .required-star {
  color: #ef4444;
  font-weight: 700;
  font-size: 18px;
}

.sequential-form input,
.sequential-form select,
.sequential-form textarea {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  color: #1e293b;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sequential-form input:focus,
.sequential-form select:focus,
.sequential-form textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 
    0 0 0 4px rgba(99, 102, 241, 0.15),
    0 4px 12px rgba(99, 102, 241, 0.1);
}

.sequential-form input::placeholder,
.sequential-form textarea::placeholder {
  color: #94a3b8;
}

.sequential-form input.error,
.sequential-form select.error,
.sequential-form textarea.error {
  border-color: #ef4444;
  animation: seqFormShake 0.5s ease;
}

@keyframes seqFormShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.sequential-form textarea {
  min-height: 120px;
  resize: vertical;
}

.sequential-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  padding-right: 50px;
}

/* Modal Footer - Action Buttons */
.form-modal-footer {
  padding: 24px 32px;
  background: linear-gradient(0deg, #f1f5f9 0%, #ffffff 100%);
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.form-btn {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-btn.secondary {
  background: #f1f5f9;
  color: #64748b;
  border: 2px solid #e2e8f0;
}

.form-btn.secondary:hover {
  background: #e2e8f0;
  color: #475569;
  border-color: #cbd5e1;
}

.form-btn.primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.form-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
}

.form-btn.primary:active {
  transform: translateY(0);
}

.form-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Radio and Checkbox Groups */
.sequential-form .radio-group,
.sequential-form .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sequential-form .radio-option,
.sequential-form .checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.sequential-form .radio-option:hover,
.sequential-form .checkbox-option:hover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
}

.sequential-form .radio-option input,
.sequential-form .checkbox-option input {
  width: 18px;
  height: 18px;
  padding: 0;
}

/* Field Hints */
.sequential-form .field-hint {
  font-size: 13px;
  color: #64748b;
  margin-top: -4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .form-modal-container {
    width: 95%;
    max-height: 90vh;
    border-radius: 20px;
  }
  
  .form-modal-header {
    padding: 24px 20px;
  }
  
  .form-modal-header h2 {
    font-size: 22px;
  }
  
  .form-progress {
    flex-direction: column;
    gap: 10px;
  }
  
  .form-modal-body {
    padding: 24px 20px;
  }
  
  .sequential-form {
    gap: 20px;
  }
  
  .sequential-form input,
  .sequential-form select,
  .sequential-form textarea {
    padding: 14px 16px;
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  .form-modal-footer {
    padding: 20px;
    flex-direction: column;
  }
  
  .form-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .form-modal-header h2 {
    font-size: 20px;
  }
  
  .form-modal-header .form-description {
    font-size: 14px;
  }
  
  .form-number {
    font-size: 13px;
    padding: 5px 12px;
  }
}

/* Dark Theme Support for Sequential Forms */
body.dark-theme .form-modal-container {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}

body.dark-theme .form-modal-body {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

body.dark-theme .sequential-form label {
  color: #e2e8f0;
}

body.dark-theme .sequential-form input,
body.dark-theme .sequential-form select,
body.dark-theme .sequential-form textarea {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark-theme .sequential-form input:focus,
body.dark-theme .sequential-form select:focus,
body.dark-theme .sequential-form textarea:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2);
}

body.dark-theme .sequential-form input::placeholder,
body.dark-theme .sequential-form textarea::placeholder {
  color: #64748b;
}

body.dark-theme .form-modal-footer {
  background: linear-gradient(0deg, #0f172a 0%, #1e293b 100%);
  border-top-color: #334155;
}

body.dark-theme .form-btn.secondary {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

body.dark-theme .form-btn.secondary:hover {
  background: #334155;
  color: #e2e8f0;
}

body.dark-theme .sequential-form .radio-option,
body.dark-theme .sequential-form .checkbox-option {
  border-color: #334155;
}

body.dark-theme .sequential-form .radio-option:hover,
body.dark-theme .sequential-form .checkbox-option:hover {
  border-color: #818cf8;
  background: rgba(129, 140, 248, 0.1);
}

/* Body State When Modal is Open */
body.sequential-modal-open {
  overflow: hidden !important;
}

body.sequential-modal-open .modern-header,
body.sequential-modal-open .prompt-section,
body.sequential-modal-open .background-animation {
  filter: blur(8px);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   END OF MIDDLE-MAN SEQUENTIAL FORM MODAL STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   🚀 OPTIMIZED FORM STYLES - APPLIED BY FIX SCRIPT
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Force 95% screen height for modal */
.form-modal-container {
  height: 95vh !important;
  max-height: 95vh !important;
  max-width: 900px !important;
}

/* Force 2-column grid layout */
.sequential-form {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 14px !important;
}

/* Force instant display - NO animation delays */
.sequential-form .form-field {
  opacity: 1 !important;
  animation: none !important;
  animation-delay: 0s !important;
}

.sequential-form .form-field:nth-child(1),
.sequential-form .form-field:nth-child(2),
.sequential-form .form-field:nth-child(3),
.sequential-form .form-field:nth-child(4),
.sequential-form .form-field:nth-child(5),
.sequential-form .form-field:nth-child(6),
.sequential-form .form-field:nth-child(7),
.sequential-form .form-field:nth-child(8),
.sequential-form .form-field:nth-child(n+9) {
  animation-delay: 0s !important;
  animation: none !important;
  opacity: 1 !important;
}

/* Force textarea full width */
.sequential-form textarea {
  grid-column: 1 / -1 !important;
}

/* Force radio groups full width */
.sequential-form .radio-group {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

/* Fast transitions */
.sequential-form-modal {
  transition: opacity 0.15s ease, visibility 0.15s ease !important;
}

.form-modal-container {
  animation-duration: 0.2s !important;
}

/* Mobile - full screen and single column */
@media (max-width: 768px) {
  .form-modal-container {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
  }
  
  .sequential-form {
    grid-template-columns: 1fr !important;
  }
  
  .form-modal-footer {
    flex-direction: column !important;
  }
  
  .form-btn {
    width: 100% !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   END OF OPTIMIZED STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   🎯 EXTRACTED FROM SCRIPT.JS - SEQUENTIAL FORM MODAL STYLES
   These styles are also injected via JavaScript for fallback
   ═══════════════════════════════════════════════════════════════════════════ */

/* If you already have these in styles.css, you can skip this section */
    /* ═══════════════════════════════════════════════════════════════════════════
       🎯 SEQUENTIAL FORM MODAL - BEAUTIFUL POPUP FOR MIDDLE-MAN FORMS
       ═══════════════════════════════════════════════════════════════════════════ */
    
    .sequential-form-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 10000;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.15s ease, visibility 0.15s ease;
    }
    
    .sequential-form-modal.active {
      opacity: 1;
      visibility: visible;
    }
    
    /* Overlay - fast blur */
    .form-modal-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(15, 23, 42, 0.9);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    
    /* 🔥 OPTIMIZED: 95% SCREEN HEIGHT, 900px WIDTH */
    .form-modal-container {
      position: relative;
      width: 95%;
      max-width: 900px;
      height: 95vh;
      max-height: 95vh;
      background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
      border-radius: 20px;
      box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
      display: flex;
      flex-direction: column;
      animation: modalSlideUp 0.2s ease-out;
      overflow: hidden;
      will-change: transform, opacity;
    }
    
    @keyframes modalSlideUp {
      from {
        transform: translateY(20px) scale(0.98);
        opacity: 0;
      }
      to {
        transform: translateY(0) scale(1);
        opacity: 1;
      }
    }
    
    .sequential-form-modal.active .form-modal-container {
      animation: modalSlideUp 0.2s ease-out forwards;
    }
    
    /* Modal Header - Compact */
    .form-modal-header {
      padding: 18px 24px;
      background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
      color: white;
      flex-shrink: 0;
    }
    
    .form-modal-header::before {
      display: none;
    }
    
    /* Form Progress Indicator */
    .form-progress {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 8px;
    }
    
    .form-number {
      font-size: 12px;
      font-weight: 600;
      background: rgba(255, 255, 255, 0.2);
      padding: 4px 10px;
      border-radius: 12px;
    }
    
    .form-progress .progress-bar {
      flex: 1;
      height: 5px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 5px;
      overflow: hidden;
    }
    
    .form-progress .progress-fill {
      height: 100%;
      background: white;
      border-radius: 5px;
      transition: width 0.2s ease;
    }
    
    .form-modal-header h2 {
      font-size: 20px;
      font-weight: 700;
      margin: 0;
    }
    
    .form-modal-header .form-description {
      font-size: 13px;
      opacity: 0.9;
      margin: 4px 0 0 0;
    }
    
    /* Modal Body - Flex grow to fill */
    .form-modal-body {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 18px 24px;
      background: #f8fafc;
      -webkit-overflow-scrolling: touch;
    }
    
    .form-modal-body::-webkit-scrollbar {
      width: 5px;
    }
    
    .form-modal-body::-webkit-scrollbar-track {
      background: transparent;
    }
    
    .form-modal-body::-webkit-scrollbar-thumb {
      background: rgba(99, 102, 241, 0.25);
      border-radius: 3px;
    }
    
    /* 🔥 OPTIMIZED: 2-COLUMN GRID LAYOUT */
    .sequential-form {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
      align-content: start;
    }
    
    /* 🔥 INSTANT DISPLAY - NO ANIMATION DELAYS */
    .sequential-form .form-field {
      display: flex;
      flex-direction: column;
      gap: 6px;
      opacity: 1;
    }
    
    .sequential-form label {
      font-size: 13px;
      font-weight: 600;
      color: #1e293b;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    
    .sequential-form .required-star {
      color: #ef4444;
      font-weight: 700;
      font-size: 14px;
    }
    
    .sequential-form input,
    .sequential-form select,
    .sequential-form textarea {
      width: 100%;
      padding: 10px 12px;
      font-size: 14px;
      border: 2px solid #e2e8f0;
      border-radius: 8px;
      background: #ffffff;
      color: #1e293b;
      transition: border-color 0.1s ease, box-shadow 0.1s ease;
    }
    
    .sequential-form input:focus,
    .sequential-form select:focus,
    .sequential-form textarea:focus {
      outline: none;
      border-color: #6366f1;
      box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }
    
    .sequential-form input::placeholder,
    .sequential-form textarea::placeholder {
      color: #94a3b8;
    }
    
    .sequential-form input.error,
    .sequential-form select.error,
    .sequential-form textarea.error {
      border-color: #ef4444;
      animation: quickShake 0.2s ease;
    }
    
    @keyframes quickShake {
      0%, 100% { transform: translateX(0); }
      25% { transform: translateX(-3px); }
      75% { transform: translateX(3px); }
    }
    
    .sequential-form textarea {
      min-height: 70px;
      resize: vertical;
      grid-column: 1 / -1;
    }
    
    .sequential-form select {
      cursor: pointer;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 16px center;
      background-size: 18px;
      padding-right: 50px;
    }
    
    /* Modal Footer - Compact */
    .form-modal-footer {
      padding: 14px 24px;
      background: white;
      border-top: 1px solid #e2e8f0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-shrink: 0;
    }
    
    /* 🔥 FIX: Footer with Skip + Previous + Continue/Complete buttons */
    .form-modal-footer .footer-left {
      display: flex;
      gap: 10px;
      align-items: center;
    }
    
    .form-btn {
      padding: 10px 20px;
      font-size: 14px;
      font-weight: 600;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.15s ease;
      border: none;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    
    .form-btn.secondary {
      background: #f1f5f9;
      color: #64748b;
      border: 2px solid #e2e8f0;
    }
    
    .form-btn.secondary:hover {
      background: #e2e8f0;
      color: #475569;
      border-color: #cbd5e1;
    }
    
    .form-btn.primary {
      background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
      color: white;
      box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    }
    
    .form-btn.primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
    }
    
    .form-btn.primary:active {
      transform: translateY(0);
    }
    
    .form-btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none !important;
    }
    
    /* 📱 MOBILE - FULL SCREEN, SINGLE COLUMN */
    @media (max-width: 768px) {
      .form-modal-footer {
        flex-direction: column;
        gap: 10px;
      }
      
      .form-modal-footer .footer-left {
        width: 100%;
        justify-content: center;
      }
      
      .form-btn {
        flex: 1;
        justify-content: center;
      }
      
      .form-btn.primary {
        width: 100%;
      }
    
      .form-modal-container {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
      }
      
      .form-modal-header {
        padding: 14px 16px;
      }
      
      .form-modal-header h2 {
        font-size: 17px;
      }
      
      .form-progress {
        flex-direction: row;
        gap: 8px;
      }
      
      .form-modal-body {
        padding: 14px 16px;
      }
      
      .sequential-form {
        grid-template-columns: 1fr;
        gap: 10px;
      }
      
      .sequential-form input,
      .sequential-form select,
      .sequential-form textarea {
        padding: 10px 12px;
        font-size: 16px;
      }
      
      .form-modal-footer {
        padding: 12px 16px;
        flex-direction: column;
      }
      
      .form-btn {
        width: 100%;
        justify-content: center;
      }
    }
    
    @media (max-width: 480px) {
      .form-modal-header h2 {
        font-size: 20px;
      }
      
      .form-modal-header .form-description {
        font-size: 14px;
      }
      
      .form-number {
        font-size: 13px;
        padding: 5px 12px;
      }
    }
    
    /* Dark Theme Support */
    body.dark-theme .form-modal-container {
      background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    }
    
    body.dark-theme .form-modal-body {
      background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    }
    
    body.dark-theme .sequential-form label {
      color: #e2e8f0;
    }
    
    body.dark-theme .sequential-form input,
    body.dark-theme .sequential-form select,
    body.dark-theme .sequential-form textarea {
      background: #1e293b;
      border-color: #334155;
      color: #f1f5f9;
    }
    
    body.dark-theme .sequential-form input:focus,
    body.dark-theme .sequential-form select:focus,
    body.dark-theme .sequential-form textarea:focus {
      border-color: #818cf8;
      box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2);
    }
    
    body.dark-theme .sequential-form input::placeholder,
    body.dark-theme .sequential-form textarea::placeholder {
      color: #64748b;
    }
    
    body.dark-theme .form-modal-footer {
      background: #1e293b;
      border-top-color: #334155;
    }
    
    body.dark-theme .form-btn.secondary {
      background: #334155;
      color: #94a3b8;
      border-color: #475569;
    }
    
    body.dark-theme .form-btn.secondary:hover {
      background: #475569;
      color: #cbd5e1;
    }

/* ═══════════════════════════════════════════════════════════════════════════
   🎯 INITIAL VISIBILITY - HIDE SECTIONS BY DEFAULT
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hide all workflow sections by default - JS will show them */
#loadingSection,
#questionFormContainer,
#formSection,
#successSection {
  display: none;
}

/* Only show inputSection by default */
#inputSection {
  display: block;
}

/* Ensure proper z-index stacking */
.prompt-section { z-index: 1; }
.modern-loading-section { z-index: 100; }
.modern-question-section { z-index: 100; }
.modern-form-section { z-index: 100; }
.modern-success-section { z-index: 100; }

/* ═══════════════════════════════════════════════════════════════════════════════
   🎯 CATEGORY A1: STORY TELLING STREAMER STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

.story-stream-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.story-stream-container.active {
  opacity: 1;
}

.story-stream-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.story-stream-modal {
  position: relative;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  background: linear-gradient(145deg, #1a1f36 0%, #0d1025 100%);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(99, 102, 241, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.story-stream-container.active .story-stream-modal {
  transform: scale(1) translateY(0);
}

.story-stream-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.story-phases {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.story-phase {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.story-phase.active {
  opacity: 1;
  background: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.story-phase.complete {
  opacity: 1;
  background: rgba(16, 185, 129, 0.3);
}

.story-phase.complete::after {
  content: '✓';
  margin-left: 4px;
  font-size: 10px;
}

.phase-icon {
  font-size: 16px;
}

.phase-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.story-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-close-btn:hover {
  background: rgba(239, 68, 68, 0.5);
  transform: rotate(90deg);
}

.story-stream-body {
  padding: 24px;
  max-height: 400px;
  overflow-y: auto;
}

.story-content {
  min-height: 200px;
}

.story-thinking {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  margin-bottom: 16px;
}

.thinking-dots {
  display: flex;
  gap: 4px;
}

.thinking-dots span {
  width: 8px;
  height: 8px;
  background: #6366f1;
  border-radius: 50%;
  animation: thinking-bounce 1.4s infinite ease-in-out;
}

.thinking-dots span:nth-child(1) { animation-delay: 0s; }
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinking-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.thinking-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-style: italic;
}

.story-message {
  padding: 16px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border-left: 4px solid var(--message-color, #6366f1);
  animation: message-slide-in 0.4s ease;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.6;
}

@keyframes message-slide-in {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.story-message .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #6366f1;
  margin-left: 2px;
  animation: cursor-blink 0.8s infinite;
  vertical-align: text-bottom;
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.story-stream-footer {
  padding: 20px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.story-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.story-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  border-radius: 3px;
  transition: width 0.5s ease;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

.story-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.story-progress-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.story-progress-percent {
  color: #a855f7;
  font-weight: 700;
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🎯 CATEGORY A3: ENHANCED FORM FOOTER - SKIP BUTTON STYLING
   ═══════════════════════════════════════════════════════════════════════════════ */

.form-btn.skip {
  background: transparent;
  color: #6366f1;
  border: 2px solid #6366f1;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-btn.skip:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.form-btn.skip:active {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🎯 CATEGORY D: UI POLISH - RIPPLE EFFECTS, FOCUS STATES, ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Ripple Effect */
@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

/* Focus Glow Effect */
.focus-glow {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3),
              0 0 20px rgba(99, 102, 241, 0.2) !important;
  transition: box-shadow 0.2s ease !important;
}

/* Button Loading Spinner */
.button-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: button-spin 0.8s linear infinite;
}

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

button.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

/* Input Validation States */
input.valid,
select.valid,
textarea.valid {
  border-color: #10b981 !important;
}

input.error,
select.error,
textarea.error {
  border-color: #ef4444 !important;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Success Checkmark Animation */
.success-checkmark {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  align-items: center;
  justify-content: center;
  animation: success-pop 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.success-checkmark::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: bold;
}

@keyframes success-pop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Hover Lift for Cards */
.dashboard-card,
.integration-card,
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover,
.integration-card:hover,
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Enhanced Notification Styles */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}

.notification {
  padding: 16px 20px;
  border-radius: 12px;
  color: white;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification.success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.notification.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification.warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.notification.info {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.notification-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🎯 CATEGORY F: MOBILE EXPERIENCE ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Story Stream Mobile */
  .story-stream-modal {
    width: 95%;
    max-height: 90vh;
    border-radius: 16px;
  }
  
  .story-phases {
    gap: 8px;
  }
  
  .story-phase {
    padding: 4px 8px;
  }
  
  .phase-label {
    display: none;
  }
  
  .story-stream-body {
    padding: 16px;
    max-height: 300px;
  }
  
  .story-message {
    padding: 12px;
    font-size: 14px;
  }
  
  /* Touch-friendly tap targets */
  button,
  .btn,
  input[type="submit"],
  input[type="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Notification Mobile */
  .notification-container {
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
  }
  
  .notification {
    padding: 14px 16px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .story-stream-header {
    padding: 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .story-phases {
    width: 100%;
    justify-content: center;
  }
  
  .story-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🎯 CATEGORY G: ACCESSIBILITY ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Focus indicators for keyboard navigation */
*:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.5);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 12px 24px;
  background: #6366f1;
  color: white;
  z-index: 999999;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .story-message,
  .notification,
  .form-modal-container {
    animation: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .story-stream-modal {
    border: 2px solid white;
  }
  
  .form-modal-container {
    border: 2px solid #000;
  }
  
  .form-btn {
    border: 2px solid currentColor;
  }
  
  input,
  select,
  textarea {
    border-width: 2px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🎯 DARK THEME ENHANCEMENTS FOR NEW COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════════ */

body.dark-theme .story-stream-modal {
  background: linear-gradient(145deg, #0f172a 0%, #020617 100%);
}

body.dark-theme .form-btn.skip {
  color: #818cf8;
  border-color: #818cf8;
}

body.dark-theme .form-btn.skip:hover {
  background: rgba(129, 140, 248, 0.1);
}

body.dark-theme .notification {
  border-color: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   END OF ENHANCED STYLES - v2.0
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   🔥 MOBILE STORY-TELLING SSE MODE - Claude-like Thinking Display
   Multi-line, readable, with blinking cursor and red/blue/black colors
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Mobile Story Container */
@media (max-width: 768px) {
  .ultimate-stream-container:not(.designer-mode) {
    width: 95% !important;
    max-width: 420px !important;
    border-radius: 16px !important;
  }
}

/* Line Colors for Mobile Story Mode */
.line-red {
  color: #fca5a5 !important;
  border-left: 3px solid #dc2626 !important;
  padding-left: 12px;
  display: block;
  margin-bottom: 8px;
  animation: line-fade-in 0.3s ease;
}

.line-blue {
  color: #93c5fd !important;
  border-left: 3px solid #3b82f6 !important;
  padding-left: 12px;
  display: block;
  margin-bottom: 8px;
  animation: line-fade-in 0.3s ease;
}

.line-dark {
  color: #f1f5f9 !important;
  border-left: 3px solid #1e293b !important;
  padding-left: 12px;
  display: block;
  margin-bottom: 8px;
  animation: line-fade-in 0.3s ease;
}

.line-accent {
  color: #c4b5fd !important;
  border-left: 3px solid #8b5cf6 !important;
  padding-left: 12px;
  display: block;
  margin-bottom: 8px;
  animation: line-fade-in 0.3s ease;
}

@keyframes line-fade-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Typing current line (in progress) */
.typing-current {
  display: inline;
  padding-left: 12px;
  border-left: 3px solid currentColor;
}

.typing-current.line-red {
  color: #fca5a5;
  border-left-color: #dc2626;
}

.typing-current.line-blue {
  color: #93c5fd;
  border-left-color: #3b82f6;
}

.typing-current.line-dark {
  color: #f1f5f9;
  border-left-color: #475569;
}

.typing-current.line-accent {
  color: #c4b5fd;
  border-left-color: #8b5cf6;
}

/* Mobile cursor styling */
.mobile-cursor {
  display: inline !important;
  animation: mobile-cursor-blink 0.6s ease-in-out infinite !important;
  font-weight: bold !important;
  font-size: 20px !important;
  margin-left: 2px !important;
  color: #dc2626 !important;
  text-shadow: 0 0 8px rgba(220, 38, 38, 0.5);
}

@keyframes mobile-cursor-blink {
  0%, 40% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Story line styling */
.story-line {
  display: block !important;
  margin-bottom: 10px;
  padding: 4px 0 4px 12px;
  border-left: 3px solid;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  animation: line-fade-in 0.4s ease;
}

/* Mobile story content scrolling */
.mobile-story-content {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.mobile-story-content::-webkit-scrollbar {
  width: 4px;
}

.mobile-story-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-story-content::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 2px;
}

/* Mobile story text wrapper */
.mobile-story-text {
  padding-bottom: 20px;
}

/* Pulse animation for thinking indicator */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px #22c55e, 0 0 10px #22c55e;
  }
  50% {
    box-shadow: 0 0 10px #22c55e, 0 0 20px #22c55e, 0 0 30px #22c55e;
  }
}

/* END MOBILE STORY MODE STYLES */

/* ═══════════════════════════════════════════════════════════════════════════════
   🎨 PREVIEW MODAL V2 - COMPLETE STYLES (Added for Preview System V2)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   PREVIEW MODAL V2 - BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

.pm2-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pm2-modal.active {
  display: block;
  opacity: 1;
}

.pm2-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pm2-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 15px 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   👑 CROWN SECTION - Top Buttons
   ═══════════════════════════════════════════════════════════════════════════════ */

.pm2-crown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, #1e1e2f 0%, #2d2d44 100%);
  border-radius: 16px 16px 0 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: none;
  flex-shrink: 0;
}

.pm2-crown-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pm2-live-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pm2-live-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pm2-pulse 1.5s infinite;
}

@keyframes pm2-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.3); }
}

.pm2-live-badge span:last-child {
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 1px;
}

.pm2-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.pm2-crown-center {
  display: flex;
  align-items: center;
}

.pm2-device-toggle {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  padding: 4px;
  border-radius: 10px;
}

.pm2-device-btn {
  width: 40px;
  height: 36px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.5);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pm2-device-btn:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
}

.pm2-device-btn.active {
  background: rgba(99, 102, 241, 0.3);
  color: #818cf8;
}

.pm2-crown-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 👑 Crown Buttons */
.pm2-crown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.pm2-btn-preview {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.pm2-btn-preview:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.pm2-btn-deploy {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.pm2-btn-deploy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
}

.pm2-btn-deploy:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   📱 PREVIEW AREA
   ═══════════════════════════════════════════════════════════════════════════════ */

.pm2-preview-area {
  flex: 1;
  position: relative;
  background: #e5e7eb;
  border-left: 1px solid rgba(255,255,255,0.1);
  border-right: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  min-height: 0;
}

.pm2-frame {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  transition: padding 0.3s ease;
  background: #d1d5db;
}

.pm2-frame.desktop {
  padding: 0;
}

.pm2-frame.tablet {
  padding: 20px 12%;
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

.pm2-frame.mobile {
  padding: 20px 28%;
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

.pm2-frame iframe,
.pm2-frame #preview-iframe {
  width: 100%;
  height: 100%;
  background: #fff;
  border: none;
}

.pm2-frame.tablet iframe,
.pm2-frame.tablet #preview-iframe,
.pm2-frame.mobile iframe,
.pm2-frame.mobile #preview-iframe {
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

/* Loading */
.pm2-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.98);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 10;
}

.pm2-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e5e7eb;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: pm2-spin 1s linear infinite;
}

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

.pm2-loading p {
  color: #6b7280;
  font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   💬 CHAT SECTION
   ═══════════════════════════════════════════════════════════════════════════════ */

.pm2-edit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1e1e2f 0%, #2d2d44 100%);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 12px 20px;
  max-width: 600px;
  width: 90%;
  margin: 0 auto 16px auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pm2-edit-bar:hover {
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.pm2-edit-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
}

.pm2-edit-bar-left svg {
  color: #818cf8;
}

.pm2-edit-icon {
  font-size: 16px;
}

.pm2-edit-bar-hint {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
}

@media (max-width: 768px) {
  .pm2-edit-bar {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 10px 16px;
  }
  
  .pm2-edit-bar-hint {
    font-size: 11px;
  }
}

/* OLD CHAT SECTION STYLES - HIDDEN */
.pm2-chat-section {
  display: none !important;
}

.pm2-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pm2-chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}

.pm2-chat-title svg {
  color: #818cf8;
}

.pm2-chat-hint {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

.pm2-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  min-height: 60px;
  max-height: 90px;
}

.pm2-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.pm2-chat-messages::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}

.pm2-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

/* Welcome Message */
.pm2-chat-welcome {
  text-align: center;
  padding: 6px;
}

.pm2-welcome-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.pm2-chat-welcome p {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  margin-bottom: 10px;
}

.pm2-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.pm2-suggestion {
  padding: 6px 12px;
  font-size: 11px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.pm2-suggestion:hover {
  background: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

/* Chat Messages */
.pm2-message {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  animation: pm2-fadeIn 0.3s ease;
}

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

.pm2-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.pm2-message-user .pm2-message-avatar {
  background: rgba(99, 102, 241, 0.3);
}

.pm2-message-content {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.pm2-message-user .pm2-message-content {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
}

.pm2-message-ai .pm2-message-content {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
}

.pm2-message-content p {
  margin: 0;
  line-height: 1.5;
}

/* Typing Indicator */
.pm2-typing .pm2-message-content {
  padding: 14px 18px;
}

.pm2-typing-dots {
  display: flex;
  gap: 4px;
}

.pm2-typing-dots span {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  animation: pm2-typingDot 1.4s infinite;
}

.pm2-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.pm2-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pm2-typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Chat Input */
.pm2-chat-input-area {
  padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.pm2-chat-input-wrapper {
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 4px 4px 4px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: border-color 0.2s;
}

.pm2-chat-input-wrapper:focus-within {
  border-color: rgba(99, 102, 241, 0.5);
}

.pm2-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  padding: 10px 0;
  outline: none;
}

.pm2-chat-input::placeholder {
  color: rgba(255,255,255,0.4);
}

.pm2-chat-send {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pm2-chat-send:hover {
  transform: scale(1.05);
}

.pm2-chat-send:active {
  transform: scale(0.95);
}

.pm2-chat-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  padding-bottom: 8px;
}

.pm2-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.pm2-action-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* Spin animation for loading */
.pm2-spin {
  animation: pm2-spin 1s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   📱 RESPONSIVE STYLES FOR PREVIEW MODAL V2
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .pm2-crown {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }
  
  .pm2-crown-left {
    order: 1;
    width: 100%;
    justify-content: center;
  }
  
  .pm2-crown-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  
  .pm2-crown-right {
    order: 2;
    width: 100%;
    justify-content: center;
  }
  
  .pm2-subtitle {
    display: none;
  }
}

@media (max-width: 768px) {
  .pm2-container {
    padding: 10px;
  }
  
  .pm2-crown-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .pm2-crown-btn span {
    display: none;
  }
  
  .pm2-btn-deploy span {
    display: inline;
  }
  
  .pm2-frame.tablet {
    padding: 15px 5%;
  }
  
  .pm2-frame.mobile {
    padding: 15px 15%;
  }
  
  .pm2-chat-section {
    max-height: 200px;
    width: 95%;
    max-width: 600px;
  }
  
  .pm2-chat-messages {
    max-height: 70px;
  }
  
  .pm2-chat-hint {
    display: none;
  }
}

@media (max-width: 480px) {
  .pm2-crown-right {
    gap: 8px;
  }
  
  .pm2-crown-btn {
    padding: 10px 14px;
  }
  
  .pm2-frame.mobile {
    padding: 10px 5%;
  }
  
  .pm2-suggestions {
    gap: 6px;
  }
  
  .pm2-suggestion {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   END OF PREVIEW MODAL V2 STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   DEPLOYMENT SUCCESS MODAL STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

.deployment-success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.deployment-success-modal.active {
  opacity: 1;
  visibility: visible;
}

.dsm-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.dsm-content {
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 24px;
  padding: 40px 50px;
  max-width: 520px;
  width: 90%;
  text-align: center;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.3),
    0 10px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: scale(0.8) translateY(30px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.deployment-success-modal.active .dsm-content {
  transform: scale(1) translateY(0);
}

/* Confetti Animation */
.dsm-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.dsm-confetti-piece {
  position: absolute;
  width: 10px;
  height: 20px;
  top: -20px;
  animation: dsm-confetti-fall 3s ease-in-out infinite;
}

.dsm-confetti-piece:nth-child(1) { left: 10%; background: #f43f5e; animation-delay: 0s; }
.dsm-confetti-piece:nth-child(2) { left: 25%; background: #8b5cf6; animation-delay: 0.2s; }
.dsm-confetti-piece:nth-child(3) { left: 40%; background: #3b82f6; animation-delay: 0.4s; }
.dsm-confetti-piece:nth-child(4) { left: 55%; background: #10b981; animation-delay: 0.6s; }
.dsm-confetti-piece:nth-child(5) { left: 70%; background: #f59e0b; animation-delay: 0.8s; }
.dsm-confetti-piece:nth-child(6) { left: 85%; background: #ec4899; animation-delay: 1s; }
.dsm-confetti-piece:nth-child(7) { left: 15%; background: #6366f1; animation-delay: 1.2s; }
.dsm-confetti-piece:nth-child(8) { left: 80%; background: #14b8a6; animation-delay: 1.4s; }

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

/* Checkmark Icon */
.dsm-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.dsm-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #10b981;
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px #10b981;
  animation: dsm-fill .4s ease-in-out .4s forwards, dsm-scale .3s ease-in-out .9s both;
}

.dsm-checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #10b981;
  fill: none;
  animation: dsm-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.dsm-checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #10b981;
  stroke-width: 3;
  animation: dsm-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes dsm-stroke {
  100% { stroke-dashoffset: 0; }
}

@keyframes dsm-scale {
  0%, 100% { transform: none; }
  50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes dsm-fill {
  100% { box-shadow: inset 0px 0px 0px 40px rgba(16, 185, 129, 0.1); }
}

/* Title & Subtitle */
.dsm-title {
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 10px 0;
  background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dsm-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin: 0 0 20px 0;
}

/* Store Name */
.dsm-store-name {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dsm-store-label {
  font-size: 14px;
  color: #6b7280;
}

.dsm-store-value {
  font-size: 18px;
  font-weight: 600;
  color: #059669;
}

/* URL Box */
.dsm-url-box {
  background: linear-gradient(135deg, #1e1e2f 0%, #2d2d44 100%);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dsm-url-label {
  display: block;
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 12px;
}

.dsm-url-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  color: #60a5fa;
  text-decoration: none;
  padding: 10px 20px;
  background: rgba(96, 165, 250, 0.1);
  border-radius: 10px;
  transition: all 0.2s ease;
  word-break: break-all;
}

.dsm-url-link:hover {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
  transform: translateY(-2px);
}

.dsm-external-icon {
  flex-shrink: 0;
}

.dsm-url-text {
  font-size: 16px;
  color: #d1d5db;
}

/* Action Buttons */
.dsm-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.dsm-btn {
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dsm-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.dsm-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.dsm-btn-secondary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.dsm-btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.dsm-btn-tertiary {
  background: transparent;
  color: #6b7280;
  border: 2px solid #e5e7eb;
}

.dsm-btn-tertiary:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

/* Close Button */
.dsm-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.dsm-close:hover {
  background: #e5e7eb;
  color: #374151;
  transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 600px) {
  .dsm-content {
    padding: 30px 25px;
    margin: 20px;
    width: calc(100% - 40px);
  }
  
  .dsm-title {
    font-size: 26px;
  }
  
  .dsm-url-link {
    font-size: 14px;
    padding: 8px 14px;
  }
  
  .dsm-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .dsm-icon {
    width: 60px;
    height: 60px;
  }
  
  .dsm-checkmark {
    width: 60px;
    height: 60px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   END OF DEPLOYMENT SUCCESS MODAL STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   CATALOG DEPLOYMENT PROGRESS STYLES
   Shows real-time product additions during deployment
   ═══════════════════════════════════════════════════════════════════════════════ */

.catalog-progress-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.catalog-progress-section.active {
  opacity: 1;
  transform: translateY(0);
  animation: catalogPulse 2s ease-in-out infinite;
}

.catalog-progress-section.complete {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  animation: none;
}

@keyframes catalogPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 20px 5px rgba(99, 102, 241, 0.2); }
}

.catalog-progress-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.catalog-icon {
  font-size: 24px;
  animation: bounceIcon 0.6s ease infinite;
}

@keyframes bounceIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.catalog-progress-section.complete .catalog-icon {
  animation: none;
}

.catalog-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.catalog-count {
  font-size: 13px;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(99, 102, 241, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  min-width: 45px;
  text-align: center;
}

.catalog-count.complete {
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
}

.catalog-products-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.catalog-products-list::-webkit-scrollbar {
  width: 4px;
}

.catalog-products-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.catalog-products-list::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 2px;
}

.catalog-product-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 3px solid #6366f1;
}

.product-item-icon {
  font-size: 16px;
  opacity: 0.8;
}

.product-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-item-name {
  font-size: 13px;
  font-weight: 500;
  color: #f1f5f9;
}

.product-item-price {
  font-size: 11px;
  color: #10b981;
  font-weight: 600;
}

.product-item-check {
  color: #10b981;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  animation: checkAppear 0.3s ease forwards 0.2s;
}

@keyframes checkAppear {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .catalog-progress-section {
    padding: 12px;
    margin: 8px 0;
  }

  .catalog-progress-header {
    gap: 8px;
  }

  .catalog-icon {
    font-size: 20px;
  }

  .catalog-title {
    font-size: 13px;
  }

  .catalog-products-list {
    max-height: 150px;
  }

  .catalog-product-item {
    padding: 6px 10px;
  }

  .product-item-name {
    font-size: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   END OF CATALOG DEPLOYMENT PROGRESS STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */
