html,
body {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.loader {
  display: block;
  width: 100%;
  height: 6%;
  border-radius: 30px;
  background-color: var(--loader-bg-color, #00000033);
  position: relative;
}

.loader::before {
  content: "";
  position: absolute;
  background: var(--loader-color, #2962ff);
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  border-radius: 30px;
  animation: moving 1s ease-in-out infinite;
}

@keyframes moving {
  50% {
    width: 100%;
  }

  100% {
    width: 0;
    right: 0;
    left: unset;
  }
}
