body { margin: 0; overflow: hidden; font-family: 'Arial', sans-serif; background-color: #000; color: #fff; }
canvas { display: block; }
#info {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    line-height: 1.6;
    z-index: 10;
}
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: 1px solid black;
    z-index: 10;
}
.stat-bar-container { margin-bottom: 5px; white-space: nowrap; }
.stat-bar { width: 100px; height: 10px; background-color: #555; border-radius: 3px; overflow: hidden; display: inline-block; border: 1px solid #333; vertical-align: middle; }
.stat-bar-fill { height: 100%; background-color: green; width: 100%; transition: width 0.5s ease-in-out; border-radius: 2px; }
.hunger .stat-bar-fill { background-color: orange; }
.thirst .stat-bar-fill { background-color: #3498db; }

/* Menu Construção */
    #build-menu {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background-color: rgba(50, 50, 50, 0.9); border: 2px solid #aaa; border-radius: 10px;
    padding: 20px; display: none; text-align: left; color: white; width: 300px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5); z-index: 20; pointer-events: none;
}
#build-menu h3 { margin-top: 0; border-bottom: 1px solid #888; padding-bottom: 10px; margin-bottom: 15px; text-align: center; }
#build-menu p { font-size: 14px; margin-bottom: 15px; text-align: center; color: #ccc; }
#build-menu .build-item { margin-bottom: 10px; font-size: 16px; padding: 5px; border: 1px solid transparent; }
#build-menu .build-item.disabled { color: #888; }
#build-menu .build-item.selected { border-color: #fff; background-color: rgba(255, 255, 255, 0.1); }

    #build-preview { position: absolute; pointer-events: none; }
    #lock-status { font-weight: bold; }

    /* Hotbar */
    #hotbar {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex;
    gap: 5px; background-color: rgba(0, 0, 0, 0.5); padding: 5px; border-radius: 5px; z-index: 10;
    }
    .slot {
    width: 50px; height: 50px; border: 2px solid #888; background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px; display: flex; justify-content: center; align-items: center;
    font-size: 18px; font-weight: bold; color: white; position: relative; user-select: none;
    }
    .slot.selected { border-color: #fff; background-color: rgba(255, 255, 255, 0.2); }
    .slot-number { position: absolute; top: 2px; left: 3px; font-size: 10px; color: #ccc; }
    .item-icon { font-size: 24px; }
    .item-quantity { position: absolute; bottom: 2px; right: 3px; font-size: 12px; background-color: rgba(0,0,0,0.7); padding: 1px 3px; border-radius: 2px; }

/* Feedback Dano */
.damage-indicator {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100%; height: 100%; background-color: rgba(255, 0, 0, 0);
    pointer-events: none; z-index: 5; transition: background-color 0.1s ease-out;
}

/* Cooldown visual para comida e água */
.cooldown-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    opacity: 1;
    transition: opacity 0.3s;
    z-index: 1000;
    pointer-events: none;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { transform: translate(-50%, -50%) scale(1); }
    to { transform: translate(-50%, -50%) scale(1.2); }
}