340+ hours of game play, and I didn't even know that this was possible.

I have 570+hrs and every new Civ match I learn something new, something I didn't realized was a thing before or never gave it the attention it deserved.

As for city flipping:

"when your empire's Unhappiness reaches -20, given your Public Opinion is low, some of your cities may start to revolt and change their allegiance to other empires following their Preferred Ideology. The effect is as if the other empire suddenly acquired the city in question. Border cities are most likely to defect, and the civilization they go to is the closest one with the Preferred Ideology." http://civilization.wikia.com/wiki/Happiness_(Civ5)

"When the Public Opinion of an empire drops to the lower level of discontent (Civil Resistance or Revolutionary Wave), and their other sources of Happiness aren't enough to counter the negative effects, allowing the empire to reach low general levels of Unhappiness (as low as -20), some cities within that empire will begin to revolt. This means that they will leave the empire on their own, and join another. The city to revolt will be whichever city is closest to the Capital of a civilization following the Preferred Ideology, and it will defect to said civilization.

Also, Rebel units appear even before this moment (with Unhappiness in the range of -10 to -19). They will attack your empire randomly, like the Barbarians. These units are at the same tech level your civilization currently is, which means that they're pretty dangerous. Don't be confused by their black and red colors - they're not Barbarians, and won't behave the same way!

Finally, in order to satisfy the masses, the civilization undergoing revolution may be forced to switch to the Preferred Ideology. This brings the Public Opinion back up to Content, and gets rid of Unhappiness originating from Public Opinion, but also means losing two of the unlocked tenets from the previously followed Ideology.

In this way, Ideologies and Tourism, combined with the World Congress's ability to further reduce Happiness and sap the opponents' abilities to fight back, can be used as an effective weapon to cripple opponents' empires and steal cities from them without having to deal with the monetary, production and diplomatic costs associated with going to war." http://civilization.wikia.com/wiki/Ideology_(Civ5)

/r/civ Thread Link - i.imgur.com