:root {
    --margin: 20px;
    --logo-height: 100px;
    --panel-color: #C6C6C6;
    --panel-color-hover: #8B8B8B;
    --item-size: 32px;
}

@font-face {
    font-family: 'Minecraft';
    src: url('../font/Minecraft.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    font-family: 'Minecraft', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    image-rendering: pixelated;
    -webkit-font-smoothing: none;
    font-smooth: never;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: start;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: calc(0px - var(--margin));
    left: calc(0px - var(--margin));
    width: calc(100% + calc(var(--margin) * 2));
    height: calc(100% + calc(var(--margin) * 2));
    background-image: url('../img/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px);
    z-index: -1;
}

.container {
    background-color: transparent;
    display: flex;
    height: calc(80vh - var(--logo-height));
    max-height: 90vh;
    max-width: 90vw;
}

.logo {
    margin-top: 10px;
    max-height: var(--logo-height);
    margin-bottom: 10px;
    max-width: 100%;
    flex-shrink: 0;
}

.frame {
    border-width: 8px;
    border-style: solid;
    border-image: url('../img/frame.png');
    border-image-slice: 8;
    border-image-repeat: round;

    background-color: var(--panel-color);
    background-clip: padding-box;
}

.panel {
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.left-panel {
    width: 30vw;
    margin-right: 10px;
}

.right-panel {
    width: 30vw;
}

h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #555;
    flex-shrink: 0;
}

.item-list {
    list-style-type: none;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
}

.item-list li {
    cursor: pointer;

    margin-top: 2px;

    border-width: 8px;
    border-style: solid;
    border-image: url('../img/frame.png');
    border-image-slice: 8;
    border-image-repeat: round;

    background-color: var(--panel-color);
    background-clip: padding-box;
}

.item-list li:hover {
    border-image: url('../img/frame_hover.png');
    border-image-slice: 8;
    background-color: var(--panel-color-hover);
}
.item-list li img{
    margin-right: 5px;
}
.crafting-recipe {
    font-size: 18px;
    line-height: 1.6;
}


.crafting-table td {
    width: var(--item-size);
    height: var(--item-size);
    min-width: var(--item-size);
    min-height: var(--item-size);
    max-width: var(--item-size);
    max-height: var(--item-size);
    text-align: center;
    vertical-align: middle;
    padding: 0;
    overflow: hidden;
    box-sizing: content-box;
}

.crafting-table td {
    text-align: center;
    vertical-align: middle;
    padding: 0;
    overflow: hidden;
}

.crafting-table td img {
    display: block;
    margin: auto;
}

#tabs button {
    padding: 5px 10px;
    background-color: var(--panel-color);
}


.input-container {
    position: relative;
    display: block;
    width: 100%;
    flex-shrink: 0;
}

.input-container input {
    width: 100%;
    background-color: black;
    border: 2px solid rgb(160, 160, 160);
    color: white;
    padding: 5px 30px 5px 5px;
    outline: none;
}

.input-container input:focus {
    border-color: white;
}

.input-container .icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.input-container .icon img {
    width: 12px;
    height: 12px;
}

.item-list li img,
.crafting-table td img {
    width: var(--item-size);
    height: var(--item-size);
}

.crafting-table td.has-item {
    cursor: help;
}

.mc-tooltip {
    position: fixed;
    z-index: 2000;
    max-width: 220px;
    padding: 6px 10px;
    border: 2px solid #373737;
    background: rgba(16, 0, 16, 0.94);
    color: #fff;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
    box-shadow: inset -2px -2px 0 #555, inset 2px 2px 0 #000;
}

.mc-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
}

#tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
    flex-shrink: 0;
}

#buttonRight {
    position: fixed;
    top: 0px;
    right: 0px;
    z-index: 1000;
    height: 32px;
    display: inline-flex;
}

.btngames {
    cursor: pointer;
    background-color: white;
    width: 32px;
    height: 32px;
    border: 1px solid #cacaca;
    background-image: url('/public/images/utilsgames_16.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: calc(100vh - var(--logo-height) - 30px);
        max-height: calc(100vh - var(--logo-height) - 30px);
        width: 100%;
        max-width: 100%;
    }

    .left-panel,
    .right-panel {
        width: 100%;
        margin-right: 0;
    }

    .left-panel {
        flex: 1;
        min-height: 0;
    }

    .right-panel {
        flex: 0 0 auto;
    }
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background-color: black;
}

::-webkit-scrollbar-thumb {
    background-color: rgb(192, 192, 192);
    border-right: 1px solid rgb(128, 128, 128);
    border-bottom: 1px solid rgb(128, 128, 128);
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgb(128, 128, 128);
    border-left: 1px solid rgb(192, 192, 192);
    border-top: 1px solid rgb(192, 192, 192);
}

::-webkit-scrollbar-horizontal {
    height: 12px;
}

::-webkit-scrollbar-vertical {
    width: 12px;
}
