html{
  overflow: hidden;
  height: 100vh;
}

body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

.container {
  background-color: #e3e3e3;
  background-image: radial-gradient(rgba(12, 12, 12, 0.171) 2px, transparent 0);
  background-size: 30px 30px;
  background-position: -5px -5px;
}

.scoreboard {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 50px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333333;
}

#closePlayBtn {
    cursor: pointer;
    border: 0;
    padding: 0 0;
    position: absolute;
    background-color: rgba(0, 0, 0, 0);
    top: 10px;
    right: 20px;
    width: 50px;
    color: #333333;
}

/* loader */
/* From Uiverse.io by aryamitra06 */ 
#loader {
  display: flex;
  align-items: center;
  justify-content:center;
  width:100px;
  height:100px;
  user-select: none;
}

#loader>.bar {
  display: inline-block;
  width: 10px;
  height: 30px;
  background-color: #bfbfbf;
  border-radius: 10px;
  animation: scale-up-bar 1s ease-in-out infinite;
}

#loader>.bar:nth-child(2) {
  height: 50px;
  margin: 0 10px;
  animation-delay: .25s;
}

#loader>.bar:nth-child(3) {
  animation-delay: .5s;
}

@keyframes scale-up-bar {
  20% {
    background-color: #955dc1;
    transform: scaleY(1.5);
  }

  40% {
    transform: scaleY(1);
  }
}

.card-container {
  perspective: 500px;
}

.card {
  margin:0 auto;
  position: relative;
  width: 300px;
  height: 350px;
  background: #955dc1;
  border-radius: 1.25em;
  box-shadow: 0 0 6px -4px rgba(0, 0, 0);
  transition: 0.5s transform ease-in-out;
  transform-style: preserve-3d;
  pointer-events: none;
  user-select: none;
  animation: move-in .7s ease-in forwards;
}

.card::before {
  content: "";
  position: absolute;
  bottom: -24px;
  bottom: 0;
  left: 0;
  width: 300px;
  height: 110px;
  transform: translate(0em, 60%) rotateX(90deg) scale(0.8);
  border-radius: 100%;
  background-color: rgba(0, 0, 0, 0.312);
  z-index: -10;
  filter: blur(32px);
}

.card-wrong{
  background-color: #fa5555;
  animation: horizontal-shaking 0.25s 5,
             move-out 1s ease-in 2s forwards;
}

.card-correct{
  animation: card-power-up .5s forwards, pick-up 0.2s ease-in 2s forwards;
}

@keyframes tilt-n-move-shaking {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(5px, 5px) rotate(5deg); }
  50% { transform: translate(0, 0) rotate(0eg); }
  75% { transform: translate(-5px, 5px) rotate(-5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes horizontal-shaking {
 0% { transform: translateX(0) }
 25% { transform: translateX(5px) }
 50% { transform: translateX(-5px) }
 75% { transform: translateX(5px) }
 100% { transform: translateX(0) }
}

@keyframes move-in {
  0% { transform: translateX(100vw) rotateY(50deg); }
 70% { transform: translateX(0px) rotateY(0deg); }
}
@keyframes pick-up {
 100% { transform: translateZ(-50px) translateY(-100vh) rotateY(30deg);}
}

@keyframes move-out {
  0% { transform: translate3d(0,0,0)}
 70% { transform: translate3d(0,0,0)}
 100% { transform: translate3d(-100vw,0,-100px)}
}

@keyframes card-power-up {
  0% { background-color: #955dc1; }
  100% { background-color: #4be070; }
}

@keyframes card-power-down {
 0% { background-color: #955dc1; }
 100% { background-color: #fa5555; }
}

.front{
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  inset: 0.7em;
  border-radius: 1em;
  background: #ffffff;
  overflow: hidden;
}

.back {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  inset: 0.7em;
  border-radius: 1em;
  background: #cb0323;
  overflow: hidden;
  transform: rotateY(180deg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.text-lg{
    font-size: 3rem;
    font-weight: bold;
    color: #333333;
}

.OpBtn {
  z-index: 10;
  user-select: none;
  padding: 30px 40px;
  margin-right: 10px;
  width: 30vw;
  max-width: 250px;
  border-radius: 10px;
  border: 0;
  background-color: #955dc1;
  letter-spacing: 1.5px;
  font-size: 2rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: #794b9c 0px 10px 0px 0px,
              rgba(0, 0, 0, 0.3) 0px 5px 5px 0px;
  color: hsl(0, 0%, 100%);
  cursor: pointer;
}

.OpBtn:hover {
    color: #333333;
    background-color: #FA9055;
    box-shadow: #d27848 0px 10px 0px 0px;
}

.OpBtn-correct, .OpBtn-correct:hover {
  color: #333333;
  background-color: #4be070;
  /*50, 168, 80*/
  box-shadow: #3db65b 0px 15px 0px 0px;
  transform: translateY(-5px);
}

#game-menu{
  width: 90%;
  max-width: 500px;
}

.MenuBtn {
  display: block;
  user-select: none;
  margin: 30px 0px;
  padding: 20px 20px;
  width: 100%;
  border-radius: 20px;
  border: 0;
  background-color: #955dc1;
  letter-spacing: 1.2px;
  font-size: 1.5rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: #794b9c 0px 10px 0px 0px,
              rgba(0, 0, 0, 0.5) 0px 5px 5px 0px;
  color: hsl(0, 0%, 100%);
  cursor: pointer;
}


.MenuBtn:hover {
    color: #333333;
    background-color: #FA9055;
    box-shadow: #d27848 0px 10px 0px 0px, #d27848 0px 5px 5px 0px;
}

.MenuBtn:active {
    color: #333333;
    background-color: #FA9055;
    box-shadow: #d27848 0px 2px 0px 0px;
    translate: 0 8px;
}

.MenuNum{
  float: left;
  opacity: 0.3;
}

.margin-top-30 {
    margin-top: 30px;
}
.margin-top-20 {
    margin-top: 20px;
}

@media screen and (max-width: 600px) {
    .scoreboard {
        font-size: 1rem;
        top: 4px;
        left: 4px;
    }
  .OpBtn {
    width: 30vw;
    padding: 20px 0px;
    font-size: 1.5rem;
    }
    .text-lg{
        font-size: 2rem;
    }
}
