/* Onboarding Tour — subtle dim overlay + spotlight highlight */

#tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 5, 16, 0.10);
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

#tour-overlay.tour-fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Spotlight — highlighted border around target element, no dimming inside */
#tour-spotlight {
  position: fixed;
  border-radius: 14px;
  border: 2.5px solid rgba(124, 92, 255, 0.7);
  box-shadow:
    0 0 20px rgba(124, 92, 255, 0.25),
    0 0 40px rgba(124, 92, 255, 0.1);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 10001;
  background: transparent;
}

/* Tooltip */
#tour-tooltip {
  position: fixed;
  z-index: 10002;
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 20px;
  background: rgba(18, 18, 36, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-radius: 14px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(124, 92, 255, 0.1);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: tour-tooltip-in 0.3s ease;
}

@keyframes tour-tooltip-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#tour-tooltip-title {
  font-size: 1rem;
  font-weight: 800;
  color: #f0f0ff;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

#tour-tooltip-text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(240, 240, 255, 0.7);
  margin-bottom: 16px;
}

#tour-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#tour-step-counter {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(240, 240, 255, 0.35);
  letter-spacing: 0.05em;
}

/* Tour buttons */
.tour-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  font-family: Inter, sans-serif;
}

.tour-btn-ghost {
  background: transparent;
  color: rgba(240, 240, 255, 0.5);
}
.tour-btn-ghost:hover {
  color: rgba(240, 240, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.tour-btn-primary {
  background: linear-gradient(135deg, #7c5cff, #6366f1);
  color: #fff;
  box-shadow: 0 2px 12px rgba(124, 92, 255, 0.3);
}
.tour-btn-primary:hover {
  background: linear-gradient(135deg, #8b6fff, #7c7cf7);
  box-shadow: 0 4px 16px rgba(124, 92, 255, 0.4);
  transform: translateY(-1px);
}

/* Congratulations modal */
#tour-congrats {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 5, 16, 0.60);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: tour-tooltip-in 0.3s ease;
  transition: opacity 0.3s ease;
}
#tour-congrats.tour-fade-out {
  opacity: 0;
  pointer-events: none;
}

.tour-congrats-card {
  background: rgba(18, 18, 36, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-radius: 18px;
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(124, 92, 255, 0.12);
  animation: tour-congrats-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tour-congrats-in {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.tour-congrats-icon {
  margin-bottom: 16px;
}

/* Tour button pulse animation */
@keyframes tour-btn-pulse-anim {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.5); }
  30%  { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(124, 92, 255, 0.2); }
  60%  { transform: scale(1);    box-shadow: 0 0 0 0 rgba(124, 92, 255, 0); }
  80%  { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(124, 92, 255, 0.15); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(124, 92, 255, 0); }
}

.tour-btn-pulse {
  animation: tour-btn-pulse-anim 1.2s ease 2 !important;
  border-color: rgba(124, 92, 255, 0.6) !important;
  background: rgba(124, 92, 255, 0.2) !important;
}

/* Responsive */
@media (max-width: 480px) {
  #tour-tooltip {
    padding: 16px;
  }
  #tour-tooltip-title {
    font-size: 0.9375rem;
  }
  .tour-btn {
    padding: 7px 12px;
    font-size: 0.75rem;
  }
}
