/* === First-run onboarding overlay === */

#ob-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 0, 20, 0.97);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: inherit;
}

/* Step panels */
.ob-step {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 480px;
  width: 100%;
  gap: 1rem;
  animation: ob-step-in 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes ob-step-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ob-step-in { animation: ob-step-in 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

/* Skip link */
.ob-skip {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #6b6a88;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: color 0.15s;
  z-index: 10001;
}
.ob-skip:hover { color: #b39ddb; }

/* Step indicator dots */
.ob-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.25rem;
}
.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a2a5c;
  transition: background 0.25s, transform 0.25s;
}
.ob-dot.active {
  background: #9d4edd;
  transform: scale(1.3);
}

/* Step 1 — Welcome */
.ob-s1-icon {
  font-size: 3.5rem;
  line-height: 1;
}
.ob-s1-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
}
.ob-s1-name {
  color: #b56cf5;
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.ob-s1-sub {
  color: #b39ddb;
  font-size: 0.9rem;
  line-height: 1.55;
}
.ob-s1-cards-label {
  color: #facc15;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ob-cards-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.ob-card-preview {
  background: linear-gradient(145deg, #1a0a2e, #120020);
  border: 1.5px solid #9d4edd;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  min-width: 100px;
  text-align: center;
  transition: opacity 0.35s, transform 0.35s;
  transform: translateY(10px);
}
.ob-card-rarity {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.ob-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e0d7ff;
  margin-bottom: 0.2rem;
}
.ob-card-stats {
  font-size: 0.72rem;
  color: #8b7cb3;
}

/* Step 2 — Build team */
.ob-team-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.ob-team-badge {
  background: rgba(157, 78, 221, 0.15);
  border: 1px solid rgba(157, 78, 221, 0.4);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  color: #d4b8ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}
.ob-team-badge small {
  font-size: 0.68rem;
  color: #7c6a99;
}

/* Step 3 — Tutorial battle */
.ob-battle-icon {
  font-size: 4rem;
  animation: ob-pulse 1.8s infinite;
}
@keyframes ob-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
.ob-enemy-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0.25rem 0;
}
.ob-enemy-badge {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  color: #f87171;
}
.ob-tooltip-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  background: rgba(157, 78, 221, 0.08);
  border: 1px solid rgba(157, 78, 221, 0.2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  width: 100%;
}
.ob-tooltip {
  font-size: 0.82rem;
  color: #b39ddb;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.ob-tooltip-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* Victory screen */
.ob-victory-icon {
  font-size: 4rem;
  animation: ob-bounce 0.6s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}
@keyframes ob-bounce {
  from { opacity: 0; transform: scale(0.3); }
  to   { opacity: 1; transform: scale(1); }
}
.ob-victory-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #facc15;
  text-shadow: 0 0 20px rgba(250, 204, 21, 0.5);
}
.ob-victory-sub {
  color: #b39ddb;
  font-size: 0.9rem;
}
.ob-rewards-box {
  background: linear-gradient(135deg, #1a0a2e, #0d1a0a);
  border: 1.5px solid #facc15;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ob-rewards-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #facc15;
  margin-bottom: 0.25rem;
}
.ob-reward-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: #e0d7ff;
}
.ob-reward-icon { font-size: 1.2rem; }
.ob-reward-label { flex: 1; font-weight: 600; }
.ob-reward-value { color: #4ade80; font-weight: 700; font-size: 0.85rem; }

/* CTA buttons */
.ob-cta-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.ob-cta-primary {
  flex: 1;
  min-width: 160px;
  background: linear-gradient(135deg, #9d4edd, #e040fb);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s;
}
.ob-cta-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.ob-cta-primary:active { transform: scale(0.97); }

.ob-cta-secondary {
  flex: 1;
  min-width: 140px;
  background: rgba(157, 78, 221, 0.12);
  color: #b56cf5;
  border: 1px solid rgba(157, 78, 221, 0.4);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.ob-cta-secondary:hover { background: rgba(157, 78, 221, 0.22); transform: translateY(-1px); }

.ob-cta-outline {
  background: transparent;
  color: #6b6a88;
  border: 1px solid #3a2a5c;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.15s;
  width: 100%;
}
.ob-cta-outline:hover { color: #b39ddb; border-color: #5a4a7c; }

/* Fade-out animation on close */
.ob-fade-out {
  animation: ob-fade-out 0.35s ease both;
}
@keyframes ob-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Generic text helpers */
.ob-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
}
.ob-sub {
  color: #b39ddb;
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .ob-s1-title { font-size: 1.3rem; }
  .ob-victory-title { font-size: 1.6rem; }
  .ob-cta-row { flex-direction: column; }
  .ob-cta-primary, .ob-cta-secondary { min-width: unset; }
}
