The difference between the two questions lies in their tense and context:
1. Did you lose your mind?
* Past tense: Refers to a specific point in the past when the person may have acted irrationally.
* Example: "Did you lose your mind when you decided to quit your job without a backup plan?"
2. Have you lost your mind?
* Present perfect tense: Implies an ongoing situation or recent behavior that seems irrational.
* Example: "Have you lost your mind, spending so much money on a single meal?"
In short:
* Use Did for a completed past action.
* Use Have for something with relevance to the present.