.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    transition: all 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.3s ease;
    position: relative;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-30px);}
    to {opacity: 1; transform: translateY(0);}
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #222;
    font-weight: 600;
    font-size: 1.3rem;
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.close-modal {
    color: #888;
    font-size: 1.5rem;
    font-weight: normal;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover,
.close-modal:focus {
    color: #333;
    background-color: #f5f5f5;
}



.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="url"]:focus,
.form-group textarea:focus {
    border-color: #02350D;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 226, 155, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.85rem;
}

.required {
    color: #e74c3c;
    margin-left: 2px;
}



.form-group input[type="file"] {
    width: 100%;
    padding: 0.5rem 0;
}



.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn {
    padding: 0.6rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: #02350D;
    color: white;
}

.btn-primary:hover {
    background-color: #084e17;
}

.btn-secondary {
    background-color: #f4f4f4;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e5e5e5;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #d62c1a;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}



.research-title-input {
    margin-bottom: 1rem;
    position: relative;
}

.research-title {
    width: 100%;
    margin-bottom: 0.5rem;
}
.research-link {
    width: 100%;
    margin-bottom: 1rem;
}

.add-more {
    display: inline-block;
}



#current_photo_container,
#picked_photo_container {
    padding: 0.75rem;
    background-color: #f9f9f9;
    border-radius: 0.375rem;
    text-align: center;
    margin-bottom: 1rem;
}

#current_photo,
#picked_photo {
    border-radius: 0.25rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}



/* spinner */
.spinner {
    display: inline-block;
    margin-left: 5px;
}

.spinner i {
    font-size: 14px;
    vertical-align: middle;
}


@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 3% auto;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}




#logout-confirm-modal .modal-content,
#delete-confirm-modal .modal-content {
    max-width: 450px;
}

#logout-confirm-modal .modal-body p,
#delete-confirm-modal .modal-body p {
    font-size: 1.1rem;
    text-align: center;
    margin: 1rem 0 1.5rem;
}



.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal.hide {
    opacity: 0;
    visibility: hidden;
}