#qrcode,
.controllerQr {
    border: 10px white solid;
    box-shadow: 0 0 20px 0 rgba(255,255,255,1);
    width: 12vw;
    height: 12vw;
    margin: 0 auto;
}

#qrcode img,
.controllerQr img {
    width: 100%;
}

.controllerQr {
    margin: 4vh auto;
}

.controllerWrap {
    transform: translateY(100vh);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.320, 1.275);
    text-align: center;
}

.controllerWrap code {
    font-size: 16px;
}

.controllerWrap input {
    display: block;
    margin: 1em auto;
}

.controllerWrap .fileUpload {
    border: 5px rgba(255, 255, 255, 0.7) dashed;
    display: block;
    padding: 4em 10em;
    cursor: pointer;
    margin-bottom: 1em;
    width: 600px;
    white-space: nowrap;
    box-sizing: border-box;
    text-shadow: 0 0 15px black;
    -webkit-text-stroke: 2px black;
    paint-order: stroke fill;
    font-weight: 700;

    overflow: hidden;
    position: relative;

    transition: border 0.2s ease-in-out;
}

.controllerWrap .fileUpload:hover,
.controllerWrap .fileUpload.hovering {
    border: 5px white dashed;
}

.controllerWrap .fileUpload::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; width: 200%;
    background: linear-gradient(
        to right,
        #e6400e 0%,
        #9366b3 25%,
        #0596cf 50%,
        rgba(0, 0, 255, 0) 100%
    );
    z-index: -1;

    transform: translateX(-100%);
    transition: transform 0.5s ease-in-out;
}

.controllerWrap .fileUpload:hover::after,
.controllerWrap .fileUpload.hovering::after {
    transform: translateX(0);
}

.controllerWrap input[type="file"] {
    display: none;
}

.instructions {
    padding: 7vh 5vw;
    width: 25vw;
    box-sizing: border-box;
    text-align: center;
    font-size: 1.4em;
}

.instructions .code {
    font-size: 1.5em;
    margin: 0;
    border: 5px rgba(255,255,255,0.2) solid;
    padding: 0.2em 0;
}

.instructions h2 {
    margin-top: 0;
}

.nameWrap {
    margin-left: 5vw;
    width: 60vw;
    text-align: center;
}

.nameWrap h1 {
    margin: 0;
    font-size: 7.5vw;
    font-weight: 900;
}

.nameWrap ul {
    list-style: none;
    padding: 0;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.nameWrap li {
    padding: 0.5em 1em;
    background: rgba(0,0,0,0.5);
    display: inline-block;
    font-size: 1vw;
    max-width: 25vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 5px rgba(255,255,255,0.2) solid;
    margin: 5px;

    
}

.home {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    transform: translateY(100vh);

    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.320, 1.275);
}

.home.out {
    transform: scale(0)translateY(0) !important;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.200, 0.000, 0.735, -0.470);
}

.answerouterwrap {
    transition: transform 0.5s cubic-bezier(0.550, 0.055, 0.675, 0.190) 0.25s;
}

.answerRow {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-basis: 0;
    flex-grow: 1;
    width: 100%;
    padding: min(2vw, 2vh) 0;
    box-sizing: border-box;
}

.answerRow:first-child {
    padding-top: 0;
}

.answerRow:last-child {
    padding-bottom: 0;
}

.answer {
    --delay-time: 0;
    --correct-percent: 0;
    --answer-text: "";
    flex-grow: 1;
    flex-basis: 0;
    height: 100%;
    margin: 0 min(2vw, 2vh);
    padding: 0;
    box-sizing: border-box;
    position: relative;

    display: flex;
    align-items: center;
    justify-content: start;
    flex-direction: row;

    border-top: 1vh var(--accent-color) solid;

    color: white;

    transform: translateY(100vh);
    transition: box-shadow 0.5s ease-out 0.5s, transform calc(0.5s + var(--delay-time) / 3) cubic-bezier(0.165, 0.840, 0.440, 1.000) var(--delay-time);
}

.answer:first-child {
    margin-left: 0;
}

.answer:last-child {
    margin-right: 0;
}

.answer > div {
    width: min(10vw, 10vh);
    height: min(10vw, 10vh);
    background: rgba(255, 255, 255, 0.75);
    font-size: 0;
    flex-shrink: 0;
    margin-left: min(5vw, 5vh);
}

.answer > span {
    flex-grow: 1;
    text-align: center;
    display: block;
    font-size: 1.5vw;
    font-family: 'Montserrat', sans-serif;
}

.answer.a, .answer.f {
    --accent-color: rgba(255,100,100,.5);
}

