

:root {
  --bg-dark: #07090e;
  --bg-surface: rgba(15, 20, 30, 0.75);
  --bg-surface-hover: rgba(26, 34, 51, 0.85);
  --accent-cyan: #ef3139; /* Brand Red */
  --accent-blue: #d81b24; /* Darker Brand Red */
  --accent-purple: #7928ca;
  --accent-emerald: #ef3139; /* Brand Red */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(239, 49, 57, 0.4); /* Brand Red Glow */
  --glass-blur: blur(16px);
  --font-main: "Archivo", sans-serif;
  --font-mono: "Archivo", sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-neon: 0 0 25px rgba(239, 49, 57, 0.35); /* Brand Red Shadow Glow */
}

/* ==========================================================================
   SCROLL TRACK & STICKY VIEWPORT
   ========================================================================== */

/* The physical height container that controls the scroll scrubbing depth */
.sw-container {
  position: relative;
  width: 100%;
  height: 800vh; /* 200vh per scene for ultra-smooth scrubbing resolution */
  background: var(--bg-dark);
  overflow: visible;
}

.tour-viewport {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-dark);
  z-index: 10;
  user-select: none;
}

/* ==========================================================================
   VIDEO CONTAINER & LAYERING
   ========================================================================== */

.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 1;
}

.tour-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.tour-video.active {
  opacity: 1;
  pointer-events: auto;
}

/* Vignette and Subtle Ambient Grid */
.cinematic-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(7, 9, 14, 0) 45%,
    rgba(7, 9, 14, 0.45) 80%,
    rgba(7, 9, 14, 0.85) 100%
  );
  pointer-events: none;
  z-index: 3;
}

.scanline-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.15) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  opacity: 0.4;
  z-index: 4;
}

/* ==========================================================================
   CINEMATIC DHAMAKEDAAR PRELOADER (JAYSHREE TECHNOSOFT)
   ========================================================================== */

.preloader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.preloader.hidden {
  opacity: 0;
  transform: scale(1.05);
  visibility: hidden;
  pointer-events: none;
}

.preloader-bg-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(239, 49, 57, 0.08) 0%, rgba(239, 49, 57, 0.04) 50%, transparent 70%);
  filter: blur(80px);
  animation: glowPulse 4s ease-in-out infinite alternate;
  pointer-events: none;
}

.preloader-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(239, 49, 57, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 49, 57, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.8;
  pointer-events: none;
}

@keyframes glowPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

.loader-content {
  position: relative;
  z-index: 10;
  text-align: center;
  background: none;
  border: none;
  backdrop-filter: none;
  box-shadow: none;
  padding: 0;
}

/* Emblem & Orbit Rings */
.loader-emblem-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emblem-pulse-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  transform-origin: center center;
}

.emblem-pulse-ring.ring-1 {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-width: 3px;
  border-top-color: #ef3139;
  border-bottom-color: #ef3139;
  animation: spinSlow 3s linear infinite;
  box-shadow: 0 0 20px rgba(239, 49, 57, 0.2);
}

.emblem-pulse-ring.ring-2 {
  width: calc(100% + 36px);
  height: calc(100% + 36px);
  top: -18px;
  left: -18px;
  border-width: 3px;
  border-left-color: rgba(239, 49, 57, 0.5);
  border-right-color: rgba(239, 49, 57, 0.3);
  animation: spinReverse 4s linear infinite;
}

.emblem-inner-orb {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at 35% 35%, #ffffff, #f8f9fb);
  border: 2px solid rgba(239, 49, 57, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 30px rgba(239, 49, 57, 0.06), 0 0 50px rgba(239, 49, 57, 0.15), 0 8px 32px rgba(0, 0, 0, 0.08);
}

.preloader-logo-img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 2px 8px rgba(239, 49, 57, 0.35));
  animation: logoPulse 2.5s ease-in-out infinite;
  display: block;
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

@keyframes spinReverse {
  to { transform: rotate(-360deg); }
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 2px 8px rgba(239, 49, 57, 0.35)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 4px 16px rgba(239, 49, 57, 0.5)); }
}

