@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

* {
  box-sizing: border-box;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  margin: 0;
  background-color: #fafafa;
}
.magic {
  appearance: none;
  position: fixed;
  top: 20px;
  z-index: 100;
  padding: 12px 20px;
  font-family: Poppins, sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  color: #fff;
  background-color: #f9ca24;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 3px rgba(249, 202, 36, 0.5);
  cursor: pointer;
  &:focus {
    outline: none;
  }
  &:active {
    box-shadow: none;
    transform: translateY(2px);
  }
}

.boxes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 500px;
  aspect-ratio: 1;
  transition: 0.4s ease;
  &.big {
    width: 600px;
    .box {
      transform: rotateZ(360deg);
    }
  }
}

.box {
  position: relative;
  width: 125px;
  height: 125px;
  background-image: url('https://media.giphy.com/media/EZqwsBSPlvSda/giphy.gif');
  background-repeat: no-repeat;
  background-size: 500px 500px;
  transition: 0.4s ease;
  &::after {
    content: '';
    position: absolute;
    top: 8px;
    right: -15px;
    height: 100%;
    width: 15px;
    background-color: #f6e58d;
    transform: skewY(45deg);
  }
  &::before {
    content: '';
    position: absolute;
    left: 8px;
    bottom: -15px;
    width: 100%;
    height: 15px;
    background-color: #f9ca24;
    transform: skewX(45deg);
  }
}
