* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #078282FF;
}

.wrapper {
  box-sizing: content-box;
  width: 26.87em;
  padding: 2.5em 3em;
  background-color: #339E66FF;
  position: absolute;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
  border-radius: 0.6em;
  box-shadow: 0 10px 10px 10px rgba(0, 0, 0, 0.4);
}

.game-container {
  position: relative;
  width: 100%;
  display: grid;
  gap: 0.6em;
}

.stats-container {
  text-align: right;
  margin-bottom: 1.2em;
}

.stats-container span {
  font-weight: 600;
}

.card-container {
  position: relative;
  width: 6.25em;
  height: 6.25em;
  cursor: pointer;
}

.card-before,
.card-after {
  position: absolute;
  border-radius: 5px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #000000;
  transition: transform 0.7s ease-out;
  backface-visibility: hidden;
}

.card-before {
  background-color: #95DBE5FF;
  font-size: 2.8em;
  font-weight: 600;
}

.card-after {
  background-color: #ffffff;
  transform: rotateY(180deg);
}

.card-container.flipped .card-before {
  transform: rotateY(180deg);
}

.card-container.flipped .card-after {
  transform: rotateY(0deg);
}

.controls-container {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background-color: #078282FF;
  top: 0;
}

button {
  border: none;
  border-radius: 0.3em;
  padding: 1em 1.5em;
  cursor: pointer;
  background: #339E66FF;
}

#stop {
  font-size: 1.1em;
  display: block;
  margin: 1.1em auto 0 auto;
  background-color: #000000;
  color: #ffffff;
}

.controls-container button {
  font-size: 1.3em;
  box-shadow: 5px 5px 5px 5px rgba(0, 0, 0, 0.2);
}

.hide {
  display: none;
}

#result {
  text-align: center;
}

#result h2 {
  font-size: 2.5em;
}

#result h4 {
  font-size: 1.8em;
  margin: 0.6em 0 1em 0;
}

img{
 max-width: 100%;
 max-height: 100%;
}

.color-changing{
  background: linear-gradient(225deg, #ffabab, #ffdaab, #ddffab, #abe4ff, #d9abff);
  animation: rainbow 25s ease infinite;
  font-weight: bold;
  /* color: #0000ff; */
  box-shadow: 0 10px 10px 10px rgba(0, 0, 0, 0.2);
  padding: 10px;
  margin: 10px;
}
@keyframes rainbow{
  0% {
    background: #ff0000;
  }
  14% {
    background: #ffa500;
  }
  28% {
    background: #ffff00;
  }
  42% {
    background: #008000;
  }
  56% {
    background: #0000ff;
  }
  70% {
    background: #4b0082;
  }
  84% {
    background: #ee82ee;
  }
  100% {
    background: #ff0000;
  }
}
