* {
    margin: 0;
    padding: 0;
    background-color: black;
    color: #ff9900;
    font-family: Hack, Consolas, 'Courier New', Courier, monospace;
    box-sizing: border-box;
    overflow: hidden;
}

html, body, #gui {
    width: 100vw;
    height: 100vh;
}
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.register {
    border: 1px dotted #ff9900;
    text-align: right;
    outline: none;
    padding: 2px;
}

.flag, .label {
    font-size: 80%;
    text-align: center;
}

.flag {
    border: 1px dotted #ff9900;
}
.flag.on {
    background-color: #ff9900;
    color: black;
}

#regs > * {
    opacity: .9;
}

#output { 
    border: none;
    border-top: 1px dotted #ff9900;
    outline: none;
    resize: none;
    overflow-y: scroll;
}

#program {
    overflow-y: scroll;
    outline: none;
    resize: none;
    border: none;
}

#program::selection {
    background-color: #ff9900;
    color: black;
}

::-webkit-scrollbar {
    width: 10px;
} 
::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}

@media screen and (orientation: portrait) {
    #gui {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        width: 98vw;
    }

    #flags {
        display: flex;
        flex-direction: row;
    }

    .flag {
        width: calc(98vw/9);
    }

    #regs {
        display: flex;
        flex-wrap: wrap;
        width: 98vw;
        background-color: #ff9900;

    }
    
    .register {
        width: calc(98vw/4);
    }

    .label::after {
        content: ":";
    }

    .label {
        text-align: right;
        width: calc(98vw/12)
    }

    .spacer {
        height: 0;
        flex-basis: 100%;
        flex-grow: 1;
    }

    #progPane {
        width: 98vw;
        flex-grow: 1;
        flex-shrink: 1;
    }
    #execute, #step {
        width: calc(98vw/2);
    }

    #program { 
        height: 53vh;
        width: 98vw;
    }

    #output { 
        flex-grow: 1;
        height: 29vh;
        width: 98vw;
    }
}

@media screen and (orientation: landscape) and (max-height: 500px) {
    #flags {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
	position: absolute;
	top: 10px;
	right: 14vw;
    }
}

@media screen and (orientation: landscape) {
    #gui { 
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        width: 98vw;
    }
    
    #flags {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .flag {
        max-width: calc(9rem/3);
        width: calc(9vw/3);
        flex-grow: 1;
    }

    #regs {
        display: flex;
        flex-direction: column;
        max-width: 9rem;
        width: 10vw;
        height: 99vh;
        justify-content: space-between;
        flex-grow: 1;
        background-color: #ff9900;
    }

    
    #progPane {
        width: 85vw;
        flex-grow: 1;
    }

    .spacer {
        flex-grow: 1;
    }
    
    #program { 
        height: 78vh;
        width: 90vw;
    }
    
    #output { 
        height: 20vh;
        width: 90vw;
    }
}

