.guessing-game-container {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.guessing-game-container h1, .guessing-game-container h2 {
  text-align: center;
}
.guessing-game-container .game-details {
  display: inline-block;
  text-align: left;
  margin-bottom: 2rem;
}
.guessing-game-container .new-guess {
  margin: 2rem auto;
  max-width: 400px;
}
.guessing-game-container .new-guess .field {
  margin-bottom: 1rem;
}
.guessing-game-container .new-guess .error-messages {
  color: #d32f2f;
  margin-bottom: 1rem;
}
.guessing-game-container .new-guess .error-messages ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}
.guessing-game-container .game-over {
  margin: 2rem auto;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 0.5rem;
  max-width: 400px;
}
.guessing-game-container .back-link {
  margin-top: 2rem;
}

.guess-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.guess-list .guess-item {
  border: 1px solid var(--muted-border-color);
  border-radius: 4px;
  width: 100%;
  max-width: 400px;
  list-style-type: none;
}
.guess-list .guess-result {
  display: flex;
  margin-top: 0.5rem;
  justify-content: center;
}
.guess-list .guess-result .letter {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  line-height: 2.5rem;
  text-align: center;
  margin-right: 0.25rem;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
}
.guess-list .guess-result .letter.correct {
  background-color: #6aaa64;
  color: white;
}
.guess-list .guess-result .letter.present {
  background-color: #c9b458;
  color: white;
}
.guess-list .guess-result .letter.absent {
  background-color: #787c7e;
  color: white;
}
.guess-list .guess-result .letter.empty {
  background-color: #d3d6da;
  border: 1px solid #c1c4c8;
}
.guess-list .guess-result .letter.special-char {
  background-color: white;
  border: 0;
}

.hide, .hidden {
  display: none;
}

.keyboard-container {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}

.keyboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  max-width: 700px;
  width: 100%;
}
.keyboard .keyboard-row {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
}
.keyboard .keyboard-key {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 3rem;
  border-radius: 4px;
  font-weight: bold;
  background-color: #d3d6da;
  color: #1a1a1b;
  cursor: pointer;
  user-select: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: inherit;
  text-transform: uppercase;
  /* High contrast mode */
}
.keyboard .keyboard-key:focus {
  outline: 2px solid #0070f3;
  outline-offset: 2px;
  z-index: 1;
}
.keyboard .keyboard-key:focus:not(:focus-visible) {
  outline: none;
}
.keyboard .keyboard-key:focus-visible {
  outline: 2px solid #0070f3;
  outline-offset: 2px;
}
@media (forced-colors: active) {
  .keyboard .keyboard-key {
    outline: 2px solid ButtonText;
  }
  .keyboard .keyboard-key:focus-visible {
    outline: 2px solid Highlight;
  }
}
.keyboard .keyboard-key.keyboard-key-letter-space {
  width: 4.5rem;
}
.keyboard .keyboard-key.keyboard-key-letter-del, .keyboard .keyboard-key.keyboard-key-letter-enter {
  width: 3.5rem;
}
.keyboard .keyboard-key.correct {
  background-color: #6aaa64;
  color: white;
}
.keyboard .keyboard-key.present {
  background-color: #c9b458;
  color: white;
}
.keyboard .keyboard-key.absent {
  background-color: #787c7e;
  color: white;
}
.keyboard .keyboard-key.unused {
  background-color: #d3d6da;
  color: #1a1a1b;
}

@media (max-width: 350px) {
  .keyboard {
    gap: 0.3rem;
  }
  .keyboard .keyboard-row {
    gap: 0.2rem;
  }
  .keyboard .keyboard-key {
    width: 1.75rem;
    height: 2.8rem;
    font-size: 0.75rem;
  }
  .keyboard .keyboard-key.keyboard-key-letter-space {
    width: 3.2rem;
  }
  .keyboard .keyboard-key.keyboard-key-letter-del, .keyboard .keyboard-key.keyboard-key-letter-enter {
    width: 2.6rem;
    font-size: 0.65rem;
  }
  .guess-list .guess-result .letter {
    width: 2.2rem;
    height: 2.2rem;
    line-height: 2.2rem;
    margin-right: 0.2rem;
    font-size: 0.9rem;
  }
}
.guessing-games {
  overflow-x: auto;
}

.themes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.themes .theme {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 0.5rem;
}
.themes .theme h2 {
  margin-top: 0;
}

.words {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.words .word {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 0.5rem;
}
.words .word h3 {
  margin-top: 0;
}
.words .word .completed {
  color: green;
}
.words .word .in-progress {
  color: orange;
  font-style: italic;
}
.words .word .not-played {
  color: gray;
  font-style: italic;
}
.words .word .play-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background-color: #0070f3;
  color: white;
  border-radius: 0.25rem;
  text-decoration: none;
}
.words .word .play-button:hover {
  background-color: #0051a9;
}
