* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f7edff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.button {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.button button {
    background-color: #333;
    color: #fff;
    border: none;
    outline: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button button:hover {
    background-color: #555;
    transform: translateY(-2px);
}

#toastBox {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    width: 100%;
    max-width: 350px;
    padding: 15px 20px;
    background: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.5s ease forwards;
    overflow: hidden;
}

@keyframes slideIn {
    0% {
        transform: translateX(120%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast i {
    font-size: 28px;
    color: green;
}

.toast.error i {
    color: red;
}

.toast.invalid i {
    color: orange;
}

.toast::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 5px;
    background: green;
    animation: progressBar 5s linear forwards;
    width: 100%;
    border-radius: 0 0 10px 10px;
}

.toast.error::after {
    background: red;
}

.toast.invalid::after {
    background: orange;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}


@media (max-width: 450px) {
    .toast {
        max-width: 90%;
        font-size: 14px;
    }

    .button button {
        width: 100px;
        padding: 10px;
        font-size: 14px;
    }

    .toast i {
        font-size: 24px;
    }
}
