body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  background: #3E2723; /* marrom madeira escuro */
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

h1 {
  font-size: 3em;
  color: #FFB703; /* amarelo vibrante */
  text-shadow: 2px 2px 6px #000;
}

#gameArea {
  position: relative;
  width: 400px;
  height: 600px;
  background: #5D4037; /* marrom médio */
  border: 4px solid #FF8C42; /* laranja destaque */
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

#player {
  position: absolute;
  bottom: 10px;   
  left: 180px;   
  width: 60px;
  height: 60px;
  background-image: url("comecome.png"); /* pacman */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 0 4px #000); /* sombra para destacar o olho */
}

.food {
  position: absolute;
  top: 0;
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.food.burger { background-image: url("hamburguer.png"); }
.food.pizza { background-image: url("pizza.png"); }
.food.salada { background-image: url("salada.png"); }
.food.macarrao { background-image: url("macarrao.png"); }
.food.bomba { background-image: url("engrenagem.png"); }

.game-info {
  display: flex;
  justify-content: space-between;
  width: 400px;
  margin-top: 20px;
}

#score, #lives {
  font-size: 1.5em;
  font-weight: bold;
  color: #fff;
  padding: 8px 15px;
  background: #E63946; /* vermelho tomate */
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

#startButton {
  margin: 20px;
  padding: 15px 30px;
  font-size: 1.2em;
  font-weight: bold;
  color: #fff;
  background: #FF8C42; /* laranja vivo */
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
#startButton:hover {
  background: #E85D04; /* laranja queimado */
}

/* Novos estilos para a tela de Game Over */
#gameOverScreen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
  transition: opacity 0.5s ease;
}

#gameOverScreen.hidden {
  display: none;
}

#gameOverScreen h2 {
  font-size: 4em;
  color: #FFB703;
  text-shadow: 2px 2px 6px #000;
  margin-bottom: 10px;
}

#gameOverScreen p {
  font-size: 2em;
  color: #fff;
  margin-bottom: 30px;
}

#restartButton {
  padding: 15px 30px;
  font-size: 1.2em;
  font-weight: bold;
  color: #fff;
  background: #E63946;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

#restartButton:hover {
  background: #b82c37;
}