header {
    justify-content: space-between;
}
.for-hackers {
    font-family: "Monogram", monospace;
    padding: .2rem .4rem;
    margin-left: 1rem;
    color: #EEE;
    font-size: 1.2rem;
    text-transform: uppercase;
    border: 2px solid #5624ed;
}
#menu-container {
    text-align: center;
}
main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 94vh;
}
section {
    flex-grow: 1;
    height: 94vh;
}
#editor-container {
    width: 50vw;
    display: flex;
    flex-direction: column;
}
#editor {
    font-family: monospace;
    font-size: 1rem;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}
div#editor .cm-editor {
    overflow: auto;
    height: 100%;
}
div#editor .cm-editor .cm-content {
    padding: .7rem 0;
    margin: 0 .7rem;
}
button#run {
    flex: 0 0 10vh;
    height: 10vh;
    background-color: #5624ed;
    border-width: 0;
    width: 100%;
    cursor: pointer;
    color: #FFF;
    text-transform: uppercase;
    font-size: 2.5rem;
    font-family: "Monogram", monospace;
    transition: filter .2s;
}
button#run:hover {
    filter: brightness(120%);
}
#header-buttons-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
}
#header-buttons-container button, #header-buttons-container select {
    margin-left: 1rem;
}
#header-buttons-container button, .load-code-snapshot, .load-code-template {
    font-family: "Monogram", monospace;
    color: #5624ed;
    padding: .2rem .4rem;
    margin-left: 1rem;
    background-color: #EEE;
    font-size: 1.3rem;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: -2px 2px 0 #5624ed;
    transition: transform .2s;
}
#header-buttons-container button#what-is-this {
    color: #EEE;
    background-color: #5624ed;
    box-shadow: -2px 2px 0 #c5b6f2;
}
#load-code-dialog {
    background-color: #222;
}
#load-code-snapshots, #load-code-templates {
    grid-gap: 1rem;
    padding: 2rem;  
}
#load-code-templates {
    grid-template-columns: 1fr 1fr;
}
.load-code-snapshot, .load-code-template {
    font-size: 1.8rem;
    color: #EEE;
    background-color: #5624ed;
    box-shadow: -2px 2px 0 #c5b6f2;
}
#header-buttons-container button:active {
    box-shadow: none;
    transform: translate(-2px, 2px);
}
#header-buttons-container button#load-code:active {
    box-shadow: none;
}
#viewer-container {
    display: flex;
    width: 50vw;
    position: relative;
}
#click-run {
    position: absolute;
    width: 100%;
    top: 3rem;
    text-align: center;
    left: 0;
    background-color: #1B1B1B;
    color: #EEE;
    font-size: 2rem;
    font-family: 'Monogram';
}
#click-run .run-wording {
    color: #5624ed;
    text-transform: uppercase;
}
#viewer {
    height: 94vh;
    flex-grow: 1;
    border-width: 0;
    background-color: #1B1B1B;
}
.hidden {
    display: none !important;
}
::backdrop {
    background-color: #000;
    opacity: .7;
}
.builder-options-dialog {
    border: 1px solid #5624ed;
}
.builder-options-dialog h4 {
    font-family: "Monogram", monospace;
    text-align: center;
    font-size: 1.8rem;
    color: #FFFFFF;
    margin: 1rem 0;
    clear: both;
}
.builder-options-dialog-close {
    float: right;
    border: none;
    background-color: transparent;
    color: #c5b6f2;
    font-size: 1.2rem;
    cursor: pointer;
}
#maps-dialog {
    background-color: #1B1B1B;
}
.builder-options-grid {
    list-style-type: none;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin: 0;
}
.builder-options-grid li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 1.5rem 2.5rem;
}
.builder-options-grid li img {
    width: 200px;
    margin-bottom: 1rem;
}
.builder-options-grid li span {
    font-family: monospace;
    color: #FFF;
    font-size: 1rem;
}
#enemies-dialog {
    background-color: #6e687b;
}
#enemies-dialog .builder-options-dialog-close {
    color: #FFF;
}
#enemies-dialog .builder-options-grid li img {
    width: auto;
}
#enemies-dialog .builder-options-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}
/****** Messages shown underneath the code ******/

