@-webkit-keyframes shake {
    0% {
        -webkit-transform: translate(2px, 1px) rotate(0deg);
    }

    10% {
        -webkit-transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        -webkit-transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        -webkit-transform: translate(0px, 2px) rotate(0deg);
    }

    40% {
        -webkit-transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        -webkit-transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        -webkit-transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        -webkit-transform: translate(2px, 1px) rotate(-1deg);
    }

    80% {
        -webkit-transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        -webkit-transform: translate(2px, 2px) rotate(0deg);
    }

    100% {
        -webkit-transform: translate(1px, -2px) rotate(-1deg);
    }
}

.shake {
    -webkit-animation-name: shake;
    -webkit-animation-duration: 0.5s;
    -webkit-transform-origin: 50% 50%;
    -webkit-animation-iteration-count: 1;
}

html, body {
    height: 100%;
}

body {
    background-color: #232323;
    color: #aaa;
}

#logo {
    height: 40px;
    width: 40px;
}

.small-text {
    color: #888;
    font-size: 0.75em;
    margin-top: 2px;
    margin-bottom: 12px;
}

body {
    display: flex;
    flex-direction: column;
}


.footer {
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-text {
    width: min-content;
}

#canvas-container {
    position: relative;
    overflow: hidden;
    background-color: #333333;
}

#canvas {
    position: absolute;
    background-color: white;
    width: auto;
    height: auto;
    max-width: 100%;
}

#zoom {
    image-rendering: pixelated;
    width: var(--canvas-size);
    height: var(--canvas-size);
    margin: 0;
    transform-origin: 0px 0px;
}

@-moz-document url-prefix() {
    #zoom {
        image-rendering: crisp-edges;
    }
}

#canvas-overlay-container {
    z-index: 10;
    pointer-events: none;
    position: absolute;
    transform-origin: 0px 0px 0px;
}

#debug-overlay {
    z-index: 10;
    position: absolute;
    transform-origin: 0px 0px 0px;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#canvas-overlay {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

:root {
    --pixel-color-1: #be0039;
    --pixel-color-2: #ff4500;
    --pixel-color-3: #ffa800;
    --pixel-color-4: #ffd635;
    --pixel-color-5: #00a368;
    --pixel-color-6: #00cc78;
    --pixel-color-7: #7eed56;
    --pixel-color-8: #00756f;
    --pixel-color-9: #009eaa;
    --pixel-color-10: #2450a4;
    --pixel-color-11: #3690ea;
    --pixel-color-12: #51e9f4;
    --pixel-color-13: #493ac1;
    --pixel-color-14: #6a5cff;
    --pixel-color-15: #811e9f;
    --pixel-color-16: #b44ac0;
    --pixel-color-17: #ff3881;
    --pixel-color-18: #ff99aa;
    --pixel-color-19: #6d482f;
    --pixel-color-20: #9c6926;
    --pixel-color-21: #000000;
    --pixel-color-22: #898d90;
    --pixel-color-23: #d4d7d9;
    --pixel-color-24: #ffffff;
    --canvas-size: 1000px;
}

.color-button {
    width: 50px;
    height: 25px;
    margin-left: 2px;
    margin-right: 2px;
}

#set-pixel-btn {
    width: 100px;
}

.nav-online {
    display: none;
}

.overlay-pixel {
    border: 1px solid;
}

#coords {
    background-color: #000000;
    height: 20px;
    width: 100px;
    text-align: center;
    font-size: smaller;
    opacity: 0.5;
    margin-top: 10px;
    border-radius: 10px;
    user-select: none;
}

#btn-reset {
    position: absolute;
    width: 30px;
    height: 30px;
    top: calc(100% - 40px);
    left: calc(100% - 40px);
    cursor: pointer;
    pointer-events: all;
}

.card {
    width: 300px;
    height: 300px;
}

.card div {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    width: 100%;
    height: 100%;
    object-fit: cover;
    overflow: hidden;
}

.card div img, #imgPreview {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    width: 100%;
    height: 100%;
    object-fit: contain;
    overflow: hidden;
}

.dropzone {
    height: 100px;
    border-style: dashed;
    border-width: 2px;
    border-color: #565656;
}