/* ============================
   General Layout and Styling
   ============================ */

body {
  margin: 0;
  padding: 0;
  background-color: #222; /* Dark gray background */
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: monospace;
  color: white;
}

/* ============================
   Start Screen
   ============================ */

#start-screen {
  text-align: center;
  color: white;
}

#start-btn {
  margin-top: 20px;
}

/* ============================
   Game Container & Layout
   ============================ */

#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

/* ============================
   Score Display
   ============================ */

#score {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

/* ============================
   Game Canvas
   ============================ */

canvas {
  background-color: #111;
  border: 2px solid lime;
}

/* ============================
   Buttons
   ============================ */

button,
#start-btn,
#restart-btn,
#game-over-screen button {
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #33ff33;
  color: black;
}

/* ============================
   Game Over Screen
   ============================ */

#game-over-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background-color: #111;
  padding: 20px;
  border: 2px solid lime;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  border-radius: 10px;
  box-shadow: 0 0 20px lime;
}

/* ============================
   Flash Effect on Game Over
   ============================ */

.flash {
  animation: flashOut 0.4s ease forwards;
}

@keyframes flashOut {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}
