@font-face{
    font-family: 'JetBrains Mono';
    src: url("JetBrainsMono-Regular.ttf"), url("JetBrainsMonoNL-Regular.ttf");
    font-weight: 400;
    font-style: normal;
}

*{
    box-sizing: border-box;
}

body {
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: hidden;
}

canvas#canvas {
    max-width: 1200px;
    max-height: 600px;

    width: calc(min(50vw, 100vh) * 2);
    height: calc(min(50vw, 100vh));

    box-shadow: 0 0 2px white;
}


div#controls{
    position: absolute;
    top: 0;
    left: 0;
    padding: 7px;
}
div#controls * {
    user-select: none;
}
div#controls *{
    color: white;
    font-family: 'JetBrains Mono', monospace;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: default;
    outline: none;
    text-shadow: 1px 1px 8px black;
    font-size: min(18px, 3.2vw);
    white-space: nowrap;
}
div#controls>*{
    padding: 3px;
}
div#controls input[type='range']:hover{
    color: initial;
}
div#controls button, div#controls input {
    cursor: pointer;
}
div#controls button:hover {
    outline: 1px solid white;
}
div#controls input[type="number"]{
    width: 2.5em;
    outline: 1px solid white;
    outline-offset: 4px;
    margin-right: 8px;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}
div#controls sub {
    font-size: 70%;
}
div#controls input[type=range]{
    -webkit-appearance: none;
    appearance: none;
    -moz-appearance: none;
    background: transparent;
    width: 10em;
}
div#controls input[type=range]::-webkit-slider-thumb{
    -webkit-appearance: none;
    display: block;
    background: white;
    width: .2em;
    height: .8em;
    border-radius: 0;
    position: relative;
    top: -.3em;
    border: none;
}
div#controls input[type=range]::-moz-range-thumb{
    -moz-appearance: none;
    display: block;
    background: white;
    width: .2em;
    height: .8em;
    border-radius: 0;
    border: none;
    transform: translateY(.5em);
}
div#controls input[type=range]::-webkit-slider-runnable-track{
    -webkit-appearance: none;
    background: white;
    height: .2em;
    border-radius: .1em;
    position: relative;
    bottom: .3em;
}
div#controls input[type=range]::-moz-range-track{
    -moz-appearance: none;
    background: white;
    height: .2em;
    border: none;
    border-radius: .1em;
    transform: translateY(.5em);
}

#settings-icon {
    display: none;
}

div#controls>#settings-icon-label {
    display: inline-block;
    width: 1em;
    height: 1em;
    padding: 0;
    margin: 0;
    border: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97l-.75-5.3c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3c-1.22.51-2.35 1.17-3.38 1.97l-4.98-2.01c-.45-.17-.97 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31c-.08.64-.14 1.29-.14 1.95s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3c1.22-.51 2.35-1.17 3.38-1.97l4.98 2.01c.45.17.97 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zm-14.86 5.05c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z' fill='white'/%3E%3C/svg%3E");
    background-size: cover;
}

div#controls>#settings-icon:not(:checked) ~ * {
    display: none;
}