body {
  background-color: lightblue;
  background-image: url(BackGround.jpg);
  height: 100%;
  /* background-position: center; */
  background-repeat: no-repeat;
  background-size: auto;
}

.left {
  width: 45%;
  float: left;
}

.right {
  width: 45%;
  float: right;
}

#myButton img {
  width: 20px;
  height: 20px;
}

* {
  padding: 0;
  margin: 0;
  font-family: "Quicksand", sans-serif;
}

.grid-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  grid-gap: 10px;
}

.grid-item,
.grid-container-image,
.grid-container-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* background-color: #e8e8e8; */
  position: relative;
}

.grid-item img {
  width: 150px;
  height: 150px;
}

.grid-item p {
  width: 150px;
  height: 150px;
  background-color: #1589ff;
}

.container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 370px;
  height: 530px;
  border-radius: 30px;
  transition: 0.5s;
}

.grid-container-image img {
  display: inline-block;
  width: 7vw;
  height: 7vw;
  border-radius: 1rem;
  backface-visibility: hidden;
  transform: perspective(1000px) rotateY(-180deg);
  transition: 0.5s;
  box-shadow: 0 5px 5px rgb(0 0 0 / 50%);
}

/* .container:hover img,.grid-container-image:hover img {
  transform: perspective(1000px) rotateY(0deg);
} */

.grid-container-image .content {
  position: absolute;
  display: inline-block;
  width: 7vw;
  height: 7vw;
  border-radius: 1rem;
  backface-visibility: hidden;
  transform: perspective(1000px) rotateY(0deg);
  background: #fff;
  transition: 0.5s;
  box-shadow: 0 5px 5px rgb(0 0 0 / 50%);
  text-align: center;
}

.grid-container-image .content img {
  width: 50%;
  backface-visibility: visible;
  height: 70%;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  text-align: center;
  transition: none;
  padding: 15% 0;
}

/* .grid-container-image:hover .content {
  transform: perspective(1000px) rotateY(180deg);
} */

.front-flip {
  transform: perspective(1000px) rotateY(180deg) !important;
}

.back-flip {
  transform: perspective(1000px) rotateY(0deg) !important;
}

.grid-container-image .content h1 {
  color: #f00;
  text-align: center;
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
}

.grid-container-text .content {
  position: absolute;
  display: inline-block;
  width: 7vw;
  height: 7vw;
  border-radius: 1rem;
  backface-visibility: hidden;
  transform: perspective(1000px) rotateY(0deg);
  background: #fff;
  transition: 0.5s;
  box-shadow: 0 5px 5px rgb(0 0 0 / 50%);
  text-align: center;
}

.grid-container-text .content img {
  width: 50%;
  backface-visibility: visible;
  height: 70%;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  text-align: center;
  transition: none;
  padding: 15% 0;
}

.grid-container-text .text {
  width: 7vw;
  height: 7vw;
  border-radius: 1rem;
  backface-visibility: hidden;
  transform: perspective(1000px) rotateY(-180deg);
  transition: 0.5s;
  box-shadow: 0 5px 5px rgb(0 0 0 / 50%);
  text-align: center;
  font-size: 0.75rem;
  color: red;
  font-family: cursive;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  /* padding-top: 2vw; */
}

.row {
  width: 100%;
  display: inline-block;
}

.col-6 {
  width: 50%;
}

.float-left {
  float: left;
}

.float-right {
  float: right;
}

#score {
  padding: 0 5%;
  font-size: 25px;
  font-family: cursive;
  color: white;
  padding-top: 0;
}

#myButton {
  padding: 2% 7%;
  color: white;
  background: dodgerblue;
  font-size: 20px;
  font-family: cursive;
  border: 0;
  border-radius: 10px;
}

.Title {
  font-size: 3rem;
  font-family: cursive;
  text-align: center;
  /* background-image: linear-gradient(to left,
      violet,
      indigo,
      blue,
      green,
      yellow,
      orange,
      red);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text; */
  color: #ffffff;
}

