<?php require_once __DIR__ . '/includes/bootstrap.php';
$pageTitle = 'Listen Live | Underground FX Radio';
$currentPage = basename(__FILE__);
include __DIR__ . '/includes/header.php';
?>
<section class="ugfx-page-hero">
  <div class="container-xxl">
    <div class="ugfx-kicker"><i class="bi bi-lightning-charge-fill"></i> Premium launch build</div>
    <h1 class="page-title">Listen live</h1>
    <p class="page-copy">High-end player page with premium stream presentation, temporary metadata, and direct-stream controls ready for the final Underground stream handoff.</p>
  </div>
</section>

<section class="section-pad pt-3">
  <div class="container-xxl">
    <?php $np = ugfx_now_playing(); $show = ugfx_current_show(); ?>
    <div class="ugfx-grid-2">
      <div class="ugfx-card p-4">
        <div class="row g-4 align-items-center">
          <div class="col-md-5"><img src="<?= htmlspecialchars($np['art']) ?>" alt="art" class="img-fluid rounded-4"></div>
          <div class="col-md-7">
            <div class="ugfx-micro-label">NOW PLAYING</div>
            <h2><?= htmlspecialchars($np['title']) ?></h2>
            <p class="text-secondary mb-2">Show: <?= htmlspecialchars($np['artist']) ?></p>
            <div class="d-flex gap-2 flex-wrap mb-4">
              <span class="ugfx-chip"><i class="bi bi-broadcast"></i> <?= htmlspecialchars($np['status']) ?></span>
              <span class="ugfx-chip"><i class="bi bi-headphones"></i> <?= (int) $np['listeners'] ?> listening</span>
              <span class="ugfx-chip"><i class="bi bi-calendar-event"></i> Next: <?= htmlspecialchars($show['next']) ?></span>
            </div>
            <div class="d-flex gap-2 flex-wrap">
              <button class="btn ugfx-btn-primary" data-player-toggle><i class="bi bi-play-fill"></i> Start Stream</button>
              <button class="btn ugfx-btn-outline" data-copy-stream="<?= htmlspecialchars($ugfx['stream_url']) ?>">Copy Stream Link</button>
              <a class="btn ugfx-btn-outline" href="player-popup.php" target="_blank" rel="noopener">Popout Player</a>
            </div>
          </div>
        </div>
      </div>
      <div class="ugfx-card p-4">
        <div class="ugfx-micro-label">STREAM NOTES</div>
        <h3>Launch build stream handling</h3>
        <ul class="text-secondary mb-4">
          <li>Direct stream URL active as placeholder.</li>
          <li>Page is ready for final now-playing API wiring.</li>
          <li>Share and popout flows are already scaffolded.</li>
          <li>Backup stream / failover block can be added next.</li>
        </ul>
        <div class="ugfx-card p-3">
          <div class="ugfx-micro-label">STREAM URL</div>
          <code class="text-warning"><?= htmlspecialchars($ugfx['stream_url']) ?></code>
        </div>
      </div>
    </div>
  </div>
</section>

<?php include __DIR__ . '/includes/footer.php'; ?>
