:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --light-color: #f9f9f9;
    --border-color: #eaeaea;
    --text-color: #333;
    --text-light: #7f8c8d;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 0;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* 选项卡样式 */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.modal-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.2s;
}

.modal-tab.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    font-weight: bold;
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.required-field::after {
    content: " *";
    color: #e74c3c;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.field-note {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 3px;
}

/* JSON 输入框样式 */
.json-input {
    width: 100%;
    height: 200px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    resize: vertical;
    box-sizing: border-box;
}

.json-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.json-example {
    background: var(--light-color);
    padding: 12px;
    border-radius: 4px;
    margin-top: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
}

.json-example-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary-color);
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.quick-add-btn {
    background: #27ae60;
    color: white;
    margin-left: 10px;
}

.quick-add-btn:hover {
    background: #219653;
}

.batch-add-btn {
    background: #e67e22;
    color: white;
}

.batch-add-btn:hover {
    background: #d35400;
}

/* 添加方法按钮组 */
.add-method-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.add-method-buttons .btn {
    flex: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .modal-tabs {
        flex-direction: column;
    }
    
    .modal-tab {
        text-align: left;
        border-bottom: none;
        border-left: 2px solid transparent;
    }
    
    .modal-tab.active {
        border-bottom-color: transparent;
        border-left-color: var(--secondary-color);
    }
    
    .add-method-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .form-input {
        padding: 6px 10px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}