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

body {
  background: #0C0D14;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
  color: #e0e0e0;
}

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

#score-display {
  font-size: 24px;
  font-weight: 600;
  color: #a0f0a0;
  letter-spacing: 2px;
  text-transform: uppercase;
}

#score {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

canvas {
  border: 2px solid #2a2d3a;
  border-radius: 4px;
  display: block;
  max-width: 90vw;
  max-height: 75vh;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(12, 13, 20, 0.85);
  z-index: 10;
  transition: opacity 0.3s ease;
}

#overlay.hidden {
  display: none;
}

#overlay-box {
  text-align: center;
  padding: 40px 60px;
  background: #161822;
  border: 2px solid #2a2d3a;
  border-radius: 12px;
}

#overlay-box h1 {
  font-size: 42px;
  margin-bottom: 16px;
  font-weight: 700;
}

#screen-start h1 {
  color: #4ade80;
}

#screen-paused h1 {
  color: #facc15;
}

#screen-gameover h1 {
  color: #ff5555;
}

#overlay-box p {
  font-size: 22px;
  margin-bottom: 10px;
  color: #cccccc;
}

#final-score {
  color: #ffffff;
  font-weight: 700;
}

.controls-hint {
  font-size: 18px !important;
  color: #999 !important;
  margin-bottom: 16px !important;
}

.action-hint {
  font-size: 16px !important;
  color: #777 !important;
  margin-top: 12px !important;
  animation: pulse 2s infinite;
}

.touch-hint {
  display: none;
  font-size: 14px !important;
  color: #555 !important;
  margin-top: 8px !important;
}

.hidden {
  display: none !important;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@media (max-width: 600px) {
  #score-display {
    font-size: 18px;
  }

  #overlay-box {
    padding: 24px 32px;
  }

  #overlay-box h1 {
    font-size: 30px;
  }

  #overlay-box p {
    font-size: 18px;
  }

  .touch-hint {
    display: block;
  }
}
