/* ---- Shared HUD look ---- */

.hud-panel {
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(0, 255, 0, 0.35);
  border-radius: 4px;
  color: #00ff00;
  font-family: monospace;
  font-size: 13px;
  font-weight: bold;
}

.hud-btn {
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(0, 255, 0, 0.35);
  border-radius: 4px;
  color: #00ff00;
  font-family: monospace;
  font-size: 13px;
  font-weight: bold;
  padding: 5px 10px;
  cursor: pointer;
  user-select: none;
}

.hud-btn:hover {
  background: rgba(0, 40, 0, 0.85);
}

/* ---- Top bar toggle ---- */

#topBarToggle {
  display: block;
  margin: 0 auto;
  background: #1a1a1a;
  border: 1px solid #333;
  border-top: none;
  border-radius: 0 0 6px 6px;
  color: #ff0505;
  font-size: 15px;
  padding: 1px 16px 2px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
  z-index: 1;
}

#topBarToggle:hover {
  background: #222;
  color: #aaa;
}

#topBar.collapsed {
  display: none !important;
}

#topBarToggle.collapsed {
  border-top: 1px solid #333;
  border-radius: 0 0 6px 6px;
}

#topBar {
  background: #111;
  flex-shrink: 0;
}

#inputBaseUrl:focus {
  border-color: #2a2 !important;
  box-shadow: 0 0 0 0.2rem rgba(34, 170, 34, .25);
}

/* ---- Viewport ---- */

#viewport {
  background: #000;
}

#canvasWrap {
  position: absolute;
  inset: 0;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(180deg);
}

/* ---- HUD overlay ---- */

#overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 10px;
  line-height: 1.4;
  pointer-events: none;
  user-select: none;
}

/* ---- Settings menu ---- */

#settings {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

#settingsPanel {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  min-width: 200px;
}

#settingsPanel.open {
  display: flex;
}

#settingsPanel label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: -2px;
}

#settingsPanel label span {
  color: rgba(0, 255, 0, 0.65);
}

#settingsPanel input[type="range"] {
  width: 100%;
  accent-color: #00ff00;
  cursor: pointer;
}

#settingsReset {
  margin-top: 4px;
  font-size: 12px;
  padding: 4px;
}
