* {
  margin: 0;
  padding: 0;

  box-sizing: border-box;

  list-style-type: none;
}

body {
  font-family: "Fredoka", sans-serif;
  background: linear-gradient(
    to right,
    rgba(109, 179, 242, 1) 0%,
    rgba(84, 163, 238, 1) 50%,
    rgba(54, 144, 240, 1) 51%,
    rgba(30, 105, 222, 1) 100%
  );
}

.result {
  color: #fff;
  margin-bottom: 25px;
}

.container {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  max-height: 100vh;
  max-width: 1440px;
  padding: 50px 30px;
}

.wrapper {
  width: 500px;
  height: 500px;

  background-color: #fff;
  border-radius: 10px;
  padding: 20px;
}

.cards,
.card,
.view {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cards {
  width: 100%;
  height: 100%;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cards .card {
  cursor: pointer;
  position: relative;
  perspective: 800px;
  transform-style: preserve-3d;
  height: calc(100% / 4 - 10px);
  width: calc(100% / 4 - 10px);
}

.card.shake {
  animation: shake 0.35s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-13px);
  }
  40% {
    transform: translateX(13px);
  }
  60% {
    transform: translateX(-8px);
  }
  80% {
    transform: translateX(8px);
  }
}

.cards .card .view {
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 7px;
  background: #fff;
  user-select: none;
  pointer-events: none;
  backface-visibility: hidden;
  box-shadow: 0 3px 10px rgb(0 0 0 / 10%);
  transition: transform 0.25s linear;
}

.card .front-view img {
  max-width: 60px;
  border-radius: 100%;
}

.card .back-view img {
  max-width: 45px;
}

.card .back-view {
  transform: rotateY(-180deg);
}

.card.flip .front-view {
  transform: rotateY(180deg);
}

.card.flip .back-view {
  transform: rotateY(0);
}

.btn {
  cursor: pointer;
  margin-top: 20px;
  background: none;
  padding: 13px 22px;
  font-size: 16px;
  color: #fff;
  border-radius: 6px;
  border: 2px solid #fff;
  transition: all 0.3s ease;
}

.btn:hover {
  background: #fff;
  color: #333;
}
