*, *:before, *:after {
     -webkit-user-select: none;
     -moz-user-select: none;
     -ms-user-select: none;
     user-select: none;
}

body {
  display: flex;
  justify-content: space-around;
  flex-direction: column;
  align-items: center;
  font-family: VT323;
  background-color: black;
  background-position: center;
  height: 100%;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none; /* Disable selection/copy in UIWebView */
}

footer {
  position: absolute;
  bottom: 0px;
  min-height: 30px;
  width: 900px;
  color: white;
  font-size: 150%;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid white;
  border-left: 1px solid white;
  border-right: 1px solid white;
  z-index: 5;
  background-color: black;
  padding: 5px;
}

header {
  position: absolute;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  top: 3px;
  min-height: 30px;
  max-height: 69px;
  width: 606px;
  color: white;
  font-size: 180%;
  border-bottom: 1px solid white;
  border-left: 1px solid white;
  border-right: 1px solid white;
  z-index: 8;
  background-color: black;
  padding: 5px;
  transform: scale(1);
}

header a:nth-child(3) img {
  height: 35px;
  width: 28px;
}

.icon {
  margin-left: 80px;
  margin-right: 80px;
}

.blue-img {
  position: absolute;
  z-index: 3;
  opacity: 0;
}

.blue-img:hover {
  opacity: 1;
  transition: opacity .03s ease-in-out;
  -moz-transition: opacity .03s ease-in-out;
  -webkit-transition: opacity .03s ease-in-out;
}

.white-img {
  opacity: 1;
  height: 35px;
  width: 35px;
  pointer-events: none;
}

img {
  height: 35px;
  width: 35px;
}

.white-img:hover {
  transition: opacity .25s ease-in-out;
  -moz-transition: opacity .25s ease-in-out;
  -webkit-transition: opacity .25s ease-in-out;
  opacity: 0;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 700px;
}

a {
  color: blue;
  max-width: 55px;
}

a:hover {
  text-decoration: underline;
}

#game {
  min-height: 500px;
  min-width: 500px;
  background-position: center;
  position: relative;
  transform: scale(1.23);
  z-index: 6;
  margin-top: 47px;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

video {
  height: 612px;
  width: 616px;
  position: absolute;
  top: 66px;
  z-index: 6;
  pointer-events: none;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

#tools {
  transform: scale(1);
  position: absolute;
  top: 60px;
  z-index: 7;
  font-family: Orbitron;
  text-shadow: 2px 2px 1px rgba(150, 150, 150, 1);
  font-size: 150%;
  border: 1px solid white;
  margin-top: 5px;
  pointer-events: none;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

.back-arrow {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 2;
  opacity: 1;
  pointer-events: none;
}

.back-arrow:hover {
  transition: opacity .25s ease-in-out;
  -moz-transition: opacity .25s ease-in-out;
  -webkit-transition: opacity .25s ease-in-out;
  opacity: 0;
}

.blue-back-arrow {
  position: absolute;
  top: 15px;
  left: 15px;
  opacity: 0;
}

.blue-back-arrow:hover {
  transition: opacity .25s ease-in-out;
  -moz-transition: opacity .25s ease-in-out;
  -webkit-transition: opacity .25s ease-in-out;
  opacity: 1;
  z-index: 3;
}

.scores {
  position: absolute;
  top: 100px;
  left: 20px;
  max-height: 260px;
  height: 260px;
  z-index: 3;
  color: white;
  background-color: black;
  text-align: center;
  font-size: 22px;
}

.scores-header {
  padding: 5px;
  font-size: 125%;
  margin: 0px;
  margin-bottom: -23px;
}

.scores-stage {
  padding: 5px;
  font-size: 115%;
  margin: 0px;
  margin-bottom: -18px;
}

.name-input {
  text-align: center;
}

.name-feedback {
  margin: 0 auto;
  height: 20px;
  width: 100px;
  margin-top: 5px;
  padding: 5px;
  color: white;
  text-align: center;
}

#user-name {
  background-color: white;
  border-radius: 5px;
  color: black;
  text-align: center;
}

