@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300&family=Roboto&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: rgb(26, 14, 51);
  height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  text-align: center;
  color: white;
  font-size: 30px;
  margin: 50px;
}

.card-cont {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 50vw;
  perspective: 1000px;
}

.card {
  background-color: rgb(79, 77, 77);
  margin: 10px;
  border-radius: 10px;
  position: relative;
  width: 135px;
  height: 135px;
  cursor: pointer;
  transform: scale(1);
  transform-style: preserve-3d;
  transition: transform 0.5s;
}

.card:active {
  transform: scale(0.97);
  transition: transform 0.2s;
}

.card.flip {
  transform: rotateY(180deg);
}

img {
  border-radius: 10px;
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgb(79, 77, 77);
  backface-visibility: hidden;
}

.front {
  transform: rotateY(180deg);
}
