@import url('boilerplate.css');
@import url('themes.css');


body, .screen {
  background-color: var(--color-page-background);
  height: 100vh;
  width: 100vw;
  padding: 0px;
  margin: 0px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--color-text2);
}

/* unvisited link */
a:link {
  color: var(--color-link);
}

/* visited link */
a:visited {
  color: var(--color-link);
}

/* mouse over link */
a:hover {
  color: var(--color-link);
}

/* selected link */
a:active {
  color: var(--color-link);
}

.full {
  background-color: #000;
}

.titletext {
  margin: 5px;
  font-size: 24px;
}

.copyright {
  font-size: 14px;
  text-wrap: nowrap;
}

.infoframe {
  background-color: var(--color-panel-background);
  font-family: monospace;
  margin:0;
  padding: 10px;
  font-size: 16px;
  max-width:800px;
  margin-left: auto;
  margin-right: auto;
}

.phototable {
  margin: auto;
  text-align: center;
}

.mainframe {
  position: fixed;
  width: 1270px;
  height: 750px;
  background: var(--color-app-background);
  border-radius: 15px;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0px;
  padding: 0px;
  top: 50%;
  left: 50%;
  transform-origin: top left;
}

.asmframe {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 400px;
  height: 730px;
  background: var(--color-asm-background);
  border-radius: 10px;
  text-align: center;
}

.asmeditor {
  position: absolute;
  top: 60px;
  left: 10px;
  width: 368px;
  height: 500px;
  background: var(--color-input-background);
  border-radius: 10px;
  resize: none;
  padding: 5px;
  display: flex;
  border: 1px var(--color-border) solid;
}

.asmeditor__textarea {
  border: none;
  outline: none;
  width: 100%;
  height: 490px;
  resize: none;
  font-size: 14pt;
  font-family: monospace;
  background: var(--color-input-background);
  color: var(--color-text);
}

.asmeditor__lines {
  border-right: 1px solid rgb(203 213 225);
  text-align: right;
  overflow: hidden;
  height: 490px;
  width: 30px;
    background: var(--color-input-background);
  color: var(--color-text);
}

.mark {
  background-color: var(--color-highlight);
  font-weight: bold;
}

.narrativebox {
  display: none;
  position: absolute;
  bottom: 28px;
  left: 10px;
  width: 358px;
  height: 90px;
  text-align: left;
  font-size: 16pt;
  border: 1px var(--color-border) solid;
  background: var(--color-narrative-background);
  border-radius: 10px;
  z-index: 1000;
  padding: 10px;
}

.visible {
  display: block;
}

.editbox {
  position: absolute;
  bottom: 15px;
  left: 10px;
  width: 378px;
  height: 145px;
  text-align: center;
  font-size: 16pt;
}

.errortext {
  font-size: 13pt;
  line-height: 15px;
  margin: 0px;
  color: var(--color-error-text);
}

.asmselect {
  background-color: var(--color-widgets);
  border-radius: 5px;
  height: 30px;
  width: 315px;
  min-width: 180px;
  font-size: 18px;
  margin-top: 10px;
  margin-left: 30px;
  margin-right: 10px;
  border: 1px var(--color-border) solid;
  color: var(--color-text2);
}

.lmcframe {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 840px;
  height: 730px;
  background: var(--color-lmc-background);
  border-radius: 10px;
  text-align: center;
}

.fullscreen {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0px;
  border: none;
  background: rgba(0, 0, 0, 0);
  z-index: 1000;
}

.fullscreen:hover {
  background: var(--color-lmc-panel-background);
}

.fullscreenimg {
  width: 16px;
  height: 16px;
}

.cpuframe {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 400px;
  height: 730px;
  text-align: center;
}

.cpubox {
  position: absolute;
  top: 50px;
  left: 0px;
  width: 398px;
  height: 510px;
  background: var(--color-lmc-panel-background);
  border-radius: 10px;
  font-size: 16pt;
  font-family: monospace;
  border: 1px var(--color-border) solid;
}

.controlunit {
  position: absolute;
  top: 45px;
  left: 20px;
  width: 230px;
  height: 260px;
  background: var(--color-panel-background);
  border-radius: 10px;
  text-align: center;
  border: 1px var(--color-border) solid;
}