@media only screen and (max-width: 980px) {

  .scores {
    display: block !important;
    position: absolute;
    bottom: 460px;
    top: auto;
    left: 350px;
    font-size: 165%;
  }

  .scores-header {
    font-size: 90%;
  }

  .scores-stage {
    font-size: 80%;
  }
}

@media only screen and (max-width: 500px) {

  .scores {
    display: none !important;
  }
}

@media only screen and (max-height: 665px) {
  header {
    display: none;
  }

  #game {
    margin-top: -76px !important;
  }

  #tools {
    margin-top: -57px !important;
  }

  video  {
    margin-top: -57px !important;
  }
}

@media only screen and (max-height: 715px) {
  footer {
    position: absolute;
    right: 5px;
    bottom: 460px;
    max-width: 127px;
    max-height: 200px;
    border-bottom: 1px solid white;
  }
}

@media only screen and (max-width: 887px) {
  footer {
    display: none;
  }
}

@media only screen and (max-height: 610px) {
  #game {
    transform: scale(.99);
      margin-top: -200px !important;
  }
  #tools {
    transform: scale(.8);
      margin-top: -120px !important;
  }
  video  {
    transform: scale(.8);
      margin-top: -120px !important;
  }
}

@media only screen and (max-width: 610px) {
  header {
    display: none;
  }
  #game {
    transform: scale(.99);
      margin-top: -200px !important;
  }
  #tools {
    transform: scale(.8);
      margin-top: -120px !important;
  }
  video  {
    transform: scale(.8);
      margin-top: -120px !important;
  }
}

@media only screen and (max-width: 468px) {
  body {
    transform: scale(.8);
  }
  #game {
    margin-top: 0px !important;
  }
  #tools {
    margin-top: -170px !important;
  }
  video {
    margin-top: -170px !important;
  }
  main {
    max-height: 400px;
  }
}

@media only screen and (min-width: 1150px) {
  @media only screen and (min-height: 870px) {
    #game {
      transform: scale(1.5);
      margin-top: 202px !important;
    }
    #tools {
      transform: scale(1.215);
      margin-top: 80px !important;
    }
    video  {
      transform: scale(1.215);
      margin-top: 80px !important;
    }
  }
}

/* iphone 6, 6s */
@media only screen and (min-device-width: 345px) and (max-device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation : portrait) {

  .scores {
    display: block;
    position: absolute;
    bottom: 460px;
    left: 350px;
    font-size: 195%;
  }

  .scores-header {
    font-size: 100%;
  }

  .scores-stage {
    font-size: 90%;
  }

  #game {
    margin-top: 310px !important;
    transform: scale(1.73) !important;
  }

  #tools {
    margin-top: 135px !important;
    transform: scale(1.4) !important;
  }
  video  {
    margin-top: 135px !important;
    transform: scale(1.4) !important;
  }

}
/* iphone 6, 6s landscape*/
@media only screen and (max-device-height: 375px) and (min-device-width: 640px) and (-webkit-device-pixel-ratio: 2) and (orientation : landscape) {

  .scores {
    display: block;
    position: absolute;
    bottom: 460px;
    left: 20px;
    font-size: 110%;
  }

  #game {
    margin-top: -160px !important;
    transform: scale(.99) !important;
  }

  #tools {
    margin-top: -100px !important;
    transform: scale(.8) !important;
  }
  video  {
    margin-top: -100px !important;
    transform: scale(.8) !important;
  }

}

/* iphone 6+, 6s+, 7+, 8+ */
@media only screen and (min-device-width: 414px) and (max-device-height: 736px) and (-webkit-device-pixel-ratio: 3) {
  body {
    transform: scale(.7);
  }
  #game {
    margin-top: -38px !important;
    transform: scale(1.3, 1) !important;
  }
  #tools {
    margin-top: -190px !important;
  }
  video  {
    margin-top: -190px !important;
  }

  main {
    max-height: 400px;
  }
}
