/* ==========================================================================
   INTERACTIVE 360° VIEWER MOCKUP & HUD STYLES - ROOM360
   2026 Edition — Neon Lime
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero Layout & Panorama Frame
   -------------------------------------------------------------------------- */
.hero-section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-20);
  position: relative;
  overflow: hidden;
}

/* 2026: ambient glow orbs behind hero */
.hero-section::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(168, 255, 0, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  text-align: center;
  max-width: 920px;
  margin: 0 auto var(--space-12);
  position: relative;
  z-index: 1;
}

.hero-title {
  margin-bottom: var(--space-6);
}

/* 2026: lime → chartreuse → pale yellow — the dopamine gradient */
.hero-title .text-gradient {
  background: linear-gradient(110deg, var(--cyan-primary) 0%, #d4ff33 45%, #ffe566 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0 0 18px rgba(168, 255, 0, 0.35));
}

.hero-description {
  font-size: clamp(1.1rem, 1.2vw + 0.85rem, 1.35rem);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-8);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}

/* --------------------------------------------------------------------------
   2. 360° Interactive Panorama Container (The Game Frame)
   -------------------------------------------------------------------------- */
.panorama-frame-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* 2026: outer glow aura around the game frame */
.panorama-frame-wrapper::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(135deg, rgba(168, 255, 0, 0.25) 0%, transparent 40%, transparent 60%, rgba(168, 255, 0, 0.1) 100%);
  z-index: -1;
  animation: frame-border-pulse 4s ease-in-out infinite;
}

@keyframes frame-border-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.panorama-frame {
  position: relative;
  background-color: var(--bg-darkest);
  border: 1px solid rgba(168, 255, 0, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 40px rgba(168, 255, 0, 0.10);
  overflow: hidden;
  user-select: none;
}

/* Embedded tour: let the iframe receive the browser's native scroll/touch input. */
.viewer-frame-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.viewer-frame {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-darkest);
  border: 1px solid rgba(168, 255, 0, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 40px rgba(168, 255, 0, 0.10);
}

.viewer-embed-container {
  position: relative;
  width: 100%;
  height: clamp(420px, 62vw, 680px);
  background-color: #060a07;
}

.viewer-embed-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  touch-action: auto;
}

.viewer-activation-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 6, 0.48);
  cursor: default;
}

.viewer-activation-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  max-width: calc(100% - 2rem);
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--cyan-primary);
  border-radius: var(--radius-xs);
  background: rgba(4, 8, 6, 0.86);
  color: var(--cyan-primary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(168, 255, 0, 0.2);
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.viewer-activation-button:hover,
.viewer-activation-button:focus-visible {
  background: rgba(168, 255, 0, 0.12);
  box-shadow: 0 0 30px rgba(168, 255, 0, 0.36);
  transform: translateY(-2px);
}

.viewer-activation-layer.is-active {
  display: none;
}

@media (max-width: 640px) {
  .viewer-embed-container {
    height: 70vh;
    min-height: 420px;
  }
}

/* Frame HUD Top Bar */
.hud-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  background-color: var(--bg-hud);
  border-bottom: 1px solid rgba(168, 255, 0, 0.10);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  z-index: 10;
  position: relative;
}

.hud-room-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hud-status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--cyan-primary);
  box-shadow: 0 0 10px var(--cyan-primary), 0 0 20px rgba(168, 255, 0, 0.5);
  animation: indicator-blink 2.5s ease-in-out infinite;
}

@keyframes indicator-blink {
  0%, 90%, 100% { opacity: 1; }
  95% { opacity: 0.3; }
}

.hud-room-title {
  color: var(--cyan-primary);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-shadow: 0 0 10px rgba(168, 255, 0, 0.5);
}

.hud-telemetry {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.hud-telemetry-item {
  display: inline-flex;
  gap: var(--space-1);
}

.hud-telemetry-val {
  color: var(--cyan-primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .hud-telemetry {
    display: none;
  }
}

/* Viewport Area */
.panorama-viewport {
  position: relative;
  height: 480px;
  cursor: grab;
  overflow: hidden;
  background-color: #060a07;
}

/* 2026: scan-line overlay on the panorama for terminal/tactical feel */
.panorama-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.10) 2px,
    rgba(0, 0, 0, 0.10) 3px
  );
  pointer-events: none;
  z-index: 9;
}

.panorama-viewport:active {
  cursor: grabbing;
}

@media (max-width: 768px) {
  .panorama-viewport {
    height: 360px;
  }
}

/* Panorama Track / Scene */
.panorama-track {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 300%;
  display: flex;
  transition: transform 0.05s ease-out;
  will-change: transform;
}

