/* ─── Onboarding Tour ─────────────────────────────────────── */

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.onboarding-overlay.visible {
  opacity: 1;
}

.onboarding-container {
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 680px;
  display: flex;
  flex-direction: column;
  padding: 40px 24px 24px;
  position: relative;
}

.onboarding-slides {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.onboarding-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.onboarding-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.onboarding-slide.prev {
  transform: translateX(-60px);
}

.onboarding-slide-content {
  text-align: center;
  padding: 0 8px;
}

/* ─── Slide 1: Welcome ─────────────── */

.onboarding-inviter-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 24px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
}

.onboarding-inviter-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.onboarding-inviter-emoji {
  font-size: 64px;
  margin-bottom: 20px;
}

.onboarding-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin: 0 0 12px;
  line-height: 1.2;
}

.onboarding-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0;
}

.onboarding-subtitle strong {
  color: rgba(255, 255, 255, 0.95);
}

/* ─── Slide 2: Features ────────────── */

.onboarding-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.onboarding-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.onboarding-feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.3));
  color: white;
}

.onboarding-feature-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.onboarding-feature-text strong {
  color: white;
  font-size: 15px;
  font-weight: 600;
}

.onboarding-feature-text span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1.4;
}

/* ─── Slide 3: Get Started ─────────── */

.onboarding-ready-emoji {
  font-size: 72px;
  margin-bottom: 20px;
}

.onboarding-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 14px 32px;
  border-radius: 50px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: white;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.onboarding-cta:active {
  transform: scale(0.96);
}

/* ─── Dots ─────────────────────────── */

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, width 0.3s;
}

.onboarding-dot.active {
  width: 24px;
  background: white;
}

/* ─── Nav ──────────────────────────── */

.onboarding-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.onboarding-skip {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s;
}

.onboarding-skip:hover {
  color: rgba(255, 255, 255, 0.8);
}

.onboarding-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 50px;
  transition: background 0.2s;
}

.onboarding-next:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ─── Responsive ───────────────────── */

@media (max-height: 600px) {
  .onboarding-container {
    padding: 20px 16px 16px;
    max-height: 100%;
  }
  .onboarding-inviter-photo {
    width: 72px;
    height: 72px;
  }
  .onboarding-title {
    font-size: 24px;
  }
}


/* ═══════════════════════════════════════════════════════════
   Mandatory Onboarding Flow — multi-step modal for new users
   ═══════════════════════════════════════════════════════════ */

.ob-flow-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.ob-flow-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.ob-flow-modal {
  width: 100%;
  max-width: 420px;
  background: var(--surface, #1a1d24);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .08);
  overflow: visible;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
  position: relative;
}

/* ── Progress bar ─────────────────────────────────────── */
.ob-flow-progress {
  height: 3px;
  background: rgba(255, 255, 255, .06);
  border-radius: 3px 3px 0 0;
  overflow: hidden;
}

.ob-flow-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, #7c9cff), #a78bfa);
  border-radius: 3px;
  transition: width .4s cubic-bezier(.25, .8, .25, 1);
}

/* ── Step containers ──────────────────────────────────── */
.ob-flow-step {
  display: none;
  padding: 32px 28px 24px;
  overflow: visible;
}

.ob-flow-step.active {
  display: block;
  animation: obStepFadeIn .3s ease;
}

@keyframes obStepFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ob-flow-step-content {
  text-align: center;
}

.ob-flow-emoji {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}

.ob-flow-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.ob-flow-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, .55);
  margin: 0 0 24px;
  line-height: 1.5;
}

/* ── Form elements ────────────────────────────────────── */
.ob-flow-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, .5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  text-align: left;
}

.ob-flow-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  color: #fff;
  outline: none;
  transition: border-color .2s, background .2s;
  margin-bottom: 16px;
  box-sizing: border-box;
  font-family: inherit;
}

.ob-flow-input:focus {
  border-color: var(--accent, #7c9cff);
  background: rgba(255, 255, 255, .08);
}

.ob-flow-input::placeholder {
  color: rgba(255, 255, 255, .25);
}

.ob-flow-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, .35);
  margin: -8px 0 12px;
  text-align: left;
}

/* ── Initials row ─────────────────────────────────────── */
.ob-flow-initials-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ob-flow-initials-preview {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #7c9cff), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.ob-flow-initials-input {
  width: 80px;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  margin-bottom: 0;
}

/* ── Photo area ───────────────────────────────────────── */
.ob-flow-photo-area {
  width: 200px;
  height: 140px;
  margin: 0 auto 16px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  border: 2px dashed rgba(255,255,255,.15);
}

.ob-flow-photo-area:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(124, 156, 255, .3);
  border-color: rgba(196,113,237,.3);
}

