* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  width: 100%;
  min-height: 100dvh;
  background: #1E1E1E;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.score {
  padding: 10px 20px;
  color: white;
  background: #383838;
  border-radius: 10px;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

.game-container {
  width: 480px;
  padding: 20px;
  background: #383838;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

.card {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  perspective: 1000px;
  cursor: pointer;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

.card-content {
  width: 100%;
  height: 100%;
  transition: transform .6s ease;
  transform-style: preserve-3d;
  position: relative;
  -webkit-transition: transform .6s ease;
  -moz-transition: transform .6s ease;
  -ms-transition: transform .6s ease;
  -o-transition: transform .6s ease;
}

.card.show .card-content {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  -ms-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);
}

.card-content .front,
.card-content .back {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  position: absolute;
  backface-visibility: hidden;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
  -webkit-backface-visibility: hidden;
}

.card-content .front {
  background: #535353;
}

.card-content .back {
  background: #535353;
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  -ms-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);
}

.end-game {
  display: none;
}

.end-game.show {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.116);
  backdrop-filter: blur(2px);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.end-game.show .wrapper {
  padding: 20px;
  background: white;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

.end-game.show .wrapper p {
  font-size: .95rem;
  text-align: center;
}

.end-game.show .wrapper button {
  margin-top: 20px;
  padding: 10px 15px;
  border: none;
  outline: none;
  background: rgb(231, 57, 57);
  color: white;
  font-weight: bold;
  border-radius: 7px;
  cursor: pointer;
  transition: background .3s ease;
  -webkit-border-radius: 7px;
  -moz-border-radius: 7px;
  -ms-border-radius: 7px;
  -o-border-radius: 7px;
  -webkit-transition: background .3s ease;
  -moz-transition: background .3s ease;
  -ms-transition: background .3s ease;
  -o-transition: background .3s ease;
}

.end-game.show .wrapper button:hover {
  background: rgb(197, 41, 41);
}

@media (max-width: 600px) {
  .game-container {
    width: 90%;
  }

  .card {
    width: 65px;
    height: 65px;
  }
}