/* ═══════════════════════════════════════════════════════════════
   Onboarding Tour — P.L.A.Y. / Yggdrasil
   ═══════════════════════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────────────────────── */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  transition: opacity .3s;
}
.tour-overlay.hidden { display: none; }

/* Dark backdrop with spotlight cutout */
.tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: auto;
  transition: all .4s cubic-bezier(.4,0,.2,1);
}

/* ── Spotlight ring ──────────────────────────────────────────── */
.tour-spotlight {
  position: fixed;
  z-index: 1001;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.75), 0 0 30px 4px rgba(134,225,31,.15);
  pointer-events: none;
  transition: all .4s cubic-bezier(.4,0,.2,1);
}

/* Allow clicks through the spotlight area */
.tour-spotlight-click {
  position: fixed;
  z-index: 1002;
  pointer-events: auto;
  cursor: pointer;
}

/* ── Tooltip bubble ──────────────────────────────────────────── */
.tour-tooltip {
  position: fixed;
  z-index: 1003;
  width: 340px;
  max-width: calc(100vw - 2rem);
  background: #1a1a2e;
  border: 1px solid rgba(134,225,31,.25);
  border-radius: .65rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 12px 48px rgba(0,0,0,.5), 0 0 20px rgba(134,225,31,.08);
  pointer-events: auto;
  animation: tourTooltipIn .3s ease;
  font-family: 'Poppins', sans-serif;
}
@keyframes tourTooltipIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Arrow */
.tour-tooltip::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #1a1a2e;
  border: 1px solid rgba(134,225,31,.25);
  transform: rotate(45deg);
}

.tour-tooltip[data-arrow="top"]::before {
  top: -7px;
  left: 50%;
  margin-left: -6px;
  border-right: none;
  border-bottom: none;
}
.tour-tooltip[data-arrow="bottom"]::before {
  bottom: -7px;
  left: 50%;
  margin-left: -6px;
  border-left: none;
  border-top: none;
}
.tour-tooltip[data-arrow="left"]::before {
  left: -7px;
  top: 50%;
  margin-top: -6px;
  border-top: none;
  border-right: none;
}
.tour-tooltip[data-arrow="right"]::before {
  right: -7px;
  top: 50%;
  margin-top: -6px;
  border-bottom: none;
  border-left: none;
}

/* ── Tooltip content ─────────────────────────────────────────── */
.tour-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .35rem;
  line-height: 1.3;
}

.tour-text {
  font-size: .82rem;
  color: #a1a1aa;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.tour-text strong {
  color: #86E11F;
  font-weight: 600;
}

/* ── Footer: counter + buttons ───────────────────────────────── */
.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tour-counter {
  font-family: 'Spline Sans Mono', monospace;
  font-size: .7rem;
  font-weight: 600;
  color: #52525b;
}

.tour-buttons {
  display: flex;
  gap: .4rem;
}

.tour-btn {
  font-family: 'Poppins', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .9rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all .15s;
}

.tour-btn-skip {
  background: transparent;
  color: #71717a;
  border: 1px solid rgba(255,255,255,.08);
}
.tour-btn-skip:hover {
  color: #a1a1aa;
  border-color: rgba(255,255,255,.15);
}

.tour-btn-next {
  background: #86E11F;
  color: #000;
}
.tour-btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(134,225,31,.25);
}

.tour-btn-back {
  background: transparent;
  color: #71717a;
  border: 1px solid rgba(255,255,255,.08);
}
.tour-btn-back:hover {
  color: #a1a1aa;
}

/* ── Welcome overlay (step 0, full-screen) ───────────────────── */
.tour-welcome {
  position: fixed;
  inset: 0;
  z-index: 1005;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  animation: tourWelcomeIn .5s ease;
}
@keyframes tourWelcomeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.tour-welcome-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: tourTreePulse 2s ease infinite;
}
@keyframes tourTreePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

.tour-welcome h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: .5rem;
  line-height: 1.2;
}
.tour-welcome h2 span {
  color: #86E11F;
}

.tour-welcome p {
  font-size: clamp(.85rem, 1.5vw, 1rem);
  color: #a1a1aa;
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.tour-welcome-actions {
  display: flex;
  gap: .75rem;
}

.tour-welcome-start {
  font-family: 'Poppins', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  padding: .65rem 2rem;
  border-radius: 9999px;
  border: none;
  background: #86E11F;
  color: #000;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.tour-welcome-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(134,225,31,.3);
}

.tour-welcome-skip {
  font-family: 'Poppins', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  padding: .5rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,.1);
  background: transparent;
  color: #71717a;
  cursor: pointer;
  transition: all .15s;
}
.tour-welcome-skip:hover {
  color: #a1a1aa;
  border-color: rgba(255,255,255,.2);
}

/* ── Progress dots ───────────────────────────────────────────── */
.tour-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.tour-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #52525b;
  transition: all .3s;
}
.tour-dot.active {
  width: 18px;
  border-radius: 3px;
  background: #86E11F;
}
.tour-dot.done {
  background: #5ea316;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .tour-tooltip {
    width: 280px;
    padding: 1rem 1.15rem;
  }
  .tour-title { font-size: .9rem; }
  .tour-text  { font-size: .78rem; }
}
