html{
  background-color: #000000;
  min-width: 320px;
  min-height: 400px;
  user-select: none;
}

body{
  background-color: #000000;
  min-width: 320px;
  min-height: 400px;
}

@font-face{ 
  font-family: MavenPro;
  font-weight: normal;
  src: url('./fonts/MavenPro-Medium.ttf');  
}

@font-face{ 
  font-family: MavenPro;
  font-weight: bold;
  src: url('./fonts/MavenPro-Bold.ttf');  
}

@font-face{
  font-family: TerminalDosis;
  font-weight: normal;
  src: url('./fonts/TerminalDosis-Regular.ttf');
}

@font-face{
  font-family: TerminalDosis;
  font-weight: lighter;
  src: url('./fonts/TerminalDosis-ExtraLight.ttf');
}

@font-face{
  font-family: TerminalDosis;
  font-weight: bold;
  src: url('./fonts/TerminalDosis-Bold.ttf');
}

noscript{
  color: #FFFFFF;
  font-weight: bold;
  font-family: fixedsys, monospace, sans-serif;
  font-size: 400%;
  text-align: center;
}

button{
  font-family: TerminalDosis, Helvetica, sans-serif;
  font-weight: bold;
  letter-spacing: .2vw;
  padding-left: 2%;
  padding-right: 2%;
}

button.keyboard{
  color: #000000;
  font-weight: bold;
  text-align: center;
  border-width: 4px;
  border-style: solid;
  border-top-color: #EEEEEE;
  border-right-color: #CCCCCC;
  border-bottom-color: #666666;
  border-left-color: #888888;
  font-size: 1.2vw;
}

#stage, #menu, #scroller{
  width: 100%;
  height: 56.25vw;
  min-height: 56.25vw;
  position: fixed;
  perspective: 800px;
  perspective-origin: 50% 60%;
  text-align: center;
  min-width: 320px;
  background-image: none;
  background-size: cover;
  background-position: center center;
  margin: 0px;
  left: 0px;
  top: 0px;
  overflow: hidden;
  border-width: 0px;
  border-bottom-width: 2px;
  border-style: solid;
  border-color: #FFFFFF;
}

#debug_view{
  position: fixed;
  width: 100%;
  left: 0px;
  top: 0px;
  background-color: rgba(0,0,0,0.5);
  color: #FFFFFF;
  font-family: fixedsys, monospace;
  font-variant: small-caps;
  margin: auto;
  text-align: center;
  opacity: 0.8;
  display: none;
}

#menu{
  color: #FFFFFF;
  background-color: #003366;
  background-color: #003366DD;
  font-family: MavenPro, Helvetica, sans-serif;
  font-weight: bold;
  overflow-x: hidden;
  overflow-y: auto;
}

.menu_show{
  opacity: 1;
  visibility: visible;
  transition: opacity 1s, visibility 0s;
}

.menu_hide{
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s, visibility 1s;
}

.menu_section{
  border-width: 1px;
  border-color: #FFFFFFEE;
  background-color: #00000022;
  box-shadow: 0px 0px 32px #FFFFFF88;
  border-style: solid;
  border-radius: 1vw;
  padding: 2vw;
  text-align: left;
  width: 40%;
  margin: auto;
}

.menu_section input, .menu_section select{
  display: inline-block;
}

.menu_section label{
  color: #FFFFFF;
  margin-right: 10px;
  font-size: 1.4vw;
}

.menu_section table{
  width: 100%;
}

#keyboard_shortcuts{
  white-space: nowrap;
}

#keyboard_shortcuts table{
  width: 20%;
  float: left;  
}

.menu_section td{
  vertical-align: middle;
  text-align: right;
  color: #FFFFFF;
  font-size: 1.2vw;
}

#keyboard_shortcuts td{
  white-space: nowrap;
  font-size: 1vw;
  text-align: left;
}

.menu_section input[type=range]{
  border-width: 1px;
  border-color: #FFFFFFEE;
  background-color: #00000022;
  box-shadow: 0px 0px 32px #FFFFFF88;
  border-style: solid;
  border-radius: 1vw;
  padding-left: 8px;
  padding-right: 8px;
  cursor: pointer;
  margin-top: 4px;
  margin-bottom: 12px;
  position: relative;
  top: 6px;
  display: inline-block;
  width: 100%;
}

