* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #2c3e50, #fd746c);
  animation: gradientBG 5s ease infinite;
  background-size: 400% 400%;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.container {
  position: relative;
  width: 150px;
  height: 150px;
  background: #03e9f4;
}

.container div {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: -100%;
  border: 4px solid #03e9f4;
  transition: 0.5s;
  transform-origin: bottom right;
}

.container div:nth-child(2) {
  top: 100%;
  left: 0;
  transform-origin: top left;
}

.container div:nth-child(3) {
  top: 0;
  left: 100%;
  transform-origin: bottom left;
}

.container div:nth-child(4) {
  top: 0;
  left: -100%;
  transform-origin: top right;
}

.container:hover div {
  background: #03e9f4;
  box-shadow: 0 0 5px #03e9f4, 0 0 25px #03e9f4, 0 0 50px #03e9f4,
    0 0 200px #03e9f4;
  animation: moveBox 3s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes moveBox {
  0% {
    transform: rotate(360deg);
  }

  50% {
    transform: rotate(180deg);
  }

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