html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #6CB1E8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #222;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(20,30,60,0.7), rgba(40,80,140,0.7));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10;
  transition: opacity 0.6s ease;
}

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

.splash-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px 32px;
  max-width: 420px;
  margin: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.splash-card h1 {
  margin: 0 0 12px;
  font-size: 26px;
}

.splash-card p {
  font-size: 15px;
  line-height: 1.4;
  margin: 0 0 14px;
  color: #444;
}

.splash-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}

.splash-actions button {
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s, color 0.2s;
}

#startBtn {
  background: #2266CC;
  color: white;
}
#startBtn:hover { background: #1A55B5; }

#skipBtn.ghost {
  background: transparent;
  color: #2266CC;
  border: 1.5px solid #2266CC;
}
#skipBtn.ghost:hover { background: rgba(34, 102, 204, 0.08); }

.splash-actions button:active { transform: scale(0.97); }

.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.5s ease;
}

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

.topbar {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.btn {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.85);
  color: #222;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  backdrop-filter: blur(4px);
}

.btn:hover { background: rgba(255,255,255,1); }
.btn:active { transform: scale(0.97); }

/* Reserve enough width that Pause/Resume swap doesn't shift the row. */
#pauseBtn { min-width: 96px; text-align: center; }

.joystick {
  position: absolute;
  bottom: 32px;
  width: 130px;
  height: 130px;
  pointer-events: auto;
  touch-action: none;
}

#joyOrbit  { left: 24px; }
#joyOffset { right: 24px; }

.joystick-bg {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  backdrop-filter: blur(6px);
}

.joystick-knob {
  position: absolute;
  width: 56px;
  height: 56px;
  left: 50%;
  top: 50%;
  margin-left: -28px;
  margin-top: -28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  transition: transform 0.08s ease-out;
}

.joystick-label {
  position: absolute;
  bottom: -22px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  font-weight: 500;
}
