.loader {
  position: relative;
  width: 10em;
  height: 10em;
  border-radius: 50%;

  /* Set up the animation as a smooth 360 rotation. */
  @keyframes animate {
    0% {
      transform: rotate(0deg);
    }

    100% {
      transform: rotate(360deg);
    }
  }

  background: linear-gradient(#fc408b, #247ba0);
  animation: animate 1.2s linear infinite;

  /* The center circle */
  &:after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: #fafafa;
    border: solid white 10px;
    border-radius: 50%;
  }

  /* Style the spans that are sweeping around */
  & span {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(#fc408b, #247ba0);

    &:nth-child(1) {
      filter: blur(5px);
    }

    &:nth-child(2) {
      filter: blur(10px);
    }

    &:nth-child(3) {
      filter: blur(25px);
    }

    &:nth-child(4) {
      filter: blur(50px);
    }
  }
}

@media (prefers-color-scheme: dark) {
  .loader:after {
    background: #1c1c1e;
    border-color: #21242b;
  }
}
