/* Gradient Defense — self-contained neon space-shooter panel, always dark */
.gd-wrap {
  --gd-bg: #05080d;
  --gd-neon: #22d3ee;
  --gd-blue: #3b82f6;
  --gd-green: #00ff9c;
  --gd-red: #ff3b5c;
  --gd-text: #cbe9f2;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: var(--gd-bg);
  border: 1px solid #12303f;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(34,211,238,0.08);
  font-family: "Courier New", ui-monospace, monospace;
  color: var(--gd-text);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.gd-wrap * { box-sizing: border-box; }
.gd-hud {
  width: 100%;
  max-width: 400px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.gd-hud .gd-val { color: var(--gd-neon); text-shadow: 0 0 6px var(--gd-neon); }
.gd-hud .gd-stats { display: flex; flex-direction: column; gap: 2px; line-height: 1.5; }
.gd-hud .gd-right { text-align: right; }
.gd-stage {
  position: relative;
  width: min(88vw, 400px);
  aspect-ratio: 400 / 520;
}
.gd-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #070b12;
  border: 1px solid #12303f;
  border-radius: 8px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.7);
  touch-action: none;
}
.gd-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  background: rgba(5,8,13,0.86);
  backdrop-filter: blur(2px);
  border-radius: 8px;
  padding: 16px;
  overflow-y: auto;
}
.gd-overlay.gd-hidden { display: none; }
.gd-overlay h1 {
  font-size: clamp(22px, 6vw, 32px);
  color: var(--gd-neon);
  text-shadow: 0 0 12px var(--gd-neon);
  letter-spacing: 2px;
  margin: 0;
}
.gd-overlay p { font-size: 13px; max-width: 280px; line-height: 1.45; color: #9fd2e0; margin: 0; }
.gd-overlay .gd-big { color: var(--gd-green); font-size: 17px; text-shadow: 0 0 8px var(--gd-green); }
.gd-btn {
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gd-bg);
  background: var(--gd-neon);
  border: none;
  border-radius: 4px;
  padding: 11px 24px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(34,211,238,0.5);
  transition: transform 0.08s ease;
}
.gd-btn:active { transform: scale(0.96); }
.gd-hint { font-size: 11px; color: #4f7768; text-align: center; line-height: 1.6; }
.gd-touch {
  display: none;
  width: 100%;
  max-width: 400px;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.gd-touch .gd-pad { display: flex; gap: 8px; }
.gd-touch button {
  height: 54px;
  min-width: 54px;
  background: rgba(34,211,238,0.12);
  color: var(--gd-neon);
  border: 1px solid #1c4a5a;
  font-size: 20px;
  border-radius: 10px;
  cursor: pointer;
}
.gd-touch button:active { background: rgba(34,211,238,0.3); }
.gd-touch .gd-fire {
  padding: 0 22px;
  font-size: 15px;
  letter-spacing: 1px;
  background: rgba(0,255,156,0.14);
  color: var(--gd-green);
  border-color: #1c5a44;
}
.gd-touch .gd-fire:active { background: rgba(0,255,156,0.3); }
@media (pointer: coarse) {
  .gd-touch { display: flex; }
  .gd-hint { display: none; }
}