.answer.b, .answer.t {
    --accent-color: rgba(150,255,150,.5);
}

.answer.d {
    --accent-color: rgba(150,150,255,.5);
}

.answer.a > div {
    border-radius: 50%;
}

.answer.b > div {
    clip-path: polygon(50% 0, 0 100%, 100% 100%);
    transform: scale(0.9);
}

.answer.c > div {
    transform: scale(0.9);
}

.answer.d > div {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.questionContent {
    font-size: 2vw;
    text-align: center;
    margin: 0 10vw;
    height: calc(45vh - 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    transform: translateY(22.5vh);
    transition: transform 0.5s cubic-bezier(0.25, 0, 0.07, 1.000);
}

.questionOuter {
    width: 100%;
    height: calc(100vh - 40px);
    transform: translateY(100vh);
    transition: transform 0.75s cubic-bezier(0.680, -0.550, 0.265, 1.550) 0.2s;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 5vh 1.5vw;
    box-sizing: border-box;
}

.questionOuter.out {
    transform: translateY(0)scale(0) !important;
    transition: transform 0.5s ease-in;
}

.questionInner {
    width: 100%;
    height: 100%;
    margin: 0 1.5vw;
    position: relative;
}

.questionOuter.showAnswers .questionContent,
.questionOuter.showAnswers.miniAnswer.showResults .questionContent {
    transform: translateY(0);
}

.questionOuter.showAnswers.miniAnswer .questionContent {
    transform: translateY(12.5vh);
}

.answerContent {
    height: calc(45vh - 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hasImg .questionContent {
    flex-direction: row;
    margin: 0;
}

.hasImg.showAnswers .questionContent p,
.hasImg.showAnswers.miniAnswer.showResults .questionContent p {
    transform: translate(0, 0);
}

.hasImg .questionContent p {
    flex-grow: 1;
    flex-basis: 0;
    transform: translate(22.5vw, -32vh);
    transition: transform 0.5s cubic-bezier(0.25, 0, 0.07, 1.000);
}

.hasImg.showAnswers.miniAnswer .questionContent p {
    transform: translate(22.5vw, -30vh);
}

.hasImg .imgWrap {
    flex-grow: 1;
    flex-basis: 0;
    height: 40vh;
    transform: translate(-22.5vw, 10vh)scale(1.5);
    transition: transform 0.5s cubic-bezier(0.25, 0, 0.07, 1.000);

    display: flex;
    align-items: center;
    justify-content: center;
}

.hasImg.showAnswers .imgWrap,
.hasImg.showAnswers.showResults.miniAnswer .imgWrap {
    transform: translate(0, 0)scale(1);
}

.hasImg.showAnswers.miniAnswer .imgWrap {
    transform: translate(-22.5vw, 10vh)scale(1.5);
}

.hasImg .imgWrap img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
    transition: transform 0.5s ease-in-out;
    box-shadow: 5px 5px 10px 0 black;
}

.miniAnswer .answerContent {
    height: 10vh;
    margin-top: calc(30vh - 20px);
    transition: transform 0.5s cubic-bezier(0.25, 0, 0.07, 1.000), opacity 0.5s ease-out;
    transform: translateY(30vh);
    opacity: 0;
}

.miniAnswer.showAnswers .answerContent {
    transform: translateY(0);
    opacity: 1;
}

.miniAnswer.showAnswers.hasImg .answerContent {
    transform: translateY(5vh);
}

.miniAnswer.showAnswers.showResults .answerContent {
    transition: opacity 0.3s ease-in;
    opacity: 0;
}

.answerContent.instr p {
    font-size: min(4vh, 2vw);
    margin: 0;
}

.answerContent.instr .extrainstr {
    font-size: min(2.5vh, 1vw);
    margin: 2vh 0 0 0;
}

.resultsContent {
    position: absolute;
    top: calc(45vh - 20px);
    height: calc(45vh - 20px);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.7s cubic-bezier(0.25, 0, 0.07, 1.000), opacity 0.7s ease-out;
    transform: translateY(50vh);
    opacity: 0;
}

.showResults .resultsContent {
    opacity: 1;
    transform: translateY(0);
}

.questionWrap.smooth {
    transition: transform 0.5s ease-in-out;
}

.countdown, .submissions {
    height: 100%;
    width: 2vw;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px 0 black;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.countdown {
    --time: 0s;
}

.countdown p, .submissions p {
    z-index: 5;
    position: relative;
    text-shadow: 0 0 5px black;
    font-size: 1.25vw;
    text-align: center;
    opacity: 0.6;
}

.countdown p {
    font-size: 2vw;
    opacity: 1;
}

.timeLeft {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transform: scaleY(0);
    transform-origin: top center;
    background: linear-gradient(rgb(0, 0, 128), rgb(128, 0, 0));
    box-shadow: 0 0 1vw black inset;

    transition: transform var(--time) linear;
}

.submissions span.sep {
    display: block;
    font-size: 0.7em;
}

.numSubmissions {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transform: scaleY(0);
    transform-origin: bottom center;
    background: linear-gradient(rgb(0, 128, 0), rgb(0, 0, 128));
    box-shadow: 0 0 1vw black inset;

    transition: transform 0.2s ease-in-out;
}

.answer::before {
    content: '';
    top: 0; left: 0; bottom: 0; right: 0;
    display: block;
    position: absolute;
    z-index: 3;
    backdrop-filter: invert(100%);
    transform-origin: left center;
    transform: scaleX(var(--correct-percent));
    transition: transform 2s cubic-bezier(0.230, 1.000, 0.320, 1.000);
}

.answer::after {
    content: var(--answer-text);
    bottom: 1em; right: 1em;
    display: block;
    position: absolute;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    transition-delay: 1s;
    font-size: 1vw;
}

.answer.done::after {
    opacity: 1;
}

.answer.correct {
    box-shadow: 0 0 1vw 1vw rgb(0, 255, 128);
}

.leaderboard {
    text-align: center;
    transform: translate(0, 100vh);
    transition: transform 0.5s cubic-bezier(0.165, 0.840, 0.440, 1.000);
}

.leaderboard.show {
    transform: translate(0, 0);
}

.leaderboard.show.slideLeft {
    transform: translate(-15vw, 0);
    transition: transform 0.5s cubic-bezier(0.655, 0, 0.440, 1.000) 0.8s;
}

.leaderboard h2 {
    font-size: 2vw;
}

.leaderboard ol {
    list-style: none;
    padding: 0;
}

.leaderboard li {
    --delay-time: 0s;

    padding: 2em 3em calc(2em + 2px) 3em;
    font-size: 1vw;
    
    --accent-color: rgba(0,150,255,.5);

    background: rgba(0,0,0,0.5);
    box-shadow: 2px 2px 10px #000;
    border: none;
    border-top: 2px var(--accent-color) solid;
    backdrop-filter: blur(10px);

    transform: translateY(100vh);
    transition: transform calc(0.5s + var(--delay-time) / 3) cubic-bezier(0.165, 0.840, 0.440, 1.000) var(--delay-time);

    display: flex;
    flex-direction: row;
}

.leaderboard li > span:first-child {
    flex-grow: 1;
    max-width: 40vw;
    min-width: 20vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    margin-right: 1vw;
}

.leaderboard li span.up {
    color: rgb(0, 255, 128);
}

.leaderboard li span.down {
    color: rgb(255, 0, 128);
}

.leaderboard li > span:last-child {
    flex-shrink: 0;
    text-align: right;
}

audio {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    bottom: 100vh;
    right: 100vw;
}

.questionRes {
    transform: translateY(100vh);
    text-align: center;
    transition: transform 0.5s cubic-bezier(0.165, 0.840, 0.440, 1.000);
}

.questionRes p {
    font-size: 2vw;
    text-align: center;
    padding-left: 10vw;
    padding-right: 10vw;
}

.tfWrap .answer {
    height: 30vh;
}

.tfWrap .answer > span {
    font-size: 5vh;
}

.responseBar {
    height: 4vw;
    width: 60vw;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px 0 black;
    margin-bottom: 1vw;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
}

.responseBar .responseText {
    z-index: 5;
    position: relative;
    text-shadow: 0 0 5px black;
    font-size: 2vw;
    text-align: center;
    opacity: 1;
}

.responseBar .responseBarInner {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(to right, rgb(0, 64, 255), rgb(0, 128, 0));
    box-shadow: 0 0 1vw black inset;

    transition: transform 2.5s cubic-bezier(0.230, 1.000, 0.320, 1.000);
}

.typeResponseWrap .response, .typeResponseWrap .responseList {
    font-size: 2vw;
    font-family: "Consolas", monospace;
}

.typeResponseWrap .response, .typeResponseWrap li {
    --delay-time: 0s;

    transform: translateY(100vh);
    transition: transform calc(0.7s + var(--delay-time) / 2) cubic-bezier(0.165, 0.840, 0.440, 1.000) var(--delay-time);
}

.map {
    margin: 1em auto;
    width: 80%;
    display: block;
    height: 40vh;
}

.persistentFooter {
    height: 40px;
    box-sizing: border-box;
    box-shadow: 0 -1px 5px 0 white;

    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 15px;

    transform: translateY(0);
    transition: transform 0.5s ease-out;
}

.persistentFooter .name {
    flex-grow: 1;
}

.persistentFooter .name .logo {
    font-weight: 900;
    font-size: 25px;
    margin-left: 5px;
}

.persistentFooter p {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    margin: 0;
}

.persistentFooter code {
    font-size: 18px;
}

.persistentFooter .gameCode {
    font-size: 30px;
    margin-left: 10px;
}

.persistentFooter.out {
    transform: translateY(50px);
    transition: transform 0.5s ease-in;
}

.questionIntro {
    position: relative;
    transform: translateY(100vh);
    transition: transform 0.75s cubic-bezier(0.680, -0.550, 0.265, 1.550);
}

.questionIntro h2 {
    text-align: center;
    font-size: 12vh;
}

.questionIntro .questionNum,
.finalResult .rankNum {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: -1;
    opacity: 0.4;
    font-weight: 900;
    font-size: 70vh;
    text-align: center;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.questionIntro .infoWrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-bottom: 12vh;
}

.questionIntro .infoWrap p {
    margin: 0 5vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 4vh;
}

.questionIntro .infoWrap p span {
    display: block;
    font-size: 8vh;
    font-weight: bold;
}

@media(max-width: 700px) {
    body::before {
        content: "The board works best when fullscreen on a computer display";
        position: fixed;
        color: white;
        background: black;
        font-size: 3em;
        top: 0;
        left: 0;
        right: 0;
        display: block;
        z-index: 9999;
        text-align: center;

        --accent-color: rgba(255,100,100,.5);

        background: rgba(0,0,0,0.5);
        box-shadow: 2px 2px 10px #000;
        border: none;
        border-bottom: 5px var(--accent-color) solid;
        backdrop-filter: blur(10px);

        padding: 1em 20px 1.2em 20px;
    }
}

@media(max-aspect-ratio: 1) {
    body::before {
        content: "The board works best when fullscreen on a computer display";
        position: fixed;
        color: white;
        background: black;
        font-size: 3em;
        top: 0;
        left: 0;
        right: 0;
        display: block;
        z-index: 9999;
        text-align: center;

        --accent-color: rgba(255,100,100,.5);

        background: rgba(0,0,0,0.5);
        box-shadow: 2px 2px 10px #000;
        border: none;
        border-bottom: 5px var(--accent-color) solid;
        backdrop-filter: blur(10px);

        padding: 1em 20px 1.2em 20px;
    }
}

.finalDownload {
    position: absolute;
    bottom: 1em;
    left: 1em;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.finalResult {
    position: relative;
    transition: transform 0.75s cubic-bezier(0.680, -0.550, 0.265, 1.550);
}

.finalResult h2 {
    font-size: 15vh;
    margin: 0;
    opacity: 0;
    transform: scale(0);
    max-width: 90vw;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.680, -0.550, 0.265, 1.550), opacity 0.5s cubic-bezier(0.680, -0.550, 0.265, 1.550);
}

.showName .finalResult h2 {
    opacity: 1;
    transform: scale(1);
}

.finalResult p {
    margin: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out 0.4s;
}

.showName .finalResult p {
    opacity: 1;
}

.credits {
    position: absolute;
    height: 80vh;
    width: 25vw;
    right: 2vw;
    top: 10vh;
    box-sizing: border-box;
    padding: 2vw;
    text-align: center;

    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 1s cubic-bezier(0.680, 0, 0.265, 1.550);

    overflow-y: hidden;
}

.credits.show {
    transform: scaleX(1);
}

.credits .scroll {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    transform: translateY(100%);
    transition: transform 50s ease-out 0.5s;
}

.credits.show .scroll {
    transform: translateY(0);
}

.credits h1 {
    font-weight: 900;
    font-size: 5vw;
    margin-top: 0;
}

.credits .title {
    margin-top: 20vh;
    font-size: 1.2em;
    font-weight: bold;
}

.credits .main {
    font-size: 2em;
}

.credits .main.sub {
    font-size: 1.5em;
    margin: 0;
}

.credits .smallMain {
    font-size: 1.1em;
}

.credits .final {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80vh;
    width: 100%;
    font-size: 1.2vw;
}

.credits .final .logo {
    font-weight: 900;
}

.credits .final .medium {
    font-size: 1.5vw;
}

.credits .final .big {
    font-size: 1.75vw;
    margin-top: 10vh;
    font-weight: bold;
}
