Refactor caption CSS