Let $\{g_i\}_{i=0}^{\infty}$ be a sequence of positive integers such that $g_0=g_1=1$ and the following recursions hold for every positive integer $n$: \begin{align*}
g_{2n+1} &= g_{2n-1}^2+g_{2n-2}^2 \\
g_{2n} &= 2g_{2n-1}g_{2n-2}-g_{2n-2}^2
\end{align*}
Compute the remainder when $g_{2011}$ is divided by $216$.

Let's think step by step and output the final answer within \boxed{}.
user