class FooterComponent extends HTMLElement {
  connectedCallback() {
    this.attachShadow({ mode: 'open' });
    this.shadowRoot.innerHTML = `
      <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        footer {
          background: #0f172a;
          color: #94a3b8;
          padding: 4rem 2rem 2rem;
        }
        .footer-container {
          max-width: 1400px;
          margin: 0 auto;
        }
        .footer-grid {
          display: grid;
          grid-template-columns: 2fr 1fr 1fr 1fr;
          gap: 3rem;
          margin-bottom: 3rem;
        }
        .brand h3 {
          font-size: 1.5rem;
          font-weight: 800;
          background: linear-gradient(135deg, #0ea5e9, #d946ef);
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
          margin-bottom: 1rem;
        }
        .brand p {
          line-height: 1.7;
          margin-bottom: 1.5rem;
        }
        .social-links {
          display: flex;
          gap: 1rem;
        }
        .social-links a {
          width: 40px;
          height: 40px;
          border-radius: 10px;
          background: rgba(255,255,255,0.05);
          display: flex;
          align-items: center;
          justify-content: center;
          transition: all 0.2s;
        }
        .social-links a:hover {
          background: linear-gradient(135deg, #0ea5e9, #d946ef);
          transform: translateY(-3px);
        }
        .footer-col h4 {
          color: white;
          font-size: 1rem;
          font-weight: 600;
          margin-bottom: 1.5rem;
        }
        .footer-col ul {
          list-style: none;
        }
        .footer-col li {
          margin-bottom: 0.75rem;
        }
        .footer-col a {
          color: #94a3b8;
          text-decoration: none;
          transition: color 0.2s;
        }
        .footer-col a:hover {
          color: #0ea5e9;
        }
        .footer-bottom {
          border-top: 1px solid rgba(255,255,255,0.1);
          padding-top: 2rem;
          display: flex;
          justify-content: space-between;
          align-items: center;
          flex-wrap: wrap;
          gap: 1rem;
        }
        @media (max-width: 768px) {
          .footer-grid {
            grid-template-columns: 1fr;
            gap: 2rem;
          }
        }
      </style>
      <footer>
        <div class="footer-container">
          <div class="footer-grid">
            <div class="brand">
              <h3>ToothVerse 3D Studio</h3>
              <p>Revolutionizing dental care with cutting-edge 3D visualization technology. Experience the future of dentistry today.</p>
              <div class="social-links">
                <a href="#"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/></svg></a>
                <a href="#"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"/><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"/><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"/></svg></a>
                <a href="#"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"/><rect x="2" y="9" width="4" height="12"/><circle cx="4" cy="4" r="2"/></svg></a>
                <a href="#"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"/></svg></a>
              </div>
            </div>
            <div class="footer-col">
              <h4>Product</h4>
              <ul>
                <li><a href="index.html#solutions">3D Scanner</a></li>
                <li><a href="index.html#solutions">CBCT Imaging</a></li>
                <li><a href="index.html#solutions">CAD Design</a></li>
                <li><a href="index.html#solutions">AI Diagnostics</a></li>
              </ul>
            </div>
            <div class="footer-col">
              <h4>Company</h4>
              <ul>
                <li><a href="#">About Us</a></li>
                <li><a href="#">Careers</a></li>
                <li><a href="#">Press</a></li>
                <li><a href="#">Contact</a></li>
              </ul>
            </div>
            <div class="footer-col">
              <h4>Resources</h4>
              <ul>
                <li><a href="demo.html">3D Demo</a></li>
                <li><a href="#">Documentation</a></li>
                <li><a href="#">API Reference</a></li>
                <li><a href="#">Support</a></li>
              </ul>
            </div>
          </div>
          <div class="footer-bottom">
            <p>&copy; 2024 ToothVerse 3D Studio. All rights reserved.</p>
            <div style="display: flex; gap: 2rem;">
              <a href="#" style="color: #94a3b8; text-decoration: none;">Privacy Policy</a>
              <a href="#" style="color: #94a3b8; text-decoration: none;">Terms of Service</a>
            </div>
          </div>
        </div>
      </footer>
    `;
  }
}
customElements.define('footer-component', FooterComponent);