/* Reset + base */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: #0b0d10;
  color: #e7ecf2;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

#app {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 12px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.app-title {
  margin: 0;
  font-family: monospace;
  font-size: 22px;
  color: #b5c4d3;
  letter-spacing: 1px;
}

#game-container {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 960 / 576;   /* keep shape as it scales down on phones */
  height: auto;
  background: #000;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
}

#game-container canvas {
  display: block;
}

.footer-hint {
  margin: 4px 0 0;
  font-size: 13px;
  color: #7a8898;
  font-family: monospace;
  text-align: center;
}

/* ── Phones / touch: full-bleed game ── */
@media (pointer: coarse), (max-width: 820px) {
  /* Lock the page so dragging on the canvas doesn't scroll/bounce the page. */
  html, body {
    overflow: hidden;
    height: 100%;
    position: fixed;
    width: 100%;
    overscroll-behavior: none;
    touch-action: none;
  }
  #app {
    padding: 0;
    gap: 0;
    max-width: none;
    width: 100vw;
    height: 100vh;
    height: 100dvh;          /* exclude mobile browser chrome where supported */
    justify-content: center;
  }
  .app-title { display: none; }   /* reclaim every pixel for the game */
  .footer-hint { display: none; } /* keyboard hint irrelevant on touch */
  #game-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    aspect-ratio: auto;       /* Phaser RESIZE fills the whole box, no letterbox */
    border-radius: 0;
    box-shadow: none;
  }
  #game-container canvas { touch-action: none; display: block; }
}
