Role of nitrogen in the formation of hard and elastic CN x thin films by reactive magnetron sputtering