* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: radial-gradient(ellipse at top, #2a1e5c 0%, #120b2e 70%);
  font-family: "Trebuchet MS", "Comic Sans MS", sans-serif;
  touch-action: none; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; overscroll-behavior: none;
}
#game-wrap {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
#game {
  display: block; max-width: 100%; max-height: 100%;
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(255, 170, 240, .35), 0 0 120px rgba(120, 90, 255, .25);
  cursor: pointer;
}
body.touch #game { border-radius: 0; box-shadow: none; }

/* ---------- Controles de toque ---------- */
#touch-controls { position: absolute; inset: 0; display: none; pointer-events: none; }
body.touch.playing #touch-controls { display: block; }
#touch-controls .tc-group {
  position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; gap: 22px; pointer-events: auto;
}
#touch-controls .tc-right { align-items: flex-end; }
#touch-controls .tc-right .tc-shoot { margin-bottom: 40px; }
#touch-controls .tc-left { left: calc(14px + env(safe-area-inset-left)); }
#touch-controls .tc-right { right: calc(14px + env(safe-area-inset-right)); }
.tc-btn {
  width: 84px; height: 84px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7);
  background: rgba(255, 120, 200, .45); color: #fff; font-size: 34px; line-height: 1;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px); touch-action: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.tc-btn:active, .tc-btn.pressed { background: rgba(255, 200, 80, .75); transform: scale(.94); }
.tc-jump { background: rgba(120, 200, 255, .55); width: 96px; height: 96px; }
.tc-shoot { background: rgba(255, 220, 90, .6); }
@media (max-height: 420px) { .tc-btn { width: 68px; height: 68px; font-size: 28px; } .tc-jump { width: 78px; height: 78px; } }

/* ---------- Aviso para virar o celular ---------- */
#rotate-hint {
  position: fixed; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at top, #2a1e5c 0%, #120b2e 70%); color: #fff; text-align: center; z-index: 10;
  font-size: 22px; padding: 30px;
}
#rotate-hint .phone { font-size: 90px; animation: rot 1.6s ease-in-out infinite alternate; }
@keyframes rot { from { transform: rotate(0deg); } to { transform: rotate(90deg); } }
@media (orientation: portrait) and (max-width: 900px) { body.touch #rotate-hint { display: flex; } }

/* ---------- Instruções de instalação ---------- */
#rotate-hint .rotate-install { font-size: 15px; opacity: .85; max-width: 340px; margin-top: 18px; line-height: 1.4; }
#install-hint {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 4, 30, .78); padding: 16px;
}
#install-hint[hidden] { display: none; }
.install-card {
  position: relative; background: linear-gradient(160deg, #3a2a7a, #1c1244); color: #fff; border-radius: 22px;
  padding: 22px 24px 18px; max-width: 460px; width: 100%; max-height: 92vh; overflow-y: auto;
  border: 3px solid rgba(255,255,255,.35); box-shadow: 0 10px 40px rgba(0,0,0,.5); text-align: left; font-size: 16px; line-height: 1.45;
}
.install-card h2 { font-size: 22px; margin: 6px 0 8px; color: #ffe74d; text-align: center; }
.install-card .install-icon { font-size: 40px; text-align: center; }
.install-card ol { margin: 10px 0 6px 22px; }
.install-card li { margin: 8px 0; }
.install-card .ico { display: inline-block; background: #fff; color: #1c7cf5; border-radius: 5px; padding: 0 5px; font-size: 14px; }
.install-card .install-outro { font-size: 14px; opacity: .85; margin-top: 12px; }
.install-close {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.18); color: #fff; font-size: 18px; cursor: pointer;
}
.install-now {
  display: block; width: 100%; margin: 12px 0 4px; padding: 14px; border: 0; border-radius: 16px;
  background: #6ee76e; color: #143; font-size: 20px; font-weight: bold; cursor: pointer;
}
