:root {
  --bg-panel: rgba(20, 20, 25, 0.85);
  --glass: rgba(255, 255, 255, 0.1);
  --accent: #5a8dee;
  --text: #eee;
  --text-dim: #999;
  --radius: 12px;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
  background: #fff;
}

model-viewer {
  width: 100vw;
  height: 100vh;
}

/* Floating UI */
#model-label, #ar-btn, #controls button, #lighting-toggle {
  position: fixed;
  z-index: 100;
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

#model-label {
  top: 16px; left: 50%; transform: translateX(-50%);
  padding: 6px 16px; background: rgba(0,0,0,0.6);
  color: #fff; font-size: 13px; pointer-events: none;
}

#ar-btn {
  top: 60px; left: 50%; transform: translateX(-50%);
  padding: 10px 20px; background: #fff; color: #000;
  font-weight: 600; cursor: pointer;
}

#controls {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 100;
}

#controls button {
  position: static; padding: 12px 24px; background: #fff;
  color: #000; font-size: 18px; cursor: pointer;
}

#lighting-toggle {
  top: 16px; right: 16px; width: 44px; height: 44px;
  background: rgba(0,0,0,0.05); color: #333; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

#lighting-toggle.active { background: var(--accent); }

/* Settings Panel */
#lighting-panel {
  position: fixed; top: 70px; right: 16px; z-index: 90;
  width: 250px; padding: 20px; border-radius: var(--radius);
  background: var(--bg-panel); color: var(--text);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: 0.2s ease-out;
}

#lighting-panel.panel-hidden { opacity: 0; transform: translateY(-10px); pointer-events: none; }

#lighting-panel h3 { margin: 0 0 15px; font-size: 12px; text-transform: uppercase; color: var(--text-dim); letter-spacing: 1px; }

.control-group { margin-bottom: 15px; }
.control-group label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.label-value { color: var(--accent); font-weight: 600; }

input[type="range"] {
  width: 100%; height: 4px; border-radius: 2px;
  background: var(--glass); cursor: pointer; appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

select, input[type="color"] {
  width: 100%; padding: 8px; border-radius: 8px;
  background: var(--glass); color: #fff; border: 1px solid rgba(255,255,255,0.1);
  font-size: 13px; cursor: pointer; appearance: none;
}

#lighting-reset {
  width: 100%; padding: 10px; margin-top: 10px;
  background: rgba(255,255,255,0.05); color: var(--text-dim);
  border: 1px solid var(--glass); border-radius: 8px; cursor: pointer;
}

#lighting-reset:hover { color: #ff5555; background: rgba(255,0,0,0.1); }

@media (max-width: 480px) {
  #lighting-panel { width: calc(100% - 32px); right: 16px; top: 120px; }
}

/* Progress Bar */
.progress-bar {
  display: block;
  width: 33%;
  height: 10px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
  border-radius: 25px;
  box-shadow: 0px 3px 10px 3px rgba(0, 0, 0, 0.5), 0px 0px 5px 1px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.progress-bar.hide {
  visibility: hidden;
  transition: visibility 0.3s;
}

.update-bar {
  background-color: rgba(255, 255, 255, 0.9);
  width: 0%;
  height: 100%;
  border-radius: 25px;
  transition: width 0.3s;
}
