You have a right against illegal search and seizure. Being parked in an undeveloped area isn't illegal, but the cop probably knew what you were doing even if he had to intimidate you to get you to admit to it.
If you're not being detained for any reason, you have the right to go free. In a police encounter, your best defense is silence. Why did you tell him you were smoking a cig! That's what would have gotten you arrested, since you are under 18 and admitted to breaking the law. You incriminated yourself with the damn cigarette!
The best thing is to shut up and deny politely.
"Why did you pull me over officer?"
"Am I being detained or can I go now?"
"I won't consent to a search officer"
"NO NO NO NO NO"
That's all you should have said to him. Even if he can smell it on you it's not tangible proof. HE HAS TO SEE IT. Most cops won't go through the trouble of getting a warrant and bringing in the drug dogs.