body {
    margin: 0;
    overflow: hidden;
    background-color: #242424;
    color: #ffffff;
    font-family: Roboto, Arial, Helvetica, sans-serif;
}

body.DocsViewFrame {
    overflow: auto;
    margin: 8px;
    margin-right: 12px;
}

a {
    color: #4ba8ff;
    text-decoration: none;
}

button {
    color: inherit;
    background-color: #242424;
    border: 1px solid #8888886e;
    padding: 4px 10px;
    cursor: pointer;
}

button:hover, button:active {
    background-color: #2b2b2b;
    border-color: #888888;
}

::-webkit-scrollbar {
    width: 4px;
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    border-radius: 2px;
    background-color: #88888886;
}

#loading {
    position: fixed;
    padding: 64px 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #3b3b3b;
    text-align: center;
    font-size: 1.6em;
    width: 100%;
    z-index: 9;
}

#loading.hiding {
    transform: translateY(-50%) scaleY(0.8);
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

#loading.hidden {
    display: none;
}

.view {
    padding: 8px;
    position: absolute;
    width: 100%;
    height: 100%;
    min-height: 100vh;
}

.view.SimulationList {
    position: static;
    width: 100%;
    max-width: 960px;
    height: 100vh;
    box-sizing: border-box;
    margin: auto;
    overflow-y: auto;
}

.view.SimulationList .list {
    text-align: center;
}

.view.SimulationList .list .simulationLink {
    display: inline-block;
    vertical-align: top;
    height: 256px;
    max-height: 100%;
    width: 256px;
    max-width: 100%;
    padding: 8px;
}

.view.SimulationList .list .simulationLink a {
    display: block;
    font-size: 1.3em;
    text-align: left;
    background-color: #79797921;
    width: 100%;
    height: 100%;
    padding-top: 40%;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

.view.Docs {
    z-index: 1;
    height: 0;
    width: 0;
}

.view.Docs .background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000067;
}

.view.Docs .background.hideBackground {
    background-color: transparent;
    height: 0;
    width: 0;
}

.view.Docs .content {
    position: absolute;
    display: flex;
    flex-direction: column;
    width: 100vw;
    max-width: 540px;
    height: 90vh;
    max-height: 720px;
    background-color: #242424;
    padding: 8px;
    border: 1px solid #7979798e;
}

.view.Docs .title {
    cursor: move;
    user-select: none;
    margin-left: 8px;
}

.view.Docs .title h1 {
    margin-bottom: 8px;
}

.view.Docs .closeButton {
    position: absolute;
    top: 42px;
    right: 18px;
    transform: translateY(-50%);
    font-size: 1.5em;
    cursor: pointer;
}

.view.Docs iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

body.DocsViewFrame math {
    display: block;
    margin: 8px 0;
}

body.DocsViewFrame p math {
    display: inline-block;
    margin: 0;
}

body.DocsViewFrame math[highlight] {
    display: inline-block;
    outline: 1px solid #bdbdbd;
    outline-offset: 4px;
}

body.DocsViewFrame img {
    width: auto;
    max-width: 100%;
    box-shadow: 0px 1px 8px #00000075;
    box-sizing: content-box;
}

.view.Simulation {
    padding: 0;
}

.view.Simulation .canvas canvas,
.view.Simulation .HTMLCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    user-select: none;
}

.view.Simulation .HTMLCanvas {
    padding: 8px;
}

.view.Simulation .canvas {
    pointer-events: none;
}

.view.Simulation .helpButton {
    position: absolute;
    display: inline-block;
    bottom: 8px;
    right: 8px;
}

.HTMLCanvas .HTMLCanvasElm {
    position: absolute;
}

.HTMLCanvas .LinearVectorInputElm {
    font-size: 12px;
    color: #ffffff;
    opacity: 0.6;
    width: auto;
}

.HTMLCanvas .LinearVectorInputElm input {
    background-color: transparent;

    color: inherit;
    font-size: inherit;
    text-align: center;

    padding: 4px;
    border: none;
}

.HTMLCanvas .LinearVectorInputElm:hover,
.HTMLCanvas .LinearVectorInputElm:focus,
.HTMLCanvas .LinearVectorInputElm:focus-within {
    opacity: 1;
}

.HTMLCanvas .LinearVectorInputElm input:hover,
.HTMLCanvas .LinearVectorInputElm input:focus {
    background-color: #000000a6;
}

.HTMLCanvas .graph canvas {
    position: absolute;
    top: 0;
    left: 0;
}
