* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -ms-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -ms-content-zooming: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

html,
body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  background-color: #000;
  color: #fff;
}

a,
a:hover,
a:active,
a:visited {
  text-decoration: none;
  color: inherit;
}

#pano-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#pano.zoom-in {
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), filter 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.5s cubic-bezier(0.4,0,0.2,1);
  transform: scale(5);
  filter: blur(8px);
  opacity: 0;
  z-index: 2;
}
/* #pano.zoom-out {
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  transform: scale(1);
  z-index: 2;
} */
#pano {
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), filter 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.5s cubic-bezier(0.4,0,0.2,1);
  transform: scale(1);
  filter: none;
  opacity: 1;
}

/* Enhanced Title Bar */
#titleBar {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  height: auto;
  z-index: 1000;
  pointer-events: none;
}

.title-content {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 12px 16px;
  max-width: 600px;
  pointer-events: auto;
}

.breadcrumb {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumb-item {
  white-space: nowrap;
}

.breadcrumb-item.current {
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumb-separator {
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.5);
}

.sceneName {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Top Right Controls */
#topControls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 1000;
}

#topControls a {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

#topControls a:hover {
  background: rgba(0, 0, 0, 0.8);
}

#topControls .icon {
  width: 20px;
  height: 20px;
}

#autorotateToggle .icon.on,
#fullscreenToggle .icon.on,
#sceneListToggle .icon.on {
  display: none;
}

#autorotateToggle .icon.off,
#fullscreenToggle .icon.off,
#sceneListToggle .icon.off {
  display: block;
}

#autorotateToggle.enabled .icon.on,
#fullscreenToggle.enabled .icon.on,
#sceneListToggle.enabled .icon.on {
  display: block;
}

#autorotateToggle.enabled .icon.off,
#fullscreenToggle.enabled .icon.off,
#sceneListToggle.enabled .icon.off {
  display: none;
}

/* Scene Carousel - Updated Animation Logic */
#sceneCarousel {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 1000;
  margin-bottom: 20px;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default state - carousel visible */
#sceneCarousel {
  height: 120px;
}

/* Collapsed state - only buttons visible */
#sceneCarousel.carousel-collapsed {
  height: 40px;
  /* Height to accommodate only the toggle buttons */
}

#carouselToggleButtons {
  text-align: left;
  margin-bottom: 8px;
  transition: margin-bottom 0.3s ease-in-out;
  height: 32px;
  /* Fixed height for buttons */
  display: flex;
  align-items: center;
}

#sceneCarousel.carousel-collapsed #carouselToggleButtons {
  margin-bottom: 0;
}

#carouselToggleButtons button {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#carouselToggleButtons button:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-container {
  position: relative;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  opacity: 1;
}

/* Hidden state - completely removed from view */
.carousel-container.carousel-hidden {
  height: 0;
  padding: 0;
  margin: 0;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
}

.carousel-track {
  display: flex;
  gap: 12px;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 40px;
  transition: opacity 0.3s ease;
}

.carousel-container.carousel-hidden .carousel-track {
  opacity: 0;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.scene-thumbnail {
  flex-shrink: 0;
  width: 120px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  border: 2px solid transparent;
}

.scene-thumbnail:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.scene-thumbnail.active {
  border-color: #fff;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.thumbnail-image {
  width: 100%;
  height: 68px;
  object-fit: cover;
  background: #333;
}

.thumbnail-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 11px;
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.8);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  opacity: 1;
}

.carousel-container.carousel-hidden .carousel-nav {
  opacity: 0;
  pointer-events: none;
}

.carousel-nav:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 8px;
}

.carousel-next {
  right: 8px;
}

/* Bottom Right Info */
#bottomInfo {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.info-links {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-link {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}

.info-link:hover {
  color: #fff;
}

.info-separator {
  color: rgba(255, 255, 255, 0.4);
}

/* Legacy Scene List - Hidden by default but functional */
#sceneList {
  position: absolute;
  top: 0;
  left: -220px;
  padding-top: 40px;
  width: 220px;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  margin-left: 0;
  -webkit-transition: margin-left 0.5s ease-in-out;
  transition: margin-left 0.5s ease-in-out;
}

