@font-face {
    font-family: 'Crystal Radio Kit';
    src: url('fonts/CrystalRadioKit-Regular.woff2') format('woff2'),
        url('fonts/CrystalRadioKit-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Press Start 2P', cursive;
    background: url('/images/bg.jpg') repeat 0 0;
}

#screen {
    position: absolute;
    left: 75px;
    top: 65px;
    width: 512px;
    height: 384px;
    z-index: -1;
    border: 30px solid #000;
    box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);
    background: #000;
}

#tv {
    position: relative;
    left: 40px;
    top: 15px;
    width: 893px;
    height: 723px;
}

.tv {
    position: relative;
    z-index: 99;
    width: 895px;
}

#controls {
    position: fixed;

    padding: 0 40px;

    left: 50%;
    transform: translateX(-50%);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;

    bottom: 0;
    height: 120px;
    background: #000;
    border-radius: 20px 20px 0 0;
}

.hide {
    display: none;
}

label.checkbox {
    box-sizing: border-box;
    color: #fff;
    display: inline-block;
    font-family: 'JetBrains Mono', Arial, sans-serif;
    white-space: nowrap;
}

.button {
    appearance: button;
    background-color: #fff;
    background-image: none;
    border: 1px solid #000;
    border-radius: 4px;
    box-shadow: #fff 4px 4px 0 0, #000 4px 4px 0 1px;
    box-sizing: border-box;
    color: #000;
    cursor: pointer;
    display: inline-block;
    font-family: 'JetBrains Mono', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    margin: 0 5px 10px 0;
    overflow: visible;
    padding: 12px 40px;
    text-align: center;
    text-transform: none;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    vertical-align: middle;
    white-space: nowrap;
}

.button:focus {
    text-decoration: none;
}

.button:hover {
    text-decoration: none;
}

.button:active {
    box-shadow: rgba(0, 0, 0, .125) 0 3px 5px inset;
    outline: 0;
}

.button:not([disabled]):active {
    box-shadow: #fff 2px 2px 0 0, #000 2px 2px 0 1px;
    transform: translate(2px, 2px);
}

#controls input {
    background: #fff;
    color: #000;
    padding: 5px;
    font-family: 'JetBrains Mono', cursive;
}

input[type="file"] {
    display: none;
}

#babble-container {
    display: flex;
    position: absolute;
    top: 40px;
    left: 1000px;
}

.babble {
    width: 400px;
    background: #fff;
    border: solid 2px #000;
    padding: 10px;
    margin-right: 20px;
}

.babble h2 {
    font-family: 'Crystal Radio Kit', cursive;
    font-size: 40px;
    padding: 0;
    margin: 0;
    letter-spacing: 2px;
}

.babble ul {
    font-size: 12px;
}

.babble ul li {
    margin-bottom: 10px;
    line-height: 16px;
}

.logo {
    font-family: 'Yantramanav', sans-serif;
    color: #fff;

    background-color: #000;
    border-radius: 10px;
    text-align: center;
    width: 300px;

    margin: 0 auto;
    margin-bottom: 40px;
}

.logo h4 {
    font-weight: 900;
    font-size: 30px;
    letter-spacing: 1px;
    margin: 0;
    padding: 0;
}

.inner-logo {
    font-size: 20px;
    font-weight: 300;

    color: #000;

    line-height: 1.1em;
    letter-spacing: 5px;

    background-color: #fff;

    border-radius: 2px;
    padding: 7px 0 0 0;
    margin: 0 4px;
}

.inner-logo .rgb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.inner-logo .rgb div {
    display: inline-block;
    width: 70px;
    height: 24px;
}

.inner-logo .rgb div:nth-child(1) {
    background: #ff0000;
}

.inner-logo .rgb div:nth-child(2) {
    background: #00FF00;
}

.inner-logo .rgb div:nth-child(3) {
    background: #0000ff;
}

