.loading {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  margin-top: 10px;
  position: relative;
  animation: load 1s linear infinite;
}

.loading .outer {
  width: 100%;
  height: 100%;
  position: absolute;
}

.loading .inner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9c6;
  position: absolute;
  left: 50%;
  animation: changeBgColor 2s ease infinite;
}

@keyframes load {
  0% {
    transform: rotate(0deg) scale(0.8);
  }
  50%{
    transform: rotate(180deg) scale(1);
  }
  100% {
    transform: rotate(360deg) ;
  }
}

@keyframes changeBgColor {
  0%, 100% {
    background: #9c6;
    box-shadow: 0 0 5px #ace573;
  }

  33.3% {
    background: #ff6;
    box-shadow: 0 0 5px #e5ff66;
  }

  66.6% {
    background: #f66;
    box-shadow: 0 0 5px #ff4c4c;
  }
}

.loading .outer:nth-child(2) {
  transform: rotate(60deg);
}

.loading .outer:nth-child(3) {
  transform: rotate(120deg);
}

.loading .outer:nth-child(4) {
  transform: rotate(180deg);
}

.loading .outer:nth-child(5) {
  transform: rotate(240deg);
}

.loading .outer:nth-child(6) {
  transform: rotate(300deg);
}

.loading .outer:nth-child(2) .inner {
  animation-delay: 0.5s;
}

.loading .outer:nth-child(3) .inner {
  animation-delay: 1s;
}

.loading .outer:nth-child(4) .inner {
  animation-delay: 1.5s;
}

.loading .outer:nth-child(5) .inner {
  animation-delay: 2s;
}

.loading .outer:nth-child(6) .inner {
  animation-delay: 2.5s;
}

.loading .outer:nth-child(7) .inner {
  animation-delay: 3s;
}

.loading .outer:nth-child(8) .inner {
  animation-delay: 3.5s;
}
