@font-face {
    font-family: 'Minecraft';
    src: local('Courier New');
    /* Fallback */
}

body {
    margin: 0;
    overflow: hidden;
    background-color: #1a1a1a;
    font-family: 'Minecraft', 'Courier New', monospace;
    user-select: none;
}

#game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 30px;
    mix-blend-mode: difference;
}

/* Stats (Hearts/Food) */
#stats-bar {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 364px;
    display: flex;
    justify-content: space-between;
}

#hearts {
    display: flex;
    gap: 2px;
}

.heart {
    width: 16px;
    height: 16px;
    background-color: red;
    display: inline-block;
    background-image: linear-gradient(to bottom, #ff5555 0%, #aa0000 100%);
    border: 2px solid #550000;
    transform: rotate(45deg);
    margin: 4px;
    /* Simulating heart shape roughly with CSS or just squares for now */
    border-radius: 2px;
}

/* Hotbar */
#hotbar {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px;
    border: 2px solid #333;
}

.slot {
    width: 36px;
    height: 36px;
    border: 2px solid #888;
    background: rgba(100, 100, 100, 0.5);
    margin: 0 2px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slot.active {
    border: 3px solid white;
    transform: scale(1.1);
    z-index: 10;
}

/* Block previews in slots - simplistic colors */
.slot[data-id="1"]::after {
    content: '';
    width: 20px;
    height: 20px;
    background: #4CAF50;
    display: block;
}

/* Grass */
.slot[data-id="2"]::after {
    content: '';
    width: 20px;
    height: 20px;
    background: #8D6E63;
    display: block;
}

/* Dirt */
.slot[data-id="3"]::after {
    content: '';
    width: 20px;
    height: 20px;
    background: #757575;
    display: block;
}

/* Stone */
.slot[data-id="5"]::after {
    content: '';
    width: 20px;
    height: 20px;
    background: #5D4037;
    display: block;
}

/* Wood */
.slot[data-id="7"]::after {
    content: '';
    width: 20px;
    height: 20px;
    background: #FFD54F;
    display: block;
}

/* Sand */
.slot[data-id="6"]::after {
    content: '';
    width: 20px;
    height: 20px;
    background: #66BB6A;
    display: block;
}

/* Leaves */

#info {
    position: absolute;
    top: 5px;
    left: 5px;
    color: white;
    font-size: 16px;
    text-shadow: 2px 2px 0 #000;
}

#crafting-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 300px;
    background: #c6c6c6;
    border: 4px solid #555;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333;
}

#instructions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 999;
}

.blink {
    animation: blinker 1s linear infinite;
    font-weight: bold;
    font-size: 24px;
    color: #FFFF55;
    cursor: pointer;
    margin-top: 30px;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}