@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700;800&family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;1,300&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #07090e;
  --bg-panel: rgba(10, 15, 26, 0.72);
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-blue: #38bdf8;
  --accent-amber: #f59e0b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.35);
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  user-select: none;
}

/* Typography styles */
.font-cinzel {
  font-family: 'Cinzel', serif;
}

.font-serif-hero {
  font-family: 'Cinzel', serif;
}

.font-mono-tech {
  font-family: 'JetBrains Mono', monospace;
}

/* Precision Crosshairs */
.crosshair {
  position: fixed;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 50;
  color: rgba(255, 255, 255, 0.45);
}
.crosshair::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  transform: translateY(-50%);
}
.crosshair::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: currentColor;
  transform: translateX(-50%);
}
.crosshair-tl { top: 20px; left: 24px; }
.crosshair-tr { top: 20px; right: 24px; }
.crosshair-bl { bottom: 20px; left: 24px; }
.crosshair-br { bottom: 20px; right: 24px; }

@media (max-width: 768px) {
  .crosshair-tl { top: 12px; left: 12px; }
  .crosshair-tr { top: 12px; right: 12px; }
  .crosshair-bl { bottom: 12px; left: 12px; }
  .crosshair-br { bottom: 12px; right: 12px; }
}

/* Glassmorphism & Specular Button */
.btn-cinematic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.35s var(--ease-cinematic);
  outline: none;
  box-shadow: 
    0 0 20px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

.btn-cinematic:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 
    0 0 30px rgba(56, 189, 248, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-cinematic:active {
  transform: translateY(1px);
}

.btn-primary-glow {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.btn-primary-glow:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.7);
  color: #ffffff;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.35);
}

/* Glass Panels */
.glass-panel {
  background: rgba(8, 12, 22, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Vignette & Gradients */
.cinematic-vignette {
  background: radial-gradient(circle at center, transparent 40%, rgba(5, 7, 12, 0.75) 90%, rgba(3, 4, 8, 0.95) 100%);
  pointer-events: none;
}

.cinematic-grad-left {
  background: linear-gradient(90deg, rgba(7, 9, 14, 0.85) 0%, rgba(7, 9, 14, 0.4) 40%, transparent 100%);
  pointer-events: none;
}

.cinematic-grad-bottom {
  background: linear-gradient(180deg, transparent 60%, rgba(5, 7, 12, 0.9) 100%);
  pointer-events: none;
}

/* Left Journey HUD Track */
.journey-track-line {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 6px;
  width: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.journey-node-dot {
  position: relative;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #080c14;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s var(--ease-cinematic);
}

.journey-node.active .journey-node-dot {
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 20px rgba(56, 189, 248, 0.4);
}

.journey-node.active .journey-node-dot::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
}

.journey-node:hover .journey-node-dot {
  border-color: #38bdf8;
  transform: scale(1.15);
}

/* Scene 0 Desktop Harmony: prevent double text over the master mockup on large screens */
@media (min-width: 769px) {
  .scene-0-desktop #scene-title,
  .scene-0-desktop #scene-desc,
  .scene-0-desktop #scene-category,
  .scene-0-desktop #scene-subtext,
  .scene-0-desktop #scene-badge {
    opacity: 0 !important;
    pointer-events: none;
  }
  
  .scene-0-desktop #scene-action-btn {
    transform: translateY(18px);
  }
}

/* Scene Layers */
.scene-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s var(--ease-cinematic), transform 1.2s var(--ease-cinematic);
  transform: scale(1.04);
}

.scene-layer.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.scene-layer.prev {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
}

/* Atmospheric Particle Canvas */
#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  opacity: 0.65;
}

/* Modal Animations */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-cinematic);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  transition: all 0.45s var(--ease-cinematic);
}

.modal-backdrop.open .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Sound Wave Animation */
.sound-bar {
  display: inline-block;
  width: 2px;
  height: 10px;
  background-color: currentColor;
  margin: 0 1px;
  transition: height 0.2s ease;
}

.sound-active .sound-bar:nth-child(1) { animation: wave 1.1s ease-in-out infinite alternate; }
.sound-active .sound-bar:nth-child(2) { animation: wave 0.8s ease-in-out infinite alternate 0.2s; }
.sound-active .sound-bar:nth-child(3) { animation: wave 1.3s ease-in-out infinite alternate 0.4s; }
.sound-active .sound-bar:nth-child(4) { animation: wave 0.9s ease-in-out infinite alternate 0.1s; }

@keyframes wave {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* Custom Scrollbar for inner modal lists */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 15, 26, 0.4);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.4);
}
