*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a1520;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  font-family: monospace;
}
#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
#ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
#menuScreen, #gameoverScreen {
  pointer-events: auto;
  text-align: center;
  color: #ffffff;
  padding: 24px;
}
#gameTitle {
  font-size: clamp(28px, 8vw, 56px);
  color: #4aefff;
  text-shadow: 0 0 20px #4aefff;
  margin-bottom: 8px;
}
#gameSubtitle {
  font-size: clamp(12px, 3vw, 16px);
  color: #88bbcc;
  margin-bottom: 24px;
}
#instructions p {
  font-size: clamp(11px, 2.5vw, 14px);
  color: #aacccc;
  margin: 6px 0;
}
#startBtn, #restartBtn {
  pointer-events: auto;
  display: inline-block;
  margin-top: 24px;
  padding: 16px 40px;
  min-width: 180px;
  min-height: 56px;
  font-size: clamp(16px, 3vw, 20px);
  font-family: monospace;
  font-weight: bold;
  color: #ffffff;
  background: linear-gradient(to bottom, #2a7a9a, #1a4a6a);
  border: 2px solid #4aefff;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#startBtn:active, #restartBtn:active {
  background: linear-gradient(to bottom, #3a9abb, #2a6a8a);
}
#gameoverTitle {
  font-size: clamp(24px, 7vw, 48px);
  color: #ff6666;
  text-shadow: 0 0 15px #cc4444;
  margin-bottom: 16px;
}
#finalScore, #finalLevel {
  font-size: clamp(14px, 4vw, 22px);
  color: #ffffff;
  margin: 8px 0;
}
#hud {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
#hud span {
  font-size: clamp(12px, 2.5vw, 16px);
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 1px 3px #000000;
}
#hudCombo {
  color: #ffdd44;
}