* {
  box-sizing: border-box;
}

body {
  /* a nice font family that uses user's built in fonts */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: #333;
  margin: 0;
  padding: 0;
  background: rgb(124, 181, 200);
  /* background: rgb(154, 200, 216); */
  /* background-image: radial-gradient(
    rgba(96, 149, 170, 0.5) 2px,
    transparent 1px
  ); */
  background-size: 30px 30px;
  display: flex;
  flex-direction: column;
  width: 50%;
  height: 50%;
  margin-left: 25%;
  align-items: center;
}

.navbar {
  display: flex;
  width: 500px;
  margin-top: 50px;
  justify-content: center;
  margin-bottom: 0;
  border: 2px solid white;
  justify-content: center;
  align-items: center;
}

.brand {
  font-size: 40px;
  color: white;
}

.info-bar {
  display: flex;
  margin-top: 20px;
  justify-content: center;
  align-items: center;
}

.letters {
  display: grid;
  margin: 15px;
  padding-left: 13px;
  max-width: 400px;
  width: 100%;
  grid-template-columns: repeat(5, 1fr);
  row-gap: 15px;
  column-gap: 5px;
}

.letter {
  height: 55px;
  width: 55px;
  font-size: 30px;
  text-transform: uppercase;
  border: 3px solid white;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.correct {
  background-color: green;
  color: white;
}

.close {
  background-color: goldenrod;
  color: white;
}

.wrong {
  background-color: red;
}

.invalid {
  animation: flash 1s;
}

@keyframes flash {
  5% {
    border-color: crimson;
  }
  100% {
    border-color: #ccc;
  }
}

.spiral {
  font-size: 40px;
  animation: spin 1.5s linear infinite;
}

/* rotates cloclwise infinitely */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* visibility hidden means the item is still there and taking up space
but just not shown. display: none doesn't take up space */

.info-bar {
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.show {
  visibility: visible;
}

/* winner animation */
@keyframes rainbow {
  100%,
  0% {
    color: rgb(255, 0, 0);
  }
  8% {
    color: rgb(255, 127, 0);
  }
  16% {
    color: rgb(255, 255, 0);
  }
  25% {
    color: rgb(127, 255, 0);
  }
  33% {
    color: rgb(0, 255, 0);
  }
  41% {
    color: rgb(0, 255, 127);
  }
  50% {
    color: rgb(0, 255, 255);
  }
  58% {
    color: rgb(0, 127, 255);
  }
  66% {
    color: rgb(0, 0, 255);
  }
  75% {
    color: rgb(127, 0, 255);
  }
  83% {
    color: rgb(255, 0, 255);
  }
  91% {
    color: rgb(255, 0, 127);
  }
}

.winner {
  animation: rainbow 4s infinite linear;
}
