/** 白屏阶段会执行的 CSS 加载动画 */

#app-loading {
  position: relative;
  top: 45vh;
  margin: 0 auto;
  color: #b8defd;
  font-size: 12px;
}

#app-loading,
#app-loading::before,
#app-loading::after {
  width: 2em;
  height: 2em;
  border-radius: 50%;
  animation: 2s ease-in-out infinite app-loading-animation;
}

#app-loading::before,
#app-loading::after {
  content: "";
  position: absolute;
}

#app-loading::before {
  left: -4em;
  animation-delay: -0.2s;
}

#app-loading::after {
  left: 4em;
  animation-delay: 0.2s;
}

@keyframes app-loading-animation {
  0%,
  80%,
  100% {
    box-shadow: 0 2em 0 -2em;
  }
  40% {
    box-shadow: 0 2em 0 0;
  }
}

.loading,
.loading > div {
  position: relative;
  box-sizing: border-box;
}

.loading {
  position: relative;
  top: 30vh;
  margin: 0 auto;
  color: #b8defd;
  font-size: 12px;
}

.loading.la-dark {
  color: #d0eaff;
}

.loading > div {
  display: inline-block;
  float: none;
  background-color: currentColor;
  border: 0 solid currentColor;
}

.loading {
  width: 32px;
  height: 32px;
}

.loading > div:nth-child(1) {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 60%;
  height: 60%;
  background: #ffffff00;
  border-radius: 100%;
  transform: translate(-50%, -50%);
  animation: ball-atom-shrink 4.5s infinite linear;
}

.loading > div:not(:nth-child(1)) {
  position: absolute;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: none;
  animation: ball-atom-zindex 1.5s 0s infinite steps(2, end);
}

.loading > div:not(:nth-child(1)):before {
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  margin-left: -5px;
  content: "";
  background: currentColor;
  border-radius: 50%;
  opacity: 0.75;
  animation:
    ball-atom-position 1.5s 0s infinite ease,
    ball-atom-size 1.5s 0s infinite ease;
}

.loading > div:nth-child(2) {
  animation-delay: 0.75s;
}

.loading > div:nth-child(2):before {
  animation-delay:
    0s,
    -1.125s;
}

.loading > div:nth-child(3) {
  transform: rotate(120deg);
  animation-delay: -0.25s;
}

.loading > div:nth-child(3):before {
  animation-delay:
    -1s,
    -0.75s;
}

.loading > div:nth-child(4) {
  transform: rotate(240deg);
  animation-delay: 0.25s;
}

.loading > div:nth-child(4):before {
  animation-delay:
    -0.5s,
    -0.125s;
}

/* 5 */
.loading > div:nth-child(5) {
  animation-delay: 0.75s;
}

.loading > div:nth-child(5):before {
  animation-delay:
    -0.25s,
    -0.375s;
}

@keyframes ball-atom-position {
  50% {
    top: 100%;
    left: 100%;
  }
}
