* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #070e0e; font-family: 'Courier New', monospace;
  -webkit-user-select: none; user-select: none;
}
#grid {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
}
#ui {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none; display: flex; flex-direction: column;
}
#top-bar {
  display: flex; justify-content: space-between; padding: 14px 18px 6px;
}
#integrity-wrap { width: 48%; }
#casualty-wrap { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
#integrity-label, #casualty-label {
  color: #3ad98f; font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
}
#integrity-bar {
  width: 100%; height: 6px; margin-top: 4px;
  background: #0e1a1a; border: 1px solid #1a3030; overflow: hidden;
}
#integrity-fill {
  height: 100%; width: 100%; background: #3ad98f;
  transition: width 0.08s linear;
}
#integrity-fill.warn { background: #d46a1e; }
#integrity-fill.crit { background: #e83030; }
.stencil {
  font-size: 22px; color: #3ad98f; font-weight: bold;
  letter-spacing: 0;
  padding-left: 12px; padding-top: 2px;
  text-shadow: 0 0 5px rgba(58, 217, 143, 0.45);
  line-height: 1.1;
}
.stencil.cascade {
  letter-spacing: -2px;
  text-shadow: none;
  color: #e83030;
}
#phase {
  position: absolute; top: 58px; width: 100%; text-align: center;
  color: #d46a1e; font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
}
#cycle-time {
  position: absolute; top: 58px; right: 18px;
  color: #3ad98f; font-size: 13px; letter-spacing: 1px;
}
#feedback {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #3ad98f; font-size: 16px;
  letter-spacing: 3px; text-transform: uppercase;
  opacity: 0; transition: opacity 0.12s;
  text-align: center; white-space: nowrap;
}
#action-btn {
  pointer-events: all; cursor: pointer;
  margin: auto auto 32px;
  background: transparent; border: 1px solid #3ad98f;
  color: #3ad98f; font-family: 'Courier New', monospace;
  font-size: 12px; letter-spacing: 3px; padding: 10px 30px;
  text-transform: uppercase; transition: all 0.08s;
  -webkit-tap-highlight-color: transparent;
}
#action-btn:active { background: rgba(58,217,143,0.22); }
#action-btn.cascade { border-color: #e83030; color: #e83030; }
body.cascade #integrity-fill { background: #e83030 !important; }
body.cascade .stencil { color: #e83030; text-shadow: none; }
