/* Only the page around the canvas is styled with CSS.
   Everything you see *inside* the game is drawn by game.js. */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  overscroll-behavior: none;

  background: #1b2430;
  color: #e8eef5;
  font-family: "Trebuchet MS", Arial, sans-serif;

  /* Stops text getting selected when you click fast to flap. */
  user-select: none;
  -webkit-user-select: none;
}

header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.title {
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.85;
}

.credit {
  margin: 3px 0 0;
  font-size: 11px;
  letter-spacing: 1px;
  opacity: 0.5;
}

button {
  font: inherit;
  font-size: 13px;
  padding: 5px 13px;
  color: #e8eef5;
  background: #24313f;
  border: 1px solid #3a4a5e;
  border-radius: 999px;
  cursor: pointer;
}

button:hover {
  background: #2e3d4e;
}

/* line-height: 0 removes the small gap under inline elements,
   so the canvas sits flush inside <main>. */
main {
  line-height: 0;
}

canvas {
  display: block;
  border-radius: 12px;
  background: #4ec0ea;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);

  /* The critical line for phones: stops the page from scrolling or
     zooming when the player taps to flap. */
  touch-action: none;
}

.hint {
  margin: 0;
  font-size: 12px;
  opacity: 0.55;
  text-align: center;
}

.hint kbd {
  padding: 1px 5px;
  font: inherit;
  font-size: 11px;
  background: #24313f;
  border: 1px solid #3a4a5e;
  border-radius: 4px;
}