/* Page basics: colors (:root), the page, the game canvas container, the FPS counter.
   Linked from index.html in a fixed order (the order is the cascade). */

:root {
  --accent: #ffc94d;
  --accent-strong: #ffb11f;
  --text: #f2f5ff;
  --muted: #8d97b3;
  --panel: rgba(12, 15, 22, 0.82);
  --border: rgba(255, 255, 255, 0.08);
  /* How far the HUD stays from the screen's edges (more on big screens). */
  --edge: clamp(16px, 1.5vw, 32px);
}

/* Phones held sideways: every pixel counts. */
@media (pointer: coarse) and (max-height: 600px) {
  :root {
    --edge: 12px;
  }
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0b0d12;
  color: var(--text);
  font-family: system-ui, "Segoe UI", sans-serif;
}

canvas {
  display: block;
}

/* The game canvas lives in here. PixiJS sets the canvas's own cursor to
   `inherit`, so the cursor must be set on this container, not the canvas.
   X-shaped aiming reticle: four diagonal strokes around a gap, with a
   gold center dot. White with a dark outline so it reads on any
   background. 48px, hotspot at the center (24 24); falls back to the system
   crosshair. */
#game {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 32 32'%3E%3Cg stroke-linecap='round' fill='none'%3E%3Cpath d='M6 6L12 12M26 6L20 12M6 26L12 20M26 26L20 20' stroke='%23000' stroke-opacity='0.75' stroke-width='4.5'/%3E%3Cpath d='M6 6L12 12M26 6L20 12M6 26L12 20M26 26L20 20' stroke='%23fff' stroke-width='2'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='2.2' fill='%23ffc94d' stroke='%23000' stroke-opacity='0.75' stroke-width='1.2'/%3E%3C/svg%3E") 24 24, crosshair;
}

/* Playing with a controller (gamepad.js): no mouse cursor over the game,
   the same reticle drawn where the right stick aims instead. */
html.gamepad #game {
  cursor: none;
}

#pad-reticle {
  position: fixed;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 32 32'%3E%3Cg stroke-linecap='round' fill='none'%3E%3Cpath d='M6 6L12 12M26 6L20 12M6 26L12 20M26 26L20 20' stroke='%23000' stroke-opacity='0.75' stroke-width='4.5'/%3E%3Cpath d='M6 6L12 12M26 6L20 12M6 26L12 20M26 26L20 20' stroke='%23fff' stroke-width='2'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='2.2' fill='%23ffc94d' stroke='%23000' stroke-opacity='0.75' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
}

[hidden] {
  display: none !important;
}

/* Bottom-left corner (the top-left holds the upgrades tab). */
#fps-counter {
  position: fixed;
  bottom: var(--edge);
  left: var(--edge);
  z-index: 20;
  padding: 4px 8px;
  font: 600 13px/1.2 ui-monospace, Consolas, monospace;
  color: #b8f5a0;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  pointer-events: none;
  user-select: none;
}

