/*
 * FLOWAYZ ANIMATIONS
 * Animations fluides et micro-interactions pour UX exceptionnelle
 */

/* === WAVE ANIMATIONS (Loading) === */
@keyframes wave-flow {
  0%, 100% {
    transform: translateY(0) scaleY(1);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-20px) scaleY(1.2);
    opacity: 1;
  }
}

@keyframes wave-horizontal {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

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

.animate-wave:nth-child(2) {
  animation-delay: 0.2s;
}

.animate-wave:nth-child(3) {
  animation-delay: 0.4s;
}

/* === PULSE ANIMATIONS (Icons, Borders) === */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 123, 84, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(255, 123, 84, 0);
    transform: scale(1.05);
  }
}

/* === GRADIENT ANIMATION === */
@keyframes gradient-x {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.animate-gradient-x {
  animation: gradient-x 3s ease infinite;
  background-size: 200% 100%;
}

/* === BLOB ANIMATION === */
@keyframes blob {
  0%, 100% { 
    transform: translate(0, 0) scale(1); 
  }
  33% { 
    transform: translate(30px, -50px) scale(1.1); 
  }
  66% { 
    transform: translate(-20px, 20px) scale(0.9); 
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* === PULSE SLOW === */
@keyframes pulse-slow {
  0%, 100% { 
    opacity: 1;
    transform: scale(1);
  }
  50% { 
    opacity: 0.9;
    transform: scale(1.05);
  }
}

.animate-pulse-slow {
  animation: pulse-slow 3s ease-in-out infinite;
}

/* === FLOAT ANIMATION === */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* === RIPPLE EFFECT === */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* === LANDING PAGE ANIMATIONS === */
@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  33% {
    transform: translateY(-20px) translateX(10px);
  }
  66% {
    transform: translateY(10px) translateX(-10px);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  opacity: 0;
  animation: fade-in-up 0.6s ease-out forwards;
}

.animate-fade-in {
  opacity: 0;
  animation: fade-in 0.6s ease-out forwards;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@keyframes progress {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

.animate-progress {
  animation: progress 2s ease-out infinite;
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse-border {
  0%, 100% {
    border-color: var(--flowayz-coral);
    border-width: 2px;
  }
  50% {
    border-color: var(--flowayz-teal);
    border-width: 3px;
  }
}

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

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

/* === RIPPLE EFFECT (Buttons) === */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.6;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}

.ripple-effect:active::after {
  animation: ripple 0.6s ease-out;
}

/* === SCALE UP (Cards) === */
@keyframes scale-up-card {
  from {
    transform: scale(1);
    box-shadow: var(--shadow-md);
  }
  to {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
  }
}

.hover-scale:hover {
  animation: scale-up-card 0.3s ease-out forwards;
}

/* === SLIDE IN MODAL === */
@keyframes slide-in-modal {
  from {
    transform: translateY(-50%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-animate {
  animation: slide-in-modal 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* === FADE IN === */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* === ROTATE LOADING === */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate-loading {
  animation: rotate 1s linear infinite;
}

/* === SHIMMER (Skeleton Loading) === */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--flowayz-gray-100) 0%,
    var(--flowayz-gray-200) 50%,
    var(--flowayz-gray-100) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* === SKELETON LOADERS (Theme-aware) === */
@keyframes skeleton-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes skeleton-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Base skeleton styles */
.skeleton-card,
.skeleton-list,
.skeleton-message,
.skeleton-table {
  position: relative;
  overflow: hidden;
}

/* Skeleton shimmer overlay effect */
.skeleton-line,
.skeleton-avatar,
.skeleton-image,
.skeleton-icon,
.skeleton-badge,
.skeleton-cell {
  position: relative;
  overflow: hidden;
}

.skeleton-line::after,
.skeleton-avatar::after,
.skeleton-image::after,
.skeleton-icon::after,
.skeleton-badge::after,
.skeleton-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  animation: skeleton-shimmer 1.5s infinite;
}

/* Dark mode shimmer adjustment */
[data-mode="dark"] .skeleton-line::after,
[data-mode="dark"] .skeleton-avatar::after,
[data-mode="dark"] .skeleton-image::after,
[data-mode="dark"] .skeleton-icon::after,
[data-mode="dark"] .skeleton-badge::after,
[data-mode="dark"] .skeleton-cell::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
}

/* Typing dots for skeleton messages */
.skeleton-message .typing-dot {
  animation: typing-dot-bounce 1.4s ease-in-out infinite;
}

@keyframes typing-dot-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

/* === BOUNCE === */
@keyframes bounce-gentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

/* === PROGRESS BAR WAVE === */
@keyframes progress-wave {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

.progress-wave {
  background: linear-gradient(
    90deg,
    var(--flowayz-coral) 0%,
    var(--flowayz-teal) 50%,
    var(--flowayz-coral) 100%
  );
  background-size: 200% 100%;
  animation: progress-wave 2s ease-in-out infinite;
}

/* === GLOW TEXT === */
@keyframes glow-text {
  0%, 100% {
    text-shadow: 0 0 10px rgba(255, 123, 84, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(255, 123, 84, 0.6), 0 0 30px rgba(255, 123, 84, 0.4);
  }
}

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

/* === DRAG DROP ZONE ANIMATIONS === */
@keyframes border-dance {
  0%, 100% {
    border-color: var(--flowayz-teal);
    transform: rotate(0deg);
  }
  50% {
    border-color: var(--flowayz-coral);
    transform: rotate(180deg);
  }
}

.dropzone-active {
  animation: border-dance 1s linear infinite;
}

/* === UTILITY ANIMATION CLASSES === */
.animate-once {
  animation-iteration-count: 1 !important;
}

.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

.animate-delay-4 {
  animation-delay: 0.4s;
}

.animate-slow {
  animation-duration: 2s;
}

.animate-fast {
  animation-duration: 0.5s;
}

/* === HOVER LIFT === */
.hover-lift {
  transition: all var(--transition-base);
}

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

/* === SMOOTH FADE TRANSITION === */
.smooth-fade {
  transition: opacity var(--transition-slow);
}

.smooth-fade.hidden {
  opacity: 0;
  pointer-events: none;
}

/* === SCALE BOUNCE === */
@keyframes scale-bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* === BOUNCE SUBTLE (pour checkmarks et sélections) === */
@keyframes bounce-subtle {
  0%, 100% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.15);
  }
  60% {
    transform: scale(0.95);
  }
}

.animate-bounce-subtle {
  animation: bounce-subtle 0.6s ease-in-out;
}

/* === RIPPLE CLICK EFFECT === */
@keyframes ripple-click {
  0% {
    transform: scale(0);
    opacity: 0.6;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple-click {
  position: relative;
  overflow: hidden;
}

.ripple-click::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple-click:active::before {
  width: 300px;
  height: 300px;
  animation: ripple-click 0.6s ease-out;
}

/* === SMOOTH SCALE TRANSITION === */
.smooth-scale {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-scale:hover {
  transform: scale(1.02);
}

.smooth-scale:active {
  transform: scale(0.98);
}

/* === SCALE BOUNCE (Corrected) === */
@keyframes scale-bounce {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(0.95);
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

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

/* === SVG PATH ANIMATION === */
@keyframes draw-line {
  from {
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.draw-svg-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-line 2s ease-out forwards;
}

/* === TYPING INDICATOR === */
@keyframes typing-dot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.typing-indicator span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 2px;
  background: var(--flowayz-coral);
  border-radius: 50%;
  animation: typing-dot 1.4s infinite;
}

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

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

/* === TOAST NOTIFICATIONS === */
@keyframes toast-slide-in {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast {
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-show {
  animation: toast-slide-in 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.toast-hide {
  animation: toast-slide-out 0.3s ease-in forwards;
}

/* === STREAMING ANIMATIONS (AI Chat) === */
@keyframes streaming-cursor {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.streaming-cursor {
  animation: streaming-cursor 1s infinite;
  display: inline-block;
  width: 2px;
  height: 1em;
  background: currentColor;
  vertical-align: text-bottom;
  margin-left: 1px;
}

@keyframes message-appear {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message-appear {
  animation: message-appear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes optimistic-message {
  0% {
    opacity: 0.7;
    transform: translateY(5px);
  }
  50% {
    opacity: 0.8;
    transform: translateY(0);
  }
  100% {
    opacity: 0.7;
  }
}

.optimistic-message {
  animation: optimistic-message 0.2s ease-out;
}

@keyframes connection-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
}

.connection-status-online {
  animation: connection-pulse 2s infinite;
}

@keyframes fade-out-quick {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

.fade-out-quick {
  animation: fade-out-quick 0.2s ease-out forwards;
}

/* === AI THINKING ANIMATIONS (Hypnotic Loading) === */

/* Avatar with pulsing ring */
.ai-thinking-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.ai-thinking-avatar .avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent, #8B5CF6),
    #EC4899,
    #F59E0B,
    var(--accent, #8B5CF6)
  );
  animation: avatar-ring-spin 2s linear infinite;
  opacity: 0.8;
}

.ai-thinking-avatar .avatar-ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg-surface);
}

.ai-thinking-avatar .avatar-core {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  color: white;
  z-index: 1;
  animation: avatar-pulse 1.5s ease-in-out infinite;
}

@keyframes avatar-ring-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes avatar-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px 5px rgba(139, 92, 246, 0.2);
  }
}

/* Thinking text with animated dots */
.ai-thinking-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-thinking-text {
  font-size: 0.9375rem;
  font-weight: 500;
}

.thinking-dots span {
  animation: thinking-dot-bounce 1.4s ease-in-out infinite;
  display: inline-block;
}

.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-dot-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

/* Sound wave animation */
.ai-wave-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 32px;
  padding: 8px 0;
}

.ai-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 100%;
}

.ai-wave span {
  display: block;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent, #8B5CF6), #EC4899);
  border-radius: 4px;
  animation: ai-wave-bar 1.2s ease-in-out infinite;
}

.ai-wave span:nth-child(1) { animation-delay: 0s; height: 60%; }
.ai-wave span:nth-child(2) { animation-delay: 0.1s; height: 100%; }
.ai-wave span:nth-child(3) { animation-delay: 0.2s; height: 80%; }
.ai-wave span:nth-child(4) { animation-delay: 0.3s; height: 100%; }
.ai-wave span:nth-child(5) { animation-delay: 0.4s; height: 60%; }

@keyframes ai-wave-bar {
  0%, 100% {
    transform: scaleY(0.5);
    opacity: 0.5;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Status badge */
.ai-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--accent-10, rgba(139, 92, 246, 0.1));
  color: var(--accent, #8B5CF6);
  font-size: 0.6875rem;
  font-weight: 500;
}

.ai-status-badge .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #8B5CF6);
  animation: status-dot-pulse 1.5s ease-in-out infinite;
}

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

/* Optimistic message sending indicator */
.sending-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sending-dots {
  display: inline-flex;
  gap: 2px;
}

.sending-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
  animation: sending-dot 1.2s ease-in-out infinite;
}

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

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

/* === AI RESPONSE PLACEHOLDER (Pre-scroll) === */
.ai-response-placeholder {
  animation: placeholder-fade-in 0.3s ease-out;
}

@keyframes placeholder-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Placeholder avatar pulse */
.ai-placeholder-avatar {
  position: relative;
}

.ai-placeholder-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: placeholder-pulse 1.5s ease-in-out infinite;
}

@keyframes placeholder-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.7;
  }
}

/* Thinking text animation */
.ai-thinking-text {
  background: linear-gradient(90deg,
    var(--text-secondary) 0%,
    var(--text-primary) 50%,
    var(--text-secondary) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: thinking-shimmer 2s ease-in-out infinite;
}

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

/* Thinking dots animation */
.ai-thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ai-thinking-dots .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  animation: thinking-dot-jump 1.4s ease-in-out infinite;
}

.ai-thinking-dots .dot:nth-child(1) { animation-delay: 0s; }
.ai-thinking-dots .dot:nth-child(2) { animation-delay: 0.15s; }
.ai-thinking-dots .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes thinking-dot-jump {
  0%, 60%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-6px) scale(1.2);
    opacity: 1;
  }
}

/* === QUOTE GENERATION LOADING ANIMATIONS === */

/* Slow ping animation for outer ring */
@keyframes ping-slow {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.2;
  }
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

.animate-ping-slow {
  animation: ping-slow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Slow spin for middle ring */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-slow {
  animation: spin-slow 3s linear infinite;
}

/* Reverse spin for inner ring */
@keyframes spin-reverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

.animate-spin-reverse {
  animation: spin-reverse 2s linear infinite;
}

/* Pulsing glow for center element */
.animate-pulse-glow {
  animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient shift animation for background */
@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-gradient-shift {
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
}

/* Fade cycle for rotating text */
@keyframes fade-cycle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.animate-fade-cycle {
  animation: fade-cycle 2s ease-in-out infinite;
}

/* Floating particles */
@keyframes particle-float {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  50% {
    transform: translateY(-100px) translateX(20px) scale(0.5);
  }
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #FF7B54), #8B5CF6);
  animation: particle-float 4s ease-in-out infinite;
  opacity: 0;
}

.particle-1 {
  left: 10%;
  bottom: 20%;
  animation-delay: 0s;
}

.particle-2 {
  left: 30%;
  bottom: 30%;
  animation-delay: 0.8s;
  width: 6px;
  height: 6px;
}

.particle-3 {
  right: 20%;
  bottom: 25%;
  animation-delay: 1.6s;
  width: 10px;
  height: 10px;
}

.particle-4 {
  right: 35%;
  bottom: 15%;
  animation-delay: 2.4s;
  width: 5px;
  height: 5px;
}

.particle-5 {
  left: 50%;
  bottom: 35%;
  animation-delay: 3.2s;
  width: 7px;
  height: 7px;
}

/* === ACCESSIBILITY: REDUCED MOTION === */
/* Respects user preference for reduced motion (accessibility) */
@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;
  }

  /* Keep essential loading indicators visible but static */
  .shimmer,
  .animate-wave,
  .typing-indicator span,
  .ai-wave span,
  .sending-dots span,
  .ai-thinking-dots .dot {
    animation: none !important;
    opacity: 1 !important;
  }

  /* Disable parallax and floating effects */
  .animate-float,
  .animate-blob,
  .hover-lift:hover {
    transform: none !important;
    animation: none !important;
  }

  /* Keep hover states but without animation */
  .smooth-scale:hover,
  .hover-scale:hover {
    transform: none !important;
    animation: none !important;
  }
}
