/* css/style.css — Tucson Frontier */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #000;
  overflow: hidden;
  width: 100vw;
  height: 100dvh;
  font-family: 'Press Start 2P', monospace;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

h1 { display: none; }

/* HUD row — overlaid at top of canvas */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 20px;
  font-size: 11px;
  color: #c9a165;
  background: rgba(17, 9, 0, 0.85);
  border-bottom: 1px solid #5a3a10;
  padding: 4px 12px;
  z-index: 10;
  font-family: monospace;
}

#hud-map  { flex: 1; text-align: center; }

/* Quest objective bar — overlaid just below HUD */
#quest-line {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  font-size: 10px;
  color: #f0c060;
  background: rgba(17, 9, 0, 0.75);
  border-bottom: 1px solid #5a3a10;
  padding: 3px 12px;
  font-family: monospace;
  letter-spacing: 1px;
  z-index: 10;
}

/* Game canvas — 320×176 internal, integer-scaled by JS to avoid blurry pixels */
#canvas-wrap {
  position: fixed;
  background: #0a0500;
  overflow: hidden;
}

#canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  touch-action: none;
}

/* UI overlay canvas — native display resolution so text is always crisp */
#ui-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  touch-action: none;
}

/* Pouch / inventory icon bar — overlaid at bottom of canvas */
#pouch {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(17, 9, 0, 0.85);
  border: 1px solid #3a2408;
  padding: 5px 10px;
  min-height: 38px;
  z-index: 10;
  font-family: monospace;
  color: #e8d9b5;
}

.pouch-empty {
  font-size: 10px;
  color: #5a4828;
  font-family: monospace;
  letter-spacing: 1px;
}

/* Each icon slot */
.pouch-item {
  position: relative;
  display: flex;
  align-items: center;
  background: #1e1206;
  border: 1px solid #5a3a10;
  border-radius: 2px;
  padding: 2px 4px;
  gap: 3px;
}

.pouch-item img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.pouch-qty {
  font-size: 9px;
  color: #f0c060;
  font-family: monospace;
  font-weight: bold;
  min-width: 10px;
}

/* Text-only fallback badge */
.pouch-text .pouch-label {
  font-size: 9px;
  color: #a89268;
  font-family: monospace;
}

/* Controls hint — overlaid at very bottom */
#hint {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  font-size: 9px;
  color: #5a4828;
  text-align: center;
  letter-spacing: 1px;
  font-family: monospace;
  z-index: 10;
}
