/* Fullscreen wrapper */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-image: radial-gradient(circle farthest-corner at 10% 20%, #00aeef 0.1%, #00aeef 94.2%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
}

/* Container */
.loading-container {
  width: 100%;
  max-width: 520px;
  text-align: center;
  color: #fff;
  position: relative;
  margin: 0 32px;
}

/* Moving line */
.loading-container::before {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  background-color: #fff;
  bottom: 0;
  left: 0;
  border-radius: 10px;
  animation: movingLine 2.4s infinite ease-in-out;
}

@keyframes movingLine {
  0% { opacity: 0; width: 0; }
  33.3%, 66% { opacity: 0.8; width: 100%; }
  85% { width: 0; left: auto; right: 0; opacity: 1; }
  100% { opacity: 0; width: 0; }
}

/* Text animation */
.loading-text {
  font-size: 5vw;
  line-height: 64px;
  letter-spacing: 10px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-evenly;
}

.loading-text span {
  animation: moveLetters 2.4s infinite ease-in-out;
  transform: translateX(0);
  position: relative;
  display: inline-block;
  opacity: 0;
  text-shadow: 0px 2px 10px rgba(46, 74, 81, 0.3);
}

/* Delay for each letter */
.loading-text span:nth-child(1) { animation-delay: 0.1s; }
.loading-text span:nth-child(2) { animation-delay: 0.2s; }
.loading-text span:nth-child(3) { animation-delay: 0.3s; }
.loading-text span:nth-child(4) { animation-delay: 0.4s; }
.loading-text span:nth-child(5) { animation-delay: 0.5s; }
.loading-text span:nth-child(6) { animation-delay: 0.6s; }
.loading-text span:nth-child(7) { animation-delay: 0.7s; }

@keyframes moveLetters {
  0% { transform: translateX(-15vw); opacity: 0; }
  33.3%, 66% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(15vw); opacity: 0; }
}