/* Hop & Run — Phaser canvas (Scale.FIT) centered over a matching gradient so
   the letterbox looks intentional. */

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #7ec8f7 0%, #f7b26b 100%);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#game {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

canvas {
  display: block;
}

/* "Rotate your device" hint: small touch screens in portrait only. */
#rotate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  background: linear-gradient(180deg, #7ec8f7 0%, #f7b26b 100%);
  color: #23324a;
  text-align: center;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
}

#rotate .rotate-icon {
  font-size: 64px;
  animation: spin 2.4s ease-in-out infinite;
}

#rotate p span {
  font-weight: 400;
  color: #3d5474;
  font-size: 16px;
}

@keyframes spin {
  0%, 60%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(90deg); }
}

@media (orientation: portrait) and (pointer: coarse) and (max-width: 820px) {
  #rotate {
    display: flex;
  }
}
