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

:root {
  --bg: #141618;
  --surface: #1e2124;
  --surface2: #252a2f;
  --border: #2e3338;
  --accent: #4a9eff;
  --text: #e8eaed;
  --text-muted: #8a8f96;
  --transition: 0.25s ease;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
}

/* ── Layout ── */

#app {
  display: flex;
  height: 100vh;
  position: relative;
}

/* ── Viewer ── */

#viewer-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#viewer {
  width: 100%;
  height: 100%;
}

#viewer canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Vtour built-in label — hide it, we have our own info panel */
.vt-scene-name-label { display: none; }
.vt-version-label { display: none; }
.vt-fullscreen-button { display: none; }

/* ── Fade overlay ── */

#fade-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

#fade-overlay.fading {
  opacity: 1;
}

/* ── Info panel ── */

#info-panel {
  position: absolute;
  bottom: 24px;
  left: 20px;
  background: rgba(20, 22, 24, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 16px 11px;
  max-width: 280px;
  z-index: 15;
  transition: left var(--transition);
  pointer-events: none;
}

.info-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.info-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

/* ── Controls ── */

#controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 15;
}

.ctrl-btn {
  width: 36px;
  height: 36px;
  background: rgba(20, 22, 24, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  padding: 8px;
}

.ctrl-btn svg {
  fill: currentColor;
  width: 100%;
  height: 100%;
}

.ctrl-btn:hover {
  background: rgba(74, 158, 255, 0.15);
  color: var(--accent);
  border-color: rgba(74, 158, 255, 0.3);
}

.ctrl-btn.active {
  background: rgba(74, 158, 255, 0.2);
  color: var(--accent);
  border-color: rgba(74, 158, 255, 0.4);
}

