1. Yes, you have to file your Answer with the court. If you don't, you risk having a default judgment entered against you. You should specify in your Answer that possession is no longer at issue since you have vacated the premises.
2. You can only get attorney's fees if the lease contains a specific provision awarding attorney's fees to the prevailing party. If you represent yourself, you will not be awarded attorney's fees.
3. The landlord must, within 21 days of regaining possession of the premises, send you either a full refund or an accounting of your security deposit. The landlord may deduct costs to repair any damages beyond normal wear-and-tear. If the deposit is not enough to cover all the costs, the landlord may sue you for the remaining balance.
4. To obtain treble damages, you have to prove the landlord did not refund your security deposit in "bad faith."
The CA Dept. of Consumer Affairs has helpful information on its website (see link below) regarding security deposits.
Generally, the court will convert this action from a unlawful detainer to a breach of contract action. You will only be awarded attorney fees based upon the lease providing for attorney fees to the prevailing party. You will not be awarded attorney fees if you do not have an attorney representing you.
This response is not intended, nor should it be construed as legal advice. Any information provided is for educational purposes only. The exchange of communications through Avvo.com and similar social media does not establish an attorney-client relationship with me or my office. To schedule an appointment for an attorney-client privileged consultation, contact me at 909-860-0342. Thank you.