.mobile #sceneList {
  padding-top: 50px;
}

#sceneList .scenes {
  width: 100%;
  background-color: rgb(58, 68, 84);
  background-color: rgba(58, 68, 84, 0.8);
}

.mobile #sceneList {
  width: 100%;
  height: 100%;
  left: -100%;
}

.mobile #sceneList.enabled {
  margin-left: 100%;
}

.mobile #sceneList .scenes {
  height: 100%;
}

#sceneList.enabled {
  margin-left: 220px;
}

#sceneList .scene {
  display: block;
  width: 100%;
  height: 30px;
}

.mobile #sceneList .scene {
  height: 40px;
}

#sceneList .scene .text {
  width: 100%;
  height: 100%;
  padding: 0 15px;
  line-height: 30px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile #sceneList .scene .text {
  line-height: 40px;
}

.no-touch #sceneList .scene:hover {
  background-color: rgb(103, 115, 131);
  background-color: rgba(103, 115, 131, 0.8);
}

#sceneList .scene.current {
  background-color: rgb(103, 115, 131);
  background-color: rgba(103, 115, 131, 0.8);
}

/* Hide scene list when only a single scene exists */
body.single-scene #sceneList,
body.single-scene #sceneListToggle {
  display: none;
}

/* Link hotspot */
.link-hotspot {
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  opacity: 0.9;
  -webkit-transition: opacity 0.2s;
  transition: opacity 0.2s;
}

.no-touch .link-hotspot:hover {
  opacity: 1;
}

.mobile .link-hotspot {
  width: 70px;
  height: 70px;
}

.link-hotspot-icon {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.link-hotspot-tooltip {
  position: absolute;
  left: 100%;
  top: 14px;
  margin-left: 3px;
  font-size: 16px;
  max-width: 300px;
  padding: 8px 10px;
  border-radius: 5px;
  background-color: rgb(58, 68, 84);
  background-color: rgba(58, 68, 84, 0.8);
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  -ms-transform: translateX(-8px);
  -webkit-transform: translateX(-8px);
  transform: translateX(-8px);
  -webkit-transition: -ms-transform 0.3s, -webkit-transform 0.3s, transform 0.3s, opacity 0.3s;
  transition: -ms-transform 0.3s, -webkit-transform 0.3s, transform 0.3s, opacity 0.3s;
}

.mobile .link-hotspot-tooltip {
  top: 19px;
}

.no-touch .link-hotspot:hover .link-hotspot-tooltip {
  opacity: 1;
  -ms-transform: translateX(0);
  -webkit-transform: translateX(0);
  transform: translateX(0);
}

.link-hotspot-tooltip {
  pointer-events: none;
}

.no-touch .link-hotspot:hover .link-hotspot-tooltip {
  pointer-events: all;
}

.tooltip-fallback .link-hotspot-tooltip {
  display: none;
}

.no-touch .tooltip-fallback .link-hotspot:hover .link-hotspot-tooltip {
  display: block;
}

/* Info hotspot */
.info-hotspot {
  line-height: 1.2em;
  opacity: 0.9;
  -webkit-transition: opacity 0.2s 0.2s;
  transition: opacity 0.2s 0.2s;
}

.no-touch .info-hotspot:hover {
  opacity: 1;
  -webkit-transition: opacity 0.2s;
  transition: opacity 0.2s;
}

.info-hotspot.visible {
  opacity: 1;
}

.info-hotspot .info-hotspot-header {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background-color: rgb(103, 115, 131);
  cursor: pointer;
  -webkit-transition: width 0.3s ease-in-out 0.5s, border-radius 0.3s ease-in-out 0.5s;
  transition: width 0.3s ease-in-out 0.5s, border-radius 0.3s ease-in-out 0.5s;
}

.mobile .info-hotspot .info-hotspot-header {
  width: 50px;
  height: 50px;
  border-radius: 25px;
}

.desktop.no-touch .info-hotspot .info-hotspot-header:hover {
  width: 260px;
  border-radius: 5px;
  -webkit-transition: width 0.3s ease-in-out, border-radius 0.3s ease-in-out;
  transition: width 0.3s ease-in-out, border-radius 0.3s ease-in-out;
}

.desktop .info-hotspot.visible .info-hotspot-header,
.desktop.no-touch .info-hotspot.visible .info-hotspot-header:hover {
  width: 260px;
  border-radius: 5px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  -webkit-transition: width 0.3s ease-in-out, border-radius 0.3s ease-in-out;
  transition: width 0.3s ease-in-out, border-radius 0.3s ease-in-out;
}

.info-hotspot .info-hotspot-icon-wrapper {
  width: 40px;
  height: 40px;
}

.mobile .info-hotspot .info-hotspot-icon-wrapper {
  width: 50px;
  height: 50px;
}

.info-hotspot .info-hotspot-icon {
  width: 90%;
  height: 90%;
  margin: 5%;
}

.info-hotspot .info-hotspot-title-wrapper {
  position: absolute;
  left: 40px;
  top: 0;
  width: 0;
  height: 40px;
  padding: 0;
  overflow: hidden;
  -webkit-transition: width 0s 0.4s, padding 0s 0.4s;
  transition: width 0s 0.4s, padding 0s 0.4s;
}

.desktop .info-hotspot.visible .info-hotspot-title-wrapper,
.desktop.no-touch .info-hotspot .info-hotspot-header:hover .info-hotspot-title-wrapper {
  width: 220px;
  padding: 0 5px;
  -webkit-transition: width 0s 0.4s, padding 0s 0.4s;
  transition: width 0s 0.4s, padding 0s 0.4s;
}

.info-hotspot .info-hotspot-title-wrapper:before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  height: 100%;
}

