@font-face {
    font-family: "MCSeven";
    src: url(Minecraft-Seven_v2.woff2);
}

* {
    image-rendering: pixelated;
    margin: 0;
    padding: 0;
    font-family: "MCSeven", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
        "Helvetica Neue", sans-serif;
    font-size: 20px;
    font-weight: 400;
    box-sizing: border-box;
}

body {
    background-color: #c6c6c6;
    color: #3f3f3f;
}

h1 {
    font-size: 30px;
    text-align: center;
}

output {
    font-size: inherit;
}

h2 {
    font-size: 25px;
}

a {
    cursor: pointer;
    color: hsl(120, 97%, 34%);
    font-size: inherit;
}

.buttons {
    justify-content: center;
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
}

button {
    outline: none;
    border: none;

    padding: 0.25rem;
    font-size: 1rem;
    cursor: pointer;
    background-color: #8b8b8b;
    color: #3f3f3f;
    display: block;
    margin: 4px;

    box-shadow: -2px -2px 0 2px #373737, 2px 2px 0 2px #ffffff,
        0 0 0 4px #8b8b8b;
}

button:hover,
button:focus,
button:active {
    background-color: #c0c0c0;
}

input[type="text"] {
    outline: none;
    border: none;

    padding: 0.25rem;
    font-size: 1rem;

    background-color: #8b8b8b;
    color: #3f3f3f;
    display: block;
    margin: 4px;

    box-shadow: -2px -2px 0 2px #373737, 2px 2px 0 2px #ffffff,
        0 0 0 4px #8b8b8b;
}

input[type="text"]:hover,
input[type="text"]:focus,
input[type="text"]:active {
    background-color: #c0c0c0;
}

ul,
ol {
    list-style-type: none;
}

.vertical {
    display: flex;
    flex-direction: column;
}

.horizontal {
    display: flex;
    flex-direction: row;
}

.centered-vertical {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.centered-horizontal {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

#preview img {
    width: var(--size);
    height: var(--size);

    display: block;
    pointer-events: none;
}

#preview a {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(var(--size) * 18 / 16);
    height: calc(var(--size) * 18 / 16);

    display: block;
}

#preview tbody {
    display: flex;
    flex-direction: column;

    --size: 64px;

    max-width: 100vw;
    overflow-x: scroll;
}

#preview tr {
    display: flex;
    flex-direction: row;
}

#preview td {
    display: block;
    padding: calc(var(--size) / 16);
    width: var(--size);
    height: var(--size);
    background-image: url(slot.png);
    background-size: cover;
    background-repeat: no-repeat;

    position: relative;

    box-sizing: content-box;
}

#preview td:hover img {
    background-color: #ffffff74;
}

#preview {
    --size: 64px;
    box-sizing: border-box;

    width: fit-content;
}

#preview input[type="checkbox"] {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    opacity: 0;

    cursor: pointer;
}

#preview input[type="checkbox"]:checked ~ img {
    background-color: hsl(120, 97%, 34%);
}

#itemsList {
    --size: 64px;
    max-width: 100vw;
}

#itemsList img {
    width: calc(var(--size));
    height: calc(var(--size));
}

#itemsList p {
    pointer-events: none;
}

#itemsList a {
    padding: 0.25rem 0.5rem 0.25rem 0.5rem;

    background-color: #8b8b8b;
    color: #3f3f3f;
    display: block;

    box-shadow: -2px -2px 0 2px #373737, 2px 2px 0 2px #ffffff,
        0 0 0 4px #8b8b8b;

    display: flex;
    flex-direction: row;
    gap: 0.25rem;

    position: relative;

    text-decoration: none;
}

#itemsList li {
    margin: 4px;
    margin-bottom: 8px;
}

#itemsList li:last-child {
    margin-bottom: 4px;
}

#itemsList a:hover,
#itemsList a:focus,
#itemsList a:active {
    background-color: #c0c0c0;
}

#itemsList div {
    justify-content: center;
    display: flex;
    flex-direction: column;
}
