document.addEventListener("DOMContentLoaded",function(){const r=new ColorThief;document.querySelectorAll(".card.style-6 img").forEach(function(e){e.setAttribute("crossorigin","anonymous"),e.complete?s(e):e.addEventListener("load",function(){s(e)})});function s(e){const t=r.getColor(e),n=`rgb(${t[0]}, ${t[1]}, ${t[2]})`;e.closest(".card").style.setProperty("--glow-color",n),e.closest(".card").classList.add("glow"),e.previousElementSibling.classList.add("d-none")}const o=document.getElementById("skinPreviewModal");o.addEventListener("show.bs.modal",function(e){const t=e.relatedTarget,n=t.getAttribute("data-skin-image"),a=t.getAttribute("data-skin-name"),c=o.querySelector("#skinPreviewImage"),l=o.querySelector("#skinPreviewName");c.src=n,l.textContent=a})});
