/* pm-streak.css — the streak badge, shared by the Level 2 and Level 1
 * dashboards.
 *
 * Moved verbatim out of index.html so Level 1 could show the same badge
 * without a second copy of it. One streak, one set of styles: a learner
 * switching levels sees the same thing, because it IS the same thing.
 *
 * .welcome-left travels with it — it is what sits the badge alongside the
 * greeting, and means nothing apart from it.
 */
/* ===== STREAK BADGE ===== */
.welcome-left { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.streak-badge {
    display: none;
    align-items: center;
    gap: 14px;
    border-radius: 14px;
    padding: 14px 22px;
    flex-shrink: 0;
    animation: streakPop 0.6s ease-out 0.3s both;
}

@keyframes streakPop {
    0% { opacity: 0; transform: scale(0.8); }
    60% { transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

.streak-badge.spark { background: linear-gradient(135deg, #fff7ed, #ffedd5); border: 2px solid #fed7aa; }
.streak-badge.hot { background: linear-gradient(135deg, #fef3c7, #fde68a); border: 2px solid #fbbf24; }
.streak-badge.blazing { background: linear-gradient(135deg, #fee2e2, #fecaca); border: 2px solid #f87171; box-shadow: 0 0 20px rgba(248,113,113,0.2); }
.streak-badge.electric { background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 2px solid #60a5fa; box-shadow: 0 0 24px rgba(96,165,250,0.3), 0 0 60px rgba(96,165,250,0.1); }

.streak-flame {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; position: relative; flex-shrink: 0;
}

.flame-svg { width: 36px; height: 36px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }

.spark .streak-flame { background: rgba(251,146,60,0.12); animation: flickerSmall 1.8s ease-in-out infinite alternate; }
.spark .flame-svg { width: 28px; height: 28px; }
.spark .flame-main { fill: #fb923c; } .spark .flame-inner { fill: #fde68a; } .spark .flame-core { fill: #fef3c7; }

@keyframes flickerSmall { 0% { transform: scale(1) rotate(-1deg); } 50% { transform: scale(1.04) rotate(1deg); } 100% { transform: scale(0.98) rotate(-0.5deg); } }

.hot .streak-flame { background: rgba(245,158,11,0.15); animation: flickerMedium 1.2s ease-in-out infinite alternate; }
.hot .flame-svg { width: 34px; height: 34px; }
.hot .flame-main { fill: #f59e0b; } .hot .flame-inner { fill: #fde68a; } .hot .flame-core { fill: #fefce8; }

@keyframes flickerMedium { 0% { transform: scale(1) rotate(-2deg); } 33% { transform: scale(1.08) rotate(2deg); } 66% { transform: scale(1.03) rotate(-1deg); } 100% { transform: scale(1.1) rotate(1.5deg); } }

.blazing .streak-flame { background: rgba(239,68,68,0.12); animation: flickerLarge 0.8s ease-in-out infinite alternate; }
.blazing .flame-svg { width: 38px; height: 38px; }
.blazing .flame-main { fill: #ef4444; } .blazing .flame-inner { fill: #fbbf24; } .blazing .flame-core { fill: #fef08a; }

@keyframes flickerLarge { 0% { transform: scale(1) rotate(-3deg); } 25% { transform: scale(1.12) rotate(3deg); } 50% { transform: scale(1.05) rotate(-2deg); } 75% { transform: scale(1.15) rotate(2deg); } 100% { transform: scale(1.08) rotate(-1deg); } }

.electric .streak-flame { background: radial-gradient(circle, rgba(96,165,250,0.2), rgba(59,130,246,0.08)); animation: flickerElectric 0.6s ease-in-out infinite alternate; }
.electric .flame-svg { width: 40px; height: 40px; filter: drop-shadow(0 0 8px rgba(96,165,250,0.5)) drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.electric .flame-main { fill: #3b82f6; } .electric .flame-inner { fill: #93c5fd; } .electric .flame-core { fill: #e0f2fe; }

@keyframes flickerElectric { 0% { transform: scale(1) rotate(-2deg); filter: brightness(1); } 25% { transform: scale(1.14) rotate(3deg); filter: brightness(1.1); } 50% { transform: scale(1.06) rotate(-3deg); filter: brightness(1.05); } 75% { transform: scale(1.16) rotate(2deg); filter: brightness(1.15); } 100% { transform: scale(1.1) rotate(-1deg); filter: brightness(1.08); } }

.electric .streak-flame::after {
    content: ''; position: absolute; inset: -4px; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, rgba(96,165,250,0.15), transparent, rgba(96,165,250,0.1), transparent);
    animation: electricSpin 3s linear infinite;
}

@keyframes electricSpin { to { transform: rotate(360deg); } }

.streak-info { text-align: left; }
.streak-count-row { display: flex; align-items: baseline; gap: 6px; }
.streak-count { font-family: 'Outfit', sans-serif; font-size: 1.7em; font-weight: 800; line-height: 1; }
.streak-label { font-size: 0.78em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; }

.spark .streak-count { color: #ea580c; } .spark .streak-label { color: #c2410c; }
.hot .streak-count { color: #d97706; } .hot .streak-label { color: #b45309; }
.blazing .streak-count { color: #dc2626; } .blazing .streak-label { color: #b91c1c; }
.electric .streak-count { color: #2563eb; } .electric .streak-label { color: #1d4ed8; }

.streak-best { font-size: 0.7em; font-weight: 600; margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.spark .streak-best { color: #9a3412; } .hot .streak-best { color: #92400e; }
.blazing .streak-best { color: #991b1b; } .electric .streak-best { color: #1e40af; }

.streak-week { display: flex; gap: 5px; margin-top: 8px; }

.streak-dot {
    width: 22px; height: 22px; border-radius: 5px; background: #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 8px; font-weight: 700; color: var(--text-light); position: relative;
}

.streak-dot.active { color: white; }
.spark .streak-dot.active { background: linear-gradient(135deg, #fb923c, #ea580c); }
.hot .streak-dot.active { background: linear-gradient(135deg, #fbbf24, #d97706); }
.blazing .streak-dot.active { background: linear-gradient(135deg, #f87171, #dc2626); }
.electric .streak-dot.active { background: linear-gradient(135deg, #60a5fa, #2563eb); }

.streak-dot.today { background: linear-gradient(135deg, #16a34a, #16a34a); color: white; box-shadow: 0 0 8px rgba(34,197,94,0.4); }

.streak-dot.freeze { background: linear-gradient(135deg, #e0f2fe, #bae6fd); color: #0284c7; border: 1.5px solid #7dd3fc; }
.streak-dot.freeze::after { content: '❄'; font-size: 10px; position: absolute; }

.freeze-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.freeze-tokens { display: flex; gap: 4px; }

.freeze-token {
    width: 22px; height: 22px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
}

.freeze-token.available { background: linear-gradient(135deg, #e0f2fe, #bae6fd); border: 1.5px solid #7dd3fc; box-shadow: 0 1px 4px rgba(56,189,248,0.2); }
.freeze-token.used { background: #f1f5f9; border: 1.5px solid #e2e8f0; opacity: 0.5; }

.freeze-label { font-size: 0.65em; font-weight: 600; color: #0369a1; text-transform: uppercase; letter-spacing: 0.5px; }
