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

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
}

#scene-image,
#scene-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.5s ease;
}

#scene-image.hidden,
#scene-video.hidden {
  opacity: 0;
  pointer-events: none;
}

#scene-video {
  opacity: 0;
  pointer-events: none;
}

#scene-video.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 5;
}

/* Hotspot layer sits exactly over the rendered (letterboxed) image area */
#hotspot-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hotspot {
  position: absolute;
  cursor: pointer;
  pointer-events: auto;
  background: transparent;
  border: none;
  -webkit-tap-highlight-color: transparent;
}

/* Touch/tap indicator — shown ONLY on touch devices that have no
   hover capability (phones, tablets). Desktop mouse users never see
   this, so the hidden-link mechanic is preserved there. Detected via
   a CSS media feature, not device/user-agent sniffing, so it's
   automatic and reliable. */
.hotspot-icon {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@media (hover: none) and (pointer: coarse) {
  .hotspot-icon {
    display: block;
  }
}

.hotspot-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.7));
}

.hotspot-icon .pulse-ring {
  animation: hotspot-pulse 2.2s ease-out infinite;
  transform-origin: center;
}

@keyframes hotspot-pulse {
  0% { opacity: 0.85; transform: scale(0.6); }
  70% { opacity: 0; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* Debug mode reveals hotspot bounds for testing */
body.debug .hotspot {
  background: rgba(255, 0, 90, 0.28);
  outline: 1px dashed rgba(255, 255, 255, 0.8);
}

/* Video overlay — sits at the exact same scale/position as the
   hotspot layer, positioned over a scene's "screen" area */
#video-overlay-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#video-overlay {
  position: absolute;
  display: none;
  background: #000;
  overflow: hidden;
}

#video-overlay.active {
  display: block;
  pointer-events: auto;
}

#video-overlay iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

#video-overlay .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 10%;
  box-sizing: border-box;
}
