html,
body {
  height: 100%;
  font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
}

#container {
  display: flex;
  background-color: rgb(18, 18, 19);
  align-items: center;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

#game {
  width: 95%;
  max-width: 500px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(58, 58, 60);
}

#help,
#stats {
  color: rgb(58, 58, 60);
  font-size: 1.5rem;
  cursor: pointer;
}

.title {
  color: gainsboro;
  font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
  font-size: 2.3rem;
  font-weight: bold;
  margin: 0.4rem 0 0.4rem 0;
  text-align: center;
}

@media only screen and (max-width: 480px) {
  .title {
    font-size: 1.5rem;
  }
}

#board-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  overflow: hidden;
  flex-direction: column;
}

#final-score {
  color: gainsboro;
}

#board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 5px;
  padding: 10px;
  box-sizing: border-box;
}

.row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 5px;
}

.square {
  border: 2px solid rgb(58, 58, 60);
  display: inline-block;
  min-width: 60px;
  min-height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 50px;
  cursor: pointer;

  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  line-height: 2rem;
  font-weight: bold;
  vertical-align: middle;
  box-sizing: border-box;
  color: gainsboro;
  text-transform: uppercase;
  user-select: none;
}

.square.incorrect-letter {
  background-color: rgb(58, 58, 60);
  border-color: rgb(58, 58, 60);
}

.square.correct-letter {
  background-color: rgb(181, 159, 59);
  border-color: rgb(181, 159, 59);
}

.square.correct-letter-in-place {
  background-color: rgb(83, 141, 78);
  border-color: rgb(83, 141, 78);
}

@media only screen and (max-width: 400px) {
  .square {
    min-width: 15vw;
    min-height: 15vw;
  }
}

#keyboard-container {
  height: 200px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto 8px;
  touch-action: manipulation;
}

.keyboard-row button {
  font-family: inherit;
  font-weight: bold;
  border: 0;
  padding: 0;
  margin-right: 6px;
  height: 58px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  background-color: rgb(129, 131, 132);
  color: rgb(215, 218, 220);
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
}

.keyboard-row button.wide-button {
  flex-grow: 1.5;
}

.keyboard-row button.incorrect-letter {
  background-color: rgb(58, 58, 60);
}

.keyboard-row button.correct-letter {
  background-color: rgb(181, 159, 59);
}

.keyboard-row button.correct-letter-in-place {
  background-color: rgb(83, 141, 78);
}

.spacer-half {
  flex-grow: 0.5;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: rgb(18, 18, 19);
  margin: 150px auto;
  padding: 20px;
  width: 80%;
  color: gainsboro;
  max-width: 500px;
}

.modal-content hr {
  border: 1px solid rgb(58, 58, 60);
}

/* The Close Button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#examples {
  width: 80%;
}

.toast {
  position: fixed;
  top: 0;
  background-color: rgb(129, 131, 132);
  padding: 15px;
  border-radius: 6px;
  margin-top: 60px;
  color: rgb(215, 218, 220);
  font-weight: bold;
  display: none;
}

.hidden {
  display: none;
}

@-webkit-keyframes shake {
  0% { -webkit-transform: translate(2px, 0) rotate(0deg); } 
  10% { -webkit-transform: translate(-1px, 0) rotate(0deg); }
  20% { -webkit-transform: translate(-3px, 0px) rotate(0deg); }
  30% { -webkit-transform: translate(0px, 0) rotate(0deg); }
  40% { -webkit-transform: translate(1px, 0) rotate(0deg); }
  50% { -webkit-transform: translate(-1px, 0) rotate(0deg); }
  60% { -webkit-transform: translate(-3px, 0) rotate(0deg); }
  70% { -webkit-transform: translate(2px, 0) rotate(0deg); }
  80% { -webkit-transform: translate(-1px, 0) rotate(0deg); }
  90% { -webkit-transform: translate(2px, 0) rotate(0deg); }
  100% { -webkit-transform: translate(1px, 0) rotate(0deg); }
}
.shake {
  -webkit-animation-name: shake;
  -webkit-animation-duration: 0.5s;
  -webkit-transform-origin:50% 50%;
  -webkit-animation-iteration-count: infinite;
}

#share-btn {
  text-align: center;
  font-weight: bold;
  background-color: lightgrey;
  color: black;
  border-radius: 5px;
  padding: 10px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.stat-row div {
  flex-grow: 1;
  width: 25%;
  text-align: center;
}

.stat-row.stat-label div {
  font-size: 14px;
}

.stat-row.stat-value div {
  font-size: 18px;
  font-weight: bold;
}

#next-word {
  padding: 10px;
  text-align: center;
}
