.main-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.wordle-row {
  display: flex;
  justify-content: center;
}

.wordle-row:not(:last-child) {
  margin-bottom: 10px;
}

.wordle-letter {
  width: 50px;
  height: 50px;
  border: 2px solid #8a8a8a;
  background-color: #eee;
  border-radius: 7px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  transition: background-color 0.2s, border-color 0.2s;
  text-transform: uppercase;
}

.wordle-letter:not(:last-child) {
  margin-right: 4px;
}

.wordle-letter.filled {
  background-color: #d3d6da;
  border-color: #d3d6da;
}

.wordle-letter.present {
  background-color: #c9b458;
  border-color: #c9b458;
}

.wordle-letter.absent {
  background-color: #787c7e;
  border-color: #787c7e;
}

.wordle-letter.correct {
  background-color: #6aaa64;
  border-color: #6aaa64;
}

.keyboard {
  width: 100%;
  max-width: 550px;
  padding: 0 4px 4px;
  margin: 0 auto;
}

.keyboard-row {
  --bs-gutter-x: 0.2rem;
}

.keyboard-row:not(:last-child) {
  margin-bottom: 10px;
}

.keyboard-larger-col {
  flex-grow: 2;
}

.keyboard-letter {
  cursor: pointer;
  width: 100%;
  height: 40px;
  border: 2px solid #393939;
  background-color: #252525;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  transition: background-color 0.2s, border-color 0.2s;
}

.keyboard-letter.present {
  background-color: #c9b458;
  border-color: #c9b458;
}

.keyboard-letter.absent {
  background-color: #787c7e;
  border-color: #787c7e;
}

.keyboard-letter.correct {
  background-color: #6aaa64;
  border-color: #6aaa64;
}

@media screen and (min-width: 375px) {
  .keyboard-row {
    --bs-gutter-x: 0.4rem;
  }
}

@media screen and (min-width: 400px) {
  .keyboard {
    padding: 0 12px 4px;
  }
}

@media screen and (min-height: 650px) {
  .keyboard {
    padding-bottom: 20px;
  }
}

@media screen and (max-height: 580px) {
  .game-container {
    padding-bottom: 184px;
  }

  .keyboard-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #000;
  }

  .keyboard-container:before {
    content: '';
    position: absolute;
    top: -40px;
    height: 40px;
    pointer-events: none;
    left: 0;
    right: 0;
    background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
  }
}