* {
  box-sizing: border-box;
}
body {
  height: 100vh;
  margin: 0;
  font-family: "Rubik Mono One", monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgb(28, 96, 118);
  color: aliceblue;
}
h1 {
  font-size: 4vmin;
  letter-spacing: 1vmin;
}
#how-to-play {
  padding: 0;
  font-size: 0.50rem;
  color: #333;
  margin: 20px 0;
  background-color: #f8fafc;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 500px;
  margin-top: 5px;
  padding: 20px;
  text-align: left;
}
#how-to-play li:first-child {
list-style-type: none;
font-weight: bold;
}
#spaceman {
  width: 504px;
  height: 687px;
  background-image: url("../imgs/spaceman-filmstrip.png");
  background-size: cover;
  background-position-x: 0;
  transform: scale(0.5);
  margin-top: -190px;
  justify-items: center;
  position: relative;
}
.game-board {
  position: fixed;
  width: 320%;
  max-width: 600%;
  height: 70vh;
  margin: 0;
  background-color: aliceblue;
  padding: 5em 3em;
  transform: translate(-50%, -50%);
  top: 100%;
  left: 70%;
  text-align: center;
  justify-content: center;
  border-radius: 1em;
  color: black;
  margin-top: 350px;
}

.word-display {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  gap: 10px;
  margin-top: 50px;
}
.word-display .letter {
  width: 28px;
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.word-display .letter.guessed {
  border-color: transparent;
  margin-bottom: 5px;
}

h3,
h4 {
  font-size: 3vmin;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
#play-again {
  margin-top: 30px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 1.2rem;
  background-color: rgb(13, 108, 139);
  color: aliceblue;
  border: none;
  padding: 10px 20px;
  border-radius: 7px;
  font-weight: bold;
}
#play-again:hover {
  background-color: rgb(23, 154, 168);
}

.letter-btn {
  padding: 10px 15px;
  margin: 5px;
  font-size: 1.5em;
  font-weight: bold;
  border: none;
  background-color: rgb(13, 108, 139);
  color: white;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.letter-btn:hover:not(.disabled) {
  background-color: rgb(23, 154, 168);
}

.letter-btn:disabled {
  background-color: grey;
  cursor: not-allowed;
}

.letter-btn.correct {
  background-color: green;
}

.letter-btn.wrong {
  background-color: rgb(180, 25, 25);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  max-width: 300px;
  width: 90%;
}

.hidden {
  display: none;
}

#modal-ok-btn {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  font-weight: bold;
  border: none;
  border-radius: 0.5rem;
  background-color: #eee;
  cursor: pointer;
}
