* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #121213;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 500px;
  width: 100%;
}

header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 1px solid #3a3a3c;
  padding-bottom: 20px;
}

h1 {
  font-size: 36px;
  font-weight: bold;
  letter-spacing: 0.2em;
  margin-bottom: 10px;
}

#date {
  color: #818384;
  font-size: 14px;
}

#game-board {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 5px;
  margin-bottom: 30px;
}

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

.tile {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid #3a3a3c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.tile.filled {
  border-color: #565758;
  animation: pop 0.1s ease-in-out;
}

.tile.correct {
  background-color: #538d4e;
  border-color: #538d4e;
  animation: flip 0.5s ease-in-out;
}

.tile.present {
  background-color: #b59f3b;
  border-color: #b59f3b;
  animation: flip 0.5s ease-in-out;
}

.tile.absent {
  background-color: #3a3a3c;
  border-color: #3a3a3c;
  animation: flip 0.5s ease-in-out;
}

@keyframes pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes flip {
  0% { transform: rotateX(0); }
  50% { transform: rotateX(90deg); }
  100% { transform: rotateX(0); }
}

#keyboard {
  display: grid;
  grid-gap: 5px;
  margin-bottom: 20px;
}

.keyboard-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.key {
  background-color: #818384;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 15px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  min-width: 43px;
  transition: all 0.1s ease;
}

.key:hover {
  background-color: #565758;
}

.key:active {
  transform: scale(0.95);
}

.key.wide {
  min-width: 65px;
  font-size: 12px;
}

.key.correct {
  background-color: #538d4e;
}

.key.present {
  background-color: #b59f3b;
}

.key.absent {
  background-color: #3a3a3c;
}

#message {
  text-align: center;
  padding: 15px;
  background-color: #3a3a3c;
  border-radius: 4px;
  margin-top: 20px;
  font-weight: bold;
}

#message.hidden {
  display: none;
}

#message.win {
  background-color: #538d4e;
}

#message.lose {
  background-color: #b59f3b;
}

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }
  
  .tile {
    font-size: 24px;
  }
  
  .key {
    padding: 12px;
    font-size: 12px;
    min-width: 35px;
  }
  
  .key.wide {
    min-width: 55px;
  }
}
