/* ============================================================
   ONBOARDING
   ============================================================ */
#ob-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(10,14,20,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#ob-overlay.ob-visible  { opacity: 1; }
#ob-overlay.ob-fade-out { opacity: 0; pointer-events: none; }

.ob-card {
  position: relative; /* positioning context for .ob-step */
  width: 100%; max-width: 500px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  min-height: 480px;
  display: flex; flex-direction: column;
}

/* Progress dots */
.ob-progress {
  display: flex; gap: 6px; align-items: center;
  justify-content: center;
  padding: 20px 0 0;
  flex-shrink: 0;
  z-index: 2;
}
.ob-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, width 0.3s, border-radius 0.3s;
}
.ob-dot.ob-dot-active {
  background: var(--brand);
  width: 22px; border-radius: 4px;
}
.ob-dot.ob-dot-done { background: rgba(249,115,22,0.4); }

/* Steps */
.ob-step {
  position: absolute; inset: 0; top: 52px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 28px 40px 36px;
  text-align: center;
  opacity: 0;
  transform: translateX(48px);
  pointer-events: none;
  transition: opacity 0.38s cubic-bezier(0.4,0,0.2,1),
              transform 0.38s cubic-bezier(0.4,0,0.2,1);
}
.ob-step.ob-step-active {
  opacity: 1; transform: translateX(0); pointer-events: all;
}
.ob-step.ob-step-exit-left  { opacity: 0; transform: translateX(-48px); }
.ob-step.ob-step-exit-right { opacity: 0; transform: translateX(48px); }

/* Spacer so card has correct height */
.ob-card::after {
  content: ''; display: block; height: 516px; flex-shrink: 0;
}

/* Typography inside steps */
.ob-title {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 900; line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.ob-text {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 28px;
}
.ob-text strong { color: var(--text-primary); }

/* Buttons */
.ob-next-btn, .ob-finish-btn {
  display: inline-flex; align-items: center; gap: 8px;
}
.ob-btn-row {
  display: flex; gap: 10px; align-items: center;
  justify-content: center; margin-top: 4px;
}

/* ── Step 0: Logo ring animation ── */
.ob-icon-ring {
  position: relative;
  width: 80px; height: 80px;
  margin-bottom: 24px;
  flex-shrink: 0;
}
.ob-logo-big {
  width: 80px; height: 80px;
  background: var(--brand);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  animation: ob-logo-pop 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
}
.ob-pulse-ring {
  position: absolute; inset: -10px;
  border-radius: 28px;
  border: 2px solid var(--brand);
  opacity: 0;
  animation: ob-ring-pulse 2.4s ease-out 0.4s infinite;
}
.ob-pulse-ring-2 { inset: -20px; border-radius: 34px; animation-delay: 1.2s; }
@keyframes ob-logo-pop {
  from { opacity: 0; transform: scale(0.7) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes ob-ring-pulse {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.35); }
}

/* ── Step 1: Input ── */
.ob-step-emoji {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  animation: ob-emoji-drop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
.ob-step.ob-step-active .ob-step-emoji { animation-delay: 0.1s; }
.ob-step:not(.ob-step-active) .ob-step-emoji { animation: none; }
@keyframes ob-emoji-drop {
  from { opacity: 0; transform: translateY(-16px) scale(0.7); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ob-field-wrap {
  position: relative; width: 100%; max-width: 340px;
  margin-bottom: 28px; text-align: left;
}
.ob-input {
  width: 100%; padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.ob-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.ob-input.ob-input-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(248,113,113,0.2);
  animation: ob-shake 0.35s ease;
}
.ob-input-label {
  display: block;
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 6px;
}
.ob-input-err {
  font-size: 12px; color: var(--danger);
  margin-top: 6px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}
.ob-input-err.ob-input-err-visible { opacity: 1; transform: translateY(0); }
@keyframes ob-shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-7px); }
  40%     { transform: translateX(7px); }
  60%     { transform: translateX(-5px); }
  80%     { transform: translateX(4px); }
}

/* ── Step 2: Feature cards ── */
.ob-features {
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; text-align: left;
  margin-bottom: 28px;
}
.ob-fc {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(14px);
  transition: none;
}
.ob-step-active .ob-fc {
  animation: ob-fc-in 0.38s cubic-bezier(0.4,0,0.2,1) forwards;
}
.ob-step-active .ob-fc:nth-child(1) { animation-delay: 0.08s; }
.ob-step-active .ob-fc:nth-child(2) { animation-delay: 0.18s; }
.ob-step-active .ob-fc:nth-child(3) { animation-delay: 0.28s; }
@keyframes ob-fc-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ob-fc-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.ob-fc-title {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 2px;
}
.ob-fc-sub {
  font-size: 12px; color: var(--text-muted); line-height: 1.4;
}

/* ── Step 3: Celebration ── */
.ob-celebration {
  position: relative;
  width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; flex-shrink: 0;
}
#ob-confetti-host {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ob-football-emoji {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  animation: ob-football-spin 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}
.ob-step-active .ob-football-emoji {
  animation: ob-football-spin 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}
@keyframes ob-football-spin {
  from { opacity: 0; transform: scale(0.3) rotate(-180deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Confetti pieces */
.ob-cp {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: ob-cp-fly 0.9s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}
@keyframes ob-cp-fly {
  0%   { opacity: 1; transform: translate(-50%,-50%) translate(0,0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) translate(var(--tx),var(--ty)) rotate(var(--rot)) scale(0.4); }
}

/* ============================================================
   TUTORIAL TOOLTIPS
   ============================================================ */
#tut-wrap {
  position: fixed; inset: 0; z-index: 850;
  pointer-events: none;
}

.tut-hl {
  position: absolute;
  border-radius: 10px;
  pointer-events: none;
  box-shadow:
    0 0 0 3000px rgba(0,0,0,0.48),
    0 0 0 2px var(--brand),
    0 0 0 5px rgba(249,115,22,0.2);
  animation: tut-hl-in 0.28s ease both;
}
@keyframes tut-hl-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.tut-tip {
  position: fixed;
  width: 276px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--brand);
  border-radius: 12px;
  padding: 16px 18px 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  pointer-events: all;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.tut-tip.tut-tip-in {
  opacity: 1; transform: translateY(0);
}
.tut-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand);
  margin-bottom: 6px;
}
.tut-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 5px;
}
.tut-text {
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
  margin-bottom: 14px;
}
.tut-row {
  display: flex; gap: 8px; justify-content: flex-end; align-items: center;
}
.tut-skip-btn { font-size: 12px; padding: 6px 10px; color: var(--text-muted); }
.tut-next-btn {
  font-size: 12px; padding: 6px 12px;
  display: inline-flex; align-items: center; gap: 5px;
}

