/* Modal styles */
.modal {
    display: none; /* Make sure the modal is hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    justify-content: center;
    align-items: center;
}

/* Modal content styles */
.modal-content {
    background-color: #333;
    margin: 0;
    padding: 0;
    border: none;
    width: 66%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    border-radius: 10px; /* Rounded corners for a smoother look */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Add subtle shadow around modal */
}

/* Full size frame inside the modal */
#modal-frame {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #333;
}

/* Close button styling */
.close-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
}

/* Mobile device styling */
@media (max-width: 768px) {
    .modal-content {
        width: 90%; /* Increased width to 90% on mobile devices */
        height: 80%; /* Slightly smaller height to fit on smaller screens */
        padding: 10px; /* Adding some internal padding */
        box-shadow: none; /* Remove box shadow for small screens */
    }

    .close-modal {
        font-size: 24px; /* Reduce font size for smaller screens */
        right: 15px; /* Adjust position for smaller screens */
    }
}

/* Optional: Add an animation for showing and hiding the modal */
@keyframes modalFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Applying animation to modal */
.modal.show {
    animation: modalFadeIn 0.3s ease-out forwards;
}

.modal.hide {
    animation: modalFadeOut 0.3s ease-in forwards;
}