#about {
    font-size: 10px;
    color: #fff;
    position: fixed;
    bottom: 10px;
    width: 100%;
    text-align: center;
}

#about a {
    color: #fff;
}

#wavcassette {
    max-width: 142px;
}

#debugger {
    display: flex;
    flex-direction: column;

    display: none;

    position: absolute;
    left: 1000px;
    top: 20px;

    padding: 10px 20px 20px 20px;

    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;

    background: #fff;
    width: 750px;

    border: solid 2px #000;
    box-shadow: #0000008c 2px 2px 10px 0px;
}

#header {
    position: relative;
    height: 50px;
}

#header h2 {
    padding: 0;
    margin: 0;
}

#close {
    position: absolute;
    right: 0;
    top: 10px;
}

#history {
    height: 600px;
    width: 750px;

    overflow-y: scroll;
    overflow-x: hidden;
}

#debugcontrols {
    margin: 20px;
}

#history table td,
#history table th {
    padding: 2px 10px;
    text-align: left;
}

#history table tr:nth-child(1) td:nth-child(1) div::before {
    font: var(--fa-font-solid);
    content: "\f061";
    background-color: red;
    width: 125px;
    padding: 4px;
}

#history table tbody tr:nth-child(1) {
    font-weight: bold;
}

input.register {
    width: 30px;
    z-index: 1000;
}

input.flags-edit {
    transform: scale(.8);
    margin: 0;
}

#flags {
    display: flex;
    flex-direction: row;
}

#flags>div {
    margin: 0 3px;
}

#keyboard {
    width: 700px;

    padding: 50px;

    position: absolute;
    left: 967px;
    top: 111px;
    z-index: 999;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: bold;

    background-color: #000;
    box-shadow: #0000008c 2px 2px 10px 0px;
}

/* #keyboard::before {
    height: 40px;
    width: 900px;
    content: ' ';
    background-color: blue;
    ;
} */

#keyboard .row {
    display: flex;
    flex-direction: row;
    margin-top: 25px;
}

#keyboard .row .key {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #000;
    width: 40px;
    padding: 3px;
    margin: 0px 5px;
}

.control {
    font-size: 12px;
    color: #fff;
    position: absolute;
    top: -16px;
}

.special {
    background-color: #89dd35;
    margin-left: 3px;
}

#keyboard>div:nth-child(2)>div:nth-child(12)>span:nth-child(2),
#keyboard>div:nth-child(3)>div:nth-child(11)>span:nth-child(2),
#keyboard>div:nth-child(4)>div:nth-child(1)>span:nth-child(2),
#keyboard>div:nth-child(4)>div:nth-child(12)>span:nth-child(2) {
    font-size: 10px;
}

#keyboard .row .key.shift {
    flex-direction: column;
    font-size: 12px;
}

#printer {
    width: 500px;
    height: 400px;

    position: absolute;
    left: 967px;
    top: 111px;

    overflow: hidden;
    border: solid 3px #000;
    z-index: 999;
}

#printer .toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;

    color: #fff;
    
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;

    background-color: #000;
    z-index: 999;
    padding-left: 5px;
}

#printer textarea {
    position: absolute;
    left: 0;
    right: 0;
    top: 20px;
    bottom: 0;
    z-index: 998;

    resize: none;
    
    font-family: 'Courier New', Courier, monospace;
}

#debugoptions {
    margin-bottom: 10px;
}

#debugoptions fieldset {
    display: flex;
}

#debugoptions fieldset div {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

#debugoptions fieldset div input {
    padding: 0;
    margin: 5px;
}

.hidden {
    display: none !important;
}

td.cycle {
    text-align: right !important;
}

p {
    font-size: 12px;
    line-height: 16px;
}

.scanlines .overlay {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1;
}

.overlay::after {
    position: absolute;
    width: 650px;
    height: 500px;
    content: "";
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.overlay::before {
    position: absolute;
    width: 650px;
    height: 500px;
    content: " ";
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}