/* Modal and popup styles */

/* General modal backdrop */
.bg-black.bg-opacity-70 {
    background-color: rgba(17, 17, 17, 0.8) !important;
}

/* Modal content container */
.modal-content {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.16) !important;
    width: 50%;
    max-height: 70vh;
    margin: 15vh auto;
    border-radius: 0;
    position: relative;
    box-shadow: 18px 18px 0 rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Scrollable content area */
.modal-scrollable {
    flex: 1;
    overflow-y: auto;
    max-height: calc(70vh - 72px);
}

/* Modal footer */
.modal-footer {
    background: #fafafa !important;
    border-top: 1px solid rgba(0, 0, 0, 0.12) !important;
    position: sticky;
    bottom: 0;
    padding: 16px;
    display: flex;
    justify-content: flex-end;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Modal close button */
#closeModal {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: #111 !important;
    position: fixed;
    right: calc(25% + 16px);
    top: calc(15vh + 16px);
    z-index: 10000;
    border-radius: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
}

/* Modal transition styles */
#modalBackdrop {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

#projectModal {
    z-index: 9999; 
}

/* Easter egg modal */
#easterEggModal {
    display: none;
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(17,17,17,0.75);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

#easterEggModal .modal-content {
    background: #fff;
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 0;
    padding: 2rem 2.5rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.95rem;
    box-shadow: 14px 14px 0 rgba(0, 0, 0, 0.08);
    max-width: 90vw;
    max-height: 80vh;
    overflow: auto;
}

#easterEggModal .close-btn {
    color: #000;
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 0;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#easterEggModal .close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: #000;
}

/* Responsive modal adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        max-height: 80vh;
    }
    
    .modal-scrollable {
        max-height: calc(80vh - 72px);
    }
    
    #closeModal {
        right: calc(5% + 16px);
        top: calc(10vh + 16px);
    }
    
    #projectModal .max-w-\[50\%\] {
        max-width: 90% !important;
        max-height: 80vh !important;
    }
}