body {
    background: transparent;
    font-family: sans-serif;
    height: 100vh;
    overflow: hidden;
}

#unsupported {
    display: none;
    text-align: center;
    width: 100vw;
    margin: 60px 0;
}

body.unsupported #unsupported {
    display: block;
}

body.unsupported #instructions,
body.unsupported #placeholder,
body.unsupported #gamepad {
    display: none;
}

#instructions {
    position: fixed;
    top: 0;
    left: 0;
    height: auto;
    line-height: 2em;
    text-align: center;
    width: 100vw;
}

@keyframes press-button {
    0% {
        fill: #898989;
        filter: drop-shadow(0 0 0 rgb(0 229 48 / 0.4));
    }

    7% {
        fill: #898989;
        filter: drop-shadow(0 0 0 rgb(0 229 48 / 0.4));
    }

    10% {
        fill: #00e530;
        filter: drop-shadow(0 0 5px rgb(0 229 48 / 0.4));
    }

    17% {
        fill: #00e530;
        filter: drop-shadow(0 0 5px rgb(0 229 48 / 0.4));
    }

    20% {
        fill: #898989;
        filter: drop-shadow(0 0 0 rgb(0 229 48 / 0.4));
    }

    27% {
        fill: #898989;
        filter: drop-shadow(0 0 0 rgb(0 229 48 / 0.4));
    }

    30% {
        fill: #00e530;
        filter: drop-shadow(0 0 5px rgb(0 229 48 / 0.4));
    }

    37% {
        fill: #00e530;
        filter: drop-shadow(0 0 5px rgb(0 229 48 / 0.4));
    }

    40% {
        fill: #898989;
        filter: drop-shadow(0 0 0 rgb(0 229 48 / 0.4));
    }

    100% {
        fill: #898989;
        filter: drop-shadow(0 0 0 rgb(0 229 48 / 0.4));
    }
}

#placeholder svg {
    height: 90%;
    left: 50%;
    max-width: 600px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
}

#placeholder #a-button path {
    animation: press-button 5s linear infinite;
}

#gamepad {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

#overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 8px 0;
    display: flex;
    justify-content: center;
    align-self: center;
}

#overlay > span {
    padding: 0 8px;
}

#overlay #color,
#overlay #triggers {
    display: none;
}

#overlay select {
    padding: 4px 0;
    border-radius: 4px;
    background: whitesmoke;
    border: none;
}

#help-popout {
    background: whitesmoke;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    color: black;
    display: none;
    font-size: 0.9em;
    left: 50%;
    min-width: 400px;
    width: 600px;
    max-height: 100vh;
    overflow-y: auto;
    padding: 20px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

#help-popout.active {
    display: block;
}

#help-popout h2 {
    margin-bottom: 1.5em;
    margin-top: 0;
}

#help-popout h3 {
    margin-top: 1.5em;
}

#help-popout p:last-child {
    margin-bottom: 0;
}

#help-popout table {
    border-collapse: collapse;
    border-spacing: 0;
    max-width: 100%;
    width: 100%;
}

#help-popout th {
    text-align: left;
}

#help-popout th,
#help-popout td {
    border-top: 1px solid #ddd;
    line-height: 1.42857143;
    padding: 8px;
    vertical-align: top;
}

#help-popout table > thead > tr > th {
    border-bottom: 2px solid #ddd;
    border-top: 0;
    vertical-align: bottom;
}

kbd {
    -moz-border-radius: 0.3em;
    -moz-user-select: none;
    -webkit-border-radius: 0.3em;
    -webkit-user-select: none;
    border-radius: 0.3em;
    border: none;
    cursor: default;
    display: inline-block;
    display: inline;
    font: normal 1em monospace;
    margin: 0 0.2em;
    min-width: 1em;
    padding: 0.2em 0.6em;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    user-select: none;
}

kbd[title],
.key[title] {
    cursor: help;
}

kbd {
    -moz-box-shadow: inset 0 0 1px rgb(150, 150, 150),
        inset 0 -0.05em 0.4em rgb(80, 80, 80), 0 0.1em 0 rgb(30, 30, 30),
        0 0.1em 0.1em rgba(0, 0, 0, 0.3);
    -webkit-box-shadow: inset 0 0 1px rgb(150, 150, 150),
        inset 0 -0.05em 0.4em rgb(80, 80, 80), 0 0.1em 0 rgb(30, 30, 30),
        0 0.1em 0.1em rgba(0, 0, 0, 0.3);
    background: -moz-linear-gradient(top, rgb(60, 60, 60), rgb(80, 80, 80));
    background: -webkit-gradient(
        linear,
        left top,
        left bottom,
        from(rgb(60, 60, 60)),
        to(rgb(80, 80, 80))
    );
    background: rgb(80, 80, 80);
    box-shadow: inset 0 0 1px rgb(150, 150, 150),
        inset 0 -0.05em 0.4em rgb(80, 80, 80), 0 0.1em 0 rgb(30, 30, 30),
        0 0.1em 0.1em rgba(0, 0, 0, 0.3);
    color: rgb(250, 250, 250);
    text-shadow: -1px -1px 0 rgb(70, 70, 70);
}
