@font-face {
    font-family: "VT323";
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/vt323/v12/pxiKyp0ihIEF2isfFJXUdVNF.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
    box-sizing: border-box;
}

html {
    font-family: "VT323", monospace;
    font-size: 12px;
}

body {
    background-color: #111;
    margin: 0;
    padding: 2ch;
    /* vietnamese */
}

#menu {
    width: auto;
    background-color: black;
    padding-top: 60px;
}

#mobile {
    margin: auto;
    width: 100%;
    position: relative;
    text-align: center;
    display: none;
}

#mobile img {
    width: 80%;
}

#mobile h1 {
    font-size: 24px;
    margin: 20px;
    text-align: center;
}

#logo {
    background-image: url("retro.png");
    background-repeat: no-repeat;
    background-size: 320px 200px;
    width: 320px;
    height: 200px;
    margin: auto;
}

#text {
    color: white;
    text-align: center;
    padding-top: 20px;
    margin: auto;
    width: auto;
    text-transform: uppercase;
}

h1 {
    margin: auto;
    color: white;
    padding-top: 10px;
    width: auto;
}

h1 a {
    color: white;
}

#buttons {
    width: auto;
    text-align: center;
    margin: auto;
    padding-top: 15px;
}

#container {
    max-width: 930px;
    margin: auto;
}

#monitor {
    background: #000;
    position: relative;
    border-top: 3px solid #444;
    margin: 5%;
    padding: 2% 2% 4% 2%;
    border-radius: 10px;
    border-bottom-left-radius: 50% 2%;
    border-bottom-right-radius: 50% 2%;
    transition: margin-right 1s;
    display: none;
}

#monitor:after {
    content: "";
    display: block;
    position: absolute;
    bottom: 3%;
    left: 36%;
    height: 0.5%;
    width: 28%;
    background: #666;
    border-radius: 20%;
    box-shadow: 0 0 3px 0 white;
}

#monitorscreen {
    position: relative;
    background-color: #000;
    background-size: cover;
    background-position: top center;
    height: 0;
    padding-bottom: 75.2%;
    position: relative;
    overflow: hidden;
}

@media all and (min-width: 960px) {
    #monitor {
        -webkit-animation: tvflicker 3s infinite alternate;
        -moz-animation: tvflicker 3s infinite alternate;
        -o-animation: tvflicker 3s infinite alternate;
        animation: tvflicker 3s infinite alternate;
    }

    @-webkit-keyframes tvflicker {
        0% {
            box-shadow: 0 0 100px 0 rgba(213, 88, 16, 0.4);
        }
        100% {
            box-shadow: 0 0 95px 0 rgba(72, 32, 8, 0.45);
        }
    }
    @-moz-keyframes tvflicker {
        0% {
            box-shadow: 0 0 100px 0 rgba(213, 88, 16, 0.4);
        }
        100% {
            box-shadow: 0 0 60px 0 rgba(72, 32, 8, 0.6);
        }
    }
    @-o-keyframes tvflicker {
        0% {
            box-shadow: 0 0 100px 0 rgba(213, 88, 16, 0.4);
        }
        100% {
            box-shadow: 0 0 60px 0 rgba(72, 32, 8, 0.6);
        }
    }
    @keyframes tvflicker {
        0% {
            box-shadow: 0 0 100px 0 rgba(213, 88, 16, 0.4);
        }
        100% {
            box-shadow: 0 0 60px 0 rgba(72, 32, 8, 0.6);
        }
    }
}

/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
canvas {
    background-color: black;
    width: 100%;
}

.vspace {
    margin-top: 20px !important;
}

.h {
    color: #8888aa !important;
}

.btn {
    background: #7c7c7c;
    border-bottom: 6px inset rgba(0, 0, 0, 0.5);
    border-left: 6px inset rgba(0, 0, 0, 0.5);
    border-right: 6px inset rgba(255, 255, 255, 0.5);
    border-top: 6px inset rgba(255, 255, 255, 0.5);
    box-sizing: border-box;
    color: white;
    cursor: pointer;
    display: inline-block;
    font-size: 2.2rem;
    margin: 1rem;
    padding: 0.5rem;
    padding-left: 15px;
    padding-right: 15px;
    text-transform: uppercase;
    width: auto;

    &:focus,
    &:hover {
        background: #bcbcbc;
    }
}

.btn.grey {
    background: #666666;

    &:focus,
    &:hover {
        background: #555555;
    }
}

.btn.primary {
    background: #881400;

    &:focus,
    &:hover {
        background: #a81000;
    }
}

.btn.secondary {
    background: #005800;

    &:focus,
    &:hover {
        background: #006800;
    }
}

.btn.tertiary {
    background: #0000bc;

    &:focus,
    &:hover {
        background: #0000fc;
    }
}

.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}

#footer {
    color: white;
    text-align: center;
    margin: auto;
    width: auto;
    text-transform: uppercase;
    background-color: #000;
    color: #d75810;
    font-size: 24px;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    padding-top: 0px;
}

.writer {
    animation: animated-text 2s steps(30, end) 1s 1 normal both;
}

@keyframes animated-text {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.pinput {
    padding-top: 25px;
    padding-bottom: 25px;
}

input[type="text"] {
    font-family: "VT323", monospace;
    font-size: 26px;
    outline-width: 0;
    color: white;
    border: 3px solid white;
    -webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
    padding: 9px;
    background: rgba(0, 0, 0, 0.5);
    margin: 0 0 10px 0;
}

#joystick1 {
    display: none;
}

#joystick2 {
    display: none;
}

/* if browser window is 600px or smaller */
/* vertical mobile phone */

@media only screen and (max-width: 760px) and (orientation: portrait) {
    #logo {
        background-size: 120px 80px;
        width: 120px;
        height: 80px;
        margin: auto;
    }
    html {
        font-family: "VT323", monospace;
        font-size: 7px;
    }
    .vspace {
        margin-top: 5px !important;
    }
    #footer {
        font-size: 12px;
    }
    #text {
        padding-top: 5px;
    }
    #buttons {
        padding-top: 5px;
    }
    input[type="text"] {
        font-family: "VT323", monospace;
        font-size: 12px;
    }
    #monitor {
        margin: 0%;
    }
    #menu {
        width: auto;
        padding-top: 0px;
    }
    #joystick1 {
        position: relative;
        width: 50%;
        height: 200px;
        float: left;
        display: block;
    }

    #joystick2 {
        position: relative;
        width: 50%;
        height: 200px;
        float: right;
        display: block;
    }
}

@media only screen and (min-device-width: 320px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape) {
    html {
        font-family: "VT323", monospace;
        font-size: 8px;
    }
    #container {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    #mobile img {
        width: 40%;
    }
    #monitor {
        margin-top: 0;
        margin-bottom: 1%;
        width: 58%;
    }
    #joystick1 {
        display: table-cell;
        position: absolute;
        left: 3%;
        top: 50%;
        width: 150px;
        height: 100px;
    }
    #joystick2 {
        display: table-cell;
        position: absolute;
        right: 3%;
        top: 50%;
        width: 150px;
        height: 100px;
    }
    #logo {
        background-size: 120px 80px;
        width: 120px;
        height: 80px;
        margin: auto;
    }
    .vspace {
        margin-top: 5px !important;
    }
    #footer {
        font-size: 14px;
    }
    #text {
        padding-top: 5px;
    }
    #buttons {
        padding-top: 4px;
    }
    input[type="text"] {
        font-family: "VT323", monospace;
        font-size: 12px;
    }
    #menu {
        width: auto;
        padding-top: 0px;
    }
}
