
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

p{
    font-size: 30px;
}

body{
  background: #000080;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  align-items: center;
}

.main{
  background:#faf0e6;  
  border-radius: 15px;  
  padding: 25px 25px 150px 25px;
}
.cards, .card, .view, .info, p{
  align-items: center;  
  display: flex;
  justify-content: center;
}

.cards{
  flex-wrap: wrap;  
  height: 600px;
  width: 600px;
  justify-content: space-between;
}

.cards .card{
  cursor: pointer;
  position: relative;
  perspective: 900px;
  transform-style: preserve-3d;
  height: calc(100% / 4 - 10px);
  width: calc(100% / 4 - 10px);
}
.card.shake{
  animation: shake 0.2s ease-in-out;
}
@keyframes shake {
  0%, 100%{
    transform: translateX(0);
  }
  20%{
    transform: translateX(-20px);
  }
  40%{
    transform: translateX(20px);
  }
  60%{
    transform: translateX(-10px);
  }
  80%{
    transform: translateX(10px);
  }
}
.cards .card .view{
  background: #fff;  
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 5px;
  pointer-events: none;
  backface-visibility: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.1s linear;
}
.card .front-side img{
  width: 125px;
}
.card .back-side img{
  width: 125px;
}
.card .back-side{
  transform: rotateY(180deg);
}
.card.flip .back-side{
  transform: rotateY(0);
}
.card.flip .front-side{
  transform: rotateY(-180deg);
}

.info {
  width: 100%;
  margin-top: 15px;
  padding: 0 20px;
  background: #fff;
  height: calc(100% / 5 - 50px);
  justify-content: space-between;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.info p{
  font-size: 25px;
  height: 25px;
  padding-right: 25px;
  border-right: 1px solid #fff;
}
.info p span{
  margin-left: 10px;
}
.info p b{
  font-weight: 700;
}
.info button{
  cursor: pointer;
  font-size: 25px;
  color: #c46521;
  border-radius: 5px;
  padding: 5px 15px;
  background: #faf0e6;
  border: 2px solid #c46521;
  transition: 0.2s ease;
}
.info button:hover{
  color: #fff;
  background: #c46521;
}

#message {
  font-size: 25px;
  width: 100%;
  padding: 0 20px;
  background: #fff;
  height: 90px;
}