/* ---------- Classic Roblox HUD (2006-07) ---------- */
.rbx-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font: 11px Arial, Helvetica, sans-serif;
  color: #fff;
  user-select: none;
  overflow: hidden;
}
.rbx-ui > * { pointer-events: auto; }
.rbx-ui [hidden] { display: none !important; }
.rbx-ui button { box-shadow: none; min-width: 0; min-height: 0; }

/* Top menu links */
.rbx-menubar {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  background: rgba(60, 60, 60, 0.55);
  border: 1px solid rgba(20, 20, 20, 0.5);
  border-top: 0;
}
.rbx-menubar span {
  padding: 3px 22px;
  cursor: pointer;
  white-space: nowrap;
}
.rbx-menubar span:hover { background: rgba(255, 255, 255, 0.25); }

/* Chat log (top-left) */
.rbx-chat-log {
  position: absolute;
  top: 6px;
  left: 6px;
  max-width: 38%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rbx-chat-line {
  align-self: flex-start;
  background: rgba(140, 140, 140, 0.55);
  padding: 1px 4px;
  line-height: 13px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rbx-chat-line .who { font-weight: normal; }
.rbx-chat-line .sys { color: #fff; font-style: italic; }

/* Bottom chat bar */
.rbx-chat-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  box-sizing: border-box;
  width: 100%;
  height: 16px;
  padding: 0 4px;
  border: 0;
  border-top: 1px solid #7a7a7a;
  background: rgba(230, 230, 230, 0.85);
  color: #000;
  font: 11px Arial, sans-serif;
  outline: none;
}
.rbx-chat-bar::placeholder { color: #000; }
.rbx-chat-bar:focus { background: #fff; }

/* Player List (top-right) */
.rbx-players {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 150px;
  background: rgba(200, 200, 200, 0.45);
  padding: 2px 4px 4px;
}
.rbx-players-head, .rbx-player { display: flex; justify-content: space-between; gap: 6px; line-height: 14px; }
.rbx-players-head { color: #fff; text-shadow: 0 0 2px #000; }
.rbx-player span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbx-player span:last-child { color: #fff; text-shadow: 0 0 2px #000; }
.rbx-player.me span:first-child { text-decoration: underline; }

/* Vertical health bar (right) */
.rbx-health {
  position: absolute;
  right: 18px;
  top: 38%;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.rbx-health-bar {
  width: 8px;
  height: 70px;
  background: #b10000;
  display: flex;
  align-items: flex-end;
}
.rbx-health-fill { width: 100%; height: 100%; background: #1fd41f; transition: height .25s; }
.rbx-health-label { margin-top: 2px; color: #1a3cc7; font-size: 12px; }

/* Camera buttons + Report (bottom-right) */
.rbx-cam {
  position: absolute;
  right: 8px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.rbx-report {
  background: #fff;
  color: #000;
  font-weight: bold;
  padding: 0 4px;
  border: 1px solid #555;
  cursor: default;
}
.rbx-cam-grid { display: grid; grid-template-columns: 18px 18px; gap: 3px; }
.rbx-cam-grid button {
  width: 18px; height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #222;
  background: radial-gradient(circle at 40% 30%, #fff, #bdbdbd 60%, #7a7a7a);
  color: #111;
  font: bold 10px Arial, sans-serif;
  line-height: 16px;
  cursor: pointer;
}
.rbx-cam-grid button:active { background: radial-gradient(circle at 50% 60%, #eee, #999 60%, #666); }

/* Message band */
.rbx-message {
  position: absolute;
  left: 0; right: 0;
  top: 40%;
  padding: 10px;
  background: rgba(120, 120, 120, 0.6);
  text-align: center;
  font: bold 16px Arial, sans-serif;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.rbx-message.show { opacity: 1; }
.rbx-message.big { font-size: 22px; padding: 16px; }

/* Help dialog */
.rbx-dialog {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
}
.rbx-dialog-box {
  width: 230px;
  background: #d4d0c8;
  color: #000;
  border: 2px outset #fff;
}
.rbx-dialog-title { background: linear-gradient(90deg, #0a246a, #a6caf0); color: #fff; font-weight: bold; padding: 2px 5px; }
.rbx-dialog-body { padding: 8px 10px; line-height: 16px; }
.rbx-dialog-body b { display: inline-block; width: 44px; }
.rbx-dialog-btns { display: flex; justify-content: flex-end; gap: 6px; padding: 0 8px 8px; }
.rbx-dialog-btns button { font: 11px Arial, sans-serif; padding: 2px 10px; }

@media (max-width: 480px) {
  .rbx-players { width: 110px; }
  .rbx-menubar span { padding: 3px 8px; }
}