/* Titles */
.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(239, 49, 57, 0.1);
  border: 1px solid rgba(239, 49, 57, 0.3);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  margin-bottom: 14px;
}

.pill-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseDot 1.5s infinite;
}

.loader-brand-title {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #ffffff 20%, var(--accent-cyan) 60%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.loader-tagline {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 32px;
}

/* Progress Track */
.loader-metrics {
  margin-bottom: 28px;
}

.loader-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
}

.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-emerald));
  border-radius: 12px;
  position: relative;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 20px var(--accent-cyan);
}

.progress-glow-tip {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: #fff;
  filter: blur(2px);
  box-shadow: 0 0 15px #fff;
}

.loader-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
}

.loader-status-text {
  color: var(--text-muted);
  letter-spacing: 1px;
}

.loader-percent {
  font-weight: 700;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px var(--accent-cyan);
}

/* Enter Button */
.btn-enter-hq {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  border-radius: 16px;
  color: #040914;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(239, 49, 57, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.btn-enter-hq:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 50px rgba(239, 49, 57, 0.8);
}

.btn-enter-hq.disabled {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.6);
}

/* ==========================================================================
   HUD HEADER
   ========================================================================== */

.hud-header {
  position: absolute;
  top: 110px; /* Placed below main website header */
  left: 32px;
  right: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  pointer-events: none;
}

.hud-header > * {
  pointer-events: auto;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  backdrop-filter: var(--glass-blur);
  border-radius: 50px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-emerald);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-main {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
}

.brand-sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent-cyan);
}

.mode-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(239, 49, 57, 0.08);
  border: 1px solid var(--border-glow);
  border-radius: 30px;
  backdrop-filter: var(--glass-blur);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(239, 49, 57, 0.15);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  backdrop-filter: var(--glass-blur);
  color: var(--text-main);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.hud-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(239, 49, 57, 0.25);
}

.hud-btn.highlight {
  background: linear-gradient(135deg, rgba(239, 49, 57, 0.2), rgba(216, 27, 36, 0.2));
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.hud-btn.highlight.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #040914;
  box-shadow: 0 0 25px rgba(239, 49, 57, 0.5);
}

/* ==========================================================================
   CHAPTER INFO CARD (BOTTOM LEFT)
   ========================================================================== */

.chapter-info-card {
  position: absolute;
  bottom: 90px;
  left: 24px;
  max-width: 360px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  backdrop-filter: var(--glass-blur);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  z-index: 20;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: var(--transition-smooth);
  animation: floatInfoCard 6s ease-in-out infinite alternate;
}

@keyframes floatInfoCard {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.chapter-number-badge {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(239, 49, 57, 0.4);
  padding: 6px 10px;
  background: rgba(239, 49, 57, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(239, 49, 57, 0.20);
}

.chapter-number-badge .sep {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 1px;
}

.chapter-number-badge .total-num {
  font-size: 13px;
  color: var(--text-dim);
}

.chapter-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-emerald);
  margin-bottom: 4px;
}

.chapter-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.chapter-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ==========================================================================
   SIDE CHAPTER NAVIGATOR
   ========================================================================== */

.side-chapter-nav {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 20;
}

.nav-line-bg {
  position: absolute;
  top: 12px;
  bottom: 12px;
  right: 7px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: -1;
  border-radius: 2px;
}

.nav-line-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-emerald));
  border-radius: 2px;
  box-shadow: 0 0 10px var(--accent-cyan);
  transition: height 0.3s ease;
}

.chapter-dot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.dot-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition-smooth);
  white-space: nowrap;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 6px 12px;
  border-radius: 8px;
  backdrop-filter: var(--glass-blur);
}

.dot-indicator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: var(--transition-smooth);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.chapter-dot:hover .dot-label,
.chapter-dot.active .dot-label {
  opacity: 1;
  transform: translateX(0);
  color: #fff;
}

