* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  display: grid;
  background: #ffffff;
}

.jax-container {
  background: dodgerblue;
  height: 34px;
  width: 100%;
  box-shadow: 0 0 10px #2a2a2a;

}
.jaxcolumns {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  place-items: center;
  padding: 0;
  height: 34px;
  min-width: 50rem;
  max-width: 60rem;
  margin-inline: auto;
  opacity: 1;
  color: #ffffff;
}

.jaxcolumns > div a {
	position: relative;
	cursor: pointer;
	color: white;
	text-decoration: none;
	text-transform: uppercase;
	font-family: 'montserrat', sans-serif;
	z-index: 9999;
}


@media (max-width: 50rem) {

 .jax-container {
   height: 100px;

 }
 
 .jaxcolumns {
   grid-template-columns: 1fr;
   place-items: center;
   padding: 10px;
   height: 100px;
   min-width: 10rem;
 }
 
 .jaxcolumns > div a {
 	display: inline-block;
	margin: 4px;
}

}



.congrats-restart-box {
  position: fixed; 
  display: grid;
  inset: 0 0 0 0;
  opacity: 0; 
  z-index: 0;
  background: rgba(0, 0, 0, 0.4);
  transition: opacity 500ms;

}

.congrats-restart {
  position: absolute;
  opacity: 0;
  place-self: center;
  margin-inline: auto;
  text-align: center;
  height: clamp(200px, 32vh, 600px);
  width: clamp(360px, 38vw, 500px);
  background-color: dodgerblue;
  border-radius: 6px;
  padding: 40px;
  box-shadow: 0 0 30px rgba(0,0,0,.3);


  color: white;
  font-size: 24px;
  text-transform: uppercase;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;

  transition: opacity 500ms ease-in-out;
  
}

.congrats-restart span {
  font-size:17px;
}

.congrats-restart a {
  color: #e89f0c;
}

#restartButton {
  cursor: pointer;
  background: #e89f0c;
  padding: 16px 24px;
  color: white;
  font-size: 18px;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
  border: none;
  border-radius: 2px;
  margin-top: 30px;
  margin-bottom: 30px;
}

.memory-game {
  width: 640px;
  height: 640px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  perspective: 1000px;
}

.memory-card {
  cursor: pointer;
  width: calc(25% - 10px);
  height: calc(33.333% - 10px);
  margin: 5px;
  position: relative;
  transform: scale(1);
  transform-style: preserve-3d;
  transition: transform .5s;
  box-shadow: 1px 1px 1px rgba(0,0,0,.3);
}

.memory-card:active {
  transform: scale(0.97);
  transition: transform .2s;
}

.memory-card.flip {
  cursor: default;
  transform: rotateY(180deg);
}

.front-face,
.back-face {
  width: 100%;
  height: 100%;
  padding: 20px;
  position: absolute;
  border-radius: 5px;
  background: #1C7CCC;
  backface-visibility: hidden;
}

.front-face {
  transform: rotateY(180deg);
}
