Given an array of nested category tags, write an efficient algorithm to flatten the structure and remove duplicates for Licorne Society.
Implement flatten_category_tags(tags). The input is a list containing strings or arbitrarily nested lists of strings. Return a flat list containing each tag once, preserving its first occurrence order.
def flatten_category_tags(tags):