:root {
  touch-action: pan-x pan-y;
}

* {
  margin: 0px;
  box-sizing: border-box;
}
body {
  font-family: bungee, sans-serif;
  font-size: 16px;
}

.container {
  background-color: #78d99d;
  height: 100vh;
  width: 100vw;
}

.home-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-self: center;
  height: 100%;
}
.text-style {
  /* text-shadow: 3px 3px 0 var(--color-secondary), px 6px 0 var(--color-tertiary); */
  font-weight: 400;
  text-transform: uppercase;
  font-size: 3.8rem;
  text-align: center;
  color: #05386b;
  /* color: #8ee4af; */

  line-height: 1.2;
  transform: perspective(200px) rotateX(45deg);
}
.best-score {
  color: #379683;
  font-size: 1.5rem;
  font-weight: 300;
  margin: 40px;
}

.start-button {
  height: 3rem;
  width: 60%;
  max-width: 210px;
  color: #8ee4af;
  background-color: #05386b;
  font-size: 1.2rem;
  border-radius: 5px;

  border-style: none;
  font-family: bungee, sans-serif;
  cursor: pointer;
  margin-bottom: 2rem;
}

.start-button:hover {
  height: 3.5rem;
  width: 60%;
  max-width: 240px;
}

#game div {
  /* border: 1px solid black; */
  /* background-color: red; */
  /* margin: 5px; */
  display: inline-block;
  background-color: #fbab7e;
  background-image: url("./images/thinking_emoji.png");
  background-position: center;
  background-size: 40%;
  background-repeat: no-repeat;

  cursor: pointer;
  width: 23%;
  height: 12vh;
}

/* #game div:hover {
  height: 1.2;
  margin: 3px;
  -webkit-box-shadow: 2px 1px 1px 2px rgba(0, 92, 55, 0.9);
  -moz-box-shadow: 2px 1px 1px 2px rgba(0, 92, 55, 0.9);
  box-shadow: 2px 1px 1px 2px rgba(0, 92, 55, 0.9);
} */

img {
  width: 100%;
  height: 100%;
  opacity: 0;
  /* border-radius: 10px; */
}

.game {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  height: 75%;
  width: fit-content;
  padding: 0rem 0rem;
  max-width: 1050px;
  min-width: 300px;
  align-content: center;
  justify-self: center;
}

/* .counter {
  height: 200px;
  width: 150px;
  background-color: red;

} */

.show {
  opacity: 1;
}

.hide {
  opacity: 0;
}

.score-container {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  height: 5%;
  max-width: 1050px;
  font-size: 1rem;
  width: 100%;
  color: #05386b;
}

#gamePage {
  width: 100vw;
  height: 100vh;
  flex-direction: column;
  /* justify-content: center; */
  align-items: center;
  /* margin-top: -2rem; */
  box-sizing: border-box;
  padding: 20px 0px;
}

#counter {
  border-style: none !important;
  background-color: transparent !important;
  justify-content: center;
  /* align-items: stretch; */
  font-size: 1rem;
  width: 100%;
  height: 5%;
  max-height: 80px;
  /* margin: 10px; */
  display: flex;
  margin-bottom: -2rem;
  color: #05386b;
  margin: 20px 0px;
}

/* .position {
  position: absolute;
  top: 150px;
} */

.modal {
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0.8rem;
  overflow: none;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);

  font-weight: 200;
}

.modal-content {
  height: 95%;
  width: 98%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  font-weight: 100;
  background-color: #78d99d;

  color: #05386b;
}

.success-img {
  opacity: 1;
  height: auto;
  width: 80%;
  border-radius: 10px;
}

.hide-container {
  display: none;
}

.top-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
}

.text-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
  gap: 0.2rem;
  font-size: 0.8rem;
}

.text-container2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  font-size: 0.8rem;
  gap: 0.6rem;
  line-height: 1.3;
}

.success-text {
  margin-top: 0.8rem;
  text-align: center;
}

.restart-button {
  height: 3rem;
  width: 60%;

  font-size: 1rem;
  border-radius: 10px;
  border-style: none;
  font-family: bungee, sans-serif;
  color: #8ee4af;
  background-color: #05386b;
  border-radius: 5px;
  box-shadow: #8ee4a7 0 2px 4px;
  cursor: pointer;
  text-align: center;
  margin-top: 2rem;
}
/* 
.restart-button:hover {
  background: #00bd68;
} */

.flip-box {
  background-color: transparent;
  border: 1px solid black;
  width: 25%;
  height: 20%;
  margin: 10px;
  perspective: 1000px; /* Remove this if you don't want the 3D effect */
}

.flip-box-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.rotate {
  transform: rotateY(180deg);
}

.flip-box-front,
.flip-box-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.flip-box-front {
  background-color: #13315c;
  color: black;
}

.flip-box-back {
  background-color: #13315c;
  color: white;
  transform: rotateY(180deg);
}

@media screen and (min-width: 768px) {
  .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    max-width: 100vw;
  }

  .text-style {
    font-size: 6rem;
    margin-bottom: 3rem;
  }

  .best-score {
    font-size: 2rem;
    margin: 3rem;
  }

  .flip-box {
    background-color: transparent;
    border: 1px solid red;
    width: 15%;
    height: 16%;
    margin: 10px;
    perspective: 1000px; /* Remove this if you don't want the 3D effect */
  }

  .modal-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.3rem;
  }

  #game div {
    width: 23%;
    height: 18%;
  }

  .top-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    height: 50%;
    width: 100%;
  }
  .text-container {
    height: 100%;
    width: 40%;
    gap: 1rem;
    font-size: 1.7rem;
  }

  .text-container2 {
    margin-top: 2rem;
    font-size: 1.7rem;
    gap: 0.6rem;
    line-height: 1.8;
  }

  .success-text {
    margin-top: 0.8rem;
    text-align: center;
  }
  .success-img {
    opacity: 1;
    height: 100;
    width: 100%;
    border-radius: 10px;
  }
  .restart-button {
    width: 40%;
    max-width: 280px;
  }

  .start-button {
    width: 50%;
    max-width: 400px;
    margin: 0px;
  }
}
