body {
    max-width: 800px;
    height: 100vh;
    margin: auto;
    border: 1px solid black;
    padding: 1rem;

    background: url('stone.png');

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

:root {
    --scale: 0.5;
}

#input {
    width: 80%;
    display: flex;
    flex-direction: column;
}

#input > div {
    margin-top: 2rem;
}

#input button {
    font-size: 30px;
}

#input .quick-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

#items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

.item {
    padding: 0px;
    width: calc(50px * var(--scale));
    height: calc(50px * var(--scale));
    background: url('diamond_ore.png') no-repeat center;
    background-size: cover;
}

.pixelated {
    image-rendering: -moz-crisp-edges;          /* Firefox */
    image-rendering: -o-crisp-edges;            /* Opera */
    image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming)*/
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;   /* IE (non-standard property) */
    background-position:50% 50%;
}

.item.current {
    animation: shake 0.5s;
    animation-iteration-count: infinite;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.item.hidden {
    background: url('stone.png') no-repeat center;
    background-size: cover;
}

#player {
    background: url('mining.gif') no-repeat center;
    background-size: cover;
    width: calc(75px * var(--scale));
    height: calc(75px * var(--scale));
    position: absolute;

    top: -9999px;
    left: -9999px;

    transition: all 0.5s;
}

.flipH {
    -moz-transform: scaleX(-1);
    -o-transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
    filter: FlipH;
    -ms-filter: "FlipH";
}

#time-left {
    width: 100%;
    text-align: center;
    font-size: 3rem;
}

