:root {
  --timer: 60s;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Fredoka One", cursive;
}
.cards {
  position: relative;
  height: 200px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}
.front,
.back {
  position: absolute;
  backface-visibility: hidden;
  top: 0;
  left: 0;
}
.back {
  color: white;
  background: #4b4d4e;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  bottom: 100%;
  transform: rotateY(180deg);
}
.front {
  background-color: white;
}
.rotate-on {
  transform: rotateY(180deg);
}
.rotate-off {
  transform: rotateY(0);
}

.valid {
  animation: valid 0.3s ease-in-out;
}
@keyframes valid {
  0% {
    top: 0;
  }
  50% {
    top: -10px;
  }
  100% {
    top: 0;
  }
}
.unvalid {
  animation: unvalid 0.2s ease-in-out;
}
@keyframes unvalid {
  0% {
    left: 0;
  }
  25% {
    left: -10px;
  }
  50% {
    left: 0;
  }
  75% {
    left: 10px;
  }
  100% {
    left: 0;
  }
}
.progress-bar {
  width: 100%;
}

.timer-on {
  animation: timer var(--timer) linear !important;
}

@keyframes timer {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}
.winOrLose {
  animation: winOrLose 0.2s ease-in;
}
@keyframes winOrLose {
  from {
    opacity: 0;
    visibility: hidden;
  }
  to {
    opacity: 1;
    visibility: visible;
  }
}
