* {
  -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, Arial, sans-serif;
  font-size: 14px;
  background-color: #0b0b0c;
  color: #fff;
}

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

#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* --- Horní lišta a nadpis (přesně uprostřed nahoře) --- */
#titleBar {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 44px;
  text-align: center;
  pointer-events: none;
  z-index: 10;
}

#titleBar .sceneName {
  display: inline-block;
  max-width: 600px;
  height: 40px;
  line-height: 40px;
  padding: 0 24px;
  background: rgba(18, 18, 20, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 25px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  font-weight: 500;
  letter-spacing: 0.4px;
  color: #f3f4f6;

  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
  pointer-events: auto;
}

/* --- Tlačítka vpravo nahoře (Fullscreen, Autorotate) --- */
#fullscreenToggle, #autorotateToggle {
  position: absolute;
  top: 20px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: rgba(18, 18, 20, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

#fullscreenToggle:hover, #autorotateToggle:hover, #sceneListToggle:hover {
  background: rgba(35, 35, 40, 0.85);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

#fullscreenToggle {
  right: 20px;
  display: none;
}

body.fullscreen-enabled #fullscreenToggle {
  display: block;
}

#autorotateToggle {
  right: 70px;
}

#fullscreenToggle .icon, #autorotateToggle .icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  opacity: 0.85;
}

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

/* --- Tlačítko pro otevírání menu vlevo nahoře --- */
#sceneListToggle {
  position: absolute;
  top: 20px;
  left: 20px;
  height: 40px;
  padding: 0 14px 0 10px;
  background: rgba(18, 18, 20, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 25px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

#sceneListToggle .text {
  font-size: 13px;
  font-weight: 500;
  color: #f3f4f6;
  line-height: 40px;
}

#sceneListToggle .icon {
  width: 20px;
  height: 20px;
  opacity: 0.85;
}

#sceneListToggle .icon.on { display: none; }
#sceneListToggle .icon.off { display: block; }
#sceneListToggle.enabled .icon.on { display: block; }
#sceneListToggle.enabled .icon.off { display: none; }


/* --- Boční vysunovací panel se seznamem scén --- */
#sceneList {
  position: absolute;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  padding-top: 80px;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(14, 14, 16, 0.85) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.6);
  z-index: 25;
  transition: left 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);
}

#sceneList.enabled {
  left: 0;
}

.sidebar-brand {
  padding: 0 20px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}

.sidebar-brand h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px 0;
}

.sidebar-brand span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#sceneList .scenes {
  width: 100%;
  background: transparent !important;
  padding: 0 10px 20px 10px;
}

#sceneList .scene {
  display: block;
  width: 100%;
  height: 42px;
  margin-bottom: 4px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

#sceneList .scene .text {
  width: 100%;
  height: 100%;
  padding: 0 14px;
  line-height: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  transition: all 0.2s ease;
}

#sceneList .scene:hover .text {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

#sceneList .scene.current .text {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 500;
}

body.single-scene #sceneList, body.single-scene #sceneListToggle {
  display: none;
}


/* --- Link hotspot (stabilní, bez nechtěného zvětšování při najetí) --- */
.link-hotspot {
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  opacity: 0.9;
}

.link-hotspot-icon {
  width: 100%;
  height: 100%;
  cursor: pointer;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.link-hotspot-tooltip {
  position: absolute;
  left: 100%;
  top: 14px;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 500;
  max-width: 250px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(18, 18, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transform: translateX(-6px);
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

.no-touch .link-hotspot:hover .link-hotspot-tooltip {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}


/* --- Info hotspot (stabilní chování) --- */
.info-hotspot {
  line-height: 1.2em;
  opacity: 0.9;
}

.info-hotspot .info-hotspot-header {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(18, 18, 20, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  cursor: pointer;
}

.desktop.no-touch .info-hotspot .info-hotspot-header:hover,
.desktop .info-hotspot.visible .info-hotspot-header {
  width: 260px;
  border-radius: 12px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

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

.info-hotspot .info-hotspot-icon {
  width: 75%;
  height: 75%;
  margin: 12.5%;
}

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

.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 12px;
}

.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;
  font-weight: 500;
  font-size: 13.5px;
}

.info-hotspot .info-hotspot-close-wrapper {
  position: absolute;
  left: 260px;
  top: 0;
  height: 40px;
  width: 40px;
  border-top-right-radius: 12px;
  background: rgba(30, 30, 35, 0.9);
  cursor: pointer;
  visibility: hidden;
}

.desktop .info-hotspot.visible .info-hotspot-close-wrapper {
  visibility: visible;
}

.info-hotspot .info-hotspot-close-icon {
  width: 60%;
  height: 60%;
  margin: 20%;
}

.info-hotspot .info-hotspot-text {
  position: absolute;
  width: 300px;
  max-height: 200px;
  top: 40px;
  left: 0;
  padding: 16px;
  background: rgba(18, 18, 20, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  overflow-y: auto;
  visibility: hidden;
}

.desktop .info-hotspot.visible .info-hotspot-text {
  visibility: visible;
}


/* --- Spodní ovládací lišta kamery (šipky, zoom) --- */
.viewControlButton {
  display: none;
  position: absolute;
  bottom: 24px;
  left: 50%;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: rgba(18, 18, 20, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.viewControlButton:hover {
  background: rgba(35, 35, 40, 0.85);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

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

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

.viewControlButton .icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  opacity: 0.85;
}

/* Rozmístění spodních tlačítek na střed */
.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; }