:root {
  --main-bg-color: #dadada;
}

* {
  box-sizing: border-box;
  transition: background-color 0.4s ease-in-out;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background: repeating-linear-gradient(
    45deg,
    #ffffff 15px,
    #ffffff 1px,
    var(--main-bg-color) 20px,
    var(--main-bg-color) 100px
  );
}

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  padding: 5px;
  max-width: 80vw;
  background: #fff;
}

.color {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  margin: 5px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.color:hover,
.color:focus,
.color:active {
  animation: hover-shake-out 0.75s linear 1;
  cursor: pointer;
}

@keyframes hover-shake-out {
  10% {
    transform: translateX(3px) rotate(2deg);
  }
  20% {
    transform: translateX(-3px) rotate(-2deg);
  }
  30% {
    transform: translateX(3px) rotate(2deg);
  }
  40% {
    transform: translateX(-3px) rotate(-2deg);
  }
  50% {
    transform: translateX(2px) rotate(1deg);
  }
  60% {
    transform: translateX(-2px) rotate(-1deg);
  }
  70% {
    transform: translateX(2px) rotate(1deg);
  }
  80% {
    transform: translateX(-2px) rotate(-1deg);
  }
  90% {
    transform: translateX(1px) rotate(0);
  }
  100% {
    transform: translateX(-1px) rotate(0);
  }
}

.red {
  background-color: #d00505;
}

.orange {
  background-color: #ffa600;
}

.yellow {
  background-color: #f1f107;
}

.green {
  background-color: #3dc802;
}

.teal {
  background-color: #008080;
}

.blue {
  background-color: #1313db;
}

.indigo {
  background-color: #4b0082;
}

.violet {
  background-color: #ee82ee;
}

.pink {
  background-color: #ea278f;
}

.grey {
  background-color: #808080;
}

.black {
  background-color: #000;
}
