* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto Mono', monospace;
}

body,
html {
  width: 100%;
  height: fit-content;

  margin: auto;

  text-align: center;
  font-family: 'Roboto Mono', monospace;
}

a {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

h1 {
  text-align: center;
  padding: 10px;
}

main {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;

  width: 500px;

  padding: 10px;

  margin: auto;

  perspective: 1000px;

  border: 1px solid blue;
  border-radius: 10px;
}

.card {
  position: relative;

  width: 95px;
  height: 95px;

  transition: transform 0.5s;
  transform-style: preserve-3d;
}

.card img {
  width: 100%;
  height: 100%;

  padding: 10px;

  background-size: cover;
}

.front {
  background-color: rgb(169, 162, 176);
  border-radius: 10px;
}

.back {
  background-color: rgba(45, 45, 203, 0.878);
  transform: rotateY(180deg);
  border-radius: 10px;
}

.front,
.back {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
}


.card.flipped {
  transform: rotateY(180deg);
}

@media (max-width: 500px) {
  main {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    width: 90%;

    padding: 10px;

    margin: auto;

    perspective: 1000px;

    border-radius: 10px;
  }
}