@import url('boilerplate.20-05-26.css');
@import url('themes.20-05-26.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;
    background-image: url(../img/grid.svg);
    background-size: cover;
}

.asmframe {
    position: absolute;
    top: 90px;
    left: 10px;
    width: 400px;
    height: 530px;
    background: var(--color-asm-background);
    border-radius: 10px;
    text-align: center;
}

.asmeditor {
    position: absolute;
    top: 55px;
    left: 10px;
    width: 368px;
    height: 415px;
    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: 410px;
    resize: none;
    font-size: 14pt;
    font-family: monospace;
    background: var(--color-input-background);
    color: var(--color-text);
    white-space: pre;      /* do NOT wrap lines */
    overflow-x: auto;      /* horizontal scrollbar */
    overflow-y: auto;      /* vertical scrollbar */
}

.asmeditor__lines {
    border-right: 1px solid rgb(203 213 225);
    text-align: right;
    overflow: hidden;
    height: 410px;
    width: 30px;
    background: var(--color-input-background);
    color: var(--color-text);
}

.mark {
    position: relative;
}

.mark::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -4px; /* adjust how close to the text/edge it sits */
    transform: translateY(-50%);

    /* triangle */
    width: 0;
    height: 0;
    border-top: 0.45em solid transparent;
    border-bottom: 0.45em solid transparent;
    border-left: 0.6em solid var(--color-highlight); /* color of the triangle */
    z-index: 999;
}

.narrativeframe {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 400px;
    height: 110px;
    background: var(--color-asm-background);
    border-radius: 10px;
    text-align: center;
}

.narrativebox {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 358px;
    height: 70px;
    text-align: left;
    font-size: 14pt;
    font-weight: bold;
    color: var(--color-highlight);
    border: 1px var(--color-border) solid;
    background: var(--color-narrative-background);
    border-radius: 10px;
    z-index: 1000;
    padding: 10px;
    max-height: 70px;
    overflow-y: auto;
}

.visible {
    display: block;
}

.editbox {
    position: absolute;
    bottom: 5px;
    left: 10px;
    width: 378px;
    height: 40px;
    text-align: center;
    font-size: 16pt;
}

.errortext {
    font-size: 14pt;
    font-weight: bold;
    margin: 0;
    color: var(--color-error-text);
}

.asmselect {
    background-color: var(--color-widgets);
    border-radius: 5px;
    height: 30px;
    width: 220px;
    min-width: 180px;
    font-size: 18px;
    border: 1px var(--color-border) solid;
    color: var(--color-widgets-text);
}

.asmselect option {
    font-size: 18px;
}


.lmcframe {
    position: absolute;
    top: 90px;
    right: 10px;
    width: 840px;
    height: 650px;
    background: var(--color-lmc-background);
    border-radius: 10px;
    text-align: center;
}

.fullscreen {
    position: absolute;
    bottom: 15px;
    right: 15px;
    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: 0px;
    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;
}

.controlunit.extended {
    height: 300px;
}

.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;
}

.decodeunit.extended {
    height: 177px;
}

.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);
    color: var(--color-highlight-text);
    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: 15px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 16px;
}

.register.extended {
    font-size: 19px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.register.highlight {
    background: var(--color-highlight);
    color: var(--color-highlight-text);
}

.register .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;
}

.register.extended .registervalue {
    height: 28px;
}

.register.highlight .registervalue {
    color: var(--color-text);
}

.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;
}

.curegister.highlight {
    background: var(--color-highlight);
    color: var(--color-highlight-text);
}

.curegister .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;
}

.curegister.highlight .curegistervalue {
    color: var(--color-text);
}

.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;
    z-index: 9000;
}

.addressbus {
    color: var(--color-text);
    position: absolute;
    width: 65px;
    height: 40px;
    left: 82px;
    top: 10px;
    z-index: 100;
    background-color: var(--color-address-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 {
    color: var(--color-text);
    position: absolute;
    width: 75px;
    height: 40px;
    left: 82px;
    top: 10px;
    z-index: 100;
    background-color: var(--color-data-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 {
    color: var(--color-text);
    position: absolute;
    width: 193px;
    height: 40px;
    left: -60px;
    top: -7px;
    z-index: 100;
    background-color: var(--color-control-bus-background);
    font-size: 13px;
    font-weight: bold;
    line-height: 40px;
    padding-right: 10px;
    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));
}

.controlbus: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));
}

.alu {
    position: absolute;
    bottom: 12px;
    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;
}

.alu.extended {
    height: 140px;
    line-height: 90px;
}

.inputbox {
    position: absolute;
    top: 520px;
    left: 0px;
    width: 190px;
    height: 110px;
    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);
    color: var(--color-highlight-text);
    border: 3px var(--color-highlight) solid;
    width: calc(190px - 4px);
    height: calc(110px - 4px);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {

    }

    50% {
        box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.5);
    }

    100% {
    }
}

