I have offensive thoughts toward other people, including God Himself, and religious things and that's what I am worried about. They can be angry thoughts or simply disrespectful thoughts. Other times I make fun of things or I think "dirty" thoughts about things, not as in me lusting for anyone, but just because the thought is offensive and disrespectful.
After I think something bad, a few minutes later I feel bad for doing it; and I realize that I don't truly mean them, or I wished that I would have never thought such things. Therefore, I always say sorry to God for thinking of bad things.
"Let nothing be done through selfish ambition or conceit, but in lowliness of mind let each esteem others better than himself. Let each of you look out not only for his own interests, but also for the interests of others" (Philippians 2:3-4).
What you are telling me is that you are having moments where personal pride is getting in the way of your reason. It shouldn't be surprising to find such struggles in young people. We spend our childhood with everything revolving around our personal desires. You've probably seen kids who throw temper-tantrums or scream mean and hateful things when things don't go their way. While you don't scream and yell on the outside anymore, you still haven't conquered the little kid on the inside. The danger is that one day, it might come blurting out. "What comes out of a man, that defiles a man. For from within, out of the heart of men, proceed evil thoughts, adulteries, fornications, murders, thefts, covetousness, wickedness, deceit, lewdness, an evil eye, blasphemy, pride, foolishness. All these evil things come from within and defile a man" (Mark 7:20-23).
The first thing is to realize where these thoughts are originating. People have a tendency to want vengeance. They think someone has done them wrong, so they lash out. "Repay no one evil for evil. Have regard for good things in the sight of all men. If it is possible, as much as depends on you, live peaceably with all men. Beloved, do not avenge yourselves, but rather give place to wrath; for it is written, "Vengeance is Mine, I will repay," says the Lord" (Romans 12:17-19). Lashing back doesn't work because we rarely are just in our thoughts. We bias things far too much in our own opinions. And while lashing back gives us something to do, it rarely fixes a problem. As a matter of fact, if you said those things out loud, you probably would have made matters worse.
The second thing is to work on your attitude toward people. It is time to conquer pride and develop meekness. Meekness is a concern about other people to the point that personal concerns are no longer an issue for consideration. It is hard to think hateful thoughts about another person when you are thinking about what they need to live life better and to reach heaven.
The final thing is to work on your anger. We get angry for a variety of reasons and few of them are ever good. For instance, I might get angry when someone doesn't behave the way I expected them to behave. But since when have I been in control of other people's behavior? But while my emotions are running high, my reason is suppressed. "So then, my beloved brethren, let every man be swift to hear, slow to speak, slow to wrath; for the wrath of man does not produce the righteousness of God" (James 1:19-20). Therefore, I need to learn to control my emotions so that the rest of my behaviors and thoughts remain righteous.