#messages {
    flex: 0 0 auto;
    max-height: 40vh;
    overflow-y: auto;
    background-color: #16161c;
    border-top: 2px solid #5624ed;
    font-family: "Monogram", monospace;
    color: #EEE;
}
#messages[hidden] {
    display: none;
}
.message {
    position: relative;
    padding: .8rem 2.4rem .8rem 1rem;
    border-bottom: 1px solid #2a2a33;
    border-left: 4px solid #e8a33d;
    line-height: 1.35;
}
.message-dismiss {
    position: absolute;
    top: .35rem;
    right: .45rem;
    font-family: "Monogram", monospace;
    font-size: 1.6rem;
    line-height: 1;
    color: #6f6980;
    background-color: transparent;
    border: none;
    padding: 0 .25rem;
    cursor: pointer;
}
.message-dismiss:hover {
    color: #ffd9a0;
}
.message-hint .message-dismiss:hover {
    color: #a5e8dd;
}
.message:last-child {
    border-bottom: none;
}
.message-hint {
    border-left-color: #4db8a8;
}
.message-title {
    font-size: 1.5rem;
    color: #ffd9a0;
}
.message-hint .message-title {
    color: #a5e8dd;
}
.message-where {
    font-size: 1.2rem;
    color: #9a94a8;
    margin-top: .15rem;
}
.message-suggestion {
    font-size: 1.3rem;
    color: #d6d2e0;
    margin-top: .4rem;
}
.message code {
    font-family: monospace;
    font-size: .95rem;
    background-color: #2a2438;
    color: #c5b6f2;
    padding: .05rem .25rem;
    border-radius: 3px;
}
.message-code {
    font-family: monospace;
    font-size: .85rem;
    background-color: #0f0f14;
    color: #c5b6f2;
    padding: .5rem .6rem;
    margin: .5rem 0 0 0;
    border-radius: 3px;
    overflow-x: auto;
}
.message-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .4rem;
    min-height: 1rem;
}
.message-line {
    font-family: "Monogram", monospace;
    font-size: 1.2rem;
    color: #c5b6f2;
    background-color: transparent;
    border: none;
    border-bottom: 1px dotted #c5b6f2;
    padding: 0;
    cursor: pointer;
}
.message-details-toggle {
    font-family: "Monogram", monospace;
    font-size: 1.1rem;
    color: #6f6980;
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}
.message-details-toggle:hover {
    color: #c5b6f2;
}
.message-count {
    font-size: 1.1rem;
    color: #6f6980;
    margin-left: auto;
}
.message-raw {
    font-family: monospace;
    font-size: .8rem;
    color: #8d8799;
    background-color: #0f0f14;
    padding: .5rem .6rem;
    margin: .4rem 0 0 0;
    border-radius: 3px;
    overflow-x: auto;
    white-space: pre-wrap;
}

#reference-dialog {
    background-color: #1B1B1B;
    width: min(64rem, 88vw);
    max-height: 84vh;
    color: #EEE;
}
#reference-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 0 2rem 1rem 2rem;
    border-bottom: 1px solid #3a3446;
    clear: both;
}
.reference-nav-link {
    font-family: "Monogram", monospace;
    font-size: 1.3rem;
    color: #c5b6f2;
    background-color: #2a2438;
    border: none;
    border-radius: 3px;
    padding: .2rem .6rem;
    cursor: pointer;
}
.reference-nav-link:hover {
    background-color: #5624ed;
    color: #FFF;
}
#reference-body {
    padding: 0 2rem 2rem 2rem;
}
.reference-section {
    height: auto;
    flex-grow: 0;
}
.reference-section h4 {
    font-family: "Monogram", monospace;
    font-size: 2rem;
    color: #FFF;
    margin: 1.4rem 0 .1rem 0;
    text-align: left;
    clear: none;
}
.reference-blurb {
    font-family: "Monogram", monospace;
    font-size: 1.3rem;
    color: #9a94a8;
    margin: 0 0 .8rem 0;
}
.reference-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.reference-entry {
    padding: .45rem 0;
    border-bottom: 1px solid #262231;
}
.reference-signature {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
}
.reference-entry:last-child {
    border-bottom: none;
}
.reference-name {
    font-family: monospace;
    font-size: .9rem;
    color: #c5b6f2;
    background-color: #2a2438;
    padding: .1rem .35rem;
    border-radius: 3px;
    flex: 0 0 auto;
}
.reference-detail {
    font-family: "Monogram", monospace;
    font-size: 1.3rem;
    color: #d6d2e0;
    margin: .15rem 0 0 0;
}
.reference-badge {
    font-family: "Monogram", monospace;
    font-size: 1.05rem;
    text-transform: uppercase;
    padding: .05rem .35rem;
    border-radius: 3px;
    flex: 0 0 auto;
    cursor: default;
}
.reference-badge-method {
    color: #c5b6f2;
    border: 1px solid #4b3f6b;
    cursor: help;
}
.reference-badge-property {
    color: #9fd0e8;
    border: 1px solid #33566b;
    cursor: help;
}
.reference-legend {
    font-family: "Monogram", monospace;
    font-size: 1.2rem;
    color: #6f6980;
    margin: 1.6rem 0 0 0;
    padding-top: 1rem;
    border-top: 1px solid #3a3446;
}
.reference-legend dt {
    color: #c5b6f2;
    text-transform: uppercase;
    margin-top: .5rem;
}
.reference-legend dd {
    margin: 0;
}

/****** "What is this??" dialog ******/

#what-is-this-dialog {
    background-color: #1B1B1B;
    width: min(46rem, 88vw);
    max-height: 84vh;
    color: #EEE;
}
#what-is-this-body {
    padding: 0 2rem 2rem 2rem;
}
#what-is-this-body h4 {
    font-family: "Monogram", monospace;
    font-size: 2rem;
    color: #FFF;
    margin: 1.4rem 0 .1rem 0;
    text-align: left;
    clear: none;
}
#what-is-this-body p,
.what-is-this-list li {
    font-family: "Monogram", monospace;
    font-size: 1.4rem;
    line-height: 1.35;
    color: #d6d2e0;
    margin: .8rem 0 0 0;
}
#what-is-this-body code {
    font-family: monospace;
    font-size: .95rem;
    background-color: #2a2438;
    color: #c5b6f2;
    padding: .05rem .25rem;
    border-radius: 3px;
}
#what-is-this-body strong {
    color: #FFF;
    font-weight: normal;
}
.what-is-this-code {
    font-family: monospace;
    font-size: .85rem;
    background-color: #0f0f14;
    color: #c5b6f2;
    padding: .8rem 1rem;
    margin: .8rem 0 0 0;
    border-radius: 3px;
    overflow-x: auto;
}
.what-is-this-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.what-is-this-list li {
    padding-left: 1rem;
    border-left: 2px solid #5624ed;
}
