chan , kun and san are not gender based . there are sign of respect so speak formality . like u wouldnt refer to your teacher male or femal as say "yamazaki-chan / kun" it would be san . same goes with your friends then u can use kun or chan . chan usualy refers to sumone younger then u but can also be used out of informal . kinda like in spanish when u address sumone and u say you when u say you to a friend or sumone u just met very informal its "tu" but if its an adult or teacher or to be respectful it would be "Usted" .
i can understand your confussion on the gender thing seeing how most anime has a girl to boy ratio of like 10 - 1 so ya