/* ============================================================
   Teledyne LeCroy — Interactive Product Guide
   scenes.css — Application Scene Animation System
   ============================================================ */

/* ============================================================
   1. SCENE VIEWER CONTAINER
   ============================================================ */

.scene-viewer {
  position: relative;
  width: 100%;
  min-height: 320px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(160deg, #0d1b2a 0%, #1a2d42 30%, #0a2240 65%, #071829 100%);
  overflow: hidden;
  border-radius: 12px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: default;
  user-select: none;
}

/* Subtle grid overlay for technical feel */
.scene-viewer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 118, 192, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 118, 192, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Vignette */
.scene-viewer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 85% 85% at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Scan line effect for added technical atmosphere */
.scene-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.04) 3px,
    rgba(0, 0, 0, 0.04) 4px
  );
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
}

/* ============================================================
   2. SCENE BASE LAYER
   ============================================================ */

.scene-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transition:
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.4s ease;
  z-index: 3;
  will-change: transform, opacity;
}

.scene-base img,
.scene-base svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Zoomed state */
.scene-base.scene-zoomed {
  transform: scale(2.5) translate(var(--zoom-tx, 0%), var(--zoom-ty, 0%));
}

/* Per-region zoom offsets — set via CSS custom properties or inline style */
.scene-base.scene-zoom-center  { --zoom-tx:   0%; --zoom-ty:   0%; }
.scene-base.scene-zoom-tl      { --zoom-tx:  18%; --zoom-ty:  15%; }
.scene-base.scene-zoom-tr      { --zoom-tx: -18%; --zoom-ty:  15%; }
.scene-base.scene-zoom-bl      { --zoom-tx:  18%; --zoom-ty: -15%; }
.scene-base.scene-zoom-br      { --zoom-tx: -18%; --zoom-ty: -15%; }
.scene-base.scene-zoom-left    { --zoom-tx:  20%; --zoom-ty:   0%; }
.scene-base.scene-zoom-right   { --zoom-tx: -20%; --zoom-ty:   0%; }
.scene-base.scene-zoom-top     { --zoom-tx:   0%; --zoom-ty:  15%; }
.scene-base.scene-zoom-bottom  { --zoom-tx:   0%; --zoom-ty: -15%; }

/* Transition states */
.scene-transitioning {
  pointer-events: none;
}

.scene-entering {
  animation: sceneEnter 0.6s ease forwards;
}

.scene-leaving {
  animation: sceneLeave 0.4s ease forwards;
}

/* ============================================================
   3. HOTSPOT SYSTEM
   ============================================================ */

.scene-hotspot {
  position: absolute;
  z-index: 10;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scene-hotspot:hover {
  transform: translate(-50%, -50%) scale(1.2);
  z-index: 20;
}

/* Hotspot inner structure */
.hotspot-core {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 2;
  transition: background-color 200ms ease, transform 150ms ease;
}

.scene-hotspot:hover .hotspot-core {
  background-color: #ffffff;
  transform: scale(1.15);
}

/* Pulsing rings */
.hotspot-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  animation: hotspotPulse 2.2s ease-out infinite;
  pointer-events: none;
}

.hotspot-ring:nth-child(1) {
  width: 24px;
  height: 24px;
  animation-delay: 0s;
}

.hotspot-ring:nth-child(2) {
  width: 36px;
  height: 36px;
  animation-delay: 0.5s;
}

.hotspot-ring:nth-child(3) {
  width: 48px;
  height: 48px;
  animation-delay: 1s;
}

/* Category color overrides */
.scene-hotspot.hotspot-power .hotspot-core {
  background-color: #F47920;
  box-shadow: 0 2px 12px rgba(244, 121, 32, 0.6);
}

.scene-hotspot.hotspot-power .hotspot-ring {
  border-color: rgba(244, 121, 32, 0.5);
}

.scene-hotspot.hotspot-digital .hotspot-core {
  background-color: #0076C0;
  box-shadow: 0 2px 12px rgba(0, 118, 192, 0.6);
}

