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

body {
  background-color: #1a1a2e;
  color: #eaeaea;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

h1 {
  font-size: 2rem;
  color: #4ecca3;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.scoreboard {
  display: flex;
  gap: 40px;
  font-size: 1.1rem;
}

.score-item span {
  font-weight: bold;
  color: #4ecca3;
  font-size: 1.3rem;
}

#gameCanvas {
  border: 3px solid #4ecca3;
  border-radius: 4px;
  background-color: #0f3460;
  box-shadow: 0 0 20px rgba(78, 204, 163, 0.3);
  display: block;
}

.hint {
  font-size: 0.85rem;
  color: #888;
  letter-spacing: 1px;
}

/* 开始界面覆盖层 */
#startScreen,
#pauseScreen,
#gameOverScreen {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(15, 52, 96, 0.92);
  border-radius: 4px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  text-align: center;
}

#startScreen.active,
#pauseScreen.active,
#gameOverScreen.active {
  display: flex;
}

.overlay-title {
  font-size: 2rem;
  color: #4ecca3;
  font-weight: bold;
}

.overlay-sub {
  font-size: 1rem;
  color: #aaa;
}

.overlay-score {
  font-size: 1.1rem;
  color: #eaeaea;
}

.overlay-score strong {
  color: #4ecca3;
}

.btn {
  margin-top: 8px;
  padding: 12px 32px;
  background-color: #4ecca3;
  color: #1a1a2e;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
  background-color: #38b492;
  transform: scale(1.05);
}

.canvas-wrapper {
  position: relative;
}

