#spinner {
  display: none;
  position: fixed; /* Changed to fixed to ensure it stays on screen */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 20px 40px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 16px;
  font-weight: 600;
  z-index: 9999; /* Increased z-index */
  color: #333;
}

#spinner::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(75, 0, 255, 0.2);
  border-top-color: #4b00ff;
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
  margin-right: 12px;
  vertical-align: middle;
}

@keyframes spinner-rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  #spinner {
    padding: 16px 32px;
  }

  #spinner::before {
    width: 20px;
    height: 20px;
    border-width: 2.5px;
    margin-right: 10px;
  }
}

@media (max-width: 480px) {
  #spinner {
    font-size: 14px;
    padding: 12px 24px;
  }

  #spinner::before {
    width: 18px;
    height: 18px;
    border-width: 2px;
    margin-right: 8px;
  }
}