.chapter-dot:hover .dot-indicator {
  border-color: var(--accent-cyan);
  transform: scale(1.2);
}

.chapter-dot.active .dot-indicator {
  background: var(--accent-cyan);
  border-color: #fff;
  box-shadow: 0 0 16px var(--accent-cyan);
  transform: scale(1.3);
}

.chapter-dot.active .dot-label {
  color: var(--accent-cyan);
  border-color: var(--border-glow);
}

/* ==========================================================================
   INTERACTIVE AR HOTSPOTS
   ========================================================================== */

.hotspots-layer {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.6);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
}

.hotspot.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hotspot-pin {
  position: relative;
  width: 36px;
  height: 36px;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 14px;
  box-shadow: 0 0 20px rgba(239, 49, 57, 0.6);
  z-index: 2;
  transition: var(--transition-smooth);
}

.hotspot-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  animation: radarPulse 2s infinite ease-out;
  z-index: 1;
}

@keyframes radarPulse {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.hotspot-card {
  position: absolute;
  left: 48px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  width: 240px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  backdrop-filter: var(--glass-blur);
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(239, 49, 57, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: var(--transition-smooth);
  z-index: 10;
}

.hotspot:hover .hotspot-pin {
  transform: scale(1.15);
  background: var(--accent-cyan);
  color: #040914;
}

.hotspot:hover .hotspot-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.hotspot-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-emerald);
  margin-bottom: 4px;
}

.hotspot-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.hotspot-card p {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ==========================================================================
   MINIMAP & RADAR WIDGET (BOTTOM RIGHT)
   ========================================================================== */

.minimap-widget {
  position: absolute;
  bottom: 110px;
  right: 36px;
  width: 230px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  backdrop-filter: var(--glass-blur);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  z-index: 20;
}

.minimap-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.radar-box {
  position: relative;
  width: 100%;
  height: 110px;
  background: rgba(8, 14, 26, 0.85);
  border: 1px solid rgba(239, 49, 57, 0.2);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.radar-sweep {
  position: absolute;
  inset: -50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 280deg,
    rgba(239, 49, 57, 0.15) 360deg
  );
  animation: radarRotate 4s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes radarRotate {
  to { transform: rotate(360deg); }
}

.office-blueprint {
  position: absolute;
  inset: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  z-index: 1;
}

.bp-room {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  transition: var(--transition-smooth);
}

.bp-room.active {
  background: rgba(239, 49, 57, 0.18);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  box-shadow: inset 0 0 12px rgba(239, 49, 57, 0.3);
}

.avatar-marker {
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--accent-cyan);
  color: #040914;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 0 15px var(--accent-cyan);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 5;
  top: 20%;
  left: 20%;
  transform: translate(-50%, -50%);
}

.minimap-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.status-val {
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
}

/* ==========================================================================
   HUD FOOTER & CONTROLS
   ========================================================================== */

.hud-footer {
  position: absolute;
  bottom: 24px;
  left: 36px;
  right: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
}

.hud-footer > * {
  pointer-events: auto;
}

.scroll-helper {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  backdrop-filter: var(--glass-blur);
  padding: 10px 18px;
  border-radius: 30px;
  transition: opacity 0.5s ease;
}

.mouse-icon {
  width: 14px;
  height: 22px;
  border: 2px solid var(--accent-cyan);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  padding-top: 3px;
}

.mouse-icon .wheel {
  width: 2px;
  height: 5px;
  background: var(--accent-cyan);
  border-radius: 2px;
  animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(6px); opacity: 0; }
}

.bounce {
  animation: bounceDown 1.5s infinite;
  color: var(--accent-cyan);
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.tour-controls-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  backdrop-filter: var(--glass-blur);
  border-radius: 50px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
}

.ctrl-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.ctrl-icon-btn:hover {
  color: var(--accent-cyan);
  transform: scale(1.2);
}

.timeline-slider-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 280px;
}

.time-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.scrub-timeline {
  position: relative;
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
}

.scrub-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.scrub-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 10px;
  box-shadow: 0 0 10px var(--accent-cyan);
}

