#custom-modal, #terms-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* dark background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px; /* padding to prevent the modal from being too close to the edges */
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* dark overlay */
}

.modal-content {
    background: #fff;
    width: 70%; /* Modal takes 70% of the screen width */
    max-width: 70%; /* Optional max width to avoid being too large on very large screens */
    z-index: 1001;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* Optional shadow for depth */
    border-radius: 8px; /* Optional rounding for aesthetics */
    height: auto;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
	z-index:1;
}

@media (max-width:600px)  {
    .modal-content {
        width: 98%;
        max-width: 98%;
        overflow-y:scroll !important;
    }
    #custom-modal, #terms-modal {
        top:10px !important;
        max-height: 99vh !important;
        overflow-y:scroll !important;
        flex-direction: column-reverse;
        align-items: center;
    }
}

