Legalized sports gambling. Legalized recreational marijuana. Who knows what else will be made lawful in the future as desperate states grab for more revenue.

I have an idea.

It came to me as I was driving 82 miles per hour down the New Jersey Turnpike the other day and noticed that I wasn’t passing many other vehicles. Nearly everyone was exceeding the 65 mph speed limit by a lot. In fact, many other drivers were passing me.

That’s when it hit me — legalized speeding.

I know what you are going to say: People shouldn’t be driving that fast because it’s unsafe. And drivers should be obeying the law or given tickets.

OK, you may be right.

But the fact of the matter is that most drivers aren’t obeying the speed limits these days on highways. So let’s make them — including me — pay for the privilege.

Find me a driver who is doing 65 mph on a major roadway, and I’ll show you a car that is causing other drivers to change lanes to go around it.

Show me a driver who is doing less than 65 — or the dreaded 55 mph where that’s the limit — in either the left or middle lane, and I’ll show you the person most likely to cause an accident.

I know I’m going to catch heat on this one, but legalized speeding would go something like this: If you want to drive between 80 mph and 85 mph and not be liable for a speeding ticket, you’d have to pay the state where you live $500 a year. (I’m just making up numbers here. We can negotiate the details later when my proposal is written into a law.)

Want to go between 75 mph and 79 mph? That’ll cost you $250 a year.

If you want to be invulnerable to a ticket for anywhere between 65 mph and 75 mph, that’ll cost you just $150 a year. Notice I said “just” — that’s the way we are going to market this plan.

You’ll have to pay only $100 a year if you want to be left alone by the police for going over 55 mph but less than 65 mph where 55 mph is the speed limit.

Reckless driving will still get you a big ticket even if you have paid for higher speed limits. And driving while intoxicated will still get you a fine and hopefully jail time.

There’s no mercy on either of those under my plan.

And I don’t see my idea working on city streets or local roads — so don’t complain about that. I concede defeat in that area.

OK, I can see some of you are starting to like this idea.

After all, those are all reasonable prices considering what a speeding ticket will cost you in higher insurance premiums and fines.

So, are the cops supposed to stop cars to find out what speed limit drivers have paid to exceed? No, that would be crazy.

Your uppermost limit would be programmed into E-ZPass.

For argument’s sake, you’d be allowed to go over your pre-arranged 85 mph speed limit for only brief bursts when you are passing another vehicle.

If your car continues at that speed for more than, say, 30 seconds then you get a fine of some nominal amount automatically assessed to E-ZPass. The fine gradually increases if you remain over the 85 mph limit for more than one minute, two minutes.

Stay at that speed for, say, 10 minutes and you get a fine on top of what you paid for the right to go 85 mph. All those “nominal” fines will eventually add up to a considerable amount of money.

This, of course, won’t rid the roads of drunk or distracted drivers. But that can be handled another way.

If your car veers out of its lane for more than three seconds you are automatically fined, say, two bucks. Most drunk or cellphone fiends can’t maintain a lane, so that will take care of them. We won’t legalize any of that.

And maybe there will also be a fine for slow drivers.

If you can’t keep up with traffic you are probably fiddling on your phone, not a very good driver or trying to tune into the Giants game when you’re in Pennsylvania.

Fined, fined, fined.

States will make lots of money and politicians will be happy.

And cops wouldn’t have to make as many random traffic stops, which are dangerous for both the officers and the motorists.

We already have red light cameras that essentially fine the car, not the driver.

My idea would also fine the car for speeding over the legally paid-for limit without the driver’s license getting dinged.

Insurance companies might not like my idea. And that’s one more thing in its favor: Who doesn’t like beating insurance companies?

Don’t have an E-ZPass? Then, I’m afraid, you can’t take part and you will still be vulnerable to tickets the old-fashioned way.

Some parts of Florida already have a special lane for drivers who want to zip along without traffic jams. The driver gets charged for that privilege on that state version of E-ZPass.

My idea goes a lot further than that, but it’s in the same vein. So the precedent is already set.

Let me just say this in my defense: People thought I was crazy when I suggested years ago that pot should be legalized in Atlantic City to draw customers. Now New Jersey is thinking of making it legal all over the state.

So maybe legalized speeding isn’t that crazy either.