* {
  box-sizing: border-box;
}

body {
  /* a nice font that uses a user's built in font */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: #333;
  margin: 0;
  padding: 0;
}

.navbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid #333;
  padding: 15px;
  text-align: center;
  margin-bottom: 0;
}

.brand {
  font-size: 30px;
}
.navbar > img{
  margin: 5px 5px 0 5px;
  width: 45px;
}

.board {
  max-width: 300px;
  width: 100%;
  margin: 10px auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  row-gap: 10px;
  column-gap: 5px;
}

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

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

/* close in the sense nearby guess */
.close {
  background-color: goldenrod;
  color: white;
}

.wrong {
  background-color: #888;
  color: white; 
}

.invalid {
  animation: flash 1s;
}

/* flashes red border and then fades back to gray */
@keyframes flash {
  5% {
    border-color: crimson;
  }

  100% {
    border-color: #ccc;
  }
}

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

/* Alert box styles */
section:has(.alert){
  display: flex;
  justify-content: center;
}

.alert{
  padding: 2px 15px;
  border-radius: 5px;
  position: fixed;
  z-index: 1;
  top: 5;
  width: 80%;
	transition: 0.3s;
  margin: 5px;
  visibility: hidden;
}

.close-alert-box {
  position: absolute;
  padding-left: 10px;
  border: 0;
  top: 7px;
  right: 10px;
  background: none;
  color:rgb(23, 22, 22);
  font-size:22px;
  font-weight:bold;
  cursor:pointer;
  width:23px;
  height:23px;
}

.show {
  visibility: visible;
}
/* Infinity loop gif */
.info-bar img{   
  margin-top: 7px;  
  width: 50px;
}

/* winner animation */

@keyframes rainbow {
  100%,
  0% {
    color: rgb(255, 0, 0);
  }
  8% {
    color: rgb(255, 127, 0);
  }
  16% {
    color: rgb(127, 255, 0);
  }
  25% {
    color: rgb(45, 224, 9);
  }
  33% {
    color: rgb(0, 255, 64);
  }
  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;
}