/* ==========================================================================
   BinaryFlux Storylane Tour — Core Design System & Shared CSS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --bg-dark: #0B0F19;
  --bg-card: #18191D;
  --bg-popover: rgba(255, 255, 255, 0.05);
  --border-color: #2E3038;
  --border-light: #33353B;
  --accent-teal: #62e9f7;
  --accent-blue: #3B82F6;
  --accent-purple: #818CF8;
  --accent-green: #10B981;
  --text-primary: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
}

/* Glassmorphism Backdrop Utilities */
.glass-modal,
.glass-panel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 229, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* macOS Window Frame Stage Utilities */
.stage-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #111625 0%, #070A10 100%);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  z-index: 1;
}

.mac-window-container {
  position: relative;
  width: 100vw;
  height: 96vh;
  max-width: 1860px;
  max-height: 980px;
  background: #141722;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.9), 0 0 60px rgba(98, 233, 247, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.mac-window-header {
  height: 38px;
  background: linear-gradient(180deg, rgba(34, 38, 50, 0.98) 0%, rgba(20, 23, 34, 0.98) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  user-select: none;
  z-index: 10;
}

.mac-window-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mac-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5);
}

.mac-dot-close {
  background-color: #FF5F56;
  border: 1px solid #E0443E;
}

.mac-dot-minimize {
  background-color: #FFBD2E;
  border: 1px solid #DEA123;
}

.mac-dot-maximize {
  background-color: #27C93F;
  border: 1px solid #1AAB29;
}

.mac-window-title {
  font-size: 0.78rem;
  color: #CBD5E1;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: monospace;
}

.mac-window-body {
  position: relative;
  flex: 1;
  width: 100%;
  height: calc(100% - 38px);
  overflow: hidden;
  background: #0B0F19;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* High-DPI Sharp Screenshot Rendering */
/*img,*/
/*.stage-image,*/
/*.detection-stage-img,*/
/*.detection-card-thumb img,*/
/*.module-thumb-img {*/
/*  image-rendering: -webkit-optimize-contrast;*/
/*  image-rendering: crisp-edges;*/
/*  -webkit-backface-visibility: hidden;*/
/*  backface-visibility: hidden;*/
/*}*/

.stage-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

#hotspotContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1005;
  pointer-events: none;
}

/* Translucent Spotlight Overlay Mask */
.spotlight-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  pointer-events: auto;
  cursor: pointer;
}

/* Storylane Popover Card */
.storylane-popover {
  position: fixed;
  bottom: 70px;
  right: 40px;
  width: 380px;
  max-width: 90vw;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 229, 255, 0.15);
  padding: 24px;
  z-index: 1001;
  animation: fadeInUp 250ms ease-out forwards;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.storylane-title {
  color: #FFFFFF;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}

.storylane-body {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.btn-storylane-next {
  background: var(--accent-teal);
  color: #000;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 6px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 229, 255, 0.3);
  transition: all 150ms ease;
}

.btn-storylane-next:hover {
  background: #33ECFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.5);
}

/* Storylane Bottom Floating Control Bar */
.storylane-control-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 700px;
  border-radius: 50px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 1001;
}

/* Floating Book a Demo Rocket Button */
.floating-demo-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1002;
  background: var(--accent-teal);
  color: #000;
  border: none;
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 229, 255, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 200ms ease;
}

#btnStartTour {
  color: #FFFFFF;
}

#btnStartTour:hover {
  background-color: var(--accent-green) !important;
}

.floating-demo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(0, 229, 255, 0.6);
}

/* Interactive Hotspot Pins */
.hotspot-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-teal);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 6px rgba(0, 229, 255, 0.4), 0 0 25px rgba(0, 229, 255, 0.6);
  animation: pulseGlow 2s infinite;
  z-index: 1005;
  pointer-events: auto;
}

.hotspot-popover {
  position: absolute;
  top: 40px;
  left: auto;
  transform: translateX(-50%);
  width: 280px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  color: #F8FAFC;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1010;
  pointer-events: auto;
  animation: fadeIn 200ms ease-out forwards;
}

/* Top Floating Header Control Bar Overlay */
.top-header-bar {
  position: fixed;
  bottom: 10px;
  right: 40px;
  z-index: 1002;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 30px;
  padding: 6px 14px;
}

/* Slide-out Navigation Drawer */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 440px;
  max-width: 90vw;
  height: 100vh;
  background: #0B0F19;
  border-left: 1px solid var(--border-color);
  z-index: 2000;
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  padding: 24px;
  animation: fadeIn 200ms ease-out forwards;
  overflow-y: auto;
}

.module-card-item {
  background: #18191D;
  border: 1px solid #2E3038;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  transition: all 150ms ease-in-out;
  cursor: pointer;
}

.module-card-item:hover {
  border-color: var(--accent-teal);
  background: #1F2024;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 229, 255, 0.15);
}

.module-card-item.active {
  border-color: var(--accent-teal);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

.module-thumb-img {
  width: 100px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #33353B;
  flex-shrink: 0;
}

/* Utility Classes */
.text-cyan {
  color: var(--accent-teal) !important;
}

.bg-cyan-subtle {
  background: rgba(98, 233, 247, 0.1) !important;
  border: 1px solid rgba(98, 233, 247, 0.3) !important;
  color: var(--accent-teal) !important;
}

/* Detections Page Showcase Components */
.detections-page {
  overflow-y: auto !important;
  background-color: var(--bg-dark);
}

.detections-nav-tab {
  background: rgba(24, 25, 29, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.detections-nav-tab:hover {
  border-color: var(--accent-teal);
  color: #FFF;
  background: rgba(31, 32, 36, 0.9);
}

.detections-nav-tab.active {
  background: var(--accent-teal);
  color: #0B0F19;
  border-color: var(--accent-teal);
  box-shadow: 0 0 15px rgba(98, 233, 247, 0.4);
}

.detection-stage-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(98, 233, 247, 0.1);
}

.detection-stage-img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
  cursor: zoom-in;
}

.detection-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  height: 100%;
  transition: all 0.25s ease;
}

.detection-card:hover {
  border-color: var(--accent-teal);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(98, 233, 247, 0.15);
}

.detection-card-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
  cursor: pointer;
}

.detection-card-thumb img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: top;
  transition: transform 0.3s ease;
}

.detection-card-thumb:hover img {
  transform: scale(1.04);
}

.detection-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent-teal);
  color: var(--accent-teal);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
}

/* Lightbox Modal Customization */
.lightbox-modal .modal-content {
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 16px;
}

.lightbox-modal img {
  max-height: 85vh;
  width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Keyframe Animations */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.6), 0 0 15px rgba(0, 229, 255, 0.4);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(0, 229, 255, 0), 0 0 25px rgba(0, 229, 255, 0.8);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 229, 255, 0), 0 0 15px rgba(0, 229, 255, 0.4);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0F172A;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-teal);
}

/* Page-specific overrides */
#hunter .hotspot-popover,
body[data-page-id="hunter"] .hotspot-popover {
  left: 10%;
}

.btn-link {
  color: #62e9f7 !important;
}

.border-secondary {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.text-secondary {
  color: rgba(255, 255, 255, 0.7) !important;
}