body {
	padding: 5em;
}

.flipper {
	perspective: 400px;
	position: relative;
	width: 300px;
	height: 44px;
}

.flipper + .flipper {
	margin-top: 1em;
}

.flipper-object {
	position: absolute;
	width: 100%;
	height: 100%;
	transition: transform 1s;
	transform-style: preserve-3d;
}

.panel {
	display: flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	top: 0;
	width: 100%;
	height: 100%;
	position: absolute;
	backface-visibility: hidden;
}

.flipper-vertical .back {
	transform: rotateX(180deg);
}

.flipper-horizontal .back {
	transform: rotateY(180deg);
}

.back {
	background-color: #CC3232;
}

.front {
	background-color: #739328;
}

.flipper:hover .flipper-vertical {
	transform: rotateX(180deg) translate3d(0, 0, -120px);
	animation: pulse 1s 1s infinite alternate both;
}

.flipper:hover .flipper-horizontal {
	transform: rotateY(180deg) translate3d(0, 0, 120px);
	animation: pulse 1s 1s infinite alternate both;
}

/*The animation keyframe*/

@keyframes pulse {
  100% {
		text-shadow: 0 0 5px #bbb;
		box-shadow: 0 0 3px 4px #bbb;
  }
}