.menu_label{
  width: 40%;
  margin: auto;
  font-size: 1.6vw;
  font-style: italic;
  text-align: right;
  text-shadow: 0px 0px 48px #FFFFFF88, 0px 0px 16px #003366;
  position: relative;
  top: 1vw;
}

#menu_buttons{
  margin-bottom: 24px;
}

#chapter_navigation_menu{
  width: 100%;
}

#dialogue, #dialogue_title{
  font-family: MavenPro, Helvetica, sans-serif;
  font-weight: bold;
  box-sizing: border-box;
  background-color: #003366;
  background-color: #003366DD;
  background-image: url('img/textrule.png');
  background-repeat: repeat;
  width: 60%;
  height: 30%;
  margin: auto;
  border-radius: 1.2vw;
  border-style: solid;
  border-width: 2px;
  border-color: #FFFFFF;
  box-shadow: inset 6px 6px 4px #FFFFFF88, inset 0px 0px 40px #000000EE, 0px 0px 24px #003366, 10px 10px 10px #000000;
  color: #FFFFFF;
  text-shadow: 2px 2px 1px #000000, 4px 4px 8px #000000;
  font-weight: bold;
  font-size: 1.4vw;
  letter-spacing: 1pt;
  position: relative;
  top: 58%;
  z-index: 100;
  cursor: pointer;
}

#dialogue_title{
  min-width: 40%;
  position: relative;
  top: -3vh;
  left: 2%;
  margin: 0px;
  text-align: center;
  padding: 1vh;
  overflow: hidden;
  background-color: #002255EE;
  height: auto;
}

#dialogue_text{
  position: relative;
  top: -5%;
  margin: auto;
  width: 90%;
  text-align: left;
  font-size: 1.2em;
  overflow: hidden;
}

.dialogue_off{
  transform: rotateX(90deg);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
}

.dialogue_on{
  transform: rotateX(0deg);
  opacity: 100;
  transition: transform 0.5s, opacity 0.5s;
}

/* FireFox does not play nice with 3D transforms (when video is behind them, at least), so disable them for FireFox. */
/* NOTE:  It appears that Firefox has since fixed this issue, so this patch is now disabled. */
/*
@-moz-document url-prefix(){
  
  .dialogue_off{
    transform: none;
    opacity: 0;
    transition: opacity 0.5s;
  }

  .dialogue_on{
    transform: none;
    opacity: 100;
    transition: opacity 0.5s;
  }  
  
}
*/

#nav_buttons, #menu_buttons{
  width: 100%;
  clear: both;
  text-align: center;
  margin-top: 24px;
  opacity: 0.6;
  transition: opacity 1s;
}

#menu_buttons{
  opacity: 1;
}

#nav_buttons:hover{
  opacity: 1;
  transition: opacity 1s;
}

.nav_button, .nav_button_disabled{
  display: inline-block;
  background-color: #003366;
  font-size: 1.1em;
  padding: .5vw;
  text-shadow: 0px 0px 2px #000000;
  color: #FFFFFF;
  border-style: solid;
  border-width: 2px;
  border-color: #FFFFFF;
  border-radius: 0.6vw;
  cursor: pointer;
  box-shadow: inset 6px 6px 4px #FFFFFF88, inset 0px 0px 40px #000000EE, 0px 0px 24px #003366, 10px 10px 10px #00000088;
  text-shadow: 0px 0px 16px #00AAFF, 0px 0px 2px #000000;
  transform: scale(1,1);
  transition: transform .5s, background-color .5s, box-shadow .5s, color .5s, text-shadow .5s;
  margin-left: 2vw;
  margin-right: 2vw;
  /*
  width: 4vw;
  height: 4vw;
  box-sizing: border-box;
  */
}