.outputbox {
    position: absolute;
    top: 520px;
    right: 0px;
    width: 190px;
    height: 110px;
    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: 70px;
    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: 0px;
    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-container {
    position: absolute;
    width: 100%;
    top: 45px;
    left: 0;
}

.ram-container.extended {
    top: 60px;
}

.ram-asmeditor {
    position: absolute;
    top: 0;
    left: 5px;
    width: calc( 100% - 18px );
    background: var(--color-panel-background);
    padding: 5px 0 5px 5px;
    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;
    border-radius: 5px;
    text-align: center;
    border: 1px var(--color-border) solid;
    align-items: center;
    z-index: 200;
}

.pagebox {
    position: absolute;
    top: -20px;
    left: 5px;
    width: calc( 100% - 18px);
    padding-left: 5px;
    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;
    border-radius: 5px;
    text-align: center;
    align-items: center;
    z-index: 100;
}

.ram-page {
    position: relative;
    background: var(--color-lmc-panel-background);
    border-radius: 5px;
    text-align: center;
    border: 1px var(--color-border) solid;
    height: 30px;
    font-size: 14px;
    font-family: "Abel", sans-serif;
    margin-bottom: 0;
    line-height: 17px;
}


.tab {
    position: absolute;
    top: 0;
    left: 0;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    width: 100%;
    height:30px;
    background: var(--color-panel-background);
    z-index: 500;
    color: black;
    line-height: 17px;
    font-weight: bolder;
}

.ram-address {
    position: relative;
    background: var(--color-memory-title);
    border-radius: 5px;
    text-align: center;
    border: 1px var(--color-border) solid;
    height: 39px;
    line-height: 19px;
    font-size: 14px;
    z-index: 600;
    font-family: "Abel", sans-serif;
}

.ram-address.extended {
        height: 38px;
}

.ram-address.highlight {
    background: var(--color-highlight);
    color: var(--color-highlight-text);
}

.ram-address:hover {
    z-index: 1300;
}


.ram-address .ram-value {
    position: absolute;
    bottom: 0px;
    left: 0px;
    background: var(--color-memory-background);
    border-radius: 0px 0px 5px 5px;
    text-align: center;
    font-size: 13px;
    margin: 0;
    height: 19px;
    width: 100%;
    border-top: 1px var(--color-border) solid;
    font-family: "Abel", sans-serif;
    cursor: default;
}

.ram-address.highlight .ram-value {
    color: var(--color-text);
}

.ram-address .ram-value::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translate(-50%, 4px);
    min-width: max-content;
    max-width: 180px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: var(--color-panel-background);
    color: var(--color-text);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s linear 0.12s;
    z-index: 1200;
}

.ram-address .ram-value::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--color-panel-background);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease, visibility 0s linear 0.12s;
    z-index: 1200;
}

.ram-address .ram-value:hover::after,
.ram-address .ram-value:hover::before {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.08s;
}

.ram-address .ram-value:hover::after {
    transform: translate(-50%, 0);
}

.controlbox {
    position: absolute;
    top: 530px;
    right: 10px;
    width: 378px;
    height: 110px;
    background: var(--color-asm-background);
    border-radius: 10px;
    text-align: center;
    border: 1px var(--color-border) solid;
    font-size: 16pt;
    color: var(--color-text);
}

.buttontable {
    width: 100%;
    padding: 0;
    margin: 0;
}

.buttontable td {
    padding: 0;
    margin: 0;
}

.button {
    background-color: var(--color-button);
    border-radius: 5px;
    height: 30px;
    width: max(100px, calc(100% - 60px));
    font-size: 18px;
    margin-top: 4px;
    margin-bottom: 3px;
    border: 1px var(--color-border) solid;
    color: var(--color-widgets-text);
}

.button:hover {
    background-color: var(--color-button-hover);
}

.button:disabled {
    background-color: var(--color-button-disabled);
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.icon-button .bi {
    font-size: 14px;
    line-height: 1;
}

.smallbutton {
    width: max(60px, calc(100% - 60px));
}

.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;
}

.fde.extended {
    height: 130px;
}

.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-text);
}

.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-panel-background);
    color: var(--color-text2);
    /* so hover is only triggered inside slice area */
    clip-path: polygon(50% 50%,
    100% calc(50% - var(--dy)),
    100% calc(50% + var(--dy)));
    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-highlight-text);
    background: var(--color-highlight);
}

/*@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: 40px;
    z-index: 1000;
    text-align: center;
    line-height: 30px;
    font-size: 14pt;
    font-family: "Abel", sans-serif;
    border: 1px var(--color-border) solid;
}

.control {
    height: 30px;
    width: 35px;
    line-height: 30px;
    font-size: 14pt;
    background-color: var(--color-control);
    color: var(--color-control-text);
}

.address {
    background-color: var(--color-address);
}

.data {
    background-color: var(--color-data);
}






