:root { --neon: #36e0ff; --neon-2: #ff3df0; --gold: #ffd23b; --bg: #0a0520; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(124,92,255,0.18), transparent 60%),
    linear-gradient(180deg, #160a36 0%, #0a0520 60%, #04010c 100%);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #eaf6ff; -webkit-tap-highlight-color: transparent; user-select: none;
}
#board { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; }

#hud {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; gap: 24px; padding: 12px 20px; justify-content: center;
  z-index: 5; text-shadow: 0 0 12px rgba(54,224,255,0.7); pointer-events: none;
}
.stat { display: flex; flex-direction: column; line-height: 1.1; text-align: center; }
.stat .label { font-size: 10px; letter-spacing: 2px; opacity: 0.65; }
.stat span:last-child { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
#lives { color: var(--neon-2); text-shadow: 0 0 12px rgba(255,61,240,0.8); }

#overlay, #help {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20,6,50,0.5), rgba(2,0,8,0.9));
  backdrop-filter: blur(3px); z-index: 10; padding: 20px;
}
#overlay.show, #help.open { display: flex; }
.panel, .help-card {
  text-align: center; padding: 32px 34px; max-width: min(94vw, 560px);
  border: 1px solid rgba(54,224,255,0.35); border-radius: 18px;
  background: rgba(10,5,30,0.8); box-shadow: 0 0 60px rgba(54,224,255,0.22);
}
h1 {
  font-size: clamp(22px,5vw,38px); letter-spacing: 3px; font-weight: 900; white-space: nowrap;
  background: linear-gradient(90deg, var(--neon), var(--neon-2), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.16em;
  filter: drop-shadow(0 0 16px rgba(54,224,255,0.5));
}
.tag { margin-top: 10px; opacity: 0.7; font-size: 13px; letter-spacing: 1px; }
.how { margin: 22px 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; opacity: 0.9; }
kbd { display: inline-block; min-width: 20px; padding: 2px 6px; border: 1px solid rgba(54,224,255,0.5); border-radius: 5px; background: rgba(54,224,255,0.08); font-size: 12px; }
button#startBtn, #helpClose {
  margin-top: 6px; padding: 13px 44px; font-size: 16px; font-weight: 800; letter-spacing: 2px;
  color: #06121a; background: linear-gradient(90deg, var(--neon), var(--neon-2));
  border: none; border-radius: 40px; cursor: pointer; box-shadow: 0 0 26px rgba(54,224,255,0.5);
}
#overMsg { margin-top: 18px; font-size: 15px; line-height: 1.6; color: var(--gold); }
.hidden { display: none !important; }
.help-card { text-align: left; }
.help-card h3 { text-align: center; color: var(--neon); letter-spacing: 3px; margin-bottom: 14px; font-size: 15px; }
.help-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.help-list li { font-size: 13.5px; line-height: 1.5; opacity: 0.9; }
.help-list b { color: var(--neon); }

#homeLink {
  position: fixed; bottom: 12px; left: 16px; z-index: 7;
  font-size: 13px; letter-spacing: 1px; color: rgba(234,246,255,0.6); text-decoration: none;
  padding: 6px 12px; border: 1px solid rgba(54,224,255,0.3); border-radius: 20px; background: rgba(10,5,30,0.5);
}
#homeLink:hover { color: var(--neon); border-color: var(--neon); }
#helpBtn {
  position: fixed; bottom: 12px; right: 16px; z-index: 7;
  width: 40px; height: 40px; font-size: 20px; font-weight: 800;
  color: rgba(234,246,255,0.7); background: rgba(10,5,30,0.5);
  border: 1px solid rgba(54,224,255,0.3); border-radius: 50%; cursor: pointer;
}
#helpBtn:hover { color: var(--neon); border-color: var(--neon); }
