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

body {
  background: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Press Start 2P', monospace;
  overflow: hidden;
}

#game-container {
  position: relative;
  width: 800px;
  height: 600px;
  border: 6px solid #4a4a6a;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

#gameCanvas {
  display: block;
  background: #2d5016;
  image-rendering: pixelated;
}

#ui {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 12px;
  pointer-events: none;
  z-index: 10;
  border-bottom: 2px solid #4a4a6a;
}

#hud {
  display: flex;
  gap: 24px;
}

#score-board {
  color: #ffd700;
}

#high-score {
  color: #aaa;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.82);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  z-index: 20;
  text-align: center;
  padding: 20px;
}

.overlay.hidden {
  display: none;
}

.overlay h1 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #ffd700;
  text-shadow: 3px 3px 0 #b8860b;
}

.overlay p {
  font-size: 12px;
  margin-bottom: 16px;
  line-height: 1.6;
  color: #ddd;
}

.animal-list {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.animal-list div {
  font-size: 12px;
  color: #90ee90;
}

.controls {
  color: #aaa;
  margin: 12px 0;
}

button {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  padding: 14px 32px;
  margin-top: 16px;
  background: #228b22;
  color: #fff;
  border: 4px solid #196619;
  cursor: pointer;
  transition: transform 0.1s;
}

button:hover {
  transform: scale(1.05);
  background: #2eb82e;
}

button:active {
  transform: scale(0.97);
}

#new-high {
  color: #ffd700;
  animation: flash 1s infinite;
}

@keyframes flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

#leaderboard {
  margin: 12px 0;
  font-size: 10px;
  color: #ccc;
  max-height: 120px;
  overflow-y: auto;
}

#leaderboard div {
  margin: 4px 0;
}
