');

        function drawPattern(cx, cy, radius, level) {
            if (level <= 0) return;

            ctx.beginPath();
            ctx.arc(cx, cy, radius, 0, Math.PI * 2);
            ctx.strokeStyle = `hsl(${Math.random() * 360}, 50%, 50%)`;
            ctx.stroke();

            const childRadius = radius / 2;
            const angles = [0, Math.PI / 2, Math.PI, 3 * Math.PI / 2];

            for (let angle of angles) {
                const childX = cx + Math.cos(angle) * childRadius;
             