/* ============================================================
   project-complete-cascade.css — v0.9.6.3
   ============================================================ */

/* Confetti Particles — 6 verschiedene Drift-Keyframes für Variation */
@keyframes confetti-fly-0 {
    0%   { transform: translate(-50%, -50%) rotate(0deg); opacity: 0.95; }
    100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 220px)) rotate(var(--rot)); opacity: 0; }
}
@keyframes confetti-fly-1 {
    0%   { transform: translate(-50%, -50%) rotate(0deg); opacity: 0.95; }
    100% { transform: translate(calc(-50% + var(--dx)*1.1), calc(-50% + var(--dy) + 260px)) rotate(var(--rot)); opacity: 0; }
}
@keyframes confetti-fly-2 {
    0%   { transform: translate(-50%, -50%) rotate(0deg); opacity: 0.95; }
    100% { transform: translate(calc(-50% + var(--dx)*0.9), calc(-50% + var(--dy) + 200px)) rotate(var(--rot)); opacity: 0; }
}
@keyframes confetti-fly-3 {
    0%   { transform: translate(-50%, -50%) rotate(0deg); opacity: 0.95; }
    100% { transform: translate(calc(-50% + var(--dx)*1.2), calc(-50% + var(--dy) + 240px)) rotate(var(--rot)); opacity: 0; }
}
@keyframes confetti-fly-4 {
    0%   { transform: translate(-50%, -50%) rotate(0deg); opacity: 0.95; }
    100% { transform: translate(calc(-50% + var(--dx)*0.8), calc(-50% + var(--dy) + 280px)) rotate(var(--rot)); opacity: 0; }
}
@keyframes confetti-fly-5 {
    0%   { transform: translate(-50%, -50%) rotate(0deg); opacity: 0.95; }
    100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 250px)) rotate(var(--rot)); opacity: 0; }
}

.confetti-burst span {
    box-shadow: 0 0 2px rgba(0,0,0,0.25);
    border-radius: 1px;
}

/* Reduced Motion: weniger aggressiv, aber nicht ganz deaktivieren */
@media (prefers-reduced-motion: reduce) {
    .confetti-burst { display: none; }
}

/* ============================================================
   Toast Stack — unten rechts, Win95-look
   ============================================================ */

.cascade-toast {
    background: linear-gradient(to bottom, #ffffff 0%, #f0f0e0 100%);
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #606060;
    border-bottom: 2px solid #606060;
    padding: 7px 12px 7px 10px;
    min-width: 220px;
    max-width: 380px;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 11px;
    color: #000;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.35);
    pointer-events: auto;
    animation: cascade-toast-in 380ms cubic-bezier(.22,.81,.36,1);
    border-left: 4px solid #4aa34a;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cascade-toast.crit {
    background: linear-gradient(to bottom, #fff8d0 0%, #ffe689 100%);
    border-left: 4px solid #e6b800;
    box-shadow: 0 0 10px rgba(230,184,0,0.5), 3px 3px 10px rgba(0,0,0,0.35);
    animation: cascade-toast-in 380ms cubic-bezier(.22,.81,.36,1), crit-glow 1.2s ease-in-out infinite alternate;
}

/* v0.9.9.12: Loss-Toast — rote Variante fuer verlorene Projekte */
.cascade-toast.loss {
    background: linear-gradient(to bottom, #ffe6e6 0%, #ffcccc 100%);
    border-left: 4px solid #c83232;
    color: #4a0000;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.35);
}

.cascade-toast.loss strong {
    color: #4a0000;
}

.cascade-toast.fade-out {
    animation: cascade-toast-out 380ms cubic-bezier(.55,.05,.68,.19) forwards;
}

.cascade-toast-icon { font-size: 14px; }

.cascade-toast strong {
    font-weight: bold;
    color: #1a1a1a;
}

.cascade-toast-val {
    color: #1a7a1a;
    font-weight: bold;
}

.cascade-toast-rep {
    color: #8a6a1a;
    font-weight: bold;
}

.cascade-toast-crit {
    color: #b88800;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 9.5px;
    letter-spacing: 0.5px;
    margin-left: 2px;
}

@keyframes cascade-toast-in {
    0%   { opacity: 0; transform: translateX(120px) scale(0.95); }
    60%  { opacity: 1; transform: translateX(-6px) scale(1.02); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes cascade-toast-out {
    0%   { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(60px); }
}

@keyframes crit-glow {
    from { box-shadow: 0 0 6px rgba(230,184,0,0.35), 3px 3px 10px rgba(0,0,0,0.35); }
    to   { box-shadow: 0 0 14px rgba(230,184,0,0.65), 3px 3px 10px rgba(0,0,0,0.35); }
}

/* v0.9.6.12: Taskbar-Button-Pulse wenn Projekt-Cascade am Taskbar-Icon statt an der Karte animiert */
@keyframes cascade-taskbar-pulse {
    0%   { background-color: rgba(74, 163, 74, 0.0); box-shadow: 0 0 0 0 rgba(74, 163, 74, 0.0); }
    30%  { background-color: rgba(74, 163, 74, 0.55); box-shadow: 0 0 8px 2px rgba(74, 163, 74, 0.5); }
    100% { background-color: rgba(74, 163, 74, 0.0); box-shadow: 0 0 0 0 rgba(74, 163, 74, 0.0); }
}
.taskbar-btn.cascade-pulse {
    animation: cascade-taskbar-pulse 1.4s ease-out forwards;
}
