{% extends 'admin.html' %}
{% block content %}
<h1>Statistics</h1>
<div class="stats-overview">
    <p><strong>Total Users:</strong> {{ stats.users }}</p>
    <p><strong>Total Songs:</strong> {{ stats.songs }}</p>
    <p><strong>Total Plays:</strong> {{ stats.plays }}</p>
</div>

<h2>Top Played Songs</h2>
<table>
    <tr><th>ID</th><th>Title</th><th>Plays</th></tr>
    {% for song in top_songs %}
    <tr>
        <td>{{ song.id }}</td>
        <td>{{ song.title }}</td>
        <td>{{ song.play_count }}</td>
    </tr>
    {% endfor %}
</table>
{% endblock %}