.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9998;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

@media (max-width: 768px) {
    .modal {
    z-index: 9999;
    top: 1rem;
        width: 100%;
        position: fixed;
        justify-content: center;
        align-items: center;
        overflow: auto;
    }
    .modal-content {
    top: -17px;
    padding: 0!important;
    }
}

.modal-content {
    background: url('https://i.imgur.com/tx2Ew5H.jpeg') no-repeat center center;
    background-size: cover;
    box-shadow: 0 3px 6px rgba(255, 255, 255, 0.1) !important;
    padding: 6rem 20px;
    padding-top: 4rem;
    border: 1px solid #888;
    width: 80%;
    position: relative;
    text-align: center;
    overflow: visible;
    max-height: 90%;
    color: white; /* Ensures text is visible on the background */
}

#recordModal .modal-content {
    background: url('https://i.imgur.com/tx2Ew5H.jpeg') no-repeat center center;
    background-size: cover;
}

#recordModal .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
    z-index: 1;
}

/* Mix Modal */
#mixModal .modal-content {
    background: url('https://i.imgur.com/KJvY60B.jpeg') no-repeat center center;
    background-size: cover;
}

#mixModal .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
    z-index: 1;
}

/* Master Modal */
#masterModal .modal-content {
    background: url('https://i.imgur.com/S6bTrE1.jpeg') no-repeat center center;
    background-size: cover;
}

#masterModal .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
    z-index: 1;
}
.modal-content > * {
    position: relative;
    z-index: 2; /* Ensure content is above the dark overlay */
}

.close {
z-index: 9999;
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: grey;
    text-decoration: none;
    cursor: pointer;
}

.icon-row {
    padding-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

@media (max-width: 928px) {
    .icon-row {
        flex-direction: column;
        gap: 0;
        padding-top: 0;
    }

    .icon-item {
        text-align: center;
    }

    .icon-item p {
        padding-top: 1rem!important;
        font-size: 1rem;
        color: #fff;
    }

    .icon-item i {
        font-size: .5rem;
        margin-bottom: 5px;
    }

    .modal-content {
        width: 90%;
        max-height: none;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    h2, h3 {
        display: none;
    }
}

.icon-item {
    color: white;
    text-align: center;
    margin: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-item i {
    font-size: 2rem;
    color: white;
    margin-bottom: 10px;
}

.icon-item p {
    padding-top: 2rem;
    font-size: 1rem;
    color: #fff;
}