/* Cairnhollow game UI */
html, body { margin: 0; padding: 0; height: 100vh; overflow: hidden; background: #131a26; }
body { font-family: ui-monospace, "Segoe UI", system-ui, sans-serif; }

#game-canvas { position: fixed; inset: 0; display: block; touch-action: none; }
canvas { width: 100vw; height: 100vh; }

#crosshair {
  position: fixed; left: 50%; top: 50%; width: 22px; height: 22px;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 6;
}
#crosshair::before, #crosshair::after {
  content: ""; position: absolute; background: rgba(245,246,250,0.9);
  box-shadow: 0 0 2px rgba(0,0,0,0.6);
}
#crosshair::before { left: 9px; top: 2px; width: 4px; height: 18px; }
#crosshair::after { left: 2px; top: 9px; width: 18px; height: 4px; }

#hud {
  position: fixed; top: 12px; left: 14px; z-index: 6; pointer-events: none;
  color: #e9eef7; text-shadow: 0 1 2px rgba(0,0,0,0.65);
  font-size: 13px; line-height: 1.5;
}
#hud-clock { color: #ffd98a; }
#hud-info { color: #a8b6c8; }

#hotbar {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; padding: 8px; z-index: 7;
  background: rgba(15, 20, 30, 0.55); border-radius: 10px;
  border: 1px solid rgba(160,176,196,0.35);
}
.slot {
  width: 50px; height: 50px; border-radius: 8px;
  border: 2px solid rgba(160,176,196,0.4);
  background: rgba(20,26,38,0.75);
  display: flex; align-items: center; justify-content: center;
}
.slot img { width: 34px; height: 34px; border-radius: 5px; image-rendering: pixelated; }
.slot .key { position: absolute; right: 4px; bottom: 2px; font-size: 11px; color: #dfe6ee; }
.slot { position: relative; }
.slot[aria-selected="true"] {
  border: 2px solid #86c95e;
  box-shadow: 0 0 10px rgba(134,201,94,0.55);
  transform: translate(0, 1px) scale(1.08);
}

#start-overlay {
  position: fixed; inset: 0; z-index: 8; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(9, 12, 20, 0.8);
  text-align: center;
}
.so-title { font-size: clamp(30px, 8vw, 64px); font-weight: 800; letter-spacing: 0.04em; color: #7fd858; text-shadow: 0 3 6px rgba(0,0,0,0.7); }
.so-line { font-size: 20px; color: #e9eef7; }
.so-keys { font-size: 14px; color: #a8b6c8; margin-top: 8px; }

#new-world {
  position: fixed; right: 16px; bottom: 14px; z-index: 9;
  font: 700 13px ui-monospace, system-ui, sans-serif;
  color: #e9eef7; background: rgba(20,26,38,0.85);
  border: 1px solid rgba(160,176,196,0.5); border-radius: 8px;
  padding: 8px 12px; cursor: pointer;
}

/* touch controls: shown only when game.js built them (touch device) */
.tp-move, .tp-jump, .tp-break, .tp-place {
  position: fixed; z-index: 8; touch-action: none;
  display: flex; align-items: center; justify-content: center;
  color: rgba(240,244,250,0.95); font-weight: 700; font-size: 12px;
  border-radius: 999px;
}
.tp-move {
  left: calc(50% - 205px); bottom: 18px; width: 128px; height: 128px;
  background: rgba(15,20,30,0.42); border: 2px solid rgba(134,201,94,0.75);
}
.tp-jump {
  right: 24px; bottom: 18px; width: 84px; height: 84px;
  background: rgba(15,20,30,0.45); border: 2px solid rgba(120,200,240,0.8);
}
.tp-break {
  right: 122px; bottom: 20px; width: 74px; height: 74px;
  background: rgba(15,20,30,0.45); border: 2px solid rgba(240,140,110,0.85);
}
.tp-place {
  right: 24px; bottom: 112px; width: 74px; height: 74px;
  background: rgba(15,20,30,0.45); border: 2px solid rgba(134,201,94,0.85);
}
@media (pointer: fine) {
  .tp-move, .tp-jump, .tp-break, .tp-place { display: none; }
}
