/* Modal Styles */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #ffffff;
    margin: auto;
    border-radius: 12px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, #001f2b 0%, #003d4f 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: #00a3a1;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 28px;
    color: #212121;
}

.modal-body p {
    margin: 12px 0;
    line-height: 1.6;
}

.modal-body ul {
    line-height: 1.8;
    color: #666;
}

.form-group {
    margin: 20px 0;
}

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

.api-key-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    transition: border-color 0.2s;
}

.api-key-input:focus {
    outline: none;
    border-color: #00a3a1;
    box-shadow: 0 0 0 3px rgba(0, 163, 161, 0.1);
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #999;
    font-size: 12px;
}

.form-group small a {
    color: #00a3a1;
    text-decoration: none;
}

.form-group small a:hover {
    text-decoration: underline;
}

.api-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.api-status.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.api-status.error {
    display: block;
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.modal-footer {
    padding: 20px 28px;
    background: #f9f9f9;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #00a3a1;
    color: white;
}

.btn-primary:hover {
    background: #008c8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 163, 161, 0.3);
}

.btn-secondary {
    background: white;
    color: #666;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

/* API Key Button in Header */
.api-key-btn {
    background: rgba(0, 163, 161, 0.15);
    border: 1px solid rgba(0, 163, 161, 0.3);
    color: #00a3a1;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    margin-left: 12px;
}

.api-key-btn:hover {
    background: rgba(0, 163, 161, 0.25);
    border-color: #00a3a1;
    transform: translateY(-1px);
}

.api-key-btn.active {
    background: #00a3a1;
    color: white;
    border-color: #00a3a1;
}

.api-key-btn i {
    margin-right: 4px;
}
