Please reason step by step, and put your final answer within \boxed{}.
Solve the following system of equations:
$$
\begin{gathered}
x+y=a(\sqrt{x}-\sqrt{y}) \\
x^{2}+y^{2}=a(\sqrt{x}-\sqrt{y})^{2}
\end{gathered}
$$
where \( a \) is a real number. For which values of \( a \) will the roots be real?
user