Optimization of properties of carbon nitride and CNx/TiN coatings prepared by single-cathode magnetron sputtering