@font-face {
  font-family: "BebasNeue";
  src: url("fonts/BebasNeue-Regular.ttf");
}

@font-face {
  font-family: "CalibriBold";
  src: url("fonts/Calibri_Bold.TTF");
}

@font-face {
  font-family: "CalibriRegular";
  src: url("fonts/Calibri_Regular.ttf");
}

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body{
  display: flex;
  align-items: center;
  justify-content: space-around;
  min-height: 100vh;
  background: #E64F27;
}
::selection{
  color: #fff;
  background: #6563ff;
}

.wrapper{
  padding: 25px;
  background: #f8f8f8;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.explanation{
  padding: 25px;
  background: #f8f8f8;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 600px;
  width: 600px;
}

.explanation-title{
  color: #E64F27;
  font-size: 30px;
  height: 60px;
  margin-bottom: 20px;
  width: 100%;
  font-family: 'BebasNeue';
}

.explanation-desc{
  background-color: #E64F27;
  border-radius: 5px;
  color: white;
  height: 100px;
  font-family: 'CalibriRegular';
  margin-bottom: 30px;
  padding: 20px;
  width: 100%;
}

.explanation-concept-start{
  border: solid 2px #E64F27;
  border-radius: 5px;
  font-family: 'CalibriRegular';
  font-size: 20px;
  margin-bottom: 30px;
  padding: 20px;
  width: 100%;
}

.explanation-concept{
  border: solid 2px #E64F27;
  border-radius: 5px;
  height: 400px;
  font-family: 'CalibriRegular';
  font-size: 20px;
  margin-bottom: 30px;
  padding: 20px;
  width: 100%;
}

.cards, .card, .view, .details, p{
  display: flex;
  align-items: center;
  justify-content: center;
}
.cards{
  height: 700px;
  width: 700px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.cards .card{
  cursor: pointer;
  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);
  }
}
.cards .card .view{
  width: 100%;
  height: 100%;
  user-select: none;
  pointer-events: none;
  position: absolute;
  background: #fff;
  border-radius: 7px;
  backface-visibility: hidden;
  transition: transform 0.25s linear;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.card .front-view img{
  max-width: 60px;
}
.card .back-view{
  transform: rotateY(-180deg);
}
.card .back-view img{
  max-width: 150px;
}
.card.flip .front-view{
  transform: rotateY(180deg);
}
.card.flip .back-view{
  transform: rotateY(0);
}

.details{
  width: 100%;
  margin-top: 15px;
  padding: 0 20px;
  border-radius: 7px;
  background: #fff;
  height: calc(100% / 4 - 30px);
  justify-content: space-between;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.details p{
  font-size: 18px;
  height: 17px;
  padding-right: 18px;
  border-right: 1px solid #ccc;
}
.details p span{
  margin-left: 8px;
}
.details p b{
  font-weight: 500;
}
.details button{
  cursor: pointer;
  font-size: 14px;
  color: #E64F27;
  border-radius: 4px;
  padding: 4px 11px;
  background: #fff;
  border: 2px solid #E64F27;
  transition: 0.3s ease;
}
.details button:hover{
  color: #fff;
  background: #E64F27;
}

.details{
  font-family: 'BebasNeue';
}

.time span b{
  font-size: 80px;
}

.flips span b{
  font-size: 80px;
}

.explanation button{
  cursor: pointer;
  font-family: 'BebasNeue';
  font-size: 30px;
  color: #E64F27;
  border-radius: 4px;
  padding: 4px 11px;
  background: #fff;
  border: 2px solid #E64F27;
  padding: 15px;
  transition: 0.3s ease;
}

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

@media screen and (max-width: 530px) {
  .cards{
    height: 300px;
    width: 300px;
  }
  .card .back-view img{
    max-width: 35px;
  }
  .details{
    margin-top: 10px;
    padding: 0 15px;
    height: calc(100% / 4 - 20px);
  }
  .details p{
    height: 15px;
    font-size: 17px;
    padding-right: 13px;
  }
  .details button{
    font-size: 13px;
    padding: 5px 10px;
    border: none;
    color: #fff;
    background: #E64F27;
  }
}