:root {
  --width: 1000px
}

* {
  box-sizing: border-box
} 


body {
  margin: 0;
  font-family: "Computer Modern Serif", sans-serif;
  background: #1A1A1A;
  padding-bottom: 35px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
body {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  overflow-y: scroll;
}

.header {
  height: 80px;
  color: white;
  background-color: #313131;
  font-weight: bold;
  display: flex;
  font-size: 2rem;
  justify-content: center; /* align horizontal */
  align-items: center; /* align vertical */
  border-radius: 0 0 15px 15px;
  padding-left: 10px;
  padding-right: 10px;
  text-decoration: none;
}

.ex_title {
  color: white;
  font-weight: bold;
  text-align: left;
  margin-left: max(calc((100% - var(--width))/2),10px); 
  margin-right: max(calc((100% - var(--width))/2),10px);
  margin-top: 50px;
  font-size: 1.5rem;
}

.ex_text_container {
  display: grid;
  grid-template-columns: 10px 1fr;
  margin-left: calc(max(calc((100% - var(--width))/2),10px) + 15px); 
  margin-right: max(calc((100% - var(--width))/2),10px);
  gap: 10px;
  padding-top: 40px;
  padding-bottom: 10px;
}

.ex_text {
  grid-column: 2;
  color: white;
  line-height: 1.5;
  font-size: 1.2rem;
}

.ex_sub {
  grid-column: 1;
  display: flex;
  justify-content: left;
  color: white;
  line-height: 1.5;
  font-size: 1rem;
  font-weight: bold;
}

.language-julia {
  border-radius: 5px;
}

.ext_bot {
  margin-left: calc(max(calc((100% - var(--width))/2),10px) + 35px); 
  margin-right: calc(max(calc((100% - var(--width))/2),10px) + 35px);
  font-weight: bold;
  padding-left: 10px;
  padding-top: 10px;
  background-color: #705DF2;
  font-weight: bold;
  font-size: 1.5rem;
  border-style: solid;
  border-color: #705DF2;
  border-width: 0px;
  border-radius: 5px;
  height: 50px;
  color: white;
  display: block;
  padding-bottom: 40px;
  width: min(calc(var(--width) - 35px),calc(100% - 55px));
  cursor: pointer;
}

.ext_bot:hover {
  color:#1A1A1A
}

.sol_container {
  margin-left: calc(max(calc((100% - var(--width))/2),10px) + 35px); 
  margin-right: max(calc((100% - var(--width))/2),10px);
  background-color: #222222;
  border-radius: 0 0 5px 5px;
  color: white;
  line-height: 1.5;
  font-size: 1.2rem;
  border-color: #705DF2;
  border-width: 5px;
  border-top: 0px;
  border-style: solid;
  margin-bottom: 0px;
  padding-bottom: 10px;
  visibility: collapse;
  display: none;
}



.sol_text {
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 20px;
}

.canvas_container {
  position: relative;
  width: 100%;
}

#params {
  position:absolute;
  left:calc(100% - 2 * max(calc((100% - var(--width))/2),10px) - 6px);
  top: 10px;
	background: none;
  border: none;
  color: white;
  z-index: 5;
}

#rerun {
  position:absolute;
  left:calc(100% - 2 * max(calc((100% - var(--width))/2),10px) - 10px);
  top:70px;
  background: none;
  border: none;
  color: white;
  z-index: 1;
}

#pause {
  position:absolute;
  left:calc(100% - 2 * max(calc((100% - var(--width))/2),10px) - 10px);
  top:120px;
  background: none;
  border: none;
  color: white;
  z-index: 1;
}

#result {
  position:absolute;
  left:calc(100% - 2 * max(calc((100% - var(--width))/2),10px) - 10px);
  top:170px;
  background: none;
  border: none;
  color: white;
  z-index: 1;
}

#rule30 {
  border: 1px solid #705DF2;
  background-color: black;
  border-radius: 5px;
  width: 100%;
  z-index: 0;
}

#settings_overlay {
  border: 1px solid #705DF2;
  border-radius: 5px;
  width: 100%;
  height: calc(100% - 10px);
  position: absolute;
  top: 0px;
  display: none;
  background-color: rgba(255, 255, 255, .15);
  backdrop-filter: blur(10px);
  z-index: 2;
  grid-template-columns: 100%;
  grid-template-rows: .5fr 1fr .5fr;

}
#titlee {
  display: flex;
  grid-row: 1;
  color: black;
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  background-color: rgba(255, 255, 255, .15);
  justify-content: center;
  align-items: center;
}

#rule_input {
  background-color: rgba(255, 255, 255, .1);
  border: none;
  text-align: center;
  grid-row: 2;
  font-size: 4rem;
  outline: none;
}



#confirm {
  background-color: rgba(255, 255, 255, .15);
  border: none;
  text-align: center;
  grid-row: 3;
  font-size: 2rem;
  font-weight: bold;
}

.chart_container {
  position: relative;
  width: 100%;
}

#chart {
  border: 1px solid #705DF2;
  background-color: black;
  border-radius: 5px;
  width: 100%;
  z-index: 0;
  margin-bottom: 10px;
}

#gameoflife {
  border: 1px solid #705DF2;
  background-color: black;
  border-radius: 5px;
  width: 100%;
  z-index: 0;
}

#gameoflife2 {
  border: 1px solid #705DF2;
  background-color: black;
  border-radius: 5px;
  width: 100%;
  z-index: 0;
}

#gameoflife3 {
  border: 1px solid #705DF2;
  background-color: black;
  border-radius: 5px;
  width: 100%;
  z-index: 0;
}

#imgcontainer {
  display: flex;
  align-items: center;
  justify-content: center;
}

#fig1 {
  height: auto;
  width: min(var(--width),100%);
}

#fig2 {
  height: min(200px,40vw);
}

#fig3 {
  height: min(200px,40vw);
}

#gameoflife3_chart {
  border: 1px solid #705DF2;
  background-color: black;
  border-radius: 5px;
  width: 100%;
  z-index: 0;
  margin-bottom: 10px;
}

#gol_rerun {
  display: none;
  position:absolute;
  left:46%;
  top:46%;
  background: none;
  border: none;
  color: white;
  z-index: 1;
  cursor: pointer;
}



.normalLink {
  text-decoration: none;
}

/* unvisited link */
.normalLink:link {
  color: white;
}

/* visited link */
.normalLink:visited {
  color: white;
}

/* mouse over link */
.normalLink:hover {
  color: #705DF2;
}

.normalLink:active {
  color: #705DF2;
}

@media only screen and (max-width:1000px) {
  .header {
    font-size: 1.2rem;
  }

}

@media only screen and (max-width:600px) {
  #params {
    top:1%;
  }
  #rerun {
    top:30%;
  }
  #pause {
    top:50%;
  }
  #result {
    top:70%;
  }
  #rule_input {
    font-size: 2rem;
  }
  #titlee {
    font-size: 1rem;
  }

  #confirm {
    font-size: 1rem;
  }
}