For your purposes the HOA lien was a super priority lien, so the new owner can take possession of the home. It is debatable whether the HOA foreclosure wipes out the mortgages. Although i think the law is clear that the mortgage is not wiped out many people are buying HOA foreclosures and then suing the lender for quiet title (requesting clear title from the court), but this is ussually used to negotiate a better deal to buy the house at a discount from the lender.
There is no right of redemption for HOA foreclosures, so you are unable to purchase the rights to the home. i would carefully review the paperwork to ensure the Trustee and/or the HOA collection company followed the statute otherwise you may be able to unwind the foreclosure sale.
Your first mortgage can come after you, but it is highly unlikely in this situation, unless it is a credit union or another small lender. Your first mortgage has 6 months to sue for a deficiency.
I agtree with Attorney Cogburn. Typically HOA declarations have subordination language in its declaration, so any buyer at auction would take the property "subject to" the 1st lien.
The question whether the super priority HOA lien wipe out all liens is currently heavily litigated in NV and it is based on a Washington state Supreme Court opinion stating that it does. The NV Supreme Court has not issued an opinion on this issue yet. Therefore, the answer to your question is unknown at this point.