/* ==========================================================================
   VITERBO 3D PUZZLE BOX DIORAMA // STYLESHEET
   Crisp Studio Lighting, Mobile-First Touch & Haptics, Zero-Text Immersion
   ========================================================================== */

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

html, body {
  width: 100vw;
  height: 100vh;
  min-height: 100%;
  overflow: hidden;
  background-color: #0c1117;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

body:active {
  cursor: grabbing;
}

#webgl-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

#webgl-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   Subtle Studio Radial Backdrop (Warm Tuscan Key Highlight, Crisp Contrast)
   -------------------------------------------------------------------------- */
.cinematic-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(
    circle at 50% 45%,
    transparent 45%,
    rgba(14, 20, 27, 0.4) 75%,
    rgba(8, 12, 18, 0.78) 100%
  );
}

/* --------------------------------------------------------------------------
   Visual Beacon / Touch Cue (Pure Golden Filigree Indicator, Zero Words)
   -------------------------------------------------------------------------- */
.touch-beacon {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.touch-beacon.hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
}

.beacon-pulse {
  width: 72px;
  height: 72px;
  border: 2px dashed rgba(255, 213, 79, 0.85);
  border-radius: 50%;
  animation: beaconPulse 2.2s ease-in-out infinite;
}

.beacon-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff9c4 20%, #ffca28 80%, #ff9800 100%);
  box-shadow: 0 0 16px rgba(255, 202, 40, 0.9), 0 0 32px rgba(255, 179, 0, 0.5);
  animation: dotBlink 1.4s ease-in-out infinite alternate;
}

@keyframes beaconPulse {
  0% {
    transform: scale(0.85) rotate(0deg);
    opacity: 0.35;
    box-shadow: 0 0 8px rgba(255, 213, 79, 0.2);
  }
  50% {
    transform: scale(1.18) rotate(180deg);
    opacity: 0.95;
    box-shadow: 0 0 24px rgba(255, 213, 79, 0.6);
  }
  100% {
    transform: scale(0.85) rotate(360deg);
    opacity: 0.35;
    box-shadow: 0 0 8px rgba(255, 213, 79, 0.2);
  }
}

@keyframes dotBlink {
  0% {
    transform: scale(0.85);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Touch Ripple Effect for Instant Tactile Feedback
   -------------------------------------------------------------------------- */
.touch-ripple {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 213, 79, 0.8);
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}

.touch-ripple.active {
  animation: ripplePop 0.45s ease-out forwards;
}

@keyframes ripplePop {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.8);
  }
}
