Is vivid an adverb or an adjective?

It was a Vivid dream.
Vivid modifies dream, and adverbs cannot modify nouns, so it is and adjective.

He mocked vividly with remarks.
Here, vividly modifies the verb, mocked, so it is an adverb since adverbs modify verbs, adjecives, or other adverbs, and adjectives modify only nouns/pronouns.