/* Futuristic Loading Spinner Styles */

.spinner-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  flex-direction: column;
}

.futuristic-spinner {
  position: relative;
  width: 120px;
  height: 120px;
}

.futuristic-spinner .ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid transparent;
  mix-blend-mode: overlay;
}

.futuristic-spinner .ring:nth-child(1) {
  border-top-color: #6366f1;
  animation: spin 1.5s linear infinite;
}

.futuristic-spinner .ring:nth-child(2) {
  border-right-color: #10b981;
  animation: spin 1.2s linear infinite reverse;
}

.futuristic-spinner .ring:nth-child(3) {
  border-bottom-color: #ef4444;
  animation: spin 1.8s linear infinite;
}

.futuristic-spinner .ring:nth-child(4) {
  border-left-color: #f59e0b;
  animation: spin 1.4s linear infinite reverse;
}

.futuristic-spinner .core {
  position: absolute;
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(99,102,241,0.8) 100%);
  border-radius: 50%;
  box-shadow: 0 0 20px 5px rgba(99,102,241,0.6);
  animation: pulse 2s ease-in-out infinite;
}

.spinner-text {
  margin-top: 30px;
  color: white;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(99,102,241,0.8);
  animation: fadeInOut 2s ease-in-out infinite;
}

/* Spinner for chat messages */
.message-spinner {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 20px auto;
}

.message-spinner .ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
}

.message-spinner .ring:nth-child(1) {
  border-top-color: #6366f1;
  animation: spin 1.5s linear infinite;
}

.message-spinner .ring:nth-child(2) {
  border-right-color: #10b981;
  animation: spin 1.2s linear infinite reverse;
}

.message-spinner .ring:nth-child(3) {
  border-bottom-color: #ef4444;
  animation: spin 1.8s linear infinite;
}

.message-spinner .core {
  position: absolute;
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(99,102,241,0.8) 100%);
  border-radius: 50%;
  box-shadow: 0 0 10px 2px rgba(99,102,241,0.6);
  animation: pulse 2s ease-in-out infinite;
}

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

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

@keyframes fadeInOut {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

/* Typing indicator animation */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  margin: 15px;
}

.typing-indicator span {
  height: 8px;
  width: 8px;
  margin: 0 2px;
  background-color: #6366f1;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.4;
}

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

.typing-indicator span:nth-child(2) {
  animation: typing 1.5s infinite 0.3s;
}

.typing-indicator span:nth-child(3) {
  animation: typing 1.5s infinite 0.6s;
}

@keyframes typing {
  0% {
    transform: translateY(0px);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-10px);
    opacity: 1;
  }
  100% {
    transform: translateY(0px);
    opacity: 0.4;
  }
}
