A three-digit number \( ABC \) (where \( A, B, \) and \( C \) are its digits and \( A \neq 0 \)) forms a geometric sequence. When the digits of this number are reversed to form the number \( CBA \), the difference between \( ABC \) and \( CBA \) is 594. Find the original number \( ABC \). Let's think step by step and output the final answer within \boxed{}.
user