/* ==========================================================================
   Melopod gamification: streak pill, XP bar, badges, level-up toast
   ========================================================================== */

.mp-streak-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 8px;
    border-radius: 999px;
    background: var(--soft, #f3f3f3);
    border: 1px solid var(--line, #e6e6e6);
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform .15s ease;
}

.mp-streak-pill:hover {
    transform: translateY(-1px);
}

.mp-streak-pill.mp-streak-risk {
    background: #fff1e6;
    border-color: #ffb066;
    animation: mpStreakPulse 1.6s ease-in-out infinite;
}

@keyframes mpStreakPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 26, .35); }
    50%      { box-shadow: 0 0 0 6px rgba(255, 122, 26, 0); }
}

.mp-streak-flame {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
    transform-origin: center;
}

.mp-streak-flame.flame-bump {
    animation: mpFlameBump .5s ease;
}

@keyframes mpFlameBump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.5) rotate(-8deg); }
    70%  { transform: scale(1.15) rotate(4deg); }
    100% { transform: scale(1); }
}

.mp-level-chip {
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--purple, #7358ff);
    color: #fff;
    font-size: 11px;
    letter-spacing: .02em;
}

/* Full dashboard card */

.mp-gami-card {
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid var(--line, #e6e6e6);
    background: #fff;
    margin-bottom: 20px;
}

.theme-dark .mp-gami-card {
    background: #191919;
    border-color: #333;
}

.mp-gami-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mp-gami-streak {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mp-streak-flame-lg {
    width: 30px;
    height: 30px;
}

.mp-gami-level {
    text-align: right;
}

.mp-xp-track {
    height: 10px;
    border-radius: 999px;
    background: var(--soft, #f3f3f3);
    overflow: hidden;
    margin-bottom: 6px;
}

.theme-dark .mp-xp-track {
    background: #292929;
}

.mp-xp-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--purple, #7358ff), var(--pink, #ff4d74));
    transition: width .6s cubic-bezier(.22, 1, .36, 1);
}

.mp-badge-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.mp-badge {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--soft, #f3f3f3);
    font-size: 16px;
    cursor: default;
    transition: transform .15s ease;
}

.mp-badge:hover {
    transform: scale(1.12) rotate(-4deg);
}

/* Level-up / streak toast */

.mp-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 20px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 14px;
    background: #111;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity .35s ease, transform .35s ease;
}

.mp-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.mp-toast .mp-toast-icon {
    font-size: 22px;
}
