* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Nunito Sans", sans-serif;
  font-weight: 600;
}
body {
  background-color: #f73e3e;
}


.wrapper {
  position: relative;
  box-sizing: content-box;
  width: 26.87em;
  padding: 2.5em 3em;
  background-color: #ffffff;
  position: absolute;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
  border-radius: 0.6em;
  box-shadow: 0 0.9em 2.8em rgba(86, 66, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers all children horizontally */
  justify-content: center; /* Centers all children vertically */
}
  
  .centered {
    margin-top: 2em; /* Optional spacing for positioning */
    font-size: 1.3em;
    background-color: #f7ab74;
    color: #ffffff;
    border: none;
    border-radius: 0.3em;
    padding: 1em 2em;
    cursor: pointer;
  }
  
  .centered:hover {
    background-color: #f7ab74; /* Slightly darker shade on hover */
  }
  
  .button-container {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-top: 1em; /* Space above buttons */
  }
  
.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: 3px solid #f77c3e;
  transition: transform 0.7s ease-out;
  backface-visibility: hidden;
}
.card-before {
  background-color: #f5af71;
  font-size: 2.8em;
  font-weight: 600;
}
.card-after {
  display: flex;
  justify-content: center;
  align-items: center;
  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:  #f99386;
  top: 0;
}
button {
  border: none;
  border-radius: 0.3em;
  padding: 1em 1.5em;
  cursor: pointer;
}
#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: 0 0.6em 2em rgba(86, 66, 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;
}

.image {
  width: 80%; /* Adjust percentage as needed for smaller images */
  height: auto; /* Maintain aspect ratio */
  object-fit: contain; /* Ensure image fits within bounds */
}

#home {
  font-size: 1.1em;
  display: block;
  margin: 1.1em auto 0 auto;
  background-color: #4286bd;
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 0.3em;
  padding: 1em 1.5em;
  cursor: pointer;
}
#home:hover {
  background-color: #f77c3e /* Slightly darker shade on hover */
}

#stop:hover{
  background-color: #f77c3e; 
}

.button-container {
  display: flex;
  justify-content: center; /* Center both buttons horizontally */
  gap: 1em; /* Add space between the buttons */
  margin-top: 1em; /* Add spacing above the buttons */
}

#stop,
#home {
  font-size: 1.1em;
  background-color: #000000;
  color: #ffffff;
  border: none;
  border-radius: 0.3em;
  padding: 1em 1.5em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}