/*Eliminates padding, centers the thumbnail */
body, html {
  padding: 0;
  margin: 0;
  text-align: center;
}

.codeBox-target h1, .codeBox-target h2, .codeBox-target h3, .codeBox-target h4 {
  font: 14px monospace;
  display: inline;
}
.codeBox-target h1 {
  color: #f92672;
}
.codeBox-target h2 {
  color: #a081db;
}
.codeBox-target h3 {
  color: #e6db66;
}
.codeBox-target h4 {
  color: white;
}
.codeBox-target .elementInstruct {
  padding: 30px 0;
}
.codeBox-target .codeContain {
  background: #333;
  padding: 10px;
}

.topButton {
  display: block;
  width: 200px;
  margin: 0 auto;
}
.topButton a {
  width: 200px;
  height: 40px;
  font-size: 18px;
}

/* Styles the codeBox, removes it from sight and adds the fade-in transition */
.codeBox-target {
  box-sizing: border-box;
  position: absolute;
  z-index: 9999;
  top: -100%;
  background: #1c1c1c;
  width: 500px;
  height: 350px;
  padding: 50px;
  margin-left: 230px;
  opacity: 0;
  -webkit-transition: opacity .5s ease-in-out;
  -moz-transition: opacity .5s ease-in-out;
  -o-transition: opacity .5s ease-in-out;
  transition: opacity .5s ease-in-out;
  overflow: hidden;
}

/* Styles the close link, adds the slide down transition */
a.codeBox-close {
  display: block;
  width: 50px;
  height: 50px;
  box-sizing: border-box;
  background: white;
  color: black;
  text-decoration: none;
  position: absolute;
  top: -80px;
  right: 0;
  -webkit-transition: .5s ease-in-out;
  -moz-transition: .5s ease-in-out;
  -o-transition: .5s ease-in-out;
  transition: .5s ease-in-out;
}

/* Provides part of the "X" to eliminate an image from the close link */
a.codeBox-close:before {
  content: "";
  display: block;
  height: 30px;
  width: 1px;
  background: black;
  position: absolute;
  left: 26px;
  top: 10px;
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}

/* Provides part of the "X" to eliminate an image from the close link */
a.codeBox-close:after {
  content: "";
  display: block;
  height: 30px;
  width: 1px;
  background: black;
  position: absolute;
  left: 26px;
  top: 10px;
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

/* Uses the :target pseudo-class to perform the animations upon clicking the .codeBox-target anchor */
.codeBox-target:target {
  opacity: 1;
  top: 0;
  bottom: 0;
}

.codeBox-target:target a.codeBox-close {
  top: 0px;
}
