:root {
  --bg: #0b0f14;
  --panel: #121821;
  --text: #d7e1ec;
  --muted: #8aa0b6;
  --accent: #00bcd4;
  --danger: #ff5252;
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; }

.button { background: var(--accent); color: #002b36; padding: 0 12px; border-radius: 8px; cursor: pointer; font-weight: 600; height: 40px; display: inline-flex; align-items: center; }
.button:active { transform: translateY(1px); }
.button.secondary { background: transparent; color: var(--text); border: 1px solid #2a3a52; }
.hidden { display: none !important; }

#viewer-container { position: fixed; inset: 0; height: 100%; }
#three-canvas { width: 100%; height: 100%; display: block; }

/* Floating buttons */
.help-button { background: var(--panel); color: var(--text); border: 1px solid #2a3a52; border-radius: 10px; width: 40px; height: 40px; font-size: 18px; line-height: 1; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.top-right { position: fixed; top: 12px; right: 12px; z-index: 20; display: flex; gap: 8px; align-items: center; }
.top-right #debug-button { height: 40px; }

/* Hamburger menu */
.menu { position: relative; }
.menu-toggle {
  background: transparent;
  border: 0; cursor: pointer; padding: 6px; display: inline-flex; flex-direction: column; gap: 4px;
}
.menu-toggle .bar { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
.menu-panel {
  position: absolute; top: 48px; right: 0;
  background: #0f1621; border: 1px solid #223046; border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  padding: 8px; min-width: 200px; z-index: 30;
}
.menu-item {
  width: 100%; text-align: left; cursor: pointer;
  background: transparent; color: var(--text);
  border: 0; padding: 10px 12px; border-radius: 8px;
}
.menu-item:hover { background: #121a27; }

/* Exit walk placement now top-right within group */
#exit-walk-label { position: static; pointer-events: none; }

#dropzone { position: absolute; inset: 0; border: 2px dashed #2a3a52; background: rgba(9,12,18,0.75); display: flex; align-items: center; justify-content: center; }
#dropzone.hidden { display: none; }
.dropzone-inner { text-align: center; color: var(--muted); }

#message { position: fixed; left: 12px; bottom: 12px; max-width: 70%; color: var(--muted); background: rgba(0,0,0,0.35); padding: 6px 10px; border-radius: 8px; font-size: 12px; z-index: 15; }
/* Loading overlay */
#loading-overlay {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55);
}
.loading-box {
  min-width: 260px; max-width: 80vw; padding: 16px 18px; border-radius: 12px;
  background: #0f1621; border: 1px solid #223046; box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}
#loading-text { font-size: 18px; margin-bottom: 10px; color: var(--text); text-align: center; }
.progress { height: 10px; border-radius: 999px; background: #1d2a3c; overflow: hidden; }
.progress .bar { height: 100%; width: 0%; background: linear-gradient(90deg, #00bcd4, #7be0f6); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 30; }
.modal .modal-content {
  background: #0f1621; color: var(--text);
  border: 1px solid #223046; border-radius: 12px;
  width: min(92vw, 560px); max-width: 92vw; padding: 16px 18px;
  box-shadow: 0 10px 36px rgba(0,0,0,0.35);
}
.modal .modal-body { color: var(--muted); }
.modal .modal-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

/* Debug overlay */
#debug-overlay {
  position: fixed; left: 12px; top: 12px; z-index: 15;
  margin: 0;
  max-width: 70%; color: var(--muted); background: rgba(0,0,0,0.35);
  padding: 6px 10px; border-radius: 8px; font-size: 12px;
  white-space: pre-wrap; line-height: 1.35; pointer-events: none;
}

.debug-copy {
  position: fixed; left: 12px; top: 12px;
  z-index: 1001; height: 28px; padding: 0 8px; font-size: 12px;
  background: var(--panel); color: var(--text); border: 1px solid #2a3a52; border-radius: 6px;
  cursor: pointer;
}
#message { position: absolute; left: 12px; bottom: 12px; max-width: 70%; color: var(--muted); background: rgba(0,0,0,0.35); padding: 6px 10px; border-radius: 8px; font-size: 12px; }
.footer { height: 40px; display: flex; align-items: center; padding: 0 12px; color: var(--muted); border-top: 1px solid #1b2330; background: var(--panel); }
/* Loading overlay */
#loading-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55);
}
.loading-box {
  min-width: 260px; max-width: 80vw; padding: 16px 18px; border-radius: 12px;
  background: #0f1621; border: 1px solid #223046; box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}
#loading-text { font-size: 18px; margin-bottom: 10px; color: var(--text); text-align: center; }
.progress { height: 10px; border-radius: 999px; background: #1d2a3c; overflow: hidden; }
.progress .bar { height: 100%; width: 0%; background: linear-gradient(90deg, #00bcd4, #7be0f6); }

@media (max-width: 640px) {
  .toolbar h1 { font-size: 14px; }
  .button { padding: 8px 10px; font-size: 14px; }
  #message { max-width: 85%; }
  .menu-item { font-size: 16px; padding: 12px 14px; }
  .menu-panel { min-width: 220px; }
  .menu-toggle .bar { width: 26px; height: 3px; }
}


