body, html {
  margin: 0; padding: 0;
  background-color: #000;
  color: white;
  font-family: 'OpenDyslexic-Regular', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  width: 98vw;
  max-width: 700px;
  text-align: center;
  user-select: none;
}

h1 {
  margin-bottom: 0.2em;
}

#gameArea {
  position: relative;
  width: 95vw;
  height: 60vw;
  max-width: 700px;
  max-height: 420px;
  margin: 1em auto;
  background: #cceeff;
  border: 2px solid #333;
  cursor: crosshair;
  touch-action: manipulation;
  outline: none;
}

.target {
  position: absolute;
  width: 15vw;
  height: 22vw;
  max-width: 128px;
  max-height: 192px;
  user-select: none;
  transition: top 0.1s, left 0.1s;
}

#scoreBox {
  font-size: 1.5em;
  margin-bottom: 0.1em;
}

#timerBox {
  font-size: 1.3em;
  margin-bottom: 0.5em;
}

button {
  font-size: 1em;
  cursor: pointer;
  border-radius: 5px;
  border: none;
  background: #f90;
  color: black;
  padding: 5px 12px;
  transition: background-color 0.3s ease;
}

button:hover, button:focus {
  background: #fa0;
}

@media (max-width: 600px) {
  #gameArea {
    height: 60vw;
  }
  .target {
    width: 22vw;
    height: 32vw;
    max-width: none;
    max-height: none;
  }
}

/* Hit and Miss Visual Effects */
@keyframes pop {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.hit-effect, .miss-effect {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
}

.hit-effect {
  width: 80px; height: 80px;
  background: rgba(50, 255, 50, 0.5);
  border: 3px solid #0f0;
  animation: pop 0.4s forwards;
}

.miss-effect {
  width: 60px; height: 60px;
  background: rgba(255, 0, 40, 0.3);
  border: 3px solid #f00;
  animation: pop 0.4s forwards;
}

/* Leaderboard Styles */
.hidden {
  display: none;
}

#leaderboardContainer {
  margin-top: 1em;
}

table {
  width: 100%;
  border-collapse: collapse;
  color: black;
  background: white;
}

th, td {
  border: 1px solid #333;
  padding: 6px 8px;
  font-size: 0.9em;
}

thead th {
  background-color: #f90;
  color: black;
}

#restartBtn {
  margin-top: 1em;
  background: #06c;
  color: white;
}

#restartBtn:hover, #restartBtn:focus {
  background: #09f;
}