.ob-flow-photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.ob-flow-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, .06);
  border: none;
  border-radius: 14px;
  color: rgba(255, 255, 255, .4);
  font-size: 12px;
}

/* ── Spirit animal row ────────────────────────────────── */
.ob-flow-spirit-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.ob-flow-spirit-input {
  flex: 1;
  margin-bottom: 0;
}

.ob-flow-spirit-random {
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255, 255, 255, .06);
  border-radius: 12px;
  font-size: 24px;
  cursor: pointer;
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), background .2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-flow-spirit-random:hover {
  background: rgba(255, 255, 255, .1);
}

/* ── Action buttons ───────────────────────────────────── */
.ob-flow-actions {
  display: flex;
  gap: 10px;
  padding: 0 0 8px;
}

.ob-flow-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  font-family: inherit;
}

.ob-flow-btn:active {
  transform: scale(0.97);
}

.ob-flow-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.ob-flow-btn-primary {
  background: linear-gradient(135deg, var(--accent, #7c9cff), #a78bfa);
  color: #fff;
}

.ob-flow-btn-primary:hover:not(:disabled) {
  opacity: .9;
}

.ob-flow-btn-secondary {
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .6);
}

.ob-flow-btn-secondary:hover {
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .8);
}

/* ── Initials hint ────────────────────────────────────── */
.ob-flow-initials-hint {
  font-size: 12px;
  font-weight: 400;
  color: #ff8a8a;
  opacity: 0;
  transition: opacity .2s ease;
}

.ob-flow-initials-hint.visible {
  opacity: 1;
}

/* ── City autocomplete dropdown ───────────────────────── */
.ob-flow-city-wrap {
  position: relative;
}

.ob-flow-city-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(17, 24, 39, .95);
  border: 1px solid rgba(196,113,237,.2);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  margin-top: 0;
  padding: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.ob-city-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(255,255,255,.85);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease;
}

.ob-city-item:hover {
  background: rgba(196,113,237,.15);
}

.ob-city-empty {
  color: rgba(255,255,255,.4);
  cursor: default;
  justify-content: center;
}

.ob-city-pin {
  font-size: 13px;
  flex-shrink: 0;
}

/* ── Photo skip jiggle ────────────────────────────────── */
@keyframes obJiggle {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px) rotate(-2deg); }
  30% { transform: translateX(5px) rotate(1.5deg); }
  45% { transform: translateX(-4px) rotate(-1deg); }
  60% { transform: translateX(3px) rotate(.5deg); }
  75% { transform: translateX(-2px); }
}

.ob-flow-photo-area.jiggle {
  animation: obJiggle .5s ease;
}

.ob-flow-skip-confirm {
  text-align: center;
  font-size: 13px;
  color: #ff8a8a;
  margin-top: 14px;
  margin-bottom: 8px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .3s ease, max-height .3s ease;
}

.ob-flow-skip-confirm.visible {
  opacity: 1;
  max-height: 40px;
}

/* ── Mobile adjustments ───────────────────────────────── */
@media (max-width: 480px) {
  .ob-flow-modal {
    max-width: 100%;
    border-radius: 20px;
  }

  .ob-flow-step {
    padding: 24px 20px 20px;
  }

  .ob-flow-title {
    font-size: 20px;
  }

  .ob-flow-emoji {
    font-size: 40px;
  }
}

/* ═══════════════════════════════════════════════════════════
   Post-onboarding Welcome Overlay
   ═══════════════════════════════════════════════════════════ */

.welcome-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .3s ease;
}
.welcome-overlay.visible { opacity: 1; }

.welcome-card {
  width: 100%; max-width: 380px;
  background: var(--surface, #1a1d2e);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  padding: 36px 28px 28px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  transform: scale(.92);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.welcome-overlay.visible .welcome-card { transform: scale(1); }

.welcome-sparkle {
  font-size: 48px;
  margin-bottom: 12px;
  animation: welcomePulse 2s ease-in-out infinite;
}
@keyframes welcomePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.welcome-title {
  font-size: 22px; font-weight: 800;
  color: #fff; margin: 0 0 12px;
  letter-spacing: -.02em;
}

.welcome-text {
  font-size: 14px; line-height: 1.55;
  color: rgba(255,255,255,.6);
  margin: 0 0 24px;
}

.welcome-buttons {
  display: flex; flex-direction: column; gap: 10px;
}

.welcome-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 20px;
  border: none; border-radius: 14px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: filter .15s, transform .15s;
}
.welcome-btn:hover { filter: brightness(1.1); transform: scale(1.02); }
.welcome-btn:active { transform: scale(.98); }

.welcome-btn-events {
  background: var(--accent, #7c9cff);
  color: var(--bg, #0a0d14);
}

.welcome-btn-friends {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
}
