* {
    box-sizing:border-box;
}

body {
  background:rgb(20,20,30);
  padding:0;
  margin:0;
  overflow:hidden;
  font-family:sans-serif;
  color:rgb(255,255,255,1);
  text-shadow:0.1rem 0.1rem 0 rgba(0,0,0,0.8);
  font-family:monospace;
}

h1, h2, h3, h4 {
  margin:0;
  padding:0;
  text-align:center;
}

canvas {
  position:absolute;
  top:0;
  left:0;
  z-index:1;
  width:100vw;
  height:100vh;
}

#controls {
  position:fixed;
  top:0;
  left:0;
  z-index:3;
  padding:1rem;
  background:rgba(255,0,255,0.1);
  margin:0;
  box-shadow:0 0 2rem rgba(0,0,0,0.8);
  border-radius:0 0 1rem 0;
  display:flex;
  flex-direction: column;
  width:21rem;
  max-height:90vh;
  overflow-y:auto;
  overflow-x:hidden;
}

#controls h3 {
  cursor:pointer;
  user-select: none;
}

.formGroup:not(:last-child) {
  padding-bottom:0.3rem;
  border-bottom:1px solid rgba(255,255,255,0.5);
}

.formGroup:not(:first-child) {
  padding-top:0.3rem;
  border-top:1px solid rgba(0,0,0,0.9);
}

.formInput {
  display:flex;
  align-items: center;
  width:18rem;
  justify-content: space-around;
  margin:0.1rem 0;
  
}

#controls .formInput {
  display:none;
  
}

#controls .formInput label {
  margin-right:1rem;
  width:9rem;
  font-size:0.7rem;
  text-align:right;
}

#controls .formInput input {
  width:8rem;
  font-size:0.8rem;
}

#instructions {
  position:absolute;
  bottom:0;
  width:30rem;
  right:0;
  background:rgba(255,255,255,0.1);
  padding:1rem;
  border-radius:1rem 1rem 0 0;
  z-index:4;
  max-height:85vh;
  overflow-x:hidden;
  overflow-y: auto;
}

#instructions h1 {
  margin-bottom:1rem;
  background:rgba(0,0,0,0.2);
  border-radius:0.5rem;
  padding:0.2rem 0;
  box-shadow:0 0 0.3rem rgba(0,0,0,0.5);
}

#instructions>div {
  display:none;
  padding-bottom:1rem;
}

#instructions>div.active {
  display:block;
}

#instructions a {
  color:rgba(255,255,255,0.8);
  user-select: none;
  text-decoration:none;
  background:rgba(0,0,0,0.2);
  border-radius:0.5rem;
  padding:0.2rem 1rem;
  box-shadow:0 0 0.3rem rgba(0,0,0,0.2);
  text-align: right;
}

#instructions label {
  font-size:0.8rem;
}

#instructions a:hover {
  background:rgba(0,0,0,0.7);
  color:rgba(255,255,255,1);
  box-shadow:0 0 0.3rem rgba(0,0,0,0.5);
}

#nextStep {
  display:block;
  float:right;
}

#previousStep {
  display:none;
  float:left;
}

#error {
  position:absolute;
  background:rgba(255,100,100);
  color:rgb(80,0,0);
  text-shadow:1px 1px 0 rgba(255,255,255,0.5);
  padding:1rem;
  font-size:1rem;
  font-weight:bold;
  bottom:0;
  right:0;
  border-radius:2rem 0 0 0;
  opacity:0.7;
}

#instructions table {
  width:100%;
  border-collapse:collapse;
  margin-top:1rem;
}

#instructions tbody {

  overflow-x:hidden;
  overflow-y:auto;
}

#instructions th {
  background:rgba(255,255,255,0.8);
  padding:0 0.5rem;
  color:rgba(0,0,0,0.9);
  text-shadow:1px 1px 0 rgba(255,255,255,1);
}

#instructions td {
  border:1px solid rgba(255,255,255,0.3);
  padding:0 0.5rem;
}

#instructions td:last-of-type {
  padding-right:2rem;
}