@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap");

.select {
  margin: 0;
  color: #800000;
  background: #eee;
  /* font-size: 1.2em; */
  width: 150px;
  height: 40px;
  padding-left: 10px;
}
.green {
  opacity: 0;
  border: 4px solid rgb(10, 87, 10);
  border-radius: 10px;
}
.memory-game {
  width: 340px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* perspective: 1000px; */
}

.memory-card {
  width: 80px;
  height: 80px;
  margin: 2px;
  position: relative;
  transform: scale(1);
  transform-style: preserve-3d;
  transition: transform 0.5s;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

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

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

/* images  */
.front-face,
.back-face {
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 5px;
  backface-visibility: hidden;
}
.back-face {
  background: #972524;
}
.front-face {
  background-color: darkgray;
}
.word {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: black;
}

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

.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 0 10px;
  /* transition: opacity 0.4s ease; */
}
.game-modal.show {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s 0.4s ease;
}
.game-modal .content {
  padding: 30px;
  max-width: 420px;
  width: 100%;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.game-modal img {
  max-width: 130px;
  margin-bottom: 20px;
}
.game-modal img[src="images/victory.gif"] {
  margin-left: -10px;
}
.game-modal h4 {
  font-size: 1.53rem;
}
.game-modal p {
  font-size: 1.15rem;
  margin: 15px 0 30px;
  font-weight: 500;
}
.game-modal p b {
  color: #5e63ba;
  font-weight: 600;
}
.game-modal button {
  padding: 12px 23px;
}

@media (min-width: 450px) {
  .memory-game {
    width: 420px;
  }

  .memory-card {
    width: 100px;
    height: 100px;
  }
}

@media (min-width: 728px) {
  .memory-game {
    width: 500px;
  }

  .memory-card {
    width: 110px;
    height: 110px;
    margin: 5px;
  }
  .word {
    font-size: 2.1rem;
  }
}
