1. Find the range of real number $a$ such that the inequality
$$
\sin 2 \theta-(2 \sqrt{2}+\sqrt{2} a) \cdot \sin \left(\theta+\frac{\pi}{4}\right)-\frac{2 \sqrt{2}}{\cos \left(\theta-\frac{\pi}{4}\right)}>-3-2 a \text {, }
$$

holds for all $\theta \in\left[0, \frac{\pi}{2}\right]$.
1. Let $x=\sin \theta+\cos \theta, \theta \in\left[0, \frac{\pi}{2}\right]$, then $x \in[1, \sqrt{2}]$. Since $\sin 2 \theta=x^{2}-1, \sin \left(\theta+\frac{\pi}{4}\right)=\cos \left(\theta-\frac{\pi}{4}\right)=$ $\frac{\sqrt{2}}{2} x$, the original inequality becomes $x^{2}-1-(2+a) x-\frac{4}{x}+3+2 a>0$, which simplifies to $(x-2)\left(x+\frac{2}{x}-a\right)>0$. Given $x \in[1, \sqrt{2}]$, then $x+\frac{2}{x}-ax+\frac{2}{x}, x \in[1, \sqrt{2}]$. Let $f(x)=x+\frac{2}{x}$, we know that $f(x)$ is monotonically decreasing on $[1, \sqrt{2}]$, so $f(x)_{\text {max }}=f(1)=3$, hence $a>f(x)_{\text {max }}$, which means $a>3$.