body,
html {
    height: 100%;
    background-color: black;
    color: white;
}

body {
    margin: 0;
    overflow: hidden;
}

body,
#box,
#top {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#box {
    color: #aaa;
    height: 20em;
    width: 30em;
    max-width: 80%;
    max-height: 80%;
    background-color: #333;
    border-radius: 0.4em;
    border: 2px solid #555;
    position: relative;
    flex-direction: column;
    transition-duration: 0.2s;
    overflow: hidden;
    font-family: monospace;
    font-weight: bold;
    font-size: 20px;
    margin: 5px;
    padding: 10px;
    text-align: center;
}

#box:hover,
#box[drag] {
    border-color: #1aafff;
    color: #ddd;
}

#input {
    cursor: pointer;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

#display {
    width: 100%;
    height: 100%;
}

select,
input[type='text'],
button {
    padding: 0 0.4em;
    margin: 0.5em 0.1em;
    width: 15em;
    max-width: 100%;
    font-family: monospace;
    font-weight: bold;
    font-size: 16px;
    background-color: #444;
    color: #aaa;
    border-radius: 0.4em;
    border: 1px solid #555;
    cursor: pointer;
    transition-duration: 0.2s;
    vertical-align: top;
    height: 2.5em;
}

select:hover,
button:hover {
    background-color: #666;
    color: #ddd;
}

.logo {
    width: 130px;
    height: 130px;
    filter: drop-shadow(0 0 8px white);
}

#top,
#version {
    margin: 5px;
}

#version button {
    fill: #aaa;
    width: auto;
    padding: 0.2em 0.3em;
    text-align: center;
    margin: 0.5em 0.1em;
}

#version svg {
    margin-top: 0.05em;
    margin-left: 0.05em;
    width: 1.8em;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    z-index: 2000;
    visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
}

.popup .content {
    background-color: #333;
    border-radius: 0.4em;
    border: 2px solid #555;
    padding: 1em;
    max-width: 80%;
    max-height: 80%;
    min-width: 30%;
    width: min-content;
    position: fixed;
    overflow-x: auto;
}

.show {
    visibility: visible;
}

.popup-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    visibility: hidden;
    top: 0;
    left: 0;
    z-index: 1000;
    opacity: 0;
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
}

.show ~ .popup-overlay {
    opacity: 1;
    visibility: visible;
}

.popup-animate .content {
    -webkit-transform: translateX(-50%) translateY(-50%) scale(0.7);
    -ms-transform: translateX(-50%) translateY(-50%) scale(0.7);
    transform: translateX(-50%) translateY(-50%) scale(0.7);
    opacity: 0;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
}

.show.popup-animate .content {
    -webkit-transform: translateX(-50%) translateY(-50%) scale(1);
    -ms-transform: translateX(-50%) translateY(-50%) scale(1);
    transform: translateX(-50%) translateY(-50%) scale(1);
    opacity: 1;
}

.popup .title,
.popup .options p {
    display: flex;
    align-items: center;
}

.popup .options p {
    margin: 0.5em 0;
    font-size: 18px;
}

.popup .title h1 {
    margin: 0 0 0.3em;
    font-size: 48px;
}

.popup .bottom {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1em;
}

.buttonbox {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.2em;
}

.buttonbox.last {
    margin-bottom: 0 !important;
}

.buttonbox p {
    margin: 0 !important;
}

.buttonbox select,
.buttonbox input[type='text'],
.buttonbox button {
    padding: 0 0.4em;
    margin: 0.5em;
    width: auto;
    font-size: 14px;
    height: 2em;
}

.buttonbox button:disabled,
.buttonbox select:disabled,
.buttonbox input[type='text']:disabled {
    background-color: #666;
    color: #aaa;
    cursor: not-allowed;
}

.hide {
    display: none !important;
}

.switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 25px;
    margin: 0.5em;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #1aafff;
}

input:focus + .slider {
    box-shadow: 0 0 1px #1aafff;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}
