/* ============================================================
   THE ROOM — HUD / shell styling

   The film grain and vignette live in the post-processing shader
   (js/post.js), NOT here, so they affect the rendered image rather
   than sitting on top of the glass. Only the HUD is drawn in CSS.
   ============================================================ */

:root {
  --ink: #c9cdd2;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
}

body {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink);
  user-select: none;
  cursor: default;
}

#c {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* ---------- crosshair ---------- */
#crosshair {
  position: fixed;
  left: 50%; top: 50%;
  width: 14px; height: 14px;
  transform: translate(-50%, -50%);
  opacity: .45;
  pointer-events: none;
}
#crosshair::before,
#crosshair::after {
  content: "";
  position: absolute;
  background: #fff;
}
#crosshair::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
#crosshair::after  { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-50%); }

/* ---------- battery ---------- */
#battery {
  position: fixed;
  left: 18px; bottom: 18px;
  width: 170px;
  pointer-events: none;
}
#battery .lbl {
  font-size: 10px;
  letter-spacing: 3px;
  opacity: .5;
  margin-bottom: 6px;
}
#battery .bar {
  height: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.04);
}
#battery .fill {
  height: 100%;
  width: 100%;
  background: #e9edf1;
  transition: width .12s linear;
}
#battery .fill.low { background: #c0553f; }

/* ---------- inventory ---------- */
#inventory {
  position: fixed;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  pointer-events: none;
}
.slot {
  position: relative;
  width: 58px; height: 58px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(8,10,12,.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 4px;
  font-size: 9px;
  letter-spacing: .5px;
  line-height: 1.15;
  text-align: center;
  color: #dfe3e8;
}
.slot .num {
  position: absolute;
  top: 2px; left: 4px;
  font-size: 9px;
  opacity: .3;
}
.slot.active {
  border-color: rgba(255,255,255,.85);
  box-shadow: 0 0 14px rgba(255,255,255,.18);
}

/* ---------- interaction hint ---------- */
#hint {
  position: fixed;
  left: 50%; top: 58%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 1.5px;
  opacity: 0;
  transition: opacity .2s;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}
#hint.show { opacity: .8; }

/* ---------- start overlay ---------- */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0,0,0,.92);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#overlay.hidden { display: none; }
#overlay h1 {
  font-size: 34px;
  letter-spacing: 12px;
  font-weight: 400;
  margin: 0 0 8px;
  color: #eef1f4;
}
#overlay .sub {
  opacity: .4;
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 40px;
  max-width: 80vw;
}
#overlay .keys {
  font-size: 12px;
  line-height: 2.1;
  opacity: .85;
}
#overlay .keys b {
  display: inline-block;
  width: 120px;
  text-align: right;
  margin-right: 16px;
  color: #fff;
  font-weight: 600;
}
#overlay .enter {
  margin-top: 36px;
  font-size: 11px;
  letter-spacing: 6px;
  opacity: .7;
  animation: pulse 2s infinite;
}
#overlay .build {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 1px;
  opacity: .3;
}
@keyframes pulse { 50% { opacity: .2; } }
