/* Terravox UI — dark, minimal, pixel-crisp. */

:root {
  --bg: #0c0e12;
  --panel: rgba(16, 18, 26, 0.92);
  --border: #3a4152;
  --text: #d8dce6;
  --dim: #8a92a6;
  --accent: #7fb069;
  --accent-dim: #4d7040;
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
  color: var(--text);
  user-select: none;
}

#app, #game-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
}
#game-canvas { display: block; }

.hidden { display: none !important; }

/* ---------- HUD ---------- */
.hud { position: fixed; z-index: 10; pointer-events: none; }

#crosshair {
  left: 50%; top: 50%;
  width: 20px; height: 20px;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
#crosshair::before, #crosshair::after {
  content: ""; position: absolute; background: #fff;
}
#crosshair::before { left: 9px; top: 0; width: 2px; height: 20px; }
#crosshair::after { top: 9px; left: 0; height: 2px; width: 20px; }

#hotbar-wrap {
  left: 50%; bottom: 8px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  image-rendering: pixelated;
}
#hotbar { display: block; }

#bars { left: 12px; bottom: 8px; }

#mode {
  left: 12px; bottom: 66px;
  font-size: 13px; color: var(--dim);
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 8px; border-radius: 3px;
}

#debug {
  left: 8px; top: 8px;
  font-size: 12px; line-height: 1.5;
  color: #e8ecf4;
  background: rgba(0, 0, 0, 0.55);
  padding: 6px 10px; border-radius: 4px;
  white-space: pre;
}

#help {
  right: 10px; top: 10px;
  font-size: 12px; color: var(--dim);
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 10px; border-radius: 4px;
  line-height: 1.6;
}

/* ---------- Overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(3px);
}
.overlay.hidden { display: none; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 36px;
  min-width: 340px;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.panel h1 {
  font-size: 34px; letter-spacing: 8px;
  margin-bottom: 4px; color: #fff;
}
.panel h2 { font-size: 14px; margin: 14px 0 6px; color: var(--dim); letter-spacing: 2px; }
.tagline { color: var(--dim); font-size: 12px; margin-bottom: 18px; }

.panel form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.panel label { font-size: 12px; color: var(--dim); display: flex; flex-direction: column; gap: 4px; }
.panel input, .panel select {
  background: #141720;
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 4px;
  outline: none;
}
.panel input:focus, .panel select:focus { border-color: var(--accent); }

.panel button {
  font: inherit; font-size: 15px;
  color: #fff; background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 10px;
  margin-top: 6px;
  cursor: pointer;
  letter-spacing: 2px;
}
.panel button:hover { background: var(--accent); }

#pause .panel button { width: 100%; margin-top: 8px; }
#pause .panel button + button { margin-top: 8px; }
#pause-world { color: var(--dim); font-size: 13px; margin-bottom: 8px; }

.controls-list { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 10px; }
.controls-list p { font-size: 11px; color: var(--dim); line-height: 1.7; text-align: left; }

.hint { font-size: 11px; color: var(--dim); margin-top: 12px; }