.scrub-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #fff;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  transition: transform 0.1s ease;
}

.scrub-timeline:hover .scrub-handle {
  transform: translate(-50%, -50%) scale(1.3);
}

.speed-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 6px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.speed-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.speed-btn.active, .speed-btn:hover {
  background: rgba(239, 49, 57, 0.15);
  color: var(--accent-cyan);
}

.keyboard-hints {
  display: flex;
  align-items: center;
  gap: 10px;
}

.key-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 6px 12px;
  border-radius: 8px;
  backdrop-filter: var(--glass-blur);
}

kbd {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  color: var(--text-main);
}

/* ==========================================================================
   RESPONSIVE OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 1024px) {
  .chapter-info-card {
    max-width: 320px;
    bottom: 90px;
    left: 20px;
    padding: 14px 18px;
    gap: 12px;
  }
  .minimap-widget {
    bottom: 95px;
    right: 20px;
  }
  .side-chapter-nav {
    right: 16px;
  }
}

@media (max-width: 768px) {
  .hud-header {
    top: 80px; /* Shifted down on mobile to avoid overlapping logo/burger menu */
    left: 16px;
    right: 16px;
    flex-direction: column;
    gap: 8px;
  }
  .header-center {
    display: none;
  }
  .chapter-info-card {
    left: 12px;
    right: 12px;
    bottom: 85px; /* Compact and pushed lower to the bottom */
    max-width: none;
    padding: 12px 14px;
    gap: 12px;
    border-radius: 12px;
  }
  .chapter-number-badge {
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 8px;
  }
  .chapter-number-badge .sep,
  .chapter-number-badge .total-num {
    font-size: 12px;
  }
  .chapter-tag {
    font-size: 9px;
    margin-bottom: 2px;
  }
  .chapter-title {
    font-size: 15px;
    margin-bottom: 4px;
  }
  .chapter-desc {
    font-size: 11px;
    line-height: 1.4;
  }
  .minimap-widget {
    display: none; /* Hide minimap on mobile for a clean view */
  }
  .side-chapter-nav {
    display: none;
  }
  .hud-footer {
    bottom: 16px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    gap: 12px;
  }
  .scroll-helper {
    font-size: 10px;
    padding: 6px 14px;
  }
  .timeline-slider-wrap {
    width: 160px;
  }
  .keyboard-hints {
    display: none;
  }

  /* Prevent hotspot cards from overflowing on mobile */
  .hotspot-card {
    position: absolute;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: 45px !important;
    width: 220px !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    transform: translateX(-50%) translateY(10px) !important;
  }
  .hotspot:hover .hotspot-card {
    transform: translateX(-50%) translateY(0) !important;
  }

  /* Shift right-side hotspots slightly left to avoid screen border collision */
  .hotspot[style*="left: 68%"] .hotspot-card,
  .hotspot[style*="left: 75%"] .hotspot-card {
    left: auto !important;
    right: -25px !important;
    transform: translateY(10px) !important;
  }
  .hotspot[style*="left: 68%"]:hover .hotspot-card,
  .hotspot[style*="left: 75%"]:hover .hotspot-card {
    transform: translateY(0) !important;
  }

  /* Shift first hotspot on mobile to avoid overlapping the central logo in background video */
  .hotspot[style*="left: 32%"] {
    left: 20% !important;
    top: 30% !important;
  }
}

/* Fix header menu z-index layer overlap */
.header {
  z-index: 110 !important;
}

/* ==========================================================================
   GSAP.COM TEXT REVEAL ANIMATIONS
   ========================================================================== */
.reveal-char-wrapper,
.reveal-word-wrapper {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.2;
  /* Premium layout correction to prevent clipping of text descenders (g, j, p, q, y) */
  padding-bottom: 0.15em;
  margin-bottom: -0.15em;
}

.reveal-char,
.reveal-desc-word {
  display: inline-block;
  transform: translateY(115%);
  opacity: 0;
  will-change: transform, opacity;
}


