From my understanding of the Castle Doctrine, you can shoot someone that has broken into your home and is currently inside of it, or if they are currently attempting to break into your home.
I.E. If someone is pounding and kicking your door but it has not broken yet, you are free to shoot, just as you are free to shoot if you see someone trying to jimmy your window's lock so that they can enter that way without breaking your window.
In what happened to you, I am unsure of what you could have or could not have done TBH. All the literature on the Castle Doctrine seems to assume that you are inside your home when the breaking in or the attempt to break in is occurring. However, you lost ALL rights to shoot the moment they showed you their hands. You can't shoot someone if you don't feel that your life is in danger, which a couple of kids with their hands up does not constitute. From my understanding of what happened to you, I don't think you could have shot even when you first left your house and when you saw the shadow running away since it would appear that they were trying to flee.
Personally, I would not have left my home. That is NEVER a smart thing to do. I would have done the following the moment I heard someone on my deck:
1. Get gun
2. Ready said gun (safety off, cocked, loaded, aimed)
3. Call 911 with my cell (if I had service, which I don't in most parts of my home)
4. Shot the moment the person outside tried to enter my home
If they were true intruders, one of them could have ambushed you the moment you came outside, either by hiding and getting you from behind, or shooting at the very nice target that you made as you exited your home. Stay inside you home, preferably at a place where you can watch at least one or more entrances and are somewhat shielded from view of anyone unlucky enough to enter through said entrance(s). This way you will have cover while you are able to shoot any intruders. Plus, you know the layout of your home better than they will which gives you the element of surprise... leaving your home to go outside, even if you know every inch of it by heart, gives the intruders the element of surprise.