* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #101418;
  color: #e2e8f0;
  min-height: 100vh;
  padding: 16px;
}
header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
h1 { font-size: 20px; }
.pill { background: #2563eb33; border: 1px solid #2563eb; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-family: monospace; }

.layout { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.col-left, .col-right { display: flex; flex-direction: column; gap: 10px; }

canvas#board {
  background: #000;
  border: 2px solid #334155;
  border-radius: 6px;
  image-rendering: pixelated;
  max-width: 100%;
}

.hud { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; background: #1a2027; padding: 10px; border-radius: 6px; font-size: 13px; }
.hud-row { display: flex; justify-content: space-between; }
.hud-row span { color: #94a3b8; }
.hud-row b { font-family: monospace; }

.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #1a2027; padding: 10px; border-radius: 6px; font-size: 13px; }
button {
  background: #2563eb; color: #fff; border: 0; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
button:hover { background: #1d4ed8; }

.stats { display: flex; gap: 14px; background: #1a2027; padding: 8px 10px; border-radius: 6px; font-size: 12px; flex-wrap: wrap; }
.stats div { display: flex; gap: 6px; align-items: baseline; }
.stats span { color: #94a3b8; }
.stats b { font-family: monospace; }

.settings { background: #1a2027; padding: 10px; border-radius: 6px; font-size: 13px; }
.settings summary { cursor: pointer; margin-bottom: 8px; color: #93c5fd; }
.settings label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; font-size: 12px; color: #94a3b8; }
.settings input { background: #0f1418; border: 1px solid #334155; color: #e2e8f0; padding: 6px 8px; border-radius: 4px; font-family: monospace; }
.hint { color: #64748b; font-size: 11px; margin-top: 6px; }

#log {
  background: #0a0e12;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 8px;
  font-family: 'Cascadia Code', Consolas, monospace;
  font-size: 11.5px;
  height: 560px;
  width: 460px;
  max-width: 100%;
  overflow-y: auto;
  line-height: 1.55;
}
.line { white-space: pre-wrap; word-break: break-word; color: #94a3b8; }
.line.run { color: #fbbf24; }
.line.level { color: #34d399; }
.line.kill { color: #f87171; }
.line.death { color: #ef4444; font-weight: bold; }
.line.bonus { color: #a78bfa; }
.line.door { color: #f5d76e; }
.line.error { color: #f87171; }
.line.action { color: #38bdf8; }
.line.bomb { color: #fb923c; }
