.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1200;
    justify-content: center;
    align-items: center;
}
.overlay-buttons-container {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 1203;
}
.overlay-button {

    width: 44px;
    height: 44px;
    font-size: 22px;
    background-color: var(--white);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    margin:5px;
    cursor: pointer;

    text-align: center;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
    z-index: 1205;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#problem-solver-button {
    background-color: #2980b9;  
}
#problem-solver-button:hover {
    background-color: #3498db; 
}
#calculator-button {
    background-color: #27ae60; 
}
#calculator-button:hover {
    background-color: #2ecc71; 
}

.selected-button {
    box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.8); 
    filter: brightness(1.2);
    transition: box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}




.overlay-wrapper {
    position: relative;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-overlay-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #000; 
    z-index: 1201;
}

.close-overlay-button:hover {
    color: #ff0000; 
}


@media (max-width: 768px) {
    .overlay-wrapper {
        width: 100%;
        height: 100%;
    }
    .overlay-buttons-container {
        bottom: 25vw;
        right: 5vw;
        width: 8vw;
    }
    .overlay-button {
        width: 6vw;
        height: 6vw;
        font-size: 3vw;
        margin-bottom: 1vw;
        padding-left: 1.9vw;
    }
    .overlay-content {
        width: 100%;
        height: 100%;
    }

    #close-overlay {
        padding: 8px 16px;
        font-size: 14px;
    }
}