html, body {
    padding: 0;
    margin: 0;
    overflow: hidden;
    overflow-x: hidden;
    -webkit-text-size-adjust: none;
    width: 100%;
    height: 100%;
    position: fixed;
    color: #333;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
}
h2 {
    margin: 20px 0 10px;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.1;
}
hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #eee;
}
.form-group {
    margin-bottom: 15px;
}
.form-control {
    box-sizing: border-box;
    height: 34px;
    padding: 6px 12px;
    color: #555;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}
.btn {
    display: inline-block;
    padding: 6px 12px;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    font: inherit;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
}
.btn-primary { background: #337ab7; border-color: #2e6da4; }
.btn-warning { background: #f0ad4e; border-color: #eea236; }
.btn-info { background: #5bc0de; border-color: #46b8da; }
.btn-destiny { background: #111820; border-color: #111820; }
.btn:hover { filter: brightness(.94); }
.btn:focus-visible, .form-control:focus-visible, input[type=checkbox]:focus-visible {
    outline: 3px solid rgba(51, 122, 183, .35);
    outline-offset: 2px;
}
.text-muted { color: #777; }
input[type=checkbox] {
    cursor: pointer;
}
[hidden] {
    display: none !important;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#overlays, #connecting {
    opacity: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
}
#connecting {
    z-index: 100;
}
#connecting-content {
    width: 350px;
    background-color: #fff;
    margin: 100px auto;
    border-radius: 15px;
    padding: 5px 15px;
}
#skin {
    width: 33%;
    float: right;
}
#gamemode {
    margin-top: 5px;
    width: 100%;
}
#helloDialog {
    width: calc(100% - 20px);
    max-width: 390px;
    max-height: calc(100vh - 20px);
    box-sizing: border-box;
    overflow-y: auto;
    background-color: #fff;
    margin: 10px auto;
    border-radius: 20px;
    padding: 24px 26px 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 55px rgba(0, 0, 0, .25);
}
.landing-brand {
    margin-bottom: 20px;
    text-align: center;
}
#title {
    margin: 0;
    padding: 0;
    color: #20252b;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -.7px;
}
.landing-brand p {
    margin: 6px 0 0;
    color: #7a8087;
    font-size: 15px;
}
.anonymous-entry {
    margin-bottom: 11px;
}
#nick {
    display: block;
    width: 100%;
    height: 46px;
    font-size: 16px;
}
.play-actions {
    display: grid;
    gap: 9px;
}
.play-actions .btn {
    display: block;
    width: 100%;
    min-height: 46px;
    font-size: 16px;
    font-weight: 600;
}
.landing-status {
    margin: 10px 2px 0;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
}
.landing-status.error {
    color: #a94442;
}
.control-preference {
    margin: 16px 0 0;
    text-align: center;
}
.control-preference label {
    cursor: pointer;
    user-select: none;
}
.control-preference input {
    margin: 0 5px 0 0;
    vertical-align: -1px;
}
#instructions {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid #eee;
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}
#chat_textbox {
    transition: all .5s ease-in-out;
    position: absolute;
    z-index: 1;
    bottom: 10px;
    background: rgba(0, 0, 0, .2);
    border: 0px;
    outline: none;
    color: #fff;
    height: 30px;
    text-indent: 12px;
    left: 10px;
    width: 300px;
    font-family: "Ubuntu";
}
#chat_textbox:focus {
    background: rgba(0, 0, 0, .5);
}
#footer {
    text-align: center;
    margin-top: 15px;
    font-size: 11px;
}
#all-time-leaderboard-btn {
    padding: 0;
    color: #4d667e;
    background: none;
    border: 0;
    border-bottom: 1px solid currentColor;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
#all-time-leaderboard-btn:hover {
    color: #20252b;
}
#all-time-leaderboard {
    width: calc(100% - 20px);
    max-width: 460px;
    max-height: calc(100vh - 20px);
    box-sizing: border-box;
    overflow-y: auto;
    padding: 22px 24px 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #20252b;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .25);
}
.all-time-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.all-time-header h2 {
    margin: 0;
    font-size: 25px;
    font-weight: 700;
}
.all-time-header p {
    margin: 6px 0 0;
    color: #7a8087;
    font-size: 13px;
}
#all-time-leaderboard-close {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    padding: 0;
    color: #66717c;
    background: #f0f2f4;
    border: 0;
    border-radius: 50%;
    font-size: 25px;
    line-height: 30px;
    cursor: pointer;
}
#all-time-leaderboard-status {
    margin: 24px 0 8px;
    text-align: center;
}
#all-time-leaderboard-list {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: all-time-rank;
}
#all-time-leaderboard-list li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border-bottom: 1px solid #edf0f2;
    counter-increment: all-time-rank;
}
#all-time-leaderboard-list li::before {
    content: counter(all-time-rank);
    color: #89939d;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.all-time-name {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.all-time-score {
    color: #337ab7;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
#play-btn {
    width: 100%;
}
#spectate-btn {
    width: 28%;
    float: right;
    top: 0;
}
#play-btn, #spectate-button {
    display: inline;
}
#gallery-btn {
    width: 100%;
    margin-bottom: 5px;
    display: none; /* Visible when skins are loaded */
}
#movement-diagnostics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 8px 0 2px;
}
#movement-diagnostics .btn {
    padding: 5px 8px;
}
.btn-diagnostic {
    background: #5a6268;
    border-color: #545b62;
}
.btn-diagnostic.recording {
    background: #c9302c;
    border-color: #ac2925;
}
.btn-diagnostic-export {
    background: #337ab7;
    border-color: #2e6da4;
}
.btn:disabled {
    cursor: not-allowed;
    filter: grayscale(.65);
    opacity: .55;
}
#diagnostics-status {
    grid-column: 1 / -1;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
}
#diagnostics-indicator {
    position: fixed;
    top: 10px;
    left: 50%;
    z-index: 5;
    transform: translateX(-50%);
    padding: 5px 9px;
    color: #fff;
    background: rgba(150, 0, 0, .8);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
}
#touchpad, #touchCircle, #splitBtn, #ejectBtn {
    position: fixed;
}
#touchpad, #splitBtn, #ejectBtn {
    z-index: 2;
}
#touchpad {
    background: #000;
    opacity: 0.3;
    width: 20vw;
    height: 20vh;
    left: 0;
    bottom: 0;
}
#touchCircle {
    width: 4vw;
    height: 4vw;
    border-radius: 2vw;
    background: #f00;
    opacity: 0.3;
    z-index: 3;
}
#splitBtn, #ejectBtn {
    width: 8vw;
    height: 8vw;
    border-radius: 4vw;
    background: #777;
    opacity: 0.5;
}
#splitBtn {
    right: 18vw;
    bottom: 0;
}
#ejectBtn {
    bottom: 18vw;
    right: 0;
}
#playSounds:checked + #soundsVolume {
    display: inline;
}
#soundsVolume {
    display: none;
    width: 100px;
    height: 18px;
    padding: 0; /* IE fix */
    vertical-align: middle;
}
#settings label {
    margin-right: 10px;
    user-select: none;
}

@media (max-height: 560px) {
    #helloDialog {
        padding-top: 18px;
        padding-bottom: 16px;
    }
    .landing-brand {
        margin-bottom: 14px;
    }
    #instructions {
        margin-top: 12px;
        padding-top: 10px;
    }
}
