/**
 * assets/css/gamification.css
 * Styles for the Phase 4 Gamified Onboarding Experience.
 */

:root {
  --gamify-primary: #2ecc71;
  --gamify-secondary: #f1c40f;
  --gamify-bg: rgba(255, 255, 255, 0.95);
  --gamify-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.gamify-body {
  background: radial-gradient(circle at top right, #f8fafc, #e2e8f0);
  min-height: 100vh;
  margin: 0;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* ── Wizard Shell ────────────────────────────────── */
.gamify-wizard {
  max-width: 800px;
  margin: 4rem auto;
  padding: 2rem;
  perspective: 1000px;
}

.gamify-card {
  background: var(--gamify-bg);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--gamify-shadow);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.gamify-step {
  display: none;
  animation: slideRotateIn 0.5s ease forwards;
}

.gamify-step.active {
  display: block;
}

@keyframes slideRotateIn {
  from { opacity: 0; transform: translateY(20px) rotateX(-5deg); }
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

/* ── Header & Points ─────────────────────────────── */
.gamify-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.points-badge {
  background: var(--gamify-secondary);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(241, 196, 15, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ── Progress Bar ───────────────────────────────── */
.gamify-progress-container {
  height: 8px;
  background: #edf2f7;
  border-radius: 4px;
  margin: 1.5rem 0;
  overflow: hidden;
}

.gamify-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gamify-primary), #27ae60);
  transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

/* ── Options & Cards ────────────────────────────── */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.option-card {
  background: #f8fafc;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.option-card:hover {
  background: #fff;
  border-color: var(--gamify-primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.option-card.selected {
  border-color: var(--gamify-primary);
  background: rgba(46, 204, 113, 0.05);
}

/* ── Micro-interactions ────────────────────────── */
.floating-points {
  position: absolute;
  color: var(--gamify-primary);
  font-weight: 800;
  font-size: 1.5rem;
  pointer-events: none;
  z-index: 100;
}

.badge-unlock {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: #fff;
  padding: 1rem 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(120%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2000;
}

.badge-unlock.visible {
  transform: translateX(0);
}

.badge-icon {
  width: 48px;
  height: 48px;
}
