4. The solution set of the inequality $\cos ^{4} x-2 \sin x \cos x-\sin ^{4} x-1>0$ is
4. $\left(-\frac{\pi}{4}+k \pi, k \pi\right)(k \in \mathbf{Z})$.

Since
$$
\begin{aligned}
\cos ^{4} x-2 \sin x \cos x-\sin ^{4} x-1 & =\left(\cos ^{2} x+\sin ^{2} x\right)\left(\cos ^{2} x-\sin ^{2} x\right)-2 \sin x \cos x \\
& =\cos 2 x-\sin 2 x=\sqrt{2} \cos \left(2 x+\frac{\pi}{4}\right),
\end{aligned}
$$

the original inequality becomes
$$
\cos \left(2 x+\frac{\pi}{4}\right)>\frac{1}{\sqrt{2}}
$$

Within $[0,2 \pi]$, the solution to $\cos \alpha>\frac{1}{\sqrt{2}}$ is $-\frac{\pi}{4}<\alpha<\frac{\pi}{4}$. Therefore, the solution to equation (1) is
$$
2 k \pi-\frac{\pi}{4}<2 x+\frac{\pi}{4}<2 k \pi+\frac{\pi}{4} \quad(k \in \mathbf{Z}),
$$

which means the solution to the original inequality is
$$
-\frac{\pi}{4}+k \pi<x<k \pi \quad(k \in \mathbf{Z}) .
$$