html {
    height: 100%;
}

body {
    color: #323232;
    background-color: #f9dae2;
    margin: 0;
    height: 100%;
    font-family: "Nunito", sans-serif;
}

.main {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

canvas, #guesscanvas {
    width: 90vw;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    touch-action: none;
    border-radius: 2em;
    background-color: white;
    border: 5px solid #b78272;
    display: block;
}

.colorpicker {
    display: flex;
    margin: 10px;
    gap: 3px;
    height: 40px;
    align-items: center;
    margin-top: 2em;
}

.color {
    width: 30px;
    height: 30px;
    cursor: pointer;
    border: 5px solid transparent;
    border-radius: 3em;
    transition: .2s ease-in;
}

.color.active {
    border-color: #b78272;
    z-index: 2;
    width: 40px;
    height: 40px;
}

.window {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 500px;
}

#drawWhat {
    font-weight: bolder;
}

.progressBar {
    width: 40vw;
    background: #ffffff;
    height: 1.5em;
    border-radius: 2em;
    overflow: hidden;
    padding: 5px;
    display: flex;
    align-items: center;
}

.ActProg {
    width: 0%;
    background: #7e92bb;
    height: 100%;
    border-radius: 1em;
    min-width: 25px;
}

h1 {
    max-width: 70%;
    text-align: center;
}

.inputsection {
    border: 5px solid #b78272;
    background-color: #ffffff;
    margin-top: 1em;
    border-radius: 2em;
    display: flex;
    width: 80%;
    gap: .5em;
    max-width: 500px;
}

input {
    padding: .5em 1em;
    font-size: 1.2em;
    background: transparent;
    color: inherit;
    font-family: inherit;
    border: 0;
    outline: none;
    min-width: 0;
    flex: 1;
}

button {
    background-color: #b4be89;
    border: 0;
    margin: .3em;
    border-radius: 2em;
    padding: .4em 1em;
    font-size: 2em;
    color: #415533;
    cursor: pointer;
    font-weight: bolder;
    font-family: inherit;
}

.inputsection button {
    font-size: 1.2em;
}

.loader {
    margin-top: 2em;
    width: 60px;
    aspect-ratio: .5;
    display: grid;
    animation: l10-1 3s linear infinite;
    transform-origin: 50% calc(100%/sqrt(3));
}

.loader:before {
    content: "";
    width: 30%;
    aspect-ratio: 1;
    border-radius: 50%;
    margin: auto auto 0;
    background: #CF4647;
    animation: l10-0 .5s cubic-bezier(0, 800, 1, 800) infinite;
}

.loader:after {
    content: "";
    width: 100%;
    aspect-ratio: 1/cos(30deg);
    margin: 0 auto auto;
    clip-path: polygon(50% -50%, 100% 50%, 50% 150%, 0 50%);
    background: #524656;
    animation: inherit;
    animation-direction: reverse;
}

@keyframes l10-0 {

    0%,
    2% {
        translate: 0 0%
    }

    98%,
    to {
        translate: 0 -.2%
    }
}

@keyframes l10-1 {
    to {
        rotate: 1turn
    }
}

.msg {
    padding: .5em 1em;
    background: #ffffff;
    border-radius: 0 2em 2em 2em;
    box-shadow: 0 0 8px #2034543d inset, 0 2px 0 #00000036, 0 4px 10px #00000030;
    align-self: baseline;
    margin-top: .5em;
    animation: yeet .3s ease-in;
}
.msg img {
    width: 250px;
    border-radius: 1em;
    margin: .3em 0;
    animation: pop .3s ease-in;
}

.msg[role="p2"] {
    border-radius: 2em 0 2em 2em;
    align-self: end;
}

#qrCode img, #qrCode canvas {
    background: white;
    padding: 1em;
    border-radius: 1em;
    margin-top: 1em;
}

#qrScanner {
    margin: 20px;
    width: 300px;
    height: fit-content;
    overflow: hidden;
    border-radius: 1em;
}


@keyframes yeet {
    0% {
        transform: translateY(1em);
        opacity: 0;
    }
    80% {
        transform: translateY(-0.2em);
        opacity: 0.8;
    }
    100% {
        transform: none;
        opacity: 1;
    }
}

@keyframes pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    80% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: none;
        opacity: 1;
    }
}