@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100vh;
  background-color: #fafafa;
  margin: 0;
}

.magic {
  font-family: inherit;
  font-size: 16px;
  position: fixed;
  top: 20px;
  z-index: 10;
  border: none;
  color: #fff;
  background-color: #f9ca24;
  padding: 12px 20px;
  border-radius: 3px;
  box-shadow: 0 3px #f9ca247f;
  cursor: pointer;
  letter-spacing: 1px;
}

.magic:focus {
  outline: none;
}

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

.boxes {
  position: relative;
  display: grid;
  grid-template: repeat(4, 1fr) / repeat(4, 1fr);
  /* display: flex;
  flex-wrap: wrap;
  justify-content: space-around; */
  width: 500px;
  height: 500px;
  gap: 0;
  transition: 0.4s ease;
}

.boxes.big {
  /* background-image: url("https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExMXRoajV4dGh5OTI0cWtwY2tjN3EyaXVvdWw5c2RlY2V0MWR5cHZ6NSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/fgR5ghGSXWpuU/giphy.gif"); */
  width: 600px;
  height: 600px;
}

.boxes.big .box {
  transform: rotateZ(360deg);
}

.box {
  background-image: url("https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExMXRoajV4dGh5OTI0cWtwY2tjN3EyaXVvdWw5c2RlY2V0MWR5cHZ6NSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/fgR5ghGSXWpuU/giphy.gif");
  width: 125px;
  height: 125px;
  background-repeat: no-repeat;
  background-size: 500px 500px;
  position: relative;
  transition: 0.4s ease;
}

.box::after {
  content: '';
  position: absolute;
  top: 8px;
  right: -15px;
  width: 15px;
  height: 100%;
  z-index: -1;
  transform: skewY(45deg);
  background-color: #f6e58d;
}

.box::before {
  content: '';
  position: absolute;
  left: 8px;
  bottom: -15px;
  width: 100%;
  height: 15px;
  z-index: -1;
  transform: skewX(45deg);
  background-color: #f9ca24;
}