.decodeunit {
  position: relative;
  margin: auto;
  width: 195px;
  height: 135px;
  background: var(--color-lmc-panel-background);
  border-radius: 10px;
  text-align: left;
  border: 1px var(--color-border) solid;
  padding: 0px;
  padding-top: 5px;
}

.mnemonictable {
  width: 100%;
}

.mnemonic {
  position: relative;
  background: var(--color-panel-background);
  border-radius: 5px;
  text-align: center;
  border: 1px var(--color-border) solid;
  width: calc(100% - 10px);
  margin-left: 5px;
  margin-right: 5px;
  font-size: 14px;

}

.current-mnemonic {
  background: var(--color-highlight);
  font-weight: bold;
}

.opcode {
  display: inline-block;
  text-align: center;
  border: none;
  font-size: 14px;
  margin-left: 5px;
  font-weight: initial;
    font-family: "Abel", sans-serif;
}

.registers {
  position: absolute;
  top: 45px;
  right: 20px;
  width: 100px;
  background: var(--color-panel-background);
  border-radius: 10px;
  text-align: center;
  border: 1px var(--color-border) solid;
}

.register {
  position: relative;
  background: var(--color-memory-title);
  border-radius: 10px;
  text-align: center;
  border: 1px var(--color-border) solid;
  width: 80px;
  margin-top: 17px;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 17px;
}

.registervalue {
  position: relative;
  background: var(--color-memory-background);
  border-radius: 0px 0px 10px 10px;
  text-align: center;
  width: 80px;
  height: 30px;
  margin: 0px;
  border-top: 1px var(--color-border) solid;
  font-family: "Abel", sans-serif;
}

.curegister {
  position: relative;
  background: var(--color-memory-title);
  border-radius: 10px;
  text-align: center;
  border: 1px var(--color-border) solid;
  width: 80px;
  margin-top: 0px;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 5px;
  font-size: 16px;
}

.curegistervalue {
  position: relative;
  background: var(--color-memory-background);
  border-radius: 0px 0px 10px 10px;
  text-align: center;
  width: 80px;
  height: 30px;
  margin: 0px;
  border-top: 1px var(--color-border) solid;
  font-size: 20px;
    font-family: "Abel", sans-serif;
}

.gap {
  position: relative;
  background-color: transparent;
  height: 20px;
}

.anchor {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /*background-color: red;*/
  visibility: hidden;
  line-height: 10px;
  font-size: 10pt;
}

.addressbus {
  position: absolute;
  width: 65px;
  height: 40px;
  left: 82px;
  top: 10px;
  z-index: 100;
  background-color: var(--color-bus-background);
  font-size: 13px;
  font-weight: bold;
  line-height: 20px;
  padding-right: 10px;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.addressbus:before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-border);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 0, 1px 1px, 1px calc(100% - 1px), calc(100% - 20px - 0.41px) calc(100% - 1px), calc(100% - 1px) calc(100% - 20px - 0.41px), calc(100% - 1px) calc(20px + 0.41px), calc(100% - 20px - 0.41px) 1px, 1px 1px);
}

.databus {
  position: absolute;
  width: 75px;
  height: 40px;
  left: 82px;
  top: 10px;
  z-index: 100;
  background-color: var(--color-bus-background);
  font-size: 13px;
  font-weight: bold;
  line-height: 40px;
  clip-path: polygon(0 20px, 20px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px));
}

.databus:before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-border);
  clip-path: polygon(0 20px, 20px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px), 0 20px, 1px calc(20px + 0.41px), 1px calc(100% - 20px - 0.41px), calc(20px + 0.41px) calc(100% - 1px), calc(100% - 20px - 0.41px) calc(100% - 1px), calc(100% - 1px) calc(100% - 20px - 0.41px), calc(100% - 1px) calc(20px + 0.41px), calc(100% - 20px - 0.41px) 1px, calc(20px + 0.41px) 1px, 1px calc(20px + 0.41px));
}

.controlbus {
  position: absolute;
  width: 193px;
  height: 20px;
  left: -35px;
  top: 0px;
  z-index: 100;
  background-color: var(--color-bus-background);
  font-size: 13px;
  font-weight: bold;
  line-height: 20px;
  padding-right: 10px;
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
}

