* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #1a1a2e;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#container {
  width: 100%; height: 100%;
  display: block;
}

#info {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  pointer-events: none;
}

#toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  pointer-events: auto;
}

.logo {
  font-weight: 700;
  color: #4fc3f7;
  font-size: 14px;
  margin-right: 8px;
}

.scene-label {
  color: #aaa;
  font-size: 12px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spacer { flex: 1; }

#toolbar button {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ccc;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

#toolbar button:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

#toolbar button.active {
  background: rgba(79, 195, 247, 0.2);
  border-color: #4fc3f7;
  color: #4fc3f7;
}

#status {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  pointer-events: none;
  transition: opacity 0.4s;
}

.status-msg { opacity: 1; }
.status-msg.hidden { opacity: 0; }

#error-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: opacity 0.3s;
}

#error-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#error-card {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(255, 80, 80, 0.4);
  border-radius: 12px;
  padding: 24px 32px;
  max-width: 400px;
  color: #fff;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* Measurement labels in 3D */
.measurement-label {
  position: absolute;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -100%);
}
