:root {
    --background:#f3f1f9;
    --toast-background: #292B2D;
    --toast-success: #9CE6A8;
    --text: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;  
}
body {
    background-color: var(--background);
    font-size: 16px;
}
#toastBox{
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}
.toast{
    width: 300px;
    height: 60px ;
    background: var(--background);
    font-weight: 500;
    margin: 15px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    position: relative;
    transform: translateX(100%);
    animation: moveleft .5s linear forwards;
}
@keyframes moveleft {
    100%{
        transform: translateX(0);
    }
}
.toast i{
    margin: 0 20px; 
    font-size: 20px;
    color: green;
}
.toast.error i{
    color: red;
}
.toast.invalid i{
    color: orange;
}
.toast::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 5px;
    background-color: green;
    animation: anim 3s linear forwards;
}
.toast.error::after{
    background: red;
}
.toast.invalid::after{
    background: orange;
}
@keyframes anim{
    100%{
        width: 0;
    }
}