Comprehensive analysis and optimal design of top-emitting organic light-emitting devices