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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

.spinner{
  top: 0;
  width: 100vw;
  height: 100vh;
  position: fixed;
  z-index: 9999;
  display: none;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(2px);
  transition: all 0.3s ease;
}

.spinner.loading-fade-in {
  animation: fadeIn 0.3s ease forwards;
}

.spinner.loading-fade-out {
  animation: fadeOut 0.3s ease forwards;
}

.spinner div {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  color: #333;
  font-weight: 500;
  text-align: center;
  padding: 20px;
}
 
.spinner:before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  top: calc(50% - 80px);
  left: calc(50% - 30px);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4539e5;
  border-right: 4px solid #4539e5;
  animation: spinner 0.8s linear infinite;
  box-shadow: 0 4px 12px rgba(69, 57, 229, 0.2);
}