:root{
  --bg0: #070b10;
  --bg1: #0b1220;
  --panel: rgba(0,0,0,0.45);
  --panelBorder: rgba(255,255,255,0.14);
  --text: #ffffff;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; margin: 0; }

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 50% 35%, #132446, var(--bg0));
  color: var(--text);
  overflow: hidden; /* helps keep it to one screen */
}

/* One-screen layout */
.app{
  height: 100%;
  display: grid;
  place-items: center;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
           max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}

/* Canvas wrapper fills the usable viewport on phones */
.board-wrap{
  position: relative;

  /* Fit on phones: wide as possible, tall as possible */
  width: min(96vw, 560px);
  height: min(96dvh, 960px);

  /* keeps button from being right on the edge */
  border-radius: 22px;

  /* UI tunables (overridden by settings.txt via JS) */
  --fire-inset-x: 2.5%;
  --fire-inset-y: 2.5%;
}

/* Left-handed layout: button on the left */
.board-wrap.lefty .throw-btn{
  left: var(--fire-inset-x);
  right: auto;
  bottom: var(--fire-inset-y);
}


/* Canvas is sized by CSS; JS will resize backing pixels to match */
#board{
  width: 100%;
  height: 100%;
  display: block;

  background: #0a0d12;
  border-radius: 22px;
  box-shadow: 0 16px 60px rgba(0,0,0,.45);

  touch-action: none; /* crucial for drag rotation on mobile */
}

/* Button positioning only */
.throw-btn{
  position: absolute;
  right: var(--fire-inset-x);
  bottom: var(--fire-inset-y);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Red arcade FIRE button (flat + stable on press) */
.fire-btn{
  padding: 14px 20px;
  border-radius: 999px;
  border: 2px solid #5a0000;

  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.12em;

  color: #fff;
  background: #b80000;

  box-shadow: 0 10px 22px rgba(0,0,0,0.45);

  transition: filter 0.05s ease, box-shadow 0.05s ease;
}

.fire-btn:active{
  /* No position shift on press */
  filter: brightness(0.95);
  box-shadow: 0 6px 14px rgba(0,0,0,0.6);
}

