html,
body {
  position: relative;

  margin: 0;
  padding: 0;
}

body {
  background-color: #eeeeee;
  font-family: "helvetica", sans-serif;
  font-size: 16px;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  background: linear-gradient(135deg, #2980b9 0%, #9b59b6 100%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=1 );
}

.sample {
  padding: 10px;
  border-bottom: 2px solid #d2e9fd;
  font-size: 26px;
  position: relative;
  color: antiquewhite;
  text-align: center;
}
.sample:before {
  content: "";
  position: absolute;
  top: -8px;
  left: 10px;
  font-size: 14px;
}

.head-border {
  position: relative;
  display: inline-block;
  padding: 0 40px;
}

.head-border:before,
.head-border:after {
  content: "";
  position: absolute;
  top: 50%;
  display: inline-block;
  width: 50px;
  height: 5px;
  background-color: floralwhite;
}

.head-border:before {
  left: 0;
}

.head-border:after {
  right: 0;
}

.container {
  position: relative;
  width: 100%;
  max-width: 800px;
  min-height: 100%;
  margin: 0px auto;
  padding: 10px;
  box-sizing: border-box;
  display: -webkit-box;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  flex-direction: row;
  flex-wrap: wrap;
  -webkit-box-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  align-items: center;
}

.element-card {
  position: relative;
  width: 300px;
  height: 300px;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transform: rotatey(0deg) translatex(0px) translatey(0px);
  transform: rotatey(0deg) translatex(0px) translatey(0px);
  -webkit-transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.4);
  margin: 10px;
  cursor: pointer;
}
.element-card:hover {
  -webkit-transform: rotatey(45deg) translatex(0px) translatey(0px);
  transform: rotatey(45deg) translatex(0px) translatey(0px);
}
.element-card.open {
  width: 300px;
  height: 300px;
  -webkit-transform: rotatey(-180deg) translatex(0px) translatey(0px);
  transform: rotatey(-180deg) translatex(0px) translatey(0px);
}
.element-card .front-facing {
  -webkit-transform: rotateY(0deg) translateZ(2px);
  transform: rotateY(0deg) translateZ(2px);
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: #ccc;
  border: 2px grey solid;
  border-radius: 5px;
}

.element-card .front-facing .abr {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 0;
  font-size: 30px;
  margin: -30px 0 0 0;
  text-align: center;
  color: red;
}

.element-card .front-facing .abr1 {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 0;
  font-size: 30px;
  margin: -30px 0 0 0;
  text-align: center;
  color: blue;
}

.element-card .front-facing .abr2 {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 0;
  font-size: 30px;
  margin: -30px 0 0 0;
  text-align: center;
  color: yellow;
}
.element-card .front-facing .abr3 {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 0;
  font-size: 30px;
  margin: -30px 0 0 0;
  text-align: center;
  color: orange;
}

.element-card .front-facing .title {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 0;
  text-transform: uppercase;
  font-size: 12px;
  margin: 15px 0 0 0;
  text-align: center;
  color: #3498db;
}
.element-card .front-facing .atomic-number {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  color: #2980b9;
}
.element-card .front-facing .atomic-mass {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 12px;
  color: #2980b9;
}
.element-card .back-facing {
  -webkit-transform: rotateY(180deg) translateZ(0px);
  transform: rotateY(180deg) translateZ(0px);
  display: -webkit-box;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  flex-direction: column;
  flex-wrap: nowrap;
  -webkit-box-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: #ecf0f1;
  border: 2px white solid;
  border-radius: 5px;
  padding: 20px;
  text-align: center;
  overflow: hidden;
}
.element-card .back-facing p {
  font-size: 14px;
  margin: 0;
}
.element-card .back-facing a.btn {
  display: inline-block;
  background-color: white;
  padding: 5px 15px;
  margin: 20px 0 0 0;
  color: #eee;
  background-color: #3498db;
  text-decoration: none;
  border-radius: 3px;
}
.element-card .back-facing a.btn:hover,
.element-card .back-facing a.btn:focus {
  color: #fff;
  background-color: #2980b9;
}
