<footer class="bg-footer text-white p-4">
  <div class="container">
    <div class="footer-shell mb-4">
      <div class="footer-box">
        <h5>Underground FX Radio</h5>
        <p class="mb-2">Big sound, bold visuals, live DJs, station chat and community energy — all tuned for Underground FX.</p>
        <a href="/popout-player.php" target="_blank" rel="noopener">Launch popout player</a>
      </div>
      <div class="footer-box">
        <h5>Live Station Stats</h5>
        <p class="mb-1">🎧 Current Listeners: <span id="currentListeners">--</span></p>
        <p class="mb-0">👀 Visitors Online: <span id="visitorsOnline">--</span></p>
      </div>
      <div class="footer-box">
        <h5>Quick Links</h5>
        <p class="mb-1"><a href="/requests.php">Song requests</a> · <a href="/schedule.php">DJ schedule</a> · <a href="/chat.php">Live chat</a></p>
        <p class="mb-0"><a href="https://discord.gg/hA2uWMpCT8" target="_blank" rel="noopener">Discord</a> · <a href="/contact.php">Contact</a> · <a href="/team.php">Join the team</a> · <a href="/admin.php">Admin</a></p>
      </div>
    </div>
    <div class="d-flex flex-column flex-lg-row justify-content-between align-items-center gap-2 pt-2" style="border-top:1px solid rgba(255,122,24,.16)">
      <p class="mb-0">Underground FX Radio © 2026 · Powered by ABC Computing · Hosted by Broadcasturself</p>
      <a href="#" onclick="window.scrollTo({ top: 0, behavior: 'smooth' }); return false;">Back to top ↑</a>
    </div>
  </div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="/assets/js/jquery.win.js"></script>
<script src="/assets/js/ugfx-site.js"></script>
<script>
function updateTrack(){fetch('/live-track.php').then(r=>r.text()).then(html=>{const el=document.getElementById('track-text'); if(el) el.innerHTML=html; const el2=document.getElementById('track-inline'); if(el2) el2.innerHTML=html; const el3=document.getElementById('navNowPlaying'); if(el3) el3.innerHTML=html;}).catch(()=>{const el=document.getElementById('track-text'); if(el) el.textContent='Unable to load now playing';});}
function updateDJSchedule(){fetch('/live-djs.php').then(r=>r.json()).then(data=>{[['dj-now','hour-now','current'],['dj-next','hour-next','next'],['dj-after','hour-after','after']].forEach(([a,b,k])=>{const n=document.getElementById(a); const h=document.getElementById(b); if(n&&data[k]) n.textContent=data[k].dj||'Unknown'; if(h&&data[k]) h.textContent=data[k].hour||'--:--';});}).catch(()=>{});}
async function updateFooterStats(){try{const [listenersRes, visitorsRes] = await Promise.all([fetch('/api/stats.php',{cache:'no-store'}),fetch('/api/ping.php',{cache:'no-store'})]); const listenersData = await listenersRes.json(); const visitorsData = await visitorsRes.json(); const listenersEl=document.getElementById('currentListeners'); const visitorsEl=document.getElementById('visitorsOnline'); if(listenersEl) listenersEl.textContent=listenersData&&listenersData.ok?listenersData.listeners:'--'; if(visitorsEl) visitorsEl.textContent=visitorsData&&visitorsData.ok?visitorsData.online:'--';}catch(e){}}
updateTrack(); updateDJSchedule(); updateFooterStats();
setInterval(updateTrack,30000); setInterval(updateDJSchedule,60000); setInterval(updateFooterStats,15000);
</script>
</body>
</html>
