@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');
:root {
  --bgColor: #1d1160;
  --textPrimary: #fff;
  --textSecondary: #00FFFF;
  --primaryColor: #fd4;
}
body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--bgColor);
  color: var(--textPrimary);
  font-size: 1.4rem;
}

main {
  width: 600px;
  margin: 50px auto;
}
h1 {
  color: var(--primaryColor);
}


#header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 20px 6px 30px;
}

#buttons {
  text-align: right;
}

#info {
  color: var(--primaryColor);
}

button {
  background: rgba(255, 255, 255, 0.2);
  border: 0;
  color: rgba(255, 255, 255, 0.5);
  padding: 5px 20px;
  border-radius: 5px;
  cursor: pointer;
}

div#game {
  line-height: 35px;
  height: 105px;
  overflow: hidden;
  position: relative;
}
div#game:focus {
  outline: 0;
}

#words {
  filter: blur(5px);
  color: var(--textSecondary);
}

#game:focus #words {
  filter: blur(0);
}

#focus-error {
  position: absolute;
  inset: 0;
  text-align: center;
  padding-top: 35px;
}

#game:focus #focus-error {
  display: none;
}

div.word {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  margin: 0 5px;
}

.letter.correct {
  color: #0f0;
}

.letter.incorrect {
  color: #f00;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#cursor {
  display: none;
  width: 2px;
  height: 1.6rem;
  background: var(--primaryColor);
  position: fixed;
  top: 198px;
  left: 18px;
  animation: blink .3s infinite;
}

#game.over #words {
    opacity: .5;
    filter: blur(0);
}

#game.over #focus-error {
    display: none;
}

#feedback {
    text-align: center;
    margin-top: 80px;
    font-size: 1.6rem;
    color: var(--primaryColor);
    width: 500px;
    height: 500px;
    margin-left: auto;
    margin-right: auto;
}

#feedback img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
}
