which is the longest stage of a star's life cycle?​