body {
  font-family: "Press Start 2P", cursive;
  background-color: #1a1a1a;
  color: #ffffff;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  height: 100dvh; /* Use dynamic viewport height for mobile */
  margin: 0;
  padding: 0;
  touch-action: none; /* Prevent scrolling on mobile */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  body {
    padding: 10px;
    min-height: 100vh;
    min-height: 100dvh;
  }
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
}

/* Mobile responsive game container */
@media (max-width: 768px) {
  .game-container {
    gap: 1rem;
    padding: 0 5px;
    width: 100%;
  }
}

canvas {
  background-color: var(--canvas-bg, #000000);
  border: 4px solid var(--border-color, #ffffff);
  cursor: none;
  box-shadow: 0 0 20px var(--glow-color, #00ff00),
    0 0 40px var(--glow-color, #00ff00);
  transition: all 0.3s ease;
  border-radius: 8px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Mobile responsive canvas */
@media (max-width: 768px) {
  canvas {
    border: 2px solid var(--border-color, #ffffff);
    border-radius: 4px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 120px);
    max-height: calc(100dvh - 120px);
  }
}

.score-board {
  display: flex;
  justify-content: space-around;
  width: 100%;
  font-size: 2.5rem;
  color: var(--score-color, #00ff00);
  text-shadow: 0 0 10px var(--glow-color, #00ff00);
}

/* Mobile responsive score board */
@media (max-width: 768px) {
  .score-board {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }
}

.message-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.8);
  padding: 2rem 3rem;
  border-radius: 10px;
  border: 2px solid var(--glow-color, #00ff00);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  z-index: 10;
}

.message-box h2 {
  font-size: 2rem;
  margin: 0;
}

.message-box button {
  font-family: "Press Start 2P", cursive;
  background-color: var(--glow-color, #00ff00);
  color: #000000;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px var(--glow-color, #00ff00);
}

.message-box button:hover {
  background-color: #ffffff;
  color: #000000;
  box-shadow: 0 0 20px #ffffff;
}

.instructions-container {
  text-align: center;
  margin-top: 1rem;
}

.instructions {
  font-size: 0.8rem;
  color: #cccccc;
  margin: 0.5rem 0;
}

.pause-instruction {
  font-size: 0.75rem;
  color: #999999;
}

/* Mobile responsive instructions */
@media (max-width: 768px) {
  .instructions-container {
    margin-top: 0.5rem;
  }

  .instructions {
    font-size: 0.6rem;
    margin: 0.3rem 0;
  }

  .pause-instruction {
    font-size: 0.55rem;
  }
}

kbd {
  background-color: #333333;
  border: 1px solid #555555;
  border-radius: 3px;
  padding: 2px 6px;
  font-family: "Press Start 2P", monospace;
  font-size: 0.7rem;
  color: var(--glow-color, #00ff00);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  text-shadow: 0 0 5px var(--glow-color, #00ff00);
}
