/* DAGASARU - style.css
   The 3D view (#view) and the pixel-art HUD (#ui, 400x300) are both scaled up with hard pixels.
   main.js scales the 800x600 #game box in half steps so every game pixel stays the same size. */
@font-face { font-family: 'Vice'; src: url('../assets/fonts/vice.ttf') format('truetype'); font-display: block; }
/* b.ttf (Reggae One, Latin subset): all small HUD / menu text */
@font-face { font-family: 'B'; src: url('../assets/fonts/b.ttf') format('truetype'); font-display: block; }

html, body {
  margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden;
  background: #000; color: #fff;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
#game {
  position: absolute; left: 0; top: 0; width: 800px; height: 600px;
  transform-origin: 0 0;              /* main.js sets an integer left/top + scale, no sub-pixel offsets */
  overflow: hidden; background: #000; color: #fff;
  font-family: 'B', 'Vice', sans-serif;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: none; outline: none;
  cursor: url('../assets/images/cursor.png') 1 1, default;
}
#game canvas { display: block; cursor: url('../assets/images/cursor.png') 1 1, default; outline: none; }
#view, #ui {
  position: absolute; left: 0; top: 0; width: 800px; height: 600px;
  image-rendering: pixelated; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor;
}
#ui { pointer-events: none; }
/* hi-res mode renders at 800x600 = 1:1 at the default size; keep it crisp when the page scales too */
#view.hires { image-rendering: pixelated; image-rendering: crisp-edges; }

/* the only DOM text: the boot screen and the WebGL error */
#loading, #fatal {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #000; text-align: center; font-family: 'B', sans-serif; -webkit-font-smoothing: none; font-smooth: never;
}
#loading { font-size: 28px; letter-spacing: 4px; color: #ffd23f; }
#loading::after { content: ''; display: block; width: 160px; height: 6px; margin-top: 18px; background: #222; box-shadow: 0 0 0 2px #000, 0 0 0 4px #444;
  background-image: linear-gradient(90deg, #ffd23f 0 40%, transparent 40%); background-size: 160px 6px; animation: dg-load 1s steps(8) infinite; }
@keyframes dg-load { from { background-position: -64px 0; } to { background-position: 160px 0; } }
#fatal { display: none; font-size: 20px; line-height: 1.6; color: #eee; padding: 0 60px; }
#fatal b { color: #ff7a5a; font-size: 30px; display: block; margin-bottom: 12px; letter-spacing: 2px; }
/* keeps both fonts loaded before the first canvas text is baked */
#fontwarm { position: absolute; left: -9999px; top: 0; font-family: 'Vice'; visibility: hidden; white-space: nowrap; }