.nav_button:hover{
  transform: scale(1.2,1.2);
  transition: transform .5s, background-color .5s, box-shadow .5s, color .5s, text-shadow .5s;
  background-color: #FFAA00;
  box-shadow: inset 6px 6px 4px #FFFFFFFF, inset 0px 0px 40px #FF8800DD, 0px 0px 24px #FFEE00, 0px 0px 24px #FF0000;
  color: #000000;
  text-shadow: 0px 0px 16px #FF0000;
  border-color: #AA0000;
}

.nav_button:focus{
  outline: none;
}

.nav_button img, .nav_button_disabled img{
  width: 1vw;
  min-width: 24px;
  height: auto;
  margin: 0px;
  vertical-align: middle;
}

.nav_button_disabled{
  opacity: 0.4;
  background-color: #888888;
  cursor: default;
}

.layer, .layer_hide{
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center bottom;
  z-index: 2;
  position: absolute;
  top: 0px;
  opacity: 100;
  transition: opacity 1s;
}

.layer_hide{
  opacity: 0;
  transition: opacity 1s;
}





/* NOTE:  These layer positions must be consistent with those specified in getOriginalPosLayer(); in the JavaScript. */

#layer1{
  left: -30%;
}

#layer2, #layer5, #layer6{
  left: 0%;
}

#layer3{
  left: 20%;
}

#layer4{
  left: 40%;
}





#video_layer{
  left: 0%;
}

#video{
  width: 100%;
  height: 100%;
}

#fade_layer, #scroller, #card{
  left: 0%;
  background-color: #000000;
}

#scroller, #card{
  font-family: "TerminalDosis", Impact, Arial, Helvetica, sans-serif;
  font-weight: normal;
  color: #FFFFFF;
}

#card{
  padding-top: 20%;
  font-size: 6vw;
  font-variant: small-caps;
  position: absolute;
  width: 100%;
  text-align: center;
}

#scroller{
  overflow: hidden;
  font-size: 2vw;
}

#scrolltext{
  position: relative;
  top: 0px;
}

#scrolltext table{
  text-align: left;
  margin-left: auto;
  margin-right: auto;
  width: 40%;
}

#scrolltext td{
  width: 30%;
  white-space: nowrap;
  padding-left: 2%;
}













@media (max-width: 789px) , (orientation: portrait){
  
  #keyboard_shortcuts td, label{
    font-size: 2vw;
  }
  
  .menu_section, .menu_label{
    width: 80%;
  }
  
  .menu_section table{
    float: none;
  }
  
  .menu_section td{
    display: block;
    width: 80%;
    font-size: 4vw !important;
  }
  
  .menu_label{
    font-size: 8vw;
  }
  
  .menu_section label{
    font-size: 4vw;
    float: left;
  }
  
  .menu_section input{
    width: 60%;
  }
  
  button.keyboard{
    font-size: 3vw;
  }
  
  #menu{
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
    margin: 0px;
    box-sizing: border-box;
    z-index: 100;
    padding-bottom: 32px;
  }
  
  
}

@media (max-width: 550px) , (orientation: portrait){
  
  #nav_buttons, #menu_buttons{
    top: 100vw;
    opacity: 1;
    width: 98%;
    left: 1%;
  }
  
  #nav_buttons{
    position: absolute;
  }
  
  #stage{
    overflow: visible;
  }
  
  #dialogue{
    width: 90%;
    font-size: 2.8vw;
    height: 40vw;
    top: 60vw;
    background-color: #002255DD;
  }
  
  #dialogue_title{
    box-shadow: inset 6px 6px 4px #FFFFFF88, inset 0px 0px 40px #000000EE, 0px 0px 24px #003366, 4px 4px 4px #00000044;
    font-size: 2.8vw;
  }
  
  .nav_button, .nav_button_disabled{
    width: 12vw;
    height: 12vw;
    margin-bottom: 2vh;
  }
  
  #link_button{
    display: none;
  }
  
}

@media (max-height: 400px) and (orientation: landscape){
  
  #dialogue_title{
    box-shadow: inset 6px 6px 4px #FFFFFF88, inset 0px 0px 40px #000000EE, 0px 0px 24px #003366, 4px 4px 4px #00000044;
    margin-bottom: 4px;
  }
  
  #dialogue{
    top: 25vw;
  }
  
  #dialogue_text{

  }
  
}








