Recently, the superconducting transition temperature Tc = 287 K has been experimentally obtained in the material composed of carbon, sulfur, and hydrogen under the high pressure of 267 GPa. The material structure is unknown yet, where the carbon and sulfur were added at a molar ratio of 1:1. Here, fixing the molar ratio of C : S = 1:1, we studied several possible C-S-H structures, and found a new stable structure C2S2H4 using the first-principles calculations. The C2S2H4 shows an insulator-to-metal transition and the superconducting ground state at the pressure of 64 GPa, and its Tc can reach 16.5 K at 300 GPa. In addition, we found another stable structure of C2S3H4, whose Tc is 47.4 K at 300 GPa. The calculations show that the added S atom in C2S3H4 breaks part of C-H bonds in C2S2H4, makes the vibration of H atom at a lower frequency, and thus enhances the electro-phonon coupling and Tc. Our results suggest that the molar ratio of C:S lower than 1:1 in the C-S-H systems may be favorable to enhance Tc. This can be useful to figure out the structure of the C-S-H material with room temperature Tc in the recent experiment.