.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}



.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background-color: #fefefe;
    z-index: 1;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-button:hover,
.close-button:focus {
    color: #000;
}

.modal-body {
    padding: 10px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-cancel,
.btn-save {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    min-width: 100px;
}

.btn-cancel {
    background-color: var(--secondary-color);
    color: white;
}

.btn-save {
    background-color: var(--primary-color);
    color: white;
}

.btn-cancel:hover,
.btn-save:hover {
    opacity: 0.9;
}

.login-help {
    font-size: 0.9em;
    margin-top: 15px;
}

.login-help a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
}

.login-help a:hover {
    text-decoration: underline;
}

.tutorial-step {
    margin-bottom: 20px;
}

.tutorial-step h4 {
    margin-bottom: 10px;
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 15px;
    }
    
    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-cancel,
    .btn-save {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Animation for modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Scrollbar styling */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}


/* --- Merged from enhanced-modal.css --- */

.enhanced-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease-out;
}

.enhanced-modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

.enhanced-modal-header {
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.enhanced-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
}

.enhanced-modal-body {
    padding: 20px 0;
    font-size: 1.1em;
    color: #555;
}

.enhanced-modal-footer {
    padding-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.enhanced-modal-button {
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.enhanced-modal-button-confirm {
    background-color: #28a745;
    color: white;
}

.enhanced-modal-button-confirm:hover {
    background-color: #218838;
}

.enhanced-modal-button-cancel {
    background-color: #dc3545;
    color: white;
}

.enhanced-modal-button-cancel:hover {
    background-color: #c82333;
}

.enhanced-modal-button-close {
    background-color: #6c757d;
    color: white;
}

.enhanced-modal-button-close:hover {
    background-color: #5a6268;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