.controlbus:before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-border);
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px, 1px calc(10px + 0.21px), 1px calc(100% - 10px - 0.21px), calc(10px + 0.21px) calc(100% - 1px), calc(100% - 10px - 0.21px) calc(100% - 1px), calc(100% - 1px) calc(100% - 10px - 0.21px), calc(100% - 1px) calc(10px + 0.21px), calc(100% - 10px - 0.21px) 1px, calc(10px + 0.21px) 1px, 1px calc(10px + 0.21px));
}

.alu {
  position: absolute;
  bottom: 15px;
  left: 150px;
  width: 100px;
  height: 170px;
  background: var(--color-panel-background);
  border-radius: 10px;
  text-align: center;
  border: 1px var(--color-border) solid;
  line-height: 110px;
}

.inputbox {
  position: absolute;
  top: 580px;
  left: 0px;
  width: 190px;
  height: 125px;
  background: var(--color-memory-title);
  border-radius: 10px;
  text-align: center;
  border: 1px var(--color-border) solid;
  font-size: 16pt;
  color: var(--color-text);
}

.waitingforinput {
  background: var(--color-highlight);
  border: 3px var(--color-border) solid;
  width: calc(190px - 4px);
  height: calc(125px - 4px);
}

.outputbox {
  position: absolute;
  top: 580px;
  right: 0px;
  width: 190px;
  height: 125px;
  background: var(--color-memory-title);
  border-radius: 10px;
  text-align: center;
  border: 1px var(--color-border) solid;
  font-size: 16pt;
}

.ioarea {
  position: absolute;
  bottom: 0px;
  left: 0px;
  width: calc(100% - 10px);
  height: 85px;
  background: var(--color-memory-background);
  border-radius: 0px 0px 10px 10px;
  font-size: 16pt;
      font-family: "Abel", sans-serif;
  border: none;
  border-top: 1px var(--color-border) solid;
  resize: none;
  padding: 5px;
  margin: 0px;
  outline: none;
  color: var(--color-text);
}


.ramframe {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 400px;
  height: 730px;
  text-align: center;
}

.rambox {
  position: absolute;
  top: 50px;
  right: 0px;
  width: 378px;
  height: 510px;
  background: var(--color-lmc-panel-background);
  border-radius: 10px;
  font-size: 16pt;
  font-family: monospace;
  border: 1px var(--color-border) solid;
}

.ram-asmeditor {
  display: grid;
  grid-template-columns: calc( 10% - 4px ) calc( 10% - 4px ) calc( 10% - 4px ) calc( 10% - 4px ) calc( 10% - 4px ) calc( 10% - 4px ) calc( 10% - 4px ) calc( 10% - 4px ) calc( 10% - 4px ) calc( 10% - 4px );
  column-gap: 4px;
  row-gap: 4px;
  margin-left: 10px;
  margin-left: 6px;
}

.ram-address {
  position: relative;
  background: var(--color-memory-title);
  border-radius: 5px;
  text-align: center;
  border: 1px var(--color-border) solid;
  height: 40px;
  line-height: 18px;
  font-size: 16px;
    font-family: "Abel", sans-serif;
}


.ram-value {
  position: absolute;
  bottom: 0px;
  left: 0px;
  background: var(--color-memory-background);
  border-radius: 0px 0px 5px 5px;
  text-align: center;
  font-size: 14px;
  margin: 0px;
  height: 20px;
  width: 100%;
  border-top: 1px var(--color-border) solid;
    font-family: "Abel", sans-serif;
}

.controlbox {
  position: absolute;
  top: 580px;
  right: 0px;
  width: 378px;
  height: 125px;
  background: var(--color-asm-background);
  border-radius: 10px;
  text-align: center;
  border: 1px var(--color-border) solid;
  font-size: 16pt;
}

.buttontable {
  width: 100%;
}

.buttontable td {
  width: 50%;
}

.button {
  background-color: var(--color-button);
  border-radius: 5px;
  height: 30px;
  width: calc(100% - 60px);
  font-size: 18px;
  margin-top: 7px;
  margin-left: 30px;
  margin-right: 30px;
  border: 1px var(--color-border) solid;
  color: var(--color-text2);
}

.button:hover {
  background-color: var(--color-button-hover);
}