.panorama-scene {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Simulated Escape Room Environment Graphics */
.panorama-bg-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Reticle / Crosshair HUD */
.hud-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 10;
  opacity: 0.45;
  transition: opacity var(--transition-fast);
}

.hud-crosshair svg {
  stroke: var(--cyan-primary);
  filter: drop-shadow(0 0 4px rgba(168, 255, 0, 0.7));
}

.panorama-viewport:hover .hud-crosshair {
  opacity: 0.9;
}

/* Hotspots / Clue Markers */
.hotspot {
  position: absolute;
  z-index: 8;
  transform: translate(-50%, -50%);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.hotspot-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(168, 255, 0, 0.15);
  border: 2px solid var(--cyan-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--cyan-primary), 0 0 32px rgba(168, 255, 0, 0.3);
  animation: pulse-ring 2s infinite ease-in-out;
  transition: transform var(--transition-fast);
}

.hotspot:hover .hotspot-ring {
  transform: scale(1.15);
  background: rgba(168, 255, 0, 0.35);
}

.hotspot-icon {
  width: 18px;
  height: 18px;
  color: var(--text-highlight);
}

.hotspot-tag {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--bg-hud);
  border: 1px solid rgba(168, 255, 0, 0.22);
  color: var(--cyan-primary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.06em;
  clip-path: polygon(6px 0%, 100% 0%, 100% 100%, 0% 100%, 0% 6px);
}

@keyframes pulse-ring {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(168, 255, 0, 0.5), 0 0 12px var(--cyan-primary);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(168, 255, 0, 0), 0 0 22px var(--cyan-primary);
  }
}

/* Hotspot Inspection Modal / Popup HUD */
.hotspot-modal {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 440px;
  background: rgba(5, 7, 8, 0.95);
  border: 1px solid var(--cyan-primary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85), 0 0 28px rgba(168, 255, 0, 0.22);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  z-index: 20;
  display: none;
  animation: slideUp 200ms cubic-bezier(0.16, 1, 0.3, 1);
  clip-path: polygon(10px 0%, 100% 0%, 100% 100%, 0% 100%, 0% 10px);
}

.hotspot-modal.is-active {
  display: block;
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.hotspot-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  border-bottom: 1px solid rgba(168, 255, 0, 0.12);
  padding-bottom: var(--space-2);
}

.hotspot-modal-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--cyan-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-shadow: 0 0 8px rgba(168, 255, 0, 0.5);
}

.hotspot-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-1);
  transition: color var(--transition-fast);
}

.hotspot-modal-close:hover {
  color: var(--cyan-primary);
}

.hotspot-modal-body {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Frame HUD Bottom Bar */
.hud-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background-color: var(--bg-hud);
  border-top: 1px solid rgba(168, 255, 0, 0.10);
  z-index: 10;
  position: relative;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hud-inventory {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hud-inventory-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: var(--space-1);
}

.hud-inventory-slot {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-medium);
  background: rgba(168, 255, 0, 0.02);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-primary);
  font-size: 0.8rem;
  position: relative;
  clip-path: polygon(4px 0%, 100% 0%, 100% 100%, 0% 100%, 0% 4px);
}

.hud-inventory-slot.filled {
  border-color: var(--amber-border);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.hud-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hud-control-btn {
  background-color: rgba(168, 255, 0, 0.04);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  padding: 0.4rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  transition: all var(--transition-fast);
  letter-spacing: 0.04em;
}

.hud-control-btn:hover {
  border-color: rgba(168, 255, 0, 0.35);
  color: var(--cyan-primary);
  background-color: rgba(168, 255, 0, 0.10);
  box-shadow: 0 0 10px rgba(168, 255, 0, 0.12);
}

.hud-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* --------------------------------------------------------------------------
   3. Demo & Try It Interactive Section
   -------------------------------------------------------------------------- */
.demo-preview-card {
  position: relative;
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 50% 30%, rgba(168, 255, 0, 0.07) 0%, rgba(13, 20, 16, 0.97) 70%),
              var(--bg-card);
  padding: var(--space-16) var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(168, 255, 0, 0.08);
  overflow: hidden;
}

/* 2026: subtle scan-line on demo card too */
.demo-preview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(168, 255, 0, 0.006) 3px,
    rgba(168, 255, 0, 0.006) 4px
  );
  pointer-events: none;
  z-index: 0;
  border-radius: var(--radius-xl);
}

.demo-preview-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--amber-primary);
  background-color: rgba(245, 158, 11, 0.10);
  border: 1px solid var(--amber-border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-xs);
  margin-bottom: var(--space-4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.demo-preview-title {
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
}

.demo-preview-text {
  max-width: 640px;
  margin: 0 auto var(--space-8);
  font-size: var(--text-lg);
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.demo-meta-tag {
  margin-top: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}
