const grid = document.getElementById("luaGrid");
symbols.forEach(symbol => {
const tile = document.createElement("div");
tile.className = "lua-tile";
tile.textContent = symbol;
tile.title = "Клікни, щоб скопіювати";
tile.onclick = () => {
const toCopy = symbol === "--[[ ]]" ? "--[[ ]]" : symbol;
navigator.clipboard.writeText(toCopy).then(() => {
tile.classList.add("copied");
setTimeout(() => tile.classList.remove("copied"), 1000);
});
};
grid.appendChild(tile);
});