*{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
html,body{
  background-color: #e6e7e8;
  color: #1c1c1c;
  height: 100vh;
  font-family: 'IBM Plex Mono', monospace;
}
h1{
  color: #D5A001;
}
p{
  font-family: 'IBM Plex Sans', sans-serif;
}
a{
  color: #D5A001;
  text-decoration: none;
  font-family: 'IBM Plex Sans', sans-serif;
}
a:hover{
  color: #5F6689;
}
header,footer{
  background-color: #1c1c1c;
  color: #e6e7e8;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 8vh;
  border-bottom: 1px solid #D5A001;
}
main{
  height: 84vh;
  background-color: #232D5E;
  display: flex;
}
.memory-game{
  width: 500px;
  height: 95%;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  perspective: 1000px; /*creates the 3d space*/
}
.memory-card{
  width: calc(25% - 4px); /*subtracts the margin to fix layout*/
  height: calc(33.333% - 4px);
  position: relative;
  margin: 2px;
  transform: scale(1);
  transform-style: preserve-3d; /*inserts the cards inside the 3d space*/
  transition: transform .5s;
}
.memory-card:active{
  transform: scale(.97);
  transition: transform .2s;
}
.memory-card.flip{
  transform: rotateY(180deg);
}
.front-face,.back-face{
  width: 100%;
  height: 100%;
  padding: .2em;
  position: absolute;
  border-radius: 5px;
  background-color: #1c1c1c;
  backface-visibility: hidden;
}
.front-face{
  transform: rotateY(180deg);
}
footer{
  border-top: 1px solid #D5A001;
}