body {
  background-color: #111;
  color: white;
  text-align: center;
  font-family: monospace;
}

h1 {
  margin: 30px 0;
  color: lime;
}

.game-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

#game-board {
  width: 400px;
  height: 400px;
  background-color: #222;
  position: relative;
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  grid-template-rows: repeat(20, 1fr);
  border: 2px solid limegreen;
  box-shadow: 0 0 20px #0f0;
}

/* Grid lines */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* Bottom layout: left = start btn, right = arrows */
.bottom-controls {
  margin-top: 20px;
  width: 400px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-weight: 600;
}

/* Start Button */
#start-button {
  
  padding: 10px 20px;
  font-size: 16px;
  background-color: limegreen;
  color: black;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 0 10px limegreen;
}

#start-button:hover {
  background-color: #00cc00;
  box-shadow: 0 0 15px #00ff00;
}

/* Arrow Keypad */
.arrow-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.arrow-pad > div {
  display: flex;
  gap: 10px;
}

.arrow {
  width: 40px;
  height: 40px;
  font-size: 20px;
  background-color: #333;
  color: white;
  border: 2px solid limegreen;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.arrow:hover {
  background-color: limegreen;
  color: black;
  box-shadow: 0 0 8px #00ff00;
}

#score-display {
  margin-top: 10px;
  font-size: 18px;
  color: white;
}

.snake {
  background-color: limegreen;
  border-radius: 30%;
}

.snake-head {
  position: relative;
  background-color: limegreen;
  border: 1px solid #0f0;
  border-radius: 30%;
}

.snake-head::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 6px;
  height: 2px;
  background-color: red;
  transform: translateY(-50%);
}

.food {
  background-color: yellow;
  border-radius: 50%;
}

#game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 30px;
  border-radius: 10px;
  border: 2px solid red;
}

#game-over.hidden {
  display: none;
}

#game-over button {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: red;
  color: white;
  border: none;
  cursor: pointer;
}
