When you think about your retirement, chances are good you envision all of the fun and wonderful things you'll get to enjoy once you no longer have to go to work every day. And, in a perfect world, your later years would be filled with nothing but things you love -- perhaps travel, grandkids, or indulging in your hobbies.

Unfortunately, while you can dream of this ideal outcome, you need a plan in case things go wrong. Otherwise, you could face financial disaster.

Specifically, three scenarios could lead to major money troubles if you don't have a plan to deal with them. Here's what they are.

Adult patient being examined by a doctor.

Image source: Getty Images.

1. A serious illness

Despite what many people believe, Medicare does not cover all healthcare costs for seniors. In fact, the Employee Benefit Research Institute found a senior couple with high prescription drug needs would require $413,000 in savings to have a 90% chance of covering all their care costs in retirement.

If you develop a major illness -- especially a chronic one that requires a lot of medications to manage -- you could need to pay tens of thousands of dollars a year out of pocket beyond what Medicare covers. Since no one can predict if this will happen to them, everyone must plan for it.

If you have a qualifying high-deductible health plan and are eligible for a health savings account, investing in it can be a great way to ensure you're able to cover medical costs. You can deduct contributions to an HSA in the year you make them, invest the money and enjoy tax-free growth, and withdraw money for qualifying medical expenses without paying taxes.

If you don't have an HSA, though, it's still important to have dedicated savings earmarked for medical spending in retirement. Hopefully you won't need it -- but if you do, you'll be glad you have it.

2. A need for long-term care

Anyone who reaches 65 has a 70% chance of requiring some kind of long-term care services and support before the end of their life. And a third of people who are 65 today will need care for more than five years.

The costs of this care can be astronomical. Genworth's Cost of Care survey shows the median costs of a private room in a nursing home are $9,733 a month. Even a semi-private room costs $8,669. And Medicare will not pay for $1 of nursing home care for those who just need help with routine tasks of living, which is why most people go into a nursing home.

Without a plan to cover long-term care costs, the only real option would be to spend everything you have and eventually qualify for Medicaid. That's a bad plan. Instead of losing all you've worked for, look into long-term care insurance or work with an estate planning attorney to find a way to protect your assets in case long-term care becomes necessary.

3. The death of a spouse

Finally, it's important to plan for what will happen when your spouse dies.

Eventually, one partner will probably pass away first. And when that occurs, the other will lose that spouse's Social Security check. This could cut household income by as much as half, depending on whether the couple had similar benefit checks coming in.

Planning for the death of a spouse is crucial to avoiding financial disaster when it happens. There are several ways to do that, including making sure there's enough savings to supplement Social Security when it goes down to one payment, and making smart Social Security claiming choices (which could mean the higher earner delays starting their retirement benefits to increase survivor benefits in the future).

It's crucial to plan for all three of these possibilities, as they are very real outcomes you could face as a retiree. If you're ready for them, at least they won't come as a financial shock.