/* ── Open button ── */
#starship-open-btn {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99990;
  background: linear-gradient(135deg, #1a1a4e, #2a2aff);
  color: #fff;
  border: 2px solid #4488ff;
  border-radius: 30px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 18px #2a2aff88, 0 4px 20px rgba(0,0,0,0.5);
  letter-spacing: 1px;
  transition: transform 0.15s, box-shadow 0.15s;
}
#starship-open-btn:hover {
  transform: translateX(-50%) scale(1.06);
  box-shadow: 0 0 28px #4488ffcc, 0 6px 24px rgba(0,0,0,0.6);
}

/* ── Modal overlay ── */
#starship-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.80);
  align-items: center;
  justify-content: center;
}
#starship-modal.active {
  display: flex;
}

/* ── Modal inner ── */
#starship-modal-inner {
  position: relative;
  background: #0a0a1a;
  border: 2px solid #2a2aff;
  border-radius: 14px;
  box-shadow: 0 0 40px #2a2affaa;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 95vw;
}

/* ── Close button ── */
#starship-close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}
#starship-close-btn:hover { color: #fff; }

/* ── Canvas ── */
#starship-canvas {
  display: block;
  border-radius: 8px;
  max-width: 100%;
  outline: none;
}

/* ── On-screen controls ── */
#starship-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  user-select: none;
  -webkit-user-select: none;
}

.ctrl-row {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.ctrl-row-special {
  margin-top: 4px;
}

.ctrl-btn {
  width: 52px;
  height: 52px;
  background: linear-gradient(160deg, #1a1a4e, #111130);
  border: 2px solid #4488ff;
  border-radius: 10px;
  color: #aaccff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, box-shadow 0.1s, transform 0.1s;
  touch-action: none;
  box-shadow: 0 2px 10px rgba(68,136,255,0.2);
}

.ctrl-btn:active,
.ctrl-btn.pressed {
  background: linear-gradient(160deg, #2a2aff, #1a1a9e);
  box-shadow: 0 0 14px #4488ffcc;
  transform: scale(0.93);
}

.ctrl-wide {
  width: 110px;
  height: 52px;
  font-size: 14px;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #112211, #115511);
  border-color: #44ff88;
  color: #88ffbb;
  box-shadow: 0 2px 10px rgba(68,255,136,0.2);
}
.ctrl-wide:active { background: linear-gradient(135deg, #22aa44, #116622); box-shadow: 0 0 14px #44ff88cc; }

.ctrl-shoot {
  width: 80px;
  font-size: 13px;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #221122, #550011);
  border-color: #ff4444;
  color: #ffaaaa;
  box-shadow: 0 2px 10px rgba(255,68,68,0.2);
}
.ctrl-shoot:active { background: linear-gradient(135deg, #aa2222, #660011); box-shadow: 0 0 14px #ff4444cc; }

/* ── Responsive ── */
@media (max-width: 760px) {
  #starship-canvas { width: 100%; height: auto; }
  .ctrl-btn { width: 46px; height: 46px; font-size: 17px; }
  .ctrl-wide { width: 96px; }
  .ctrl-shoot { width: 70px; }
}
