main {
  display: flex;
  flex-flow: column;
  height: 90%;
  margin: auto;
}
main > * {
  margin-bottom: 1rem;
  margin-inline: auto;
}

canvas {
  background: rgba(123, 53, 53, 0.2);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

main .buttons {
  display: flex;
  flex-flow: column;
  justify-content: center;
  height: 90%;
  margin: auto;
}
main .buttons > * {
  margin-bottom: 1rem;
  margin-inline: auto;
}

.words {
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
}
.words .secret-word {
  color: #a62f01;
  font-size: 3rem;
  margin: 0;
  letter-spacing: 0.8rem;
}
.words .input-word {
  margin: auto;
  text-transform: uppercase;
  border-radius: 20px;
  width: 35px;
  height: 40px;
  padding-left: 10px;
}

.game-over {
  opacity: 0.9;
  background-color: #000;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 10;
  visibility: hidden;
}
.game-over .you-win,
.game-over .you-loss {
  display: none;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.game-over .you-win > *,
.game-over .you-loss > * {
  margin-bottom: 1rem;
}
.game-over .you-loss .loss-text,
.game-over .you-win .win-text {
  text-align: center;
  font-size: 2rem;
  padding: 1rem;
}
.game-over .you-loss .loss-text {
  color: red;
}
.game-over .you-win .win-text {
  color: green;
}

.bad-letters {
  display: flex;
  flex-flow: row;
}
.bad-letters .bad-letter {
  background: #ff4d4d;
  text-shadow: 1px 2px 0 red;
  padding: 10px;
  color: white;
  text-transform: uppercase;
  margin-right: 10px;
  animation: letteranim 0.3s ease;
}
.bad-letters .bad-letter:first-child {
  visibility: hidden;
}

.letter-anim {
  animation: letteranim 0.3s ease;
}

.shake {
  animation: shake 1s ease;
}

@keyframes letteranim {
  50% {
    transform: translateY(-5px) scale(1.05);
  }
}

@keyframes shake {
  0% {
    transform: translate(1px, 1px) rotate(0deg);
    background-color: #a62f01;
  }
  10% {
    transform: translate(-1px, -2px) rotate(-1deg);
  }
  20% {
    transform: translate(-3px, 0px) rotate(1deg);
  }
  30% {
    transform: translate(3px, 2px) rotate(0deg);
  }
  40% {
    transform: translate(1px, -1px) rotate(1deg);
  }
  50% {
    transform: translate(-1px, 2px) rotate(-1deg);
  }
  60% {
    transform: translate(-3px, 1px) rotate(0deg);
  }
  70% {
    transform: translate(3px, 1px) rotate(-1deg);
  }
  80% {
    transform: translate(-1px, -1px) rotate(1deg);
  }
  90% {
    transform: translate(1px, 2px) rotate(0deg);
  }
  100% {
    transform: translate(1px, -2px) rotate(-1deg);
  }
}

/**** DESKTOP ****/

@media (min-width: 1200px) {
  main .buttons {
    flex-flow: row;
  }
  main .buttons > a:first-child {
    margin-right: 1rem;
  }
}