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

body {
  overflow: hidden;
  background: #000;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #fff;
}

canvas {
  display: block;
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 10;
}

#score {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 28px;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition: opacity 0.3s;
}

#score.visible {
  opacity: 1;
}

#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 20;
  transition: opacity 0.4s;
}

#overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#overlay-content {
  text-align: center;
}

#overlay-title {
  font-size: 48px;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(255, 100, 0, 0.6);
}

#overlay-sub {
  font-size: 20px;
  margin-bottom: 6px;
  color: #ccc;
}

.controls {
  font-size: 14px;
  color: #888;
  margin-bottom: 24px;
}

#start-btn {
  padding: 14px 48px;
  font-size: 22px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #e85d04, #dc2f02);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(232, 93, 4, 0.4);
}

#start-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(232, 93, 4, 0.6);
}

/* Virtual joystick */
#joystick-base {
  position: fixed;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#joystick-base.visible {
  display: flex;
}

#joystick-knob {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
}
