body {
    overflow: hidden;
    user-select: none;
}

.stage {
    display: none;
}
.stage.active {
    display: block;
}
.stage.results {
    height: 100vh;
    overflow-y: auto;
}

.stage.results span.good {
    color: var(--success);
}
.stage.results span.bad {
    color: var(--failed);
}

.queue,
.result-contents {
    max-width: 750px;
    margin: 0 auto;
}

.result-contents.daily-challenge,
.result-contents.challenge {
    margin-top: 75px;
}

.queue h2 {
    margin: 70px 0px 5px 0px;
    text-align: center;
}
.queue p {
    margin: 5px 0px 30px 0px;
    text-align: center;
}
.queue li {
    font-weight: bold;
}
.queue .button {
    text-align: center;
}

.queue a.copy {
    cursor: pointer;
}

.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
}

.countdown.active h2 {
    transform: scale(1);
    color: black;
}
.countdown h2 {
    transform: scale(100);
    color: white;
    font-size: 100px;
    transition: 1s ease-in;
}

.result-contents h2 {
    text-align: center;
}

.result-contents .player {
    margin: 15px 0px;
    cursor: pointer;
}
.result-contents .player.you {
    margin: 0px -15px;
    padding: 15px;
    border-radius: 10px;
    background-color: var(--bg-sec);
}

.result-contents .player h4 {
    margin: 0px 0px 4px 0px;
}
.result-contents .player p {
    margin: 4px 0px 0px 0px;
}

.result-contents:not(.challenge) .battle-results {
    margin-bottom: 100px;
}

.result-contents .new-game {
    text-align: center;
    margin: 25px 0px;
}

.result-contents .battle-results ul {
    width: 400px;
    display: block;
    margin: 25px auto;
    padding-inline-start: 0;
}
.result-contents .battle-results li {
    display: flex;
}
.result-contents .battle-results li b {
    flex: 1;
}

.result-contents .exit {
    text-align: center;
}
.result-contents .description {
    margin-top: 50px;
}

div.home,
div.toolbar {
    position: fixed;
    top: 25px;
    left: 25px;
    height: 50px;
    background-color: var(--bg-pri);
    border: 1px solid var(--bg-sec);
    border-radius: 10px;
    display: flex;
    align-items: center;
}
div.home {
    width: 50px;
    justify-content: center;
}
div.toolbar {
    left: 50%;
    transform: translate(-50%);
    gap: 10px;
    padding: 0px 10px;
}

button.gate {
    display: none;
}
button.gate.active {
    display: inline-block;
}

div.truthtable {
    position: fixed;
    right: 25px;
    top: 25px;
    display: flex;
    padding: 10px;
    border: 1px solid var(--bg-sec);
    background-color: var(--bg-pri);
    border-radius: 10px;
}

div.test {
    margin-right: 5px;
}
div.test .cell {
    color: var(--bg-sec);
}
div.test .cell.failed {
    color: var(--failed);
}
div.test .cell.passed {
    color: var(--success);
}

div.output {
    margin-left: 5px;
}
.truthtable div.title {
    text-align: center;
    border-bottom: 3px solid black;
}
div.cell {
    padding: 2.5px 10px;
    color: white;
}
div.cell.off {
    background-color: #1d5723;
}
div.cell.on {
    background-color: var(--success);
}

canvas {
    display: block;
    padding: 0;
    margin: 0;
    background-position: 10px 10px;
    background-size: 20px 20px;
    background-image: radial-gradient(circle, var(--bg-sec) 1px, rgba(0, 0, 0, 0) 1px);
}

div.alert {
    position: fixed;
    z-index: 1000;
    right: 10px;
    background-color: rgb(0, 0, 0, .5);
    color: #fff;
    padding: 5px 10px;
    font-size: 14px;
    bottom: -100%;
    transition: 1s;
    border-radius: 5px;
}

.instructions {
    position: fixed;
    right: 0;
    bottom: 0;
    background-color: var(--bg-pri);
    border-top: 1px solid var(--bg-sec);
    border-left: 1px solid var(--bg-sec);
    border-radius: 5px 0px 0px 0px;
    max-width: 30vw;
    width: 450px;
}

.instructions .title {
    display: flex;
    padding: 1em 1em 2px 1em;
    cursor: pointer;
}

.instructions .title h3 {
    margin: 0px;
    flex: 1;
}
.instructions .title span {
    transform: rotate(0deg);
    transition: .3s;
}
.instructions.active .title span {
    transform: rotate(180deg);
}

.instructions ul {
    height: 0;
    transition: .3s;
    margin: 3px 0;
}
.instructions.active ul {
    height: auto;
    margin: 1em 0;
}