* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #000;
  color: #fff;
  font-family: "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
}

#pano {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* Sidebar Menu */
#sceneList {
  position: absolute;
  top: 40px;
  left: 0;
  width: 260px;
  background: rgba(32,38,44,0.95);
  z-index: 80;
  padding-top: 12px;
  border-top-right-radius: 6px;
  transition: transform 0.3s ease, left 0.25s ease, top 0.2s ease;
  max-height: calc(100% - 40px);
  overflow-y: auto;
  pointer-events: auto;
}
#sceneList.hidden { transform: translateX(-100%); }
#sceneList ul.scenes { list-style: none; margin: 0; padding: 0; }
#sceneList a.scene {
  display: block;
  text-decoration: none;
  color: #e6eef6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
#sceneList a.scene .text { padding: 10px 16px; font-size: 14px; }
#sceneList a.scene:hover { background: rgba(255, 255, 255, 0.05); cursor: pointer; }

.section {
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13px;
  color: #e6eef6;
  background: rgba(48,57,68,0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.section.collapsible { cursor: pointer; position: relative; pointer-events: auto; }
.section.collapsible::after {
  content: "▸";
  position: absolute;
  right: 14px;
  transition: transform 0.18s ease;
}
.section.collapsible.open::after { transform: rotate(90deg); }

.submenu {
  display: none;
  margin: 0;
  padding: 0;
  background: rgba(28, 33, 38, 0.95);
}
.submenu.open { display: block; }

.hidden-scene { display: none !important; }

/* Title Bar */
#titleBar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: rgba(58,68,84,0.85);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Menu toggle */
#menuToggle {
  position: absolute;
  left: 10px;
  top: 5px;
  width: 30px;
  height: 30px;
  background: rgba(103,115,131,0.85);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
}
#menuToggle:hover { background: rgba(130,145,161,0.9); }
#menuToggle .menu-arrow { display: block; }

/* Scene title */
#titleBar .sceneName {
  flex: 1;
  text-align: center;
  pointer-events: auto;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 60px;
}

/* Title controls */
#titleBar .titleControls {
  position: absolute;
  right: 10px;
  top: 5px;
  height: 30px;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
#titleBar .titleControls a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 30px;
  background: rgba(103, 115, 131, 0.85);
  border-radius: 3px;
  text-decoration: none;
}
#titleBar .titleControls a .icon {
  width: 18px;
  height: 18px;
  display: block;
}

/* Hotspots */
.hotspot { position: relative; }
.hotspot-inner {
  position: relative;
  left: -29px; /* moved 2px more left */
  top: -24px;
  pointer-events: none;
}
.hotspot-inner img {
  pointer-events: auto;
  width: 64px;
  height: 64px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease;
}
.hotspot-inner img:hover { transform: scale(1.08); }

/* Scrollbar */
#sceneList::-webkit-scrollbar { width: 6px; }
#sceneList::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

@media (max-width:700px) { #sceneList { width: 80%; } }

/* Fullscreen adjustment */
:fullscreen #titleBar, :-webkit-full-screen #titleBar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 99999;
}
:fullscreen #sceneList, :-webkit-full-screen #sceneList {
  position: fixed; top: 44px; left: 0; z-index: 99998;
  pointer-events: auto;
}

/* --- FIX: permanently hide default view control buttons --- */
.viewControlButton {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
/* === Safe Pulse Animation for Hotspot Icons === */
@keyframes pulseHotspot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.8;
  }
}

/* Apply only to the icon, not the parent hotspot */
.link-hotspot-icon,
.info-hotspot-icon {
  animation: pulseHotspot 1.8s ease-in-out infinite;
  transform-origin: center center;
}

