body{
  padding: 0;
  margin: 0;

}

nav{
  z-index: 100;
  position: fixed;
  top: 0;
  left: 5%;
  right: 5%;
  height: 10%;
  background-color: black;
  text-align: center;


}

li{
  margin-top: 0.5%;
  display: inline-block;
  margin-left: 10px;
  margin-right: 10px;
}
a{

}
.amenu {
  font-size: 25px;
  font-family: arial black;
  color: white;
  text-decoration: none;
}

main{
  z-index: 1;
  position: absolute;
  top: 10%;
  left: 10%;
  right: 10%;
  background-color: green;
  border: 5px solid #900000;
  border-top: 0;
  border-bottom: 0;
  height: 700px;
  box-shadow: 0px 0px 20px #800000;
}

.cube1{
  margin-left: -5px;
  left: 5%;
  z-index: 99;
  position: fixed;
  border-left: solid 5px #900000;
  border-bottom: solid 5px #900000;
  height: 10%;
  top: 0;
  width: 5%;
  box-shadow: -5px 5px 10px #800000;
}
.cube2{
  margin-right: -5px;
  top: 0;
  z-index: 99;
  position: fixed;
  border-right: solid 5px #900000;
  right: 5%;
  height: 10%;
  border-bottom: solid 5px #900000;
  width: 5%;
  box-shadow: 5px 5px 10px #800000;
}

a:hover{
  animation-name: flakern;
  animation-duration: 5s;
  animation-delay: 0;
  animation-iteration-count: infinite;
}

span:hover{
  transform: translate3d(1, 1, 1, 260deg);
  z-index: 100;
  transform-style: preserve-3d;
  animation-name: d3d;
  animation-delay: 1s;
  animation-duration: 5s;
  animation-iteration-count: infinite;
  /*
  transform: translate(30px, 30px);
  transform: translateZ(-100px);*/
  transition: transform 1s;


}

.box{
  display: flex;
  position: absolute;
  height: 100px;
  width: 100%;

  }

.bigone{
  transform: rotate3d(1, 1, 1, 90deg);
  display: inline;
  height: 20px;
  float: left;
}

span{
  transform: rotate3d(1, 1, 1, 180deg);
  z-index: 0;
  height: 100px;
  width: 100px;
  display: flex;
  margin: 1px;
}

span:hover:nth-child(1){


}

span:hover:nth-child(2){

}

span:hover:nth-child(3){
  background-color: #403;
}
span:hover:nth-child(4){
  background-color: #504;
}
span:hover:nth-child(5){
  background-color: #605;
}

span:nth-child(1){
  background-color: #201;
  transform: rotate3d(1, 1, 1, 340deg);

}

span:nth-child(2){
  background-color: #302;
}

span:nth-child(3){
  background-color: #403;
}
span:nth-child(4){
  background-color: #504;
}
span:nth-child(5){
  background-color: #605;
}

@keyframes d3d {
  0%{
    transform: rotate3d(1, 1, 1, 260deg);
  }
  100%{
    transform: rotate3d(1, 1, 1, 360deg);
  }
}

@keyframes flakern {
  100%{
  opacity: 1;
  }
  80%{
  opacity: 0.5;
  }
  20%{
  opacity: 0.2;
  }
  100%{
  opacity: 1;
  }
}
