You floss regularly, yield to oncoming traffic and use your credit cards judiciously, dutifully paying off your balance every month.

You may believe that your exemplary behavior shields you from unexpected credit card fees. Sadly, that is no longer the case.

Starting next year, Bank of America will charge a small number of customers an annual fee, ranging from $29 to $99. The bank has characterized the fee as experimental. But card holders who have never carried a balance or paid late fees could be among those affected.

NEW RULE PROPOSED: Fed wants banks to get customer OK to pay debit card, ATM overdrafts

Citigroup, meanwhile, has started charging annual fees to card holders who don't put more than a specific amount on their cards, typically $2,400 a year. Other banks are charging inactivity fees if customers don't use their credit cards during a specific period of time. You heard that right: You could be spanked for staying out of debt.

These fees are the credit card industry's response to credit card legislation that will, among other things, restrict credit card issuers' ability to raise interest rates on existing balances. Credit card issuers are looking for ways to raise income before the new rules take effect in February. During the first quarter, 27% of credit card offers included annual fees, up from 18% a year earlier, according to Synovate Mail Monitor, a credit card direct-mail tracking service.

Curtis Arnold, founder of CardRatings.com, says he expected credit card issuers to raise annual fees after the legislation was enacted. What he didn't expect, he says, "was that good customers were going to be hit."

Fortunately, if you've paid off your balance on time every month, you probably have a good credit score. And when you have good credit, you have more choices.

What to do if your card issuer starts charging an annual fee — or increases the fee you're already paying:

•Call and complain. Check your credit score first to make sure you're on solid ground, says Adam Levin, founder of Credit.com, a consumer website. If you have a good score and you've been a good customer, the lender may be willing to waive the fee to keep your business.

•Weigh the benefits of rewards against the annual fee. The days when you could get a rewards card with no annual fee are numbered, Arnold says. If your rewards card charges a fee, you'll need to figure out whether the value of the rewards exceeds the fee.

That's not always easy to do, particularly with cards that give you airline miles, says Chris Fichera, associate editor for Consumer Reports. Rewards miles often come with restrictions and expiration dates, making it difficult to figure out how much they're worth, he says.

"A lot of airline cards are not the best deal unless you can combine them with a frequent-flier plan," Fichera adds.

If you're not a frequent flier, Fichera says, you're probably better off using a card that gives you cash back. As long as you can estimate how much you spend, it's easy to figure out whether you'll get enough cash back to justify the annual fee.

•Leave. If your card issuer won't waive the fee, you'll have a choice: Pay the annoying fee or close your account. Unfortunately, this decision isn't as clear-cut as it sounds, because closing an account could hurt your credit score.

One of the factors used to calculate your credit score is what's known as the "credit utilization ratio," which is based on the amount of credit you have outstanding as a percentage of your total available credit. When you close a credit card account, the amount of your total available credit shrinks, which could lead to a higher utilization rate. This ratio accounts for 30% of your credit score.

In addition, closing an account you've owned a long time could affect your credit history, another factor used to calculate your score, Fichera says.

Still, if you aren't carrying balances on your other accounts and the card is relatively new, closing your account is worth considering. Even now, there are good deals out there, particularly for card holders with good credit, Arnold says. For example, the Fidelity Rewards American Express card pays 2% of cash back to a Fidelity account, with no limits on cash rewards and no annual fee.

If you don't care about rewards and just want a credit card that doesn't charge an annual fee, consider applying for a card through a credit union. Many credit union cards charge no annual fee and offer below-average interest rates.

Associations, such as the USAA, which provides products and services for military personnel and their families, also offer good deals on credit cards, according to Consumer Reports.

Sandra Block covers personal finance for USA TODAY. Her Your Money column appears Tuesdays. Click here for an index of Your Money columns. E-mail her at: sblock@usatoday.com. Follow on Twitter: www.twitter.com/sandyblock