/* styles.css - simple polished UI */
:root {
  --panel-width: 320px;
  --accent: #2b6cdf;
  --bg: #111214;
  --fg: #e6eef8;
}

* {
  box-sizing: border-box;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--fg);
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
}

#viewer {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

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

#topbar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  z-index: 40;
}

#logo img {
  height: 40px;
}

#controls button {
  margin-left: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--fg);
  border-radius: 6px;
  cursor: pointer;
}

#controls button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(43, 108, 223, 0.18);
}

.panel {
  position: fixed;
  right: 12px;
  top: 76px;
  width: var(--panel-width);
  background: rgba(10, 12, 14, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 12px;
  border-radius: 10px;
  z-index: 40;
  backdrop-filter: blur(6px);
}

.panel.hidden {
  display: none;
}

.row {
  margin: 8px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
}

#parts {
  max-height: 400px;
  overflow: auto;
  margin-top: 8px;
}

.part-row {
  padding: 8px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

#loading {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  max-width: 90%;
  background: rgba(0, 0, 0, 0.6);
  padding: 18px;
  border-radius: 12px;
  z-index: 60;
  display: none;
}

#progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
}

#progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #7bd3ff);
}

#loading-text {
  margin-top: 8px;
  font-size: 13px;
  text-align: center;
}

#hotspot-container {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 50;
}

.part-item {
  cursor: pointer;
  padding: 5px 10px;
}

.part-item:hover {
  background-color: rgb(90, 93, 102);
}

.part-item.selected {
  background-color: #007bff;
  color: white;
}

.outline-shader-container {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
}