.modal {
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 300px;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.modal.show {
    visibility: visible;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 1;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    cursor: pointer;
}