* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #ffffff;
  color: #222;
  font-family: Arial, sans-serif;

  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 20px 10px;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 32px;
  letter-spacing: 6px;
  font-weight: 800;
}

header p {
  margin-top: 5px;
  color: #777;
  font-size: 14px;
}

/* BOARD */

#board {
  width: 300px;

  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;

  margin-bottom: 20px;
}

.tile {
  width: 56px;
  height: 56px;

  border: 2px solid #d3d6da;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 28px;
  font-weight: bold;
  text-transform: uppercase;

  transition: 0.15s;
}

.tile.filled {
  border-color: #878a8c;
}

/* COLORS */

.tile.correct {
  background: #6aaa64;
  border-color: #6aaa64;
  color: white;
}

.tile.present {
  background: #c9b458;
  border-color: #c9b458;
  color: white;
}

.tile.absent {
  background: #787c7e;
  border-color: #787c7e;
  color: white;
}

/* MESSAGE */

#message {
  height: 30px;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
}

/* KEYBOARD */

.keyboard {
  width: 100%;
  max-width: 420px;

  display: flex;
  flex-direction: column;
  gap: 6px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.key {
  height: 52px;
  min-width: 36px;

  border: none;
  border-radius: 4px;

  background: #d3d6da;

  font-size: 14px;
  font-weight: bold;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  user-select: none;
}

.key.wide {
  min-width: 58px;
}

.key.correct {
  background: #6aaa64;
  color: white;
}

.key.present {
  background: #c9b458;
  color: white;
}

.key.absent {
  background: #787c7e;
  color: white;
}

/* NEW GAME */

#newGame {
  margin-top: 20px;

  padding: 12px 25px;

  border: none;
  border-radius: 6px;

  background: #222;
  color: white;

  font-weight: bold;
  cursor: pointer;
}

#newGame:hover {
  background: #444;
}

/* MOBILE */

@media (max-width: 400px) {

  .tile {
    width: 52px;
    height: 52px;
  }

  #board {
    width: 280px;
  }

  .key {
    min-width: 31px;
    height: 48px;
  }

  .key.wide {
    min-width: 50px;
  }
}