Unlawful? No, not on these facts.
You are presumed to be at-will employee and can be fired for any reason that is not discriminatory or against a state or federal law.
Young people have no protection for "young age" discrimination -- only us old farts over 40 are protected.
David A. Mallen offers answers on Avvo for general information only. This offer of free, general answers is not intended to create an attorney-client relationship. If you need specific advice regarding your legal question, you should consult an attorney confidentially. Many experienced California labor and employment attorneys, including David A. Mallen offer no-risk legal consultations to employers and employees at no charge. David A. Mallen is licensed to practice law before all state and federal courts in California, as well as the California Labor Commissioner and the California Unemployment Insurance Appeals Board. Failure to take legal action within the time periods prescribed by law could result in the loss of important legal rights and remedies.
You also indicated that you signed a document at the time of separation. it is possible you signed a release at that time. I concur that nothing indicates that you have any form of claim against them. Wishing you better luck in your next position.