* {box-sizing: border-box;}

html, body{
    height: 100%;
    margin: 0;
    background-color: #151515;
    overflow: hidden;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
}

.flexdiv{
    display: flex;
    justify-content: flex-start;
    height: 100%;
    overflow: auto;
    position: relative;
}
.fps{
    position: absolute;
    top: 16px;
    left: 18px;
    font-family: "Roboto", sans-serif;
    font-size: 12px;
    color: #219d80;
    pointer-events: none;
    z-index: 5;
}
.canv{
    transform: scale(4);
    flex: 0 1 auto;
    margin: auto;
    image-rendering: crisp-edges;
}

.simplebtn{
    padding: 10px 20px;
    cursor: pointer;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
}

.btn{
    padding: 10px 20px;
    position: absolute;
    left: 10px;
    top: 10px;
    cursor: pointer;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
}

.btn1{
    padding: 10px 20px;
    position: absolute;
    right: 24px;
    top: 10px;
    cursor: pointer;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
}

.gamebtn{
    display: block;
    font-family: "Roboto", sans-serif;
    background-color: transparent;
    color: wheat;
    border: 0;
    width: 100%;
    padding: 2px 20px;
    text-align: left;
    font-size: 18px;
    cursor: pointer;
}

.games{
    position: fixed;
    top: 0px;
    left: -650px;
    width: 650px;
    height: 100%;
    padding: 10px 0px;
    background-color: #2b2b2be6;
    color: wheat;
    transition: 0.2s;
    border-right: 1px solid wheat;
    overflow-y: scroll;
}

.options{
    position: fixed;
    top: 0px;
    right: -650px;
    width: 650px;
    height: 100%;
    background-color: #2b2b2be6;
    transition: 0.2s;
    border-left: 1px solid wheat;
    overflow-y: scroll;
}

.closebtn{
    position: absolute;
    font-family: "Roboto", sans-serif;
    top: 10px;
    padding: 5px 10px;
    color: wheat;
    background-color: orangered;
    border: 0;
    font-weight: bold;
    font-size: 22px;
    cursor: pointer;
}

.message{
    color: wheat;
    padding: 10px;
    text-align: center;
    font-size: 18px;
}

.savemsg{
    position: absolute;
    text-align: center;
    width: 100%;
    top: -50px;
    background-color: #a87a4a;
    padding: 10px 0px;
    color: white;
    font-size: 18px;
    transition: 0.2s;
}

.radiolabel{
    display: block;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 16px;
}

.optionsblock{
    display: inline-block;
    vertical-align: top;
    font-size: 16px;
    width: max-content;
    color: wheat;
    border: 1px solid;
    margin: 6px;
}

.optionsheader{
    background: wheat;
    color: #222;
    padding: 5px 20px;
    text-align: center;
}

input[type="radio"]{
    display: none;
}

.savename {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    font-size: 16px;
}

.imgdiv{
    display: none;
    position: absolute;
    top: 0px;
    left: 0px;
    align-content: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background-color: #02020280;
}

.fsimage{
    flex: 0 1 auto;
    align-self: center;
    max-height: 100%;
}

.fsimage1{
    flex: 0 1 auto;
    align-self: center;
    max-width: 100%;
}

.optionsbtndiv{
    display: flex;
    justify-content: space-evenly;
    margin-top: 20px;
}

/* HTML-легенда раскладки клавиатуры */
.kbdlegend{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background-color: #07070ccc;
    align-items: center;
    justify-content: center;
    overflow: auto;
}
.kbdlegendbox{
    background: #1d1d2b;
    color: #e8e8f0;
    padding: 16px 24px 20px;
    border-radius: 8px;
    max-width: 760px;
    width: 94%;
    max-height: 92%;
    overflow: auto;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
}
.kbdlegendbox h3{
    margin: 10px 0 4px;
    color: #a8e6ff;
    font-size: 15px;
}
.kbdlegendbox table{
    border-collapse: collapse;
    margin: 4px 0 8px;
}
.kbdlegendbox td,
.kbdlegendbox th{
    border: 1px solid #444;
    padding: 2px 10px;
    text-align: left;
}
.kbdlegendbox kbd{
    background: #2c2c40;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 0 5px;
}
.kbdlegendbox .muted{
    color: #9a9ab0;
}
/* кнопка «Открыть…» — загрузка .z80/.sna с диска, вверху меню игр */
.openbtn{
    border-bottom: 1px solid #7a5d2e;
    border-top: 2px solid #7a5d2e;
    background-color: #3d3d4d;
    font-weight: bold;
    margin-bottom: 6px;
}
.openbtn:hover{
    background-color: #4a4a5e;
}