.button:disabled {
  background-color: var(--color-button-disabled);
}

.construction {
  z-index: 255;
  width: 600px;
  position: absolute;
  top: 200px;
  left: 350px;
  background-color: var(--color-popup-background);
  border-radius: 5px;
  border: 1px var(--color-border) solid;
  text-align: center;
}

.fde {
  position: absolute;
  bottom: 15px;
  left: 15px;
  width: 150px;
  height: 145px;
  text-align: center;
}

.pie {
  display: grid;
  margin: 0px;
  width: 120px; /* set width to desired pie diameter */
  aspect-ratio: 1; /* make element square */
  font: 15px sans-serif;
  color: var(--color-text2);
}

.slice {
  display: grid;
  --hov: 0;
  --ba: 1turn/var(--n); /* angle of one slice */
  --ca: var(--i) *var(--ba) + var(--oa, -90deg); /* slice rotation */
  --dy: 50% *tan(.5 * var(--ba)); /* half a slice height */
  grid-area: 1/ 1; /* stack them all on top of each other */
  place-content: center end; /* text at 3 o'clock pre rotation */
  padding: 0px; /* space from circle edge to text */
  border-radius: 50%; /* turn square into disc */
  transform: /* need rotation before translation */ rotate(calc(var(--ca))) /* non-zero only in hover case */ translate(2px);
  background: var(--color-highlight);
  /* so hover is only triggered inside slice area */
  clip-path: polygon(50% 50%,
  100% calc(50% - var(--dy)),
  100% calc(50% + var(--dy)));
  filter: saturate(var(--hov));
  transition: .3s;
  counter-reset: i calc(var(--i) + 1);
  /* border: 1px var(--color-border) solid;*/


  &::after {
    /* reverse parent rotation for upright text */
    rotate: calc(-1 * (var(--ca)));
    content: var(--lab);
  }
}

.fetch {
  --i: 0;
  --lab: "Fetch";
  padding: 10px;
}

.decode {
  --i: 1;
  --lab: "Decode";
}

.execute {
  --i: 2;
  --lab: "Execute";
}

.currentphase {
  --hov: 1;
  font-weight: bold;
  color: var(--color-text);
}

/*@keyframes animation {
  0% {
    display: block;
    translate: 716px 168px;
  }
  100% {
    display: none;
    translate: 716px 256px;
  }
}

  .move {
    animation: animation 10s ease-in-out;
  }*/

.animated {
  visibility:hidden;
  position: absolute;
  border-radius: 5px;
  height: 30px;
  width: 30px;
  z-index: 1000;
  text-align: center;
  line-height: 30px;
  font-size: 14pt;
      font-family: "Abel", sans-serif;
  border: 1px var(--color-border) solid;
  padding-left: 5px;
  padding-right: 5px;
}

.control {
  height: 15px;
  width: 35px;
  line-height: 15px;
  font-size: 10pt;
  background-color: var(--color-highlight3);
}

.address {
  background-color: var(--color-highlight);
}

.data {
  background-color: var(--color-highlight2);
}

.sliderlabel {
  font-size: 16px;
  line-height: 22px;
  text-align: left;
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  margin: 5px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.switchslider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-slider-background);
  -webkit-transition: .4s;
  transition: .4s;
  margin: 0px;
  border: 1px solid var(--color-border);
  opacity: 0.7;
}

.switchslider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:hover + .switchslider {
  opacity: 1;
}

input:checked + .switchslider {
  background-color: var(--color-slider-on);
}

input:focus + .switchslider {
  box-shadow: 0 0 1px var(--color-slider-background);
}

input:checked + .switchslider:before {
  -webkit-transform: translateX(16px);
  -ms-transform: translateX(16px);
  transform: translateX(16px);
}

/* Rounded sliders */
.switchslider.round {
  border-radius: 20px;
}

.switchslider.round:before {
  border-radius: 50%;
}

.switchslider--input {
  margin: 0;
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 18px;
  width:105px;
  padding: 2px;
  background: var(--color-slider-on);
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
  border-radius: 25px;
  border: 1px solid var(--color-border);
  margin: 5px;
}

.slider:hover {
  opacity: 1;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  background: #fff;
  cursor: pointer;
  border-radius: 50%;
}


