body{
    background-color: bisque;
    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
  .rotate {
    padding: 10px 5px;
    border: 3px dotted blueviolet;
    border-radius: 20px;
    width: 150px;
    font-size: 1.2rem;
    text-align: center;
  }
  
  
  .rotate {
    transition: rotate 2s;
  }
  
  div:hover .rotate {
    rotate: 1 1 1 360deg;
  }

  .container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .box {
    margin-top: 200px;
    width: 200px;
    height: 200px;
    color: #00136c;
    display: flex;
    justify-content: space-evenly;
    /*flex-direction: column;
    align-items: center;*/
  }
  .box:first-child {
    background-color:rgba(195,93,232,0.5);
    animation: loader 2s infinite;
  }
  
  .box:nth-child(2) {
    background-color: rgba(106,219,236,0.5);
    animation: loader 3s infinite;
  }
  
  .box:nth-child(3) {
    background-color: rgba(106, 236, 154, 0.5);
    animation: loader 4s infinite;
  }
  
  .box:last-child {
    background-color: rgba(236, 184, 106, 0.5);
    animation: loader 5s infinite;
  }
  
  @keyframes loader {
    0% {
        border-radius: 100%;
        rotate: 0deg;
      }
      25% {
        rotate: y 90deg;
        scale: 0.5;
      }
      50% {
        border-radius: 60%;
        rotate: 180deg;
      }
      75% {
        rotate: x 270deg;
        border-radius: 50%;
      }
      100% {
        border-radius:20%;
        rotate: 360deg;
      }
  }

  @keyframes moveagain {
    0% {
      border-radius: 100%;
      rotate: 0deg;
    }
    25% {
      rotate: 90 deg;
      scale: 0.5;
      transform: translateY(300px);
      transform: translateX(300px);
    }
    50% {
      border-radius: 60%;
      rotate: 180deg;
      transform: translateY(300px);
      transform: translateX(300px);
  
    }
    75% {
      rotate: 270deg;
      border-radius: 50%;
      transform: translateY(300px);
      transform: translateX(300px);
    }
    100% {
      border-radius:20%;
      rotate: 360deg;
    }
    
  }
  div:hover.box{
    /*background-color:coral;*/
    animation: moveagain 5s infinite;
    transition: 0.3s;
    background-color: rgba(255,148,198,0.3);
  }