class ScriptCard extends HTMLElement { static get observedAttributes() { return ['title', 'category', 'description', 'icon', 'downloads', 'rating']; } constructor() { super(); this.attachShadow({ mode: 'open' }); } connectedCallback() { this.render(); } attributeChangedCallback(name, oldValue, newValue) { if (oldValue !== newValue) { this.render(); } } render() { const title = this.getAttribute('title') || 'Untitled Script'; const category = this.getAttribute('category') || 'Miscellaneous'; const description = this.getAttribute('description') || 'No description provided'; const icon = this.getAttribute('icon') || 'code'; const downloads = this.getAttribute('downloads') || '0'; const rating = this.getAttribute('rating') || '0'; this.shadowRoot.innerHTML = `
${description}