.scene-hotspot.hotspot-digital .hotspot-ring {
  border-color: rgba(0, 118, 192, 0.5);
}

.scene-hotspot.hotspot-automotive .hotspot-core {
  background-color: #5CC151;
  box-shadow: 0 2px 12px rgba(92, 193, 81, 0.6);
}

.scene-hotspot.hotspot-automotive .hotspot-ring {
  border-color: rgba(92, 193, 81, 0.5);
}

.scene-hotspot.hotspot-rf .hotspot-core {
  background-color: #FDB913;
  box-shadow: 0 2px 12px rgba(253, 185, 19, 0.6);
}

.scene-hotspot.hotspot-rf .hotspot-ring {
  border-color: rgba(253, 185, 19, 0.5);
}

/* Active hotspot state */
.scene-hotspot.active .hotspot-core {
  transform: scale(1.4);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.scene-hotspot.active .hotspot-ring {
  animation-play-state: paused;
  opacity: 0.8;
}

/* Hotspot label tooltip */
.hotspot-label {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(7, 24, 41, 0.92);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 150ms ease, transform 150ms ease;
  border: 1px solid rgba(0, 118, 192, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.hotspot-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(7, 24, 41, 0.92);
}

.scene-hotspot:hover .hotspot-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hotspot-label-sub {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

/* ============================================================
   4. SCENE NAVIGATION (PILL ROW)
   ============================================================ */

.scene-nav {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  gap: 6px;
  padding: 6px;
  background-color: rgba(7, 24, 41, 0.72);
  backdrop-filter: blur(12px);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  flex-wrap: nowrap;
  overflow: visible;
}

.scene-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease,
    transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  background-color: transparent;
}

.scene-nav-pill:hover {
  color: rgba(255, 255, 255, 0.9);
  background-color: rgba(255, 255, 255, 0.08);
}

.scene-nav-pill.active {
  background-color: #0076C0;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.04);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 118, 192, 0.5);
}

.scene-nav-pill svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ============================================================
   5. SCENE LABEL OVERLAYS
   ============================================================ */

.scene-label {
  position: absolute;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: rgba(255, 255, 255, 0.96);
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 300ms ease, transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(0, 118, 192, 0.15);
}

.scene-label.visible {
  opacity: 1;
  transform: scale(1);
  animation: labelAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.scene-label svg {
  width: 14px;
  height: 14px;
  color: #0076C0;
  flex-shrink: 0;
}

.scene-label-text {
  font-size: 12px;
  font-weight: 700;
  color: #1a1b1c;
  white-space: nowrap;
}

.scene-label-value {
  font-size: 11px;
  color: #58595B;
  font-family: 'Roboto Mono', monospace;
  margin-left: 2px;
}

/* Label connector line */
.scene-label-line {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.4);
  transform-origin: 0 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
  z-index: 11;
}

.scene-label.visible + .scene-label-line {
  opacity: 1;
}

/* ============================================================
   6. INDIVIDUAL SCENE HOTSPOT POSITIONS
   ============================================================ */

/* --- IVN / Automotive Car Scene --- */
.scene-ivn .scene-hotspot[data-zone="can-bus"] {
  left: 38%;
  top: 52%;
}

.scene-ivn .scene-hotspot[data-zone="lin"] {
  left: 52%;
  top: 45%;
}

.scene-ivn .scene-hotspot[data-zone="sent"] {
  left: 65%;
  top: 38%;
}

.scene-ivn .scene-hotspot[data-zone="automotive-eth"] {
  left: 25%;
  top: 42%;
}

.scene-ivn .scene-hotspot[data-zone="flexray"] {
  left: 72%;
  top: 55%;
}

.scene-ivn .scene-hotspot[data-zone="most"] {
  left: 42%;
  top: 68%;
}

.scene-ivn .scene-hotspot[data-zone="canfd"] {
  left: 30%;
  top: 62%;
}

/* IVN labels */
.scene-ivn .scene-label[data-zone="can-bus"] {
  left: 41%;
  top: 38%;
}

.scene-ivn .scene-label[data-zone="lin"] {
  left: 55%;
  top: 31%;
}

.scene-ivn .scene-label[data-zone="automotive-eth"] {
  left: 10%;
  top: 29%;
}

/* --- PC Tower Scene --- */
.scene-pc-tower .scene-hotspot[data-zone="pcie"] {
  left: 55%;
  top: 35%;
}

.scene-pc-tower .scene-hotspot[data-zone="ddr5"] {
  left: 42%;
  top: 28%;
}

.scene-pc-tower .scene-hotspot[data-zone="usb4"] {
  left: 68%;
  top: 55%;
}

.scene-pc-tower .scene-hotspot[data-zone="thunderbolt"] {
  left: 72%;
  top: 65%;
}

.scene-pc-tower .scene-hotspot[data-zone="sata"] {
  left: 38%;
  top: 62%;
}

.scene-pc-tower .scene-hotspot[data-zone="m2-nvme"] {
  left: 50%;
  top: 50%;
}

/* --- Power Electronics Lab Scene --- */
.scene-power-lab .scene-hotspot[data-zone="gate-drive"] {
  left: 25%;
  top: 40%;
}

.scene-power-lab .scene-hotspot[data-zone="pwm"] {
  left: 45%;
  top: 35%;
}

.scene-power-lab .scene-hotspot[data-zone="current-sense"] {
  left: 65%;
  top: 48%;
}

.scene-power-lab .scene-hotspot[data-zone="thermal"] {
  left: 55%;
  top: 62%;
}

.scene-power-lab .scene-hotspot[data-zone="switcher"] {
  left: 35%;
  top: 58%;
}

.scene-power-lab .scene-hotspot[data-zone="bus-voltage"] {
  left: 20%;
  top: 55%;
}

/* --- PCB Development Board Scene --- */
.scene-pcb .scene-hotspot[data-zone="mcu"] {
  left: 50%;
  top: 45%;
}

.scene-pcb .scene-hotspot[data-zone="i2c"] {
  left: 32%;
  top: 38%;
}

.scene-pcb .scene-hotspot[data-zone="spi"] {
  left: 68%;
  top: 38%;
}

.scene-pcb .scene-hotspot[data-zone="uart"] {
  left: 62%;
  top: 62%;
}

.scene-pcb .scene-hotspot[data-zone="jtag"] {
  left: 25%;
  top: 60%;
}

.scene-pcb .scene-hotspot[data-zone="power-rail"] {
  left: 40%;
  top: 68%;
}

/* ============================================================
   7. SCENE SELECTOR TABS
   ============================================================ */

.scene-selector {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 0 2px;
  margin-bottom: var(--sp-3, 12px);
  border-bottom: 2px solid rgba(0, 118, 192, 0.15);
}

.scene-selector::-webkit-scrollbar {
  display: none;
}

.scene-selector-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #58595B;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition:
    color 150ms ease,
    border-color 150ms ease;
  position: relative;
  flex-shrink: 0;
}

.scene-selector-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity 150ms ease;
}

.scene-selector-tab:hover {
  color: #0076C0;
}

.scene-selector-tab:hover svg {
  opacity: 0.9;
}

.scene-selector-tab.active {
  color: #0076C0;
  font-weight: 700;
  border-bottom-color: #0076C0;
}

.scene-selector-tab.active svg {
  opacity: 1;
}

.scene-selector-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  background-color: #e8e8e8;
  color: #58595B;
  transition: background-color 150ms ease, color 150ms ease;
}

.scene-selector-tab.active .scene-selector-tab-count {
  background-color: #0076C0;
  color: #ffffff;
}

/* ============================================================
   8. ZOOM CLICK HELPER
   ============================================================ */

.scene-zoom-hint {
  position: absolute;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background-color: rgba(7, 24, 41, 0.65);
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  white-space: nowrap;
  animation: zoomHintFade 4s ease forwards;
}

.scene-zoom-hint svg {
  width: 13px;
  height: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.scene-zoom-hint.hidden {
  display: none;
}

@keyframes zoomHintFade {
  0%    { opacity: 0; transform: translateX(-50%) translateY(6px); }
  15%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  70%   { opacity: 1; }
  100%  { opacity: 0; }
}

/* ============================================================
   9. SCENE BREADCRUMB
   ============================================================ */

.scene-breadcrumb {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.scene-breadcrumb.visible {
  opacity: 1;
}

.breadcrumb-segment {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 9999px;
  background-color: rgba(7, 24, 41, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: color 150ms ease, background-color 150ms ease;
}

.breadcrumb-segment:hover {
  color: rgba(255, 255, 255, 0.95);
  background-color: rgba(0, 118, 192, 0.35);
}

.breadcrumb-segment.current {
  color: #ffffff;
  font-weight: 600;
  cursor: default;
  background-color: rgba(0, 118, 192, 0.3);
}

.breadcrumb-separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  user-select: none;
}

/* ============================================================
   10. SCENE BACK BUTTON
   ============================================================ */

.scene-back-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 10px;
  background-color: rgba(7, 24, 41, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition:
    opacity 250ms ease,
    transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 150ms ease;
}

.scene-back-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.scene-back-btn:hover {
  background-color: rgba(0, 118, 192, 0.5);
  color: #ffffff;
  border-color: rgba(0, 118, 192, 0.4);
}

.scene-back-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ============================================================
   11. ZOOM REGION OVERLAY
   ============================================================ */

.zoom-region {
  position: absolute;
  z-index: 8;
  cursor: zoom-in;
  border-radius: 8px;
  border: 1.5px solid rgba(0, 118, 192, 0);
  transition:
    border-color 200ms ease,
    background-color 200ms ease;
}

.zoom-region::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 10px;
  border: 1px dashed rgba(0, 118, 192, 0);
  transition: border-color 200ms ease;
}

.zoom-region:hover {
  border-color: rgba(0, 118, 192, 0.5);
  background-color: rgba(0, 118, 192, 0.06);
}

.zoom-region:hover::before {
  border-color: rgba(0, 118, 192, 0.25);
}

/* When scene is zoomed, show an explicit cursor to indicate you can zoom back */
.scene-viewer.is-zoomed {
  cursor: zoom-out;
}

.scene-viewer.is-zoomed .scene-nav {
  bottom: 56px;
}

/* ============================================================
   12. MEASUREMENT OVERLAY (appears when zoomed)
   ============================================================ */

.scene-measurement {
  position: absolute;
  z-index: 13;
  pointer-events: none;
  opacity: 0;
  transition: opacity 350ms ease 200ms;
}

.scene-measurement.visible {
  opacity: 1;
}

.measurement-line {
  position: absolute;
  background: rgba(253, 185, 19, 0.8);
  box-shadow: 0 0 6px rgba(253, 185, 19, 0.5);
}

.measurement-line.horizontal {
  height: 1.5px;
  width: 100%;
  left: 0;
}

.measurement-line.vertical {
  width: 1.5px;
  height: 100%;
  top: 0;
}

.measurement-label {
  position: absolute;
  background-color: rgba(7, 24, 41, 0.85);
  color: #FDB913;
  font-family: 'Roboto Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(253, 185, 19, 0.3);
  white-space: nowrap;
}

/* ============================================================
   13. SCENE INFO PANEL (side details during zoom)
   ============================================================ */

.scene-info-panel {
  position: absolute;
  right: 14px;
  top: 14px;
  bottom: 70px;
  width: 200px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.scene-info-panel.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.scene-info-card {
  background-color: rgba(7, 24, 41, 0.82);
  backdrop-filter: blur(12px);
  border-radius: 10px;
  border: 1px solid rgba(0, 118, 192, 0.25);
  padding: 10px 12px;
  animation: labelAppear 0.35s ease backwards;
}

.scene-info-card:nth-child(1) { animation-delay: 0.05s; }
.scene-info-card:nth-child(2) { animation-delay: 0.12s; }
.scene-info-card:nth-child(3) { animation-delay: 0.19s; }

.scene-info-card-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.scene-info-card-value {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  font-family: 'Roboto Mono', monospace;
  line-height: 1.2;
}

.scene-info-card-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 3px;
}

.scene-info-card-bar {
  margin-top: 8px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}

.scene-info-card-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #0076C0, #5CC151);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   14. SCENE TRANSITION ANIMATIONS
   ============================================================ */

@keyframes sceneEnter {
  0% {
    opacity: 0;
    transform: scale(1.04) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes sceneLeave {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.97) translateY(-6px);
  }
}

@keyframes hotspotPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

@keyframes labelAppear {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(6px);
  }
  60% {
    transform: scale(1.04) translateY(-1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes zoomIn {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(2.5) translate(var(--zoom-tx, 0%), var(--zoom-ty, 0%));
  }
}

@keyframes zoomOut {
  0% {
    transform: scale(2.5) translate(var(--zoom-tx, 0%), var(--zoom-ty, 0%));
  }
  100% {
    transform: scale(1) translate(0, 0);
  }
}

@keyframes hotspotsReveal {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  60% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Staggered hotspot reveal */
.scene-hotspot {
  animation: hotspotsReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.scene-hotspot:nth-child(1) { animation-delay: 0.3s; }
.scene-hotspot:nth-child(2) { animation-delay: 0.4s; }
.scene-hotspot:nth-child(3) { animation-delay: 0.5s; }
.scene-hotspot:nth-child(4) { animation-delay: 0.6s; }
.scene-hotspot:nth-child(5) { animation-delay: 0.7s; }
.scene-hotspot:nth-child(6) { animation-delay: 0.8s; }
.scene-hotspot:nth-child(7) { animation-delay: 0.9s; }

/* ============================================================
   15. SCENE WAVEFORM OVERLAY
   ============================================================ */

.scene-waveform-overlay {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  width: 200px;
  height: 50px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
}

.scene-waveform-overlay.visible {
  opacity: 1;
}

.scene-waveform-svg {
  width: 100%;
  height: 100%;
}

/* Animated waveform path */
.waveform-path {
  fill: none;
  stroke: #5CC151;
  stroke-width: 1.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px rgba(92, 193, 81, 0.6));
}

.waveform-path-trigger {
  stroke: #FDB913;
  stroke-dasharray: 3 2;
}

/* ============================================================
   16. RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 1024px) {
  .scene-info-panel {
    width: 170px;
  }

  .scene-nav-pill {
    padding: 5px 10px;
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .scene-viewer {
    border-radius: 8px;
  }

  .scene-nav {
    bottom: 42px;
    max-width: calc(100% - 24px);
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    gap: 4px;
    padding: 4px;
  }

  .scene-nav::-webkit-scrollbar {
    display: none;
  }

  .scene-nav-pill {
    padding: 5px 10px;
    font-size: 11px;
  }

  .scene-info-panel {
    display: none;
  }

  .scene-breadcrumb {
    top: 8px;
    left: 8px;
  }

  .breadcrumb-segment {
    font-size: 10.5px;
    padding: 2px 6px;
  }

  .scene-back-btn {
    top: 8px;
    left: 8px;
    padding: 5px 10px 5px 8px;
    font-size: 11px;
  }

  .scene-selector-tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  .hotspot-ring:nth-child(2),
  .hotspot-ring:nth-child(3) {
    display: none;
  }
}

/* ============================================================
   17. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .scene-base {
    transition: opacity 0.01ms;
  }

  .scene-base.scene-zoomed {
    transition: none;
  }

  .hotspot-ring {
    animation: none;
    opacity: 0.4;
  }

  .scene-hotspot {
    animation: none;
    opacity: 1;
  }

  .scene-entering {
    animation: none;
    opacity: 1;
  }

  .scene-leaving {
    animation: none;
    opacity: 0;
  }

  .scene-label {
    transition: opacity 0.01ms;
  }

  .scene-back-btn {
    transition: opacity 0.01ms, background-color 0.01ms;
  }

  .scene-zoom-hint {
    animation: none;
    opacity: 0.8;
  }
}
