/* The Modal (background) */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    /* Black with opacity */
    padding-top: 60px;
    transition: all 0.3s ease;
    overflow: auto;
    /* Allow scrolling if content overflows */
}

/* Modal Content */
.modal-content {
    background-color: #fff;
    /* White background */
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #8c40ed;
    /* Border with primary color */
    width: 80%;
    max-width: 600px;
    min-height: 200px;
    /* Set a minimum height */
    max-height: 80vh;
    /* Maximum height based on viewport */
    border-radius: 10px;
    /* Rounded corners */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    /* Soft shadow for depth */
    position: relative;
    /* For positioning the close button */
    transition: transform 0.3s ease;
    /* Smooth transition for any transforms */
}

/* The Close Button */
.close-btn {
    color: #8c40ed;
    /* Primary color for close button */
    font-size: 32px;
    /* Larger size */
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
    /* Smooth color transition */
}

.close-btn:hover,
.close-btn:focus {
    color: #5a1d94;
    /* Darker shade of primary color on hover */
    text-decoration: none;
}

/* Modal Body */
#modal-body {
    font-size: 16px;
    color: #333;
    /* Text color for content */
    line-height: 1.5;
    /* Spacing between lines */
    max-height: 60vh;
    /* Ensures the content is scrollable if it's too long */
    overflow-y: auto;
    /* Allow scrolling for long content */
    padding-right: 15px;
    /* Prevent text from touching the right edge */
}

/* Add a smooth fade-in animation when the modal appears */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    animation: fadeIn 0.3s ease-in-out;
}

/* Make the modal responsive for smaller screens */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        /* Take up more space on smaller screens */
        min-height: 150px;
        /* Adjust minimum height */
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        /* Take almost full width on very small screens */
    }
}