* {
font-family: monospace;}

.bottom-right-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 2px solid white;
    cursor: pointer;
    z-index: 1000;
    font-family: monospace;
    font-weight: bold;
}

.bottom-right-trigger:hover {
    background: white;
    color: black;
}

#paletteMenu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #222;
    border: 2px solid white;
    padding: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 300px;
}

.palette-item:hover {
    border-color: white;
    transform: scale(1.1);
}
.category-btn {
border:1px solid white;
color:white;
background:black;

margin:4px;
font-size:14px;
display:inline-block;
padding:2px; 
}
.category-btn:hover {
cursor:pointer;
border:1px solid white;
color:black;
background:white;
}

#paletteGrid {
    display: flex;
    flex-wrap: wrap;        /* Allows items to wrap horizontally */
    gap: 10px;              /* Space between icons */
    padding: 15px;
    max-height: 800px;      /* Controls how tall the menu can get */
    overflow: none;       /* Corrected: Enables vertical scroll if content overflows */
    background: rgba(0, 0, 0, 0.3);
    justify-content: center; /* Centers the items in the grid */
    width: 100%;            /* Ensures it uses the full width of the menu */
}

/* Individual item styling */
.palette-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 72px;            /* Fix: Changed from 800px to a smaller size */
    background: transparent;
    border: 1px solid white;
    cursor: pointer;
    padding: 4px;

}
.palette-item:hover {
    background: #444;
    border-color: #007fff;
}

.palette-item img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated; /* Keeps your textures crisp */

}

.palette-item span {
    font-size: 10px;
    color: #ccc;
    text-align: center;
    word-break: break-word;
    pointer-events: none;  /* Helps with drag and drop stability */
}

#hotbar {
    position: fixed;
    bottom: 45px; /* Sits above the block indicator */
    right: 20px;   /* Aligns left with standard UI, or use 50% / translate-x for center */
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hotbar-slot {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid white;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.hotbar-slot img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.hotbar-slot.selected {
    border-color: white;
    background-color: black;
    transform: scale(1.1);
}

.key-hint {
    position: absolute;
    top: -2px;
    left: 2px;
    font-size: 10px;
    color: white;
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
}



#minimapContainer {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 200px;
    height: 200px;
    overflow: hidden;
    border: 4px solid white;
    background: black; 
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 9999;
    display: block;
}

#minimap {
    display: block;
}


#tpDialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    border: 2px solid cyan;
    padding: 20px;
    z-index: 300;
    font-family: monospace;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#cartDialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    border: 2px solid orange;
    padding: 20px;
    z-index: 300;
    font-family: monospace;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#msgDialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    border: 2px solid gold;
    padding: 20px;
    z-index: 300;
    font-family: monospace;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#tpDialog h3 { margin: 0 0 10px 0; color: cyan; text-align: center; }
#cartDialog h3 { margin: 0 0 10px 0; color: orange; text-align: center; }
#msgDialog h3 { margin: 0 0 10px 0; color: gold; text-align: center; }

#buildHud {
background:black;
padding:2px;
border:2px solid white;
}

#hudImage {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    border: 1px solid gray;
}

.hint {
    
    right:20px;
bottom:20px; 
font-size: 10px;
    color: white;
    color:white;
}
  
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

#discOverlay {
    display:none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

.loading-container {
    display: flex;
perspective: 1000px;
    align-items: flex-end; 
    gap: 20px;
    padding-bottom: 50px; 
}
.cube {
    width: 64px;
    height: 64px;
    position: relative;
    transform-style: preserve-3d; 
    animation: spinCube 3s linear infinite;
}

.face {
    position: absolute;
    width: 64px;
    height: 64px;
    background-image: url('burner.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 1;
}

.face.front  { transform: translateZ(32px); }
.face.back   { transform: rotateY(180deg) translateZ(32px); }
.face.right  { transform: rotateY(90deg) translateZ(32px); }
.face.left   { transform: rotateY(-90deg) translateZ(32px); }
.face.top    { transform: rotateX(90deg) translateZ(32px); }
.face.bottom { transform: rotateX(-90deg) translateZ(32px); }

@keyframes spinCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

html {
    color: white;
    background: black;
    font-family: monospace;
    overflow: hidden;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

button {
    font-size: 12px;
    color: white;
    background: black;
    border: 1px solid white;
    height: 20px;
    margin: 0;
    padding: 0 4px;
    cursor: pointer;
}

input {
    color: white;
    background: black;
    border: 1px solid white;
    height: 22px;
    margin: 0;
    padding: 0 4px;
}

.pickr {
    color: white;
    background: black;
    border: 1px solid white;
    height: 16px;
    margin: 0;
    padding: 0 4px;
}

select {
    color: white;
    background: black;
    border: 1px solid white;
    height: 22px;
    margin: 0;
    padding: 0 4px;
}

#blockControls {
    display: block;
    position: absolute;
    top: 20px;
    left: 20px;
    background: #111;
    border: 2px solid white;
    padding: 8px;
    z-index: 100;
    cursor: move;
}

#notes {
    opacity: 0.9;
    display: flex;
    border: 1px solid white;
    padding: 4px;
    background: #111;
    border-left: 2px solid white;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    padding-left: 8px;
    padding-right: 8px;
    margin-top: 4px;
}

#notes:hover {
    opacity: 1;
}

iframe {
    opacity: 0.7;
    width: 600px;
    height: 800px;
    border: 0;
}

iframe:hover {
    opacity: 1;
}

#chat {
    width: 900px;
    height: 900px;
    bottom:100px;
    overflow: hidden;
    border: 2px solid white;
    zoom: 75%;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: black;
    background-repeat: no-repeat;
    background-size: cover;
}

#collapsibleBox {
    position: absolute;
    display: block;
    bottom: 20px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0px;
    font-family: sans-serif;
    max-width: 900px;
    max-height:900px;
    transition: transform 0.3s ease;
    z-index: 50;
}

#collapsibleBox.collapsed {
    transform: translateY(100%);
    display: none;
}
 #zoomBtn {

display: flex;
}

#toggleButton {
    position: absolute;
    bottom: 40px;
    left: 10px;
    margin: 10px;
    font-weight: 900;
    font-size: 14px;
    background: white;
    color: black;
    border: 2px solid black;
    cursor: pointer;
    z-index: 51;
}