/* ═══════════════════════════════════════════════════════════════════════════════
   MOTIVATION SYSTEM - CSS
   Animationen, Toasts, Modals, Konfetti
   ═══════════════════════════════════════════════════════════════════════════════ */


/* ─── TOAST ──────────────────────────────────────────────────────────────── */
.motivation-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    min-width: 280px;
    max-width: 92vw;
    padding: 14px 22px;
    background: linear-gradient(135deg, rgba(20,20,22,0.96), rgba(35,30,28,0.96));
    border: 1px solid rgba(255,159,67,0.35);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,159,67,0.10);
    color: #fff;
    z-index: 100000;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    animation: mtEnter 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.motivation-toast.mt-leave {
    animation: mtLeave 0.4s ease-in forwards;
}

.mt-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 0.02em;
    color: #ff9f43;
}

.mt-subtitle {
    font-size: 13px;
    color: #c0c8d0;
    margin-top: 4px;
    font-weight: 400;
}

@keyframes mtEnter {
    0%   { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(0.9); }
    60%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.02); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes mtLeave {
    0%   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(0.9); }
}


/* Toast-Variants */
.motivation-anim-pulseGreen {
    border-color: rgba(46,204,113,0.50);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 30px rgba(46,204,113,0.18);
}
.motivation-anim-pulseGreen .mt-title { color: #2ecc71; }

.motivation-anim-glitterPulse {
    border-color: rgba(255,215,0,0.55);
    animation: mtEnter 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, mtGlow 1.4s ease-in-out infinite alternate;
}
.motivation-anim-glitterPulse .mt-title {
    color: #ffd700;
    text-shadow: 0 0 14px rgba(255,215,0,0.6);
}

.motivation-anim-sparkle {
    border-color: rgba(155,89,255,0.45);
}
.motivation-anim-sparkle .mt-title { color: #b78aff; }

.motivation-anim-progressGlow .mt-title { color: #ff9f43; }

.motivation-anim-wave .mt-title { color: #6699ff; }

@keyframes mtGlow {
    0%   { box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 18px rgba(255,215,0,0.20); }
    100% { box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 38px rgba(255,215,0,0.55); }
}


/* ─── MODAL ──────────────────────────────────────────────────────────────── */
.motivation-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: auto;
}

.motivation-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: mmBgIn 0.4s ease-out forwards;
}

@keyframes mmBgIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.motivation-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(20,20,22,0.98), rgba(35,30,28,0.98));
    border: 2px solid rgba(255,159,67,0.5);
    border-radius: 20px;
    padding: 36px 32px;
    text-align: center;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(255,159,67,0.25);
    transform: scale(0.6) rotate(-8deg);
    opacity: 0;
    animation: mmEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.motivation-modal.mm-leave .motivation-modal-content {
    animation: mmLeave 0.35s ease-in forwards;
}

@keyframes mmEnter {
    0%   { opacity: 0; transform: scale(0.5) rotate(-12deg); }
    50%  { opacity: 1; transform: scale(1.08) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes mmLeave {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.7); }
}

.mm-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
    display: inline-block;
    animation: iconBounce 1.5s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-8px) scale(1.05); }
}

.mm-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    color: #ff9f43;
    margin: 0 0 8px;
    letter-spacing: 0.03em;
    text-shadow: 0 0 30px rgba(255,159,67,0.5);
}

.mm-subtitle {
    color: #c0c8d0;
    font-size: 15px;
    margin: 0 0 24px;
    line-height: 1.5;
}

.mm-btn {
    background: linear-gradient(135deg, #ff9f43, #ff7a18);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(255,159,67,0.35);
}
.mm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,159,67,0.55);
}


/* Big-Confetti Modal-Variant: zusätzlicher Glow */
.motivation-anim-bigConfetti {
    border-color: rgba(255,215,0,0.6);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6),
                0 0 80px rgba(255,215,0,0.35),
                0 0 120px rgba(255,159,67,0.2);
}
.motivation-anim-bigConfetti .mm-title {
    background: linear-gradient(90deg, #ffd700, #ff9f43, #ffd700);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineGold 2.5s linear infinite;
}

@keyframes shineGold {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}


/* ─── KONFETTI ───────────────────────────────────────────────────────────── */
@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(105vh) rotate(720deg);
        opacity: 0.6;
    }
}


/* ─── SPARKLES ───────────────────────────────────────────────────────────── */
@keyframes sparkleFly {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    30% {
        opacity: 1;
        transform: translateY(-15px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.7);
    }
}


/* ─── KARTEN-INDIKATOREN ─────────────────────────────────────────────────── */
/* Hot Streak Badge auf Goal-Karten */
.goal-hot-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: linear-gradient(90deg, #ff7a18, #ff3838);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    margin-left: 6px;
    animation: hotPulse 1.5s ease-in-out infinite;
}

@keyframes hotPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(255,107,53,0.6); }
    50%      { box-shadow: 0 0 18px rgba(255,107,53,0.9); }
}

/* Heute-fast-geschafft Hint */
.goal-card-hint {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255,159,67,0.08);
    border: 1px solid rgba(255,159,67,0.22);
    border-radius: 8px;
    font-size: 12px;
    color: #ff9f43;
    text-align: center;
    font-weight: 500;
}

.goal-card-hint.hint-warn {
    background: rgba(231,76,60,0.08);
    border-color: rgba(231,76,60,0.28);
    color: #e74c3c;
}

.goal-card-hint.hint-success {
    background: rgba(46,204,113,0.10);
    border-color: rgba(46,204,113,0.30);
    color: #2ecc71;
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(46,204,113,0.0); }
    50%      { box-shadow: 0 0 16px rgba(46,204,113,0.30); }
}


/* Mobile */
@media (max-width: 600px) {
    .motivation-toast {
        min-width: 86vw;
        font-size: 14px;
        padding: 12px 16px;
    }
    .mt-title { font-size: 16px; }
    .mt-subtitle { font-size: 12px; }
    .mm-icon { font-size: 56px; }
    .mm-title { font-size: 26px; }
    .motivation-modal-content { padding: 28px 22px; }
}
