/* ═══════════════════════════════════════
   ONBOARDING OVERLAY
═══════════════════════════════════════ */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #4936e8 0%, #8b6ff8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.onboarding-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.onboarding-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 40px 32px 36px;
  width: min(360px, 92vw);
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: ob-pop 0.45s var(--spring) both;
}
@keyframes ob-pop {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.onboarding-fox {
  width: 130px;
  height: 130px;
  margin: 0 auto 8px;
  animation: wave 1.6s ease-in-out infinite;
}
.onboarding-fox img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(108,79,246,0.22));
}
@keyframes wave {
  0%,100% { transform: rotate(-5deg) scale(1); }
  50%      { transform: rotate(5deg) scale(1.04); }
}
.onboarding-title {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  direction: rtl;
}
.onboarding-sub {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
  direction: rtl;
}
.onboarding-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  font-size: 18px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  background: var(--surface2);
  outline: none;
  transition: border-color 0.2s;
}
.onboarding-input:focus {
  border-color: var(--primary);
  background: #fff;
}
.onboarding-btn {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.15s var(--spring), box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(73,54,232,0.35);
}
.onboarding-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(73,54,232,0.45); }
.onboarding-btn:active { transform: scale(0.97); }

/* Onboarding step 2 — interests */
#obStep1, #obStep2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.ob-tags-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}
.ob-tag {
  padding: 10px 4px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface2);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s var(--spring);
  direction: rtl;
  line-height: 1.4;
}
.ob-tag:hover { transform: scale(1.06); border-color: var(--primary); }
.ob-tag.selected {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
  border-color: transparent;
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(73,54,232,0.3);
}
.ob-skip-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-soft);
  cursor: pointer;
  padding: 4px 8px;
  direction: rtl;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Certificate overlay */
.cert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 30, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.cert-overlay.open { opacity: 1; }
.cert-card {
  background: #fff;
  border-radius: 28px;
  padding: 36px 28px 28px;
  width: min(340px, 92vw);
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: ob-pop 0.5s var(--spring) both;
  border: 3px solid #f59e0b;
}
.cert-fox  { font-size: 52px; line-height: 1; }
.cert-badge { font-size: 48px; margin: 4px 0; }
.cert-title {
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cert-name {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #4936e8, #9b6ff8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cert-unit {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  direction: rtl;
}
.cert-date { font-size: 12px; color: var(--text-soft); }
.cert-btns { display: flex; gap: 10px; width: 100%; margin-top: 8px; }
.cert-share-btn, .cert-close-btn {
  flex: 1;
  padding: 13px;
  border-radius: 14px;
  border: none;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s var(--spring);
}
.cert-share-btn {
  background: #25d366;
  color: #fff;
}
.cert-close-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
}
.cert-share-btn:active, .cert-close-btn:active { transform: scale(0.96); }


/* Age selection grid (Step 3) */
.ob-age-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0 24px;
  direction: ltr;
}

.ob-age-btn {
  padding: 16px 8px;
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.14);
  border-radius: 16px;
  color: var(--text, #f1f5f9);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s, border-color .15s, background .15s;
  min-height: 60px;
}
.ob-age-btn:active {
  transform: scale(.94);
  border-color: var(--primary, #7c5bf8);
  background: rgba(124,91,248,.22);
}
