* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 120%, #1b2a6b 0%, #0b1026 60%, #05060f 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Prevent the browser from intercepting taps as scroll/zoom gestures */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

#game {
  display: block;
  width: 100vw;
  height: 100dvh;
  touch-action: none;
}

#score {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0;
  right: 0;
  margin-top: 18px;
  text-align: center;
  color: #ffffff;
  font-size: clamp(28px, 8vw, 48px);
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

#fs-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: calc(env(safe-area-inset-right, 0px) + 14px);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 10;
}

#fs-btn:active {
  background: rgba(255, 255, 255, 0.25);
}

/* Hide the button once we're actually fullscreen. */
body.is-fullscreen #fs-btn {
  display: none;
}
