.preloader {
  background-color: #ffffff;
  height: 100vh;
  /* Use viewport height instead of 100% */
  width: 100vw;
  /* Use viewport width instead of 100% */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999999;
  display: flex;
  /* Use flexbox to center the spinner */
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  position: relative;
}

.spinner::before,
.spinner::after {
  content: "";
  position: absolute;
  border-radius: inherit;
}

.spinner:before {
  width: 100%;
  height: 100%;
  background-image: linear-gradient(109deg, #8d20d0, #27e5fa 28%);
  animation: spin8932 .5s infinite linear;
}

.spinner:after {
  width: 85%;
  height: 85%;
  background-color: #ffffff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin8932 {
  to {
    transform: rotate(360deg);
  }
}