/* =========================
   BASIS / LAYOUT
   ========================= */
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  background: #0b0f19;           /* rand buiten het speelveld */
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
}

.app {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

/* Speelveld 1080x1920 (9:16) */
.stage {
  position: relative;
  width: min(100vw, calc(100vh * (1080 / 1920)));
  aspect-ratio: 1080 / 1920;
}

/* Canvas vult de stage exact */
#game {
  width: 100%;
  height: 100%;
  display: block;
  background: #0b0f19;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}

/* =========================
   HUD
   ========================= */
.hud-overlay {
  position: absolute;
  z-index: 5;
  top: 14px;
  left: 0;
  right: 0;
  margin: 0 14px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.hud-chip {
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(4px);
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

.levelup {
  position: absolute;
  z-index: 6;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 800;
  opacity: 0;
}

/* =========================
   STARTSCHERM
   ========================= */
.start-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: 1fr auto 24px; /* ruimte voor knop onder */
  place-items: center;
  border-radius: 14px;
  overflow: hidden;
}

/* Geen donkere overlay/filters */
.start-bg {
  grid-row: 1 / -1;
  position: absolute;
  inset: 0;
  background-color: #000;          /* fallback */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
}
.start-bg::after { content: none; }

.start-btn {
  grid-row: 2;
  margin-bottom: 24px;
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 14px 22px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .4px;
  color: #062b1b;
  background: #0bd36e;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  cursor: pointer;
  z-index: 1;
}

/* =========================
   VRAAG- & CRASHBORD (midden, gecentreerde tekst)
   ========================= */
.hidden { display: none !important; }

.sign {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);     /* subtiele backdrop */
  backdrop-filter: blur(3px);
}

.board {
  width: min(92%, 680px);
  background: rgba(17,24,39,.92);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  text-align: center;              /* << vraagtekst gecentreerd */
}

.board.warning { background: rgba(31,41,55,.96); }

.board h2 { margin: 0 0 10px; font-size: 20px; font-weight: 800; }
.board p  { margin: 0 0 14px; color: #d1d5db; line-height: 1.45; }

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;         /* knoppen ook centreren */
}

.actions button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
}

#btn-yes     { background: #0bd36e; color: #062b1b; }
#btn-no      { background: #ef476f; color: #fff; }
#btn-restart { background: #111;    color: #fff; }

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 480px){
  .board { width: 94%; padding: 14px; }
  .hud-chip { padding: 6px 10px; }
  .start-btn { padding: 12px 18px; font-size: 16px; }
}


/* Uitslag-lijst: geen bullets, gecentreerd onder elkaar */
.board ul, .board .list, .board .final-list{
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  text-align: center;
}
.board ul li, .board .list li, .board .final-list li{
  margin: 6px 0;
}


/* =========================
   BOOST UI (in-frame)
   ========================= */
.boost-btn{
  position: absolute;
  z-index: 16;
  right: 16px;
  bottom: 28px;
  width: 72px;
  height: 72px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.boost-btn img{ width: 100%; height: 100%; display: block; }

.boost-bar{
  position: absolute;
  z-index: 16;
  right: 16px;
  top: 22px;
  width: 180px;
  height: 12px;
  background: rgba(255,255,255,.25);
  border-radius: 7px;
  overflow: hidden;
}
.boost-bar .fill{
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #34d399, #10b981);
  transition: width 120ms linear;
}
.boost-bar .fill.empty{ background: #9ca3af; }

/* Verberg mobiele tap/focus-highlight op de boostknop */
.boost-btn{
  -webkit-tap-highlight-color: transparent; /* Android/Chrome */
  outline: none;
}
.boost-btn:focus,
.boost-btn:active{
  outline: none;
  box-shadow: none;
}

/* =========================
   VISUAL HINT ARROWS (non-interactive)
   ========================= */
.hint-arrow{
  position: absolute;
  z-index: 14;
  bottom: 120px;               /* net boven de boostknop */
  font-size: 150px;             /* groter */
  line-height: 1;
  color: rgba(255,255,255,.32); /* iets transparanter */
  text-shadow: 0 0 10px rgba(0,0,0,.35);
  user-select: none;
  pointer-events: none;
}
.hint-arrow.left{ left: 10px; }
.hint-arrow.right{ right: 10px; }

/* Boost button pressed state */
.boost-btn.pressed img{
  filter: brightness(0.78);
  transform: scale(0.98);
  transition: transform 80ms ease, filter 80ms linear;
}

/* Prevent long-press image actions on mobile */
.boost-btn img{
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
}