.displayNone {
  display: none !important;
}

.card {
  align-items: center;
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 0.4px 3.6px rgba(0, 0, 0, 0.004),
    0 1px 8.5px rgba(0, 0, 0, 0.01), 0 1.9px 15.7px rgba(0, 0, 0, 0.019),
    0 3.4px 28.2px rgba(0, 0, 0, 0.03),
    0 6.3px 54.4px rgba(0, 0, 0, 0.047), 0 15px 137px rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
  position: absolute;
  width: 25vw;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  padding: 2% 0;
}

.popupText-parent {
  padding: 5% 10%;
  text-align: center;
}

.title {
  align-items: center;
  display: flex;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 4px;
  position: relative;
}

.buttons {
  display: flex;
  margin-top: 8px;
  width: 100%;
}

.button {
  align-items: center;
  background: #edf1f7;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  height: 8vh;
  justify-content: center;
  width: 80%;
  margin: 0 auto;
  font-size: 2vw;
}

.button-primary {
  background-color: #0060f6;
  color: #fff;
}

.instructionPopup,
.matchPopup {
  position: absolute;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  top: 0;
  left: 0;
  backdrop-filter: blur(15px);
  z-index: 1;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease 0.5s;
}

.hand-tap {
  fill: #f5cfb0;
  stroke: #000;
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tap-1 {
  fill: transparent;
  stroke: #000;
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tap-1 {
  opacity: 0.5;
}

.hold-1 {
  opacity: 0;
}

/* ANIMATION KEYFRAMES */

@keyframes tap {
  0% {
    transform: rotateX(0deg);
  }

  10% {
    transform: rotateX(12.5deg);
  }

  25% {
    transform: rotateX(25deg);
  }
}

@keyframes tap-circle {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  75% {
    transform: scale(1.05);
    opacity: 0.6;
  }

  80% {
    transform: scale(1);
    opacity: 0.5;
  }
}

/* SVG ANIMATION */

.tap-wrapper * {
  transform-origin: 50% 50%;
  perspective: 100px;
}

.tap-wrapper {
  position: absolute;
  top: 25%;
  left: 25%;
}

.hand-tap {
  animation: tap 1s ease-out backwards;
  animation-iteration-count: infinite;
}

.tap-1 {
  animation: tap-circle 1s ease-out backwards;
  animation-iteration-count: infinite;
}

.tap-svg {
  z-index: 11;
  width: 8vw;
  rotate: -35deg;
  position: absolute;
  top: 20%;
}

#message {
  text-align: center;
  font-family: cursive;
  font-size: 2rem;
  /* padding-bottom: 2%; */
  color: white;
}

#winImage {
  width: 15vw;
}

.expand {
  width: 92%;
  position: absolute;
  top: 5%;
  /* left: 30%; */
  backface-visibility: hidden;
  transform: perspective(1000px) rotateY(-180deg);
  background: dodgerblue;
  color: white;
  font-family: cursive;
  font-weight: 600;
  border-radius: 5px;
  padding: 5px;
  font-size: 0.75rem;
  transition: 0.5s;
  cursor: pointer;
  text-align: center;
  display: none;
}

.textHelpPopup,
.imageHelpPopup {
  position: absolute;
  width: 50%;
  background: rgba(0, 0, 0, 0.4);
  top: 22%;
  /* left: 0; */
  backdrop-filter: blur(15px);
  z-index: 1;
  height: 70%;
}

.textHelpPopup .button,.imageHelpPopup .button {
  width: 50%;
  font-size: 1rem;
  height: auto;
  padding: 2% 0;
  color: white;
  font-family: cursive;
}

.textHelpPopup .info {
  font-size: 2rem;
  text-align: center;
  font-family: cursive;
  color: red;
}

.ImageDescriptionPopup {
  width: 80%;
}