/* Import Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
body{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #3f3c3ec7;
}
.header{
    margin: 10px 20px 30px 20px;
}
.header h1{
    margin: 30px 0px; 
    padding-left: 20px;
    font-size: 2.3rem;
    text-shadow: 2px 8px 6px rgba(0,0,0,0.2),
                 0px -5px 35px rgba(255,255,255,0.3);
}
.header h3,p{
    font-weight: bold;
    padding-left: 20px;
}
.wrapper{
  padding: 25px;
  border-radius: 10px;
  background: #e6dcdcaf;
  box-shadow: 0 10px 30px rgba(192, 109, 109, 0.541);
}
.cards, .card, .view{
  display: flex;
  align-items: center;
  justify-content: center;
}
.cards{
  height: 600px;
  width: 600px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-left: 15px;
}
.cards .card{
  cursor: pointer;
  list-style: none;
  user-select: none;
  position: relative;
  perspective: 1000px;
  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);
  }
}
.card .view{
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 10px;
  background: rgb(202, 110, 110);
  pointer-events: none;
  backface-visibility: hidden;
  box-shadow: 0 3px 10px rgba(247, 120, 120, 0.384);
  transition: transform 0.25s linear;
}
.card .front-view img{
  width: 40px;
}
.card .back-view img{
  max-width: 100px;
}
.card .back-view{
  transform: rotateY(-180deg);
}
.card.flip .back-view{
  transform: rotateY(0);
}
.card.flip .front-view{
  transform: rotateY(180deg);
}

@media screen and (max-width: 700px) {
  .cards{
    height: 350px;
    width: 350px;
  }
  .card .front-view img{
    width: 17px;
  }
  .card .back-view img{
    max-width: 40px;
  }
}
@media screen and (max-width: 530px) {
  .cards{
    height: 300px;
    width: 300px;
  }
  .card .front-view img{
    width: 15px;
  }
  .card .back-view img{
    max-width: 35px;
  }
}
