/* Reset & base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

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

/* Loader */
.loader {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7);
  color: #fff; z-index: 100;
  transition: opacity 0.4s;
}
.loader.hidden { opacity: 0; pointer-events: none; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Scene nav */
.scene-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: center; gap: 4px;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  z-index: 10;
}
.nav-btn {
  flex: 1; max-width: 120px;
  padding: 8px 4px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: #fff; font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.nav-btn:active { background: rgba(255,255,255,0.3); }
.nav-btn.active { background: rgba(255,255,255,0.35); border-color: #fff; }

/* Hide pannellum default controls on mobile */
.pannellum-button { display: none !important; }
.pannellum-control { display: none !important; }

/* Custom hotspot buttons — round, semi-transparent with arrow icons */
.pnlm-hotspot {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255, 255, 255, 0.5) !important;
  cursor: pointer !important;
  transition: background 0.2s, transform 0.15s;
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.pnlm-hotspot:hover {
  background: rgba(255, 255, 255, 0.45) !important;
  transform: scale(1.1);
}
.pnlm-hotspot.pnlm-scene {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
}
.pnlm-hotspot.pnlm-scene::after {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 24 24'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E") center/contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Directional arrows for scene hotspots */
.pnlm-hotspot.scene-left::after  { transform: rotate(180deg); }
.pnlm-hotspot.scene-right::after  { transform: rotate(0deg); }
.pnlm-hotspot.scene-up::after     { transform: rotate(-90deg); }
.pnlm-hotspot.scene-down::after    { transform: rotate(90deg); }

/* Info hotspot — different icon */
.pnlm-hotspot.pnlm-info {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}
.pnlm-hotspot.pnlm-info::after {
  content: 'i';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  font-style: italic;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Custom tooltip — pill style */
.pnlm-tooltip {
  border-radius: 20px !important;
  padding: 4px 16px !important;
  font-size: 13px !important;
  letter-spacing: 0.3px;
}
.pnlm-tooltip span {
  background: rgba(0, 0, 0, 0.75) !important;
  border-radius: 20px !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
}

/* A/B Toggle */
.option-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.option-label {
  color: #888;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.option-label.active {
  color: #fff;
}

.toggle-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 1.5rem;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  min-width: 2.5rem;
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.toggle-btn.active {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
}
