#overlay-root {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.overlay-box {
    min-width: 260px;
    padding: 14px 18px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    opacity: 0;
    color: #000;
    position: relative;
    overflow: hidden;
    transform: translateX(-300%);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.overlay-box.success {
    background-color: #d4f9d4;
    color: #000000;
    border: 1.5px solid #4caf50;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.4);
}

.overlay-box.error {
    background-color: #f9d4d4;
    color: #000000;
    border: 1.5px solid #e53935;
    box-shadow: 0 0 8px rgba(229, 57, 53, 0.4);
}

.overlay-box.show {
    transform: translateX(0);
    opacity: 0.95;
}

.overlay-box.fade-out {
    transform: translateX(300%);
    opacity: 0;
}

.overlay-box .progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: rgba(0,0,0,0.2);
    width: 100%;
}

@media (max-width: 600px) {
    #overlay-root {
        top: 130px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        gap: 8px;
    }

    .overlay-box {
        min-width: auto;
        width: 100%;
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .overlay-box.success {
        background-color: #d4f9d4; 
        border: 1.5px solid #4caf50; 
        box-shadow: 0 0 12px rgba(76, 175, 80, 0.4);
    }

    .overlay-box.error {
        background-color: #f9d4d4; 
        border: 1.5px solid #e53935; 
        box-shadow: 0 0 8px rgba(229, 57, 53, 0.4);
    }

    .overlay-box .progress {
        height: 3px;
        width: 100%;
    }
}
