/* Protocol Circle — gamification layer styles
   Flames, points pills, streak cells, daily-reward + milestone overlays.
   All motion is wrapped in prefers-reduced-motion: no-preference. */

/* ── Flame ─────────────────────────────────────────────────── */
.gamif-flame-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gamif-flame { display: block; }
.gamif-flame-amber      { filter: drop-shadow(0 0 9px rgba(245, 180, 84, 0.55)); }
.gamif-flame-orange     { filter: drop-shadow(0 0 11px rgba(251, 146, 60, 0.60)); }
.gamif-flame-orangedeep { filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.62)); }
.gamif-flame-rose       { filter: drop-shadow(0 0 14px rgba(248, 113, 113, 0.66)); }
.gamif-flame-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 8%;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  text-shadow: 0 1px 4px rgba(120, 40, 0, 0.5);
  font-variant-numeric: tabular-nums;
}
@keyframes gamif-flicker {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@media (prefers-reduced-motion: no-preference) {
  .gamif-flame-anim {
    animation: gamif-flicker 2.4s ease-in-out infinite;
    transform-origin: center 70%;
  }
}

/* ── Points pill ───────────────────────────────────────────── */
.gamif-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.28);
  color: #4ade80;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.gamif-pill-lg { padding: 5px 12px; font-size: 13px; }
.gamif-pill-unit { opacity: 0.7; font-weight: 600; }

/* ── Streak strip cells ────────────────────────────────────── */
.gamif-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.gamif-cell-hit { background: rgba(245, 180, 84, 0.12); border-color: rgba(245, 180, 84, 0.28); }
.gamif-cell-last { border-color: #f5b454; border-width: 1.5px; }
.gamif-cell-dot { width: 6px; height: 6px; border-radius: 999px; background: #3f4156; }

/* ── Milestone dots row ────────────────────────────────────── */
.gamif-ms-line { width: 22px; height: 2px; background: rgba(255, 255, 255, 0.10); }
.gamif-ms-line-on { background: #f5b454; }
.gamif-ms-dot {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}
.gamif-ms-dot-on { background: rgba(245, 180, 84, 0.16); border-color: #f5b454; }
.gamif-ms-dot-next { border-color: rgba(245, 180, 84, 0.5); box-shadow: 0 0 16px rgba(245, 180, 84, 0.27); }

/* ── Overlays ──────────────────────────────────────────────── */
.gamif-reward-bg {
  background:
    radial-gradient(130% 80% at 50% -5%, rgba(74, 222, 128, 0.26), transparent 55%),
    radial-gradient(120% 80% at 50% 108%, rgba(0, 200, 160, 0.20), transparent 50%),
    #06060c;
}
.gamif-milestone-bg {
  background:
    radial-gradient(140% 90% at 50% -8%, rgba(245, 180, 84, 0.36), transparent 55%),
    radial-gradient(120% 80% at 50% 112%, rgba(108, 99, 255, 0.20), transparent 52%),
    #0a0608;
}
@keyframes gamif-overlay-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
  .gamif-overlay-enter { animation: gamif-overlay-in 0.36s cubic-bezier(0.16, 1, 0.3, 1); }
}
.gamif-close {
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
}

.gamif-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.gamif-bignum {
  font-size: 92px;
  font-weight: 800;
  letter-spacing: -4px;
  line-height: 1;
  background: linear-gradient(135deg, #4ade80, #00c8a0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #4ade80; /* fallback */
  font-variant-numeric: tabular-nums;
}
.gamif-tnum { font-variant-numeric: tabular-nums; }

.gamif-math { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(108, 99, 255, 0.14); }
.gamif-streak-chip { background: rgba(245, 180, 84, 0.08); border: 1px solid rgba(245, 180, 84, 0.22); }

.gamif-progress { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.gamif-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4ade80, #00c8a0); }

.gamif-btn-teal { background: linear-gradient(135deg, #00c8a0, #00a080); color: #0a0a12; border: none; }
.gamif-btn-warm { background: linear-gradient(135deg, #f5b454, #e8623a); color: #2a1206; border: none; }
.gamif-btn-teal:active, .gamif-btn-warm:active { transform: scale(0.985); }

/* ── Milestone badge ───────────────────────────────────────── */
.gamif-ms-pill { background: rgba(245, 180, 84, 0.16); border: 1px solid rgba(245, 180, 84, 0.35); }
.gamif-bonus-chip { background: rgba(74, 222, 128, 0.10); border: 1px solid rgba(74, 222, 128, 0.28); }
.gamif-badge-ring {
  width: 168px;
  height: 168px;
  border-radius: 999px;
  background: conic-gradient(from 220deg, #f5b454, #e8623a, #6c63ff, #f5b454);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 70px rgba(245, 180, 84, 0.40);
}
.gamif-badge-inner {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: #0a0608;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