.info-hotspot .info-hotspot-title {
  display: inline-block;
  vertical-align: middle;
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.info-hotspot .info-hotspot-close-wrapper {
  position: absolute;
  left: 260px;
  top: 0;
  height: 40px;
  width: 40px;
  border-top-right-radius: 5px;
  background-color: rgb(78, 88, 104);
  visibility: hidden;
  -ms-transform: perspective(200px) rotateY(90deg);
  -webkit-transform: perspective(200px) rotateY(90deg);
  transform: perspective(200px) rotateY(90deg);
  -ms-transform-origin: 0 50% 0;
  -webkit-transform-origin: 0 50% 0;
  transform-origin: 0 50% 0;
  -webkit-transition: -ms-transform 0.3s 0.3s, -webkit-transform 0.3s 0.3s, transform 0.3s 0.3s, visibility 0s 0.6s;
  transition: -ms-transform 0.3s 0.3s, -webkit-transform 0.3s 0.3s, transform 0.3s 0.3s, visibility 0s 0.6s;
}

.desktop .info-hotspot.visible .info-hotspot-close-wrapper {
  visibility: visible;
  -ms-transform: perspective(200px) rotateY(0deg);
  -webkit-transform: perspective(200px) rotateY(0deg);
  transform: perspective(200px) rotateY(0deg);
  -webkit-transition: -ms-transform 0.3s, -webkit-transform 0.3s, transform 0.3s, visibility 0s 0s;
  transition: -ms-transform 0.3s, -webkit-transform 0.3s, transform 0.3s, visibility 0s 0s;
}

.info-hotspot .info-hotspot-close-icon {
  width: 70%;
  height: 70%;
  margin: 15%;
}

.info-hotspot .info-hotspot-text {
  position: absolute;
  width: 300px;
  height: auto;
  max-height: 200px;
  top: 40px;
  left: 0;
  padding: 10px;
  background-color: rgb(58, 68, 84);
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  overflow-y: auto;
  visibility: hidden;
  -ms-transform: perspective(200px) rotateX(-89.999deg);
  -webkit-transform: perspective(200px) rotateX(-89.999deg);
  transform: perspective(200px) rotateX(-89.999deg);
  -ms-transform-origin: 50% 0 0;
  -webkit-transform-origin: 50% 0 0;
  transform-origin: 50% 0 0;
  -webkit-transition: -ms-transform 0.3s, -webkit-transform 0.3s, transform 0.3s, visibility 0s 0.3s;
  transition: -ms-transform 0.3s, -webkit-transform 0.3s, transform 0.3s, visibility 0s 0.3s;
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.desktop .info-hotspot.visible .info-hotspot-text {
  visibility: visible;
  -ms-transform: perspective(200px) rotateX(0deg);
  -webkit-transform: perspective(200px) rotateX(0deg);
  transform: perspective(200px) rotateX(0deg);
  -webkit-transition: -ms-transform 0.3s 0.3s, -webkit-transform 0.3s 0.3s, transform 0.3s 0.3s, visibility 0s 0s;
  transition: -ms-transform 0.3s 0.3s, -webkit-transform 0.3s 0.3s, transform 0.3s 0.3s, visibility 0s 0s;
}

/* Info hotspot modal */
.desktop .info-hotspot-modal {
  display: none;
}

.info-hotspot-modal {
  top: 0;
  left: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 11000 !important;
  background-color: rgba(0, 0, 0, 0.5);
  line-height: 1.2em;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 0.2s ease-in-out 0.5s, visibility 0s 0.7s;
  transition: opacity 0.2s ease-in-out 0.5s, visibility 0s 0.7s;
}

.info-hotspot-modal.visible {
  opacity: 1;
  visibility: visible;
  -webkit-transition: opacity 0.2s ease-in-out, visibility 0s 0s;
  transition: opacity 0.2s ease-in-out, visibility 0s 0s;
}

.info-hotspot-modal .info-hotspot-header {
  position: absolute;
  top: 60px;
  left: 10px;
  right: 10px;
  width: auto;
  height: 50px;
  background-color: rgb(103, 115, 131);
  background-color: rgba(103, 115, 131, 0.8);
  opacity: 0;
  -webkit-transition: opacity 0.3s ease-in-out 0.2s;
  transition: opacity 0.3s ease-in-out 0.2s;
}

.info-hotspot-modal.visible .info-hotspot-header {
  opacity: 1;
  -webkit-transition: opacity 0.3s ease-in-out 0.2s;
  transition: opacity 0.3s ease-in-out 0.2s;
}

.info-hotspot-modal .info-hotspot-icon-wrapper {
  width: 50px;
  height: 50px;
}

.info-hotspot-modal .info-hotspot-icon {
  width: 90%;
  height: 90%;
  margin: 5%;
}

.info-hotspot-modal .info-hotspot-title-wrapper {
  position: absolute;
  top: 0;
  left: 50px;
  right: 50px;
  width: auto;
  height: 50px;
  padding: 0 10px;
}

.info-hotspot-modal .info-hotspot-title-wrapper:before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  height: 100%;
}

.info-hotspot-modal .info-hotspot-title {
  display: inline-block;
  vertical-align: middle;
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.info-hotspot-modal .info-hotspot-close-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
  background-color: rgb(78, 88, 104);
  background-color: rgba(78, 88, 104, 0.8);
  cursor: pointer;
}

.info-hotspot-modal .info-hotspot-close-icon {
  width: 70%;
  height: 70%;
  margin: 15%;
}

.info-hotspot-modal .info-hotspot-text {
  position: absolute;
  top: 110px;
  bottom: 10px;
  left: 10px;
  right: 10px;
  padding: 10px;
  background-color: rgb(58, 68, 84);
  background-color: rgba(58, 68, 84, 0.8);
  overflow-y: auto;
  opacity: 0;
  -webkit-transition: opacity 0.3s ease-in-out;
  transition: opacity 0.3s ease-in-out;
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.info-hotspot-modal.visible .info-hotspot-text {
  opacity: 1;
  -webkit-transition: opacity 0.3s ease-in-out 0.4s;
  transition: opacity 0.3s ease-in-out 0.4s;
}

/* Custom hotspot styles */
.custom-hotspot {
  opacity: 0.9;
  -webkit-transition: opacity 0.2s, transform 0.2s;
  transition: opacity 0.2s, transform 0.2s;
}

.no-touch .custom-hotspot:hover {
  opacity: 1;
}

.custom-hotspot-icon {
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.custom-hotspot-text {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.custom-hotspot-tooltip {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.2s;
  transition: opacity 0.2s;
}

.no-touch .custom-hotspot:hover .custom-hotspot-tooltip {
  opacity: 1;
}

/* Custom hotspot animations */
.custom-hotspot.animated {
  animation-duration: 2s;
  animation-iteration-count: infinite;
}

.custom-hotspot.pulse-animation {
  animation-name: pulse;
}

.custom-hotspot.bounce-animation {
  animation-name: bounce;
}

.custom-hotspot.rotate-animation {
  animation-name: rotate;
}


/* Inverted Dropdown for Floor Switch - expand upwards */
.inverted-dropdown {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: 1.5px solid #444;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 14px;
  margin-left: 16px;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.inverted-dropdown:focus {
  border-color: #fff;
}

.inverted-dropdown option {
  background: #222;
  color: #fff;
}

/* Floor Switch Custom Menu */
.floor-switch-menu-wrapper {
  position: relative;
  display: inline-block;
  margin-left: 16px;
}

.floor-switch-btn {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: 1.5px solid #444;
  border-radius: 6px;
  padding: 6px 16px 6px 12px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
  width: auto;
  position: relative;
}

.floor-switch-btn:focus,
.floor-switch-btn[aria-expanded="true"] {
  border-color: #fff;
}

.floor-switch-arrow {
  transition: transform 0.2s;
}

.floor-switch-btn[aria-expanded="true"] .floor-switch-arrow {
  transform: rotate(180deg);
}

.floor-switch-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.95);
  border: 1.5px solid #444;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  min-width: 0;
  width: auto;
  z-index: 2000;
  list-style: none;
  padding: 4px 0;
  display: block;
  opacity: 1;
  animation: floorMenuUp 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes floorMenuUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floor-switch-item {
  padding: 8px 16px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}

.floor-switch-item:hover,
.floor-switch-item.active {
  background: #222;
}


#loaderOverlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* default: allow interaction when hidden */
  transition: opacity 0.2s;
  opacity: 0;
}
#loaderOverlay.visible {
  pointer-events: auto; /* block interaction when visible */
  opacity: 1;
}
#loaderOverlay .loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* View control buttons */
.viewControlButton {
  display: none;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 40px;
  height: 40px;
  padding: 5px;
  background-color: rgb(103, 115, 131);
  background-color: rgba(103, 115, 131, 0.8);
}

body.view-control-buttons .viewControlButton {
  display: block;
}

@media (max-width: 600px) {
  body.view-control-buttons .viewControlButton {
    display: none;
  }
}

.viewControlButton .icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
}

.viewControlButton-1 {
  margin-left: -145px;
}

.viewControlButton-2 {
  margin-left: -95px;
}

.viewControlButton-3 {
  margin-left: -45px;
}

.viewControlButton-4 {
  margin-left: 5px;
}

.viewControlButton-5 {
  margin-left: 55px;
}

.viewControlButton-6 {
  margin-left: 105px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  #titleBar {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .title-content {
    padding: 10px 12px;
  }

  .sceneName {
    font-size: 16px;
  }

  #topControls {
    top: 10px;
    right: 10px;
    gap: 6px;
  }

  #topControls a {
    width: 40px;
    height: 40px;
  }

  #sceneCarousel {
    bottom: 20px;
    left: 10px;
    right: 10px;
    height: 100px;
    margin-bottom: 20px;
  }

  #sceneCarousel.carousel-collapsed {
    height: 36px;
  }

  .carousel-container {
    padding: 12px;
  }

  .scene-thumbnail {
    width: 100px;
    height: 68px;
  }

  .thumbnail-image {
    height: 48px;
  }

  #bottomInfo {
    bottom: 120px;
    right: 10px;
  }
}

@media (max-width: 600px) {
  #titleBar {
    top: 20px;
    left: 10px;
    right: 60px;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  }

  .title-content {
    max-width: 60vw;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
  }

  #topControls {
    top: 10px;
    right: 10px;
    z-index: 1100;
    position: absolute;
  }
}

@media (max-width: 480px) {
  .breadcrumb {
    font-size: 11px;
  }

  #sceneCarousel {
    height: 90px;
    margin-bottom: 4px;
  }

  #sceneCarousel.carousel-collapsed {
    height: 32px;
  }

  .sceneName {
    font-size: 14px;
  }

  .scene-thumbnail {
    width: 80px;
    height: 58px;
  }

  .thumbnail-image {
    height: 40px;
  }

  .thumbnail-label {
    font-size: 10px;
    padding: 2px 4px;
  }
}