Term: bittersweet
Example: when i learned i won the contest i felt bittersweet knowing i beat out my best friend who wanted to win more than me
Definition: when something is good but there is a bad part about it