*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body{
  background-color: #deee;
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
}
.magic{
  background-color:royalblue;
  color: white;
  border: 0;
  border-radius: 3px;
  padding: 12px 20px;
  cursor: pointer;
  position: fixed;
  top: 20px;
  letter-spacing: 1px;
  box-shadow: 0 3px rgba(10, 106, 202, 0.5);
  z-index: 111;
}

.magic:focus{
  outline: none;
}
.magic:active{
  box-shadow: none;
  transform: translateY(2px);
}

.boxes {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  height: 500px;
  width: 500px;
  position: relative;
  transition: 0.4s ease;
}
.boxes.big{
  width: 600px;
  height: 600px;
}
.boxes.big .box{
  transform: rotateZ(360deg);
}
.box{
  background-image: url("imgs/img.gif");
  background-repeat: no-repeat;
  background-size: 500px 500px;
  height: 125px;
  width: 125px;
  transition: 0.4s ease;
  position: relative;
}
.box::after{
  content: "";
  background-color: rgb(80, 116, 226);
  position: absolute;
  top: 8px;
  right: -15px;
  height: 100%;
  width: 15px;
  transform: skewY(45deg);
}
.box::before{
  content: "";
  background-color: rgb(80, 116, 226);
  position: absolute;
  bottom: -15px;
  left: 8px;
  height: 15px;
  width: 100%;
  transform: skewX(45deg);
}