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

body {
  background: #000;
  color: #fff;
  font-family: monospace;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.game-active {
  cursor: none;
}

#menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

#menu h1 {
  font-size: 2rem;
  font-weight: normal;
}

#startBtn {
  background: none;
  border: 1px solid #fff;
  color: #fff;
  font-family: monospace;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#startBtn:hover {
  background: #fff;
  color: #000;
}

#countdown {
  display: none;
  font-size: 4rem;
  font-weight: normal;
}

#timer {
  display: none;
}

#result {
  display: none;
  font-size: 1.5rem;
  text-align: center;
}

#result.show {
  display: block;
}

#leaderboard {
  margin-top: 2rem;
  width: 100%;
  max-width: 500px;
}

#leaderboard h2 {
  font-size: 1.5rem;
  font-weight: normal;
  margin-bottom: 1rem;
  text-align: center;
}

#leaderboard-list {
  border: 1px solid #fff;
  padding: 1rem;
  min-height: 200px;
  max-height: 300px;
  overflow-y: auto;
}

.leaderboard-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 1px solid #333;
}

.leaderboard-entry:last-child {
  border-bottom: none;
}

.leaderboard-entry.highlight {
  background: #222;
  animation: highlightFade 2s ease-out;
}

@keyframes highlightFade {
  0% {
    background: #444;
  }
  100% {
    background: #222;
  }
}

.leaderboard-rank {
  font-weight: bold;
  margin-right: 1rem;
  min-width: 2rem;
}

.leaderboard-time {
  flex: 1;
  text-align: left;
}

.leaderboard-date {
  font-size: 0.8rem;
  color: #888;
}

.leaderboard-empty {
  text-align: center;
  color: #666;
  padding: 2rem;
}
