/* Base styles and aesthetics */
body {
  margin: 0;
  overflow: hidden;
  background-color: #050505;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
}

#canvas-container {
  width: 100vw;
  height: 100vh;
}

/* Glassmorphism UI */
.glass-panel {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Interactive elements styles */
.service-btn {
  transition: all 0.2s ease;
}

.service-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
  border-color: rgba(56, 189, 248, 0.5);
}

.service-btn:active {
  transform: translateY(0);
}

.service-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid #38bdf8;
  box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.2);
}

.time-btn {
  transition: all 0.1s ease;
}

.time-btn.active {
  background: rgba(56, 189, 248, 0.4);
  border-color: #38bdf8;
  color: white;
}

.tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  display: none;
  z-index: 100;
  border: 1px solid #333;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Onboarding Modal Styles */
.onboarding-step {
  display: none;
}

.onboarding-step.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.key-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: monospace;
  font-size: 0.8em;
  color: #fff;
}

/* Neon Green Pulse for Play Button */
.pulse-green {
  background-color: #39ff14 !important;
  color: #000 !important;
  border-color: #39ff14 !important;
  box-shadow: 0 0 10px #39ff14, 0 0 20px #39ff14;
  animation: neonPulse 1.5s infinite;
}

@keyframes neonPulse {
  0% {
    box-shadow: 0 0 5px #39ff14, 0 0 10px #39ff14;
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 20px #39ff14, 0 0 30px #39ff14;
    transform: scale(1.1);
  }

  100% {
    box-shadow: 0 0 5px #39ff14, 0 0 10px #39ff14;
    transform: scale(1);
  }
}

/* Animation for Onboarding Flow */
.flow-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.flow-node {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
  background: #1f2937;
  border: 1px solid #374151;
}

.flow-line {
  width: 60px;
  height: 2px;
  background: #4b5563;
  position: relative;
}

.flow-packet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: -3px;
  left: 0;
  animation: flowMove 1.5s infinite linear;
}

@keyframes flowMove {
  0% {
    left: 0;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    left: 100%;
    opacity: 0;
  }
}

/* Tutorial Styles */
#tutorial-popup {
  transition: right 0.4s ease-out, bottom 0.4s ease-out, left 0.4s ease-out,
    top 0.4s ease-out, transform 0.4s ease-out;
}

#tutorial-popup.tutorial-enter {
  animation: tutorialFadeIn 0.5s ease-out;
}

@keyframes tutorialFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

#tutorial-popup.tutorial-step-change {
  animation: tutorialStepChange 0.3s ease-out;
}

@keyframes tutorialStepChange {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.97);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

#tutorial-highlight {
  animation: tutorialHighlightPulse 1.5s infinite;
}

@keyframes tutorialHighlightPulse {
  0%,
  100% {
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5), 0 0 30px rgba(6, 182, 212, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.8), 0 0 60px rgba(6, 182, 212, 0.5);
  }
}

.tutorial-tool-highlight {
  animation: toolHighlightPulse 1.2s infinite !important;
  position: relative;
  z-index: 100;
}

@keyframes toolHighlightPulse {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6),
      inset 0 0 8px rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.8) !important;
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 25px rgba(6, 182, 212, 1), 0 0 40px rgba(6, 182, 212, 0.5),
      inset 0 0 12px rgba(6, 182, 212, 0.3);
    border-color: rgba(6, 182, 212, 1) !important;
    transform: scale(1.05);
  }
}

/* Intervention Warning Styles */
.intervention-warning {
  animation: warningSlideIn 0.3s ease-out, warningPulse 1s ease-in-out infinite;
}

@keyframes warningSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes warningPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px currentColor;
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 20px currentColor;
  }
}

.warning-danger {
  background: rgba(220, 38, 38, 0.9);
  border-color: #ef4444;
  color: #fecaca;
}

.warning-warning {
  background: rgba(217, 119, 6, 0.9);
  border-color: #f59e0b;
  color: #fef3c7;
}

.warning-info {
  background: rgba(37, 99, 235, 0.9);
  border-color: #3b82f6;
  color: #dbeafe;
}

/* Event indicator bar */
.event-active-bar {
  animation: eventBarPulse 0.5s ease-in-out infinite alternate;
}

@keyframes eventBarPulse {
  from {
    opacity: 0.8;
  }
  to {
    opacity: 1;
  }
}
