* {
    margin: 0;
    padding: 0;
}

:root {
    --room-background: #d8d0c4;
    --room-background-center: #f1ede5;
    --room-background-middle: #dfd8cc;
}

html[data-room-phase='night'] {
    --room-background: #111620;
    --room-background-center: #2e3542;
    --room-background-middle: #1d2430;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(
        ellipse at 50% 40%,
        var(--room-background-center) 0%,
        var(--room-background-middle) 44%,
        var(--room-background) 100%
    );
}

#webgl,
#css,
#overlay {
    background: transparent;
}

.webgl {
    position: fixed;
    top: 0;
    left: 0;
    outline: none;
}

.jitter {
    animation-duration: 0.3s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-name: jittery;
    z-index: -10;
}

.interface-wrapper {
    width: 100%;
    top: 64px;
    left: 64px;
}

.icon-control-container {
    height: 26.5px;
    width: 26.5px;
}

.icon-control-container:focus-visible {
    outline: 2px solid white;
    outline-offset: 3px;
    box-shadow: 0 0 0 5px #152839;
}

@media (prefers-reduced-motion: reduce) {
    .jitter, .blinking-cursor { animation: none; }
}

@media only screen and (max-width: 768px) {
    .interface-wrapper {
        width: 100%;
        top: 24px;
        left: 24px;
    }

    .icon-control-container {
        height: 19.5px;
        width: 19.5px;
    }
}

@keyframes jittery {
    10% {
        transform: translate(-0.1px, -0.15px) scale(1, 1);
    }

    20% {
        transform: translate(0.15px, 0.1px) scale(1, 1);
    }

    30% {
        transform: translate(-0.2px, -0.25px) scale(1, 1);
    }

    40% {
        transform: translate(0.05px, 0.1px) scale(1, 1);
    }

    50% {
        transform: translate(-0.025px, -0.05px) scale(1, 1);
    }

    60% {
        transform: translate(0px, 0.075px) scale(1, 1);
    }

    70% {
        transform: translate(-0.075px, -0.1px) scale(1, 1);
    }

    80% {
        transform: translate(0.075px, 0.125px) scale(1, 1);
    }

    90% {
        transform: translate(-0.125px, -0.075px) scale(1, 1);
    }

    100% {
        transform: translate(0.075px, 0.025px) scale(1, 1);
    }
}

.room-load-error {
  pointer-events: auto;
  position: fixed;
  z-index: 80;
  top: 50%;
  left: 50%;
  width: min(430px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 1.15rem 1.25rem 1.2rem;
  transform: translate(-50%, -50%);
  border: 1px solid #9aa98e;
  border-radius: 4px;
  background: #f4f1e6;
  box-shadow: 0 18px 52px #0b121733, 0 2px 7px #0b121722;
  color: #26372b;
  font: 14px/1.55 Arial, sans-serif;
}

.room-load-error-kicker {
  margin: 0 0 .35rem;
  color: #60705d;
  font: 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.room-load-error h2 {
  margin: 0;
  color: #26372b;
  font: 500 25px/1.15 Georgia, 'Times New Roman', serif;
  letter-spacing: -.02em;
}

.room-load-error p:not(.room-load-error-kicker) {
  margin: .55rem 0 1rem;
  color: #34473d;
  font: 14px/1.55 Arial, sans-serif;
}

.room-load-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.room-load-error-actions > * {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: .35rem .7rem;
  border: 1px solid #6e8068;
  border-radius: 2px;
  background: #fffdf5;
  color: #26372b;
  font: 12px/1.2 Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.room-load-error-actions button {
  border-color: #365b40;
  background: #365b40;
  color: #fffef8;
}

.room-load-error-actions > *:hover { border-color: #26372b; }
.room-load-error-actions > *:focus-visible { outline: 2px solid #26372b; outline-offset: 3px; }

h1,
h2,
h3,
h4,
h5,
p {
    /* font-family: ocr-a-std, monospace; */
    font-family: monospace;
    font-weight: 400;
    font-style: normal;
    color: white;
    /* mobile friendly font size */
    font-size: 16px;
}

/* if on mobile */
@media only screen and (max-width: 768px) {
    h1,
    h2,
    h3,
    h4,
    h5,
    p {
        font-size: 10px;
    }
}

br {
    padding-top: 8px;
    padding-bottom: 8px;
    height: 16px;
}

.loading::after {
    display: inline-block;
    animation: dotty steps(1, end) 1s infinite;
    content: '';
}

@keyframes dotty {
    0% {
        content: '   ';
    }
    25% {
        content: '. ';
    }
    50% {
        content: '.. ';
    }
    75% {
        content: '...';
    }
    100% {
        content: '   ';
    }
}
.blinking-cursor {
    background-color: #fff;
    width: 0.8em;
    height: 0.15em;
    -webkit-animation: 0.65s blink step-end infinite;
    -moz-animation: 0.65s blink step-end infinite;
    -ms-animation: 0.65s blink step-end infinite;
    -o-animation: 0.65s blink step-end infinite;
    animation: 0.65s blink step-end infinite;
}

@keyframes blink {
    from,
    to {
        background-color: transparent;
    }
    50% {
        background-color: white;
    }
}

@-moz-keyframes blink {
    from,
    to {
        background-color: transparent;
    }
    50% {
        background-color: white;
    }
}

@-webkit-keyframes blink {
    from,
    to {
        background-color: transparent;
    }
    50% {
        background-color: white;
    }
}

@-ms-keyframes blink {
    from,
    to {
        background-color: transparent;
    }
    50% {
        background-color: white;
    }
}

@-o-keyframes blink {
    from,
    to {
        background-color: transparent;
    }
    50% {
        background-color: white;
    }
}

.bios-start-button {
    background-color: #000;
    border: 4px solid #fff;
    border-width: 4px 3px 4px 3px;
}

.bios-start-button p {
    box-sizing: border-box;
    padding: 8px;
}

.bios-start-button:hover p {
    background-color: #fff;
    cursor: pointer;
    color: #000;
}

.loading-screen-header {
    padding: 48px;
}

.loading-screen-body {
    padding-left: 48px;
    padding-right: 48px;
}

.loading-screen-footer {
    padding: 48px;
    padding-bottom: 64px;
}

.info-wrapper {
    top: 64px;
    left: 64px;
}

/* if on mobile make all loading screen elements have a padding of 16 */
@media only screen and (max-width: 768px) {
    .loading-screen-header {
        padding: 16px;
    }

    .info-wrapper {
        top: 16px;
        left: 16px;
    }

    .blinking-cursor {
        background-color: #fff;
        width: 0.4em;
        height: 0.08em;
        -webkit-animation: 0.65s blink step-end infinite;
        -moz-animation: 0.65s blink step-end infinite;
        -ms-animation: 0.65s blink step-end infinite;
        -o-animation: 0.65s blink step-end infinite;
        animation: 0.65s blink step-end infinite;
    }
    
    .loading-screen-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .loading-screen-footer {
        padding: 16px;
        padding-bottom: 32px;
    }
}

