Ugly means unpleasant or unattractive in appearance, which is the direct opposite of good-looking (attractive). Smart refers to intelligence, timid refers to shyness, and elegant is actually similar in positive connotation to good-looking. The contrast is purely about physical appearance.