.loading-spinner-wrapper {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

.loading-spinner-circle {
  width: 50px;
  height: 50px;
  border: 4px solid #e8e8e8;
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spinnerRotate 1.2s linear infinite;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

@keyframes spinnerRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .loading-spinner-circle {
    width: 45px;
    height: 45px;
    border-width: 3px;
  }
}

@media (max-width: 480px) {
  .loading-spinner-circle {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }
}

@media (prefers-color-scheme: dark) {
  .loading-spinner-circle {
    border-color: #444;
    border-top-color: #3498db;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner-circle {
    animation-duration: 2s;
  }
}
