Advancing LLM Safe Alignment with Safety Representation Ranking