/* ==== Otto's Tank Blitz 3D — looks ==== */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: #0a120a;
  color: #eafbe7;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  user-select: none;
}

/* The 3D canvas fills the whole screen */
#scene { position: fixed; inset: 0; z-index: 1; }
#scene canvas {
  display: block;
  width: 100%; height: 100%;
  image-rendering: pixelated;      /* blow up the tiny render with chunky pixels */
  image-rendering: crisp-edges;
}

/* ---- HUD on top of the 3D scene ---- */
#hud {
  position: fixed;
  top: 14px; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 26px;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 0 2px 4px #000;
  pointer-events: none;
}
.stat span { color: #ffe14d; }

/* ---- HEALTH BAR ---- */
#healthWrap { width: 260px; }
#healthLabel { font-size: 15px; margin-bottom: 4px; letter-spacing: 1px; }
#healthPct { color: #ffe14d; }
#healthBarOuter {
  width: 100%;
  height: 20px;
  background: #08120a;
  border: 2px solid #0d3d17;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6);
}
#healthBarInner {
  height: 100%;
  width: 100%;                 /* starts full = 100% */
  background: linear-gradient(90deg, #34d058, #7dff8f);
  border-radius: 10px;
  transition: width .18s ease, background .18s ease;
}

/* ---- SNIPER SCOPE overlay ---- */
#scopeUI { position: fixed; inset: 0; z-index: 4; display: none; pointer-events: none; }
#scopeUI .vig {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center,
    transparent 0 28%, rgba(0,0,0,.55) 34%, rgba(0,0,0,.96) 44%, #000 100%);
}
#scopeUI .reticle {
  position: absolute; left: 50%; top: 50%;
  width: 56vmin; height: 56vmin; transform: translate(-50%, -50%);
  border: 2px solid rgba(150,180,150,.35); border-radius: 50%;
}
#scopeUI .cross { position: absolute; background: rgba(120,220,120,.7); }
#scopeUI .cross.v { left: 50%; top: 6%; bottom: 6%; width: 2px; transform: translateX(-1px); }
#scopeUI .cross.h { top: 50%; left: 6%; right: 6%; height: 2px; transform: translateY(-1px); }
#scopeUI .dot {
  position: absolute; left: 50%; top: 50%; width: 6px; height: 6px;
  background: #ff4d4d; border-radius: 50%; transform: translate(-50%, -50%);
}
#scopeUI .scopeHint {
  position: absolute; bottom: 6%; left: 0; right: 0; text-align: center;
  color: #cfe8cf; font-size: 15px; letter-spacing: 1px; text-shadow: 0 1px 3px #000;
}

/* ---- Start / Game Over card ---- */
#overlay {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(4, 8, 6, .82);
  display: none; align-items: center; justify-content: center;
}
#overlay.show { display: flex; }
.card {
  background: #16261a;
  border: 3px solid #ffe14d;
  border-radius: 16px;
  padding: 28px 34px;
  max-width: 460px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
}
.card h1 { margin: 0 0 4px; font-size: 28px; color: #ffe14d; }
.badge {
  font-size: 15px; background: #ff5a3c; color: #fff;
  padding: 2px 8px; border-radius: 6px; vertical-align: middle;
}
.tag { margin: 0 0 16px; color: #9fdc9f; font-style: italic; }
.how { text-align: left; line-height: 1.8; padding-left: 18px; }
button {
  margin-top: 16px; padding: 14px 30px;
  font-size: 20px; font-weight: bold;
  color: #16261a; background: #ffe14d;
  border: none; border-radius: 30px; cursor: pointer;
  transition: transform .08s;
}
button:hover { transform: scale(1.05); }
