{% extends "base.html" %}
{% block content %}
    <section class="panel">
        <h2>Players</h2>
        {% if players %}
            <table>
                <thead>
                    <tr>
                        <th>Player</th>
                        <th>Progress</th>
                        <th>Status</th>
                        <th>Combat Stats</th>
                        <th>Actions</th>
                    </tr>
                </thead>
                <tbody>
                    {% for player in players %}
                        <tr>
                            <td>
                                <strong>{{ player.username }}</strong><br>
                                <span class="muted mini">Wallet ${{ player.wallet_money }}</span>
                            </td>
                            <td>Lv {{ player.level }} • {{ player.xp }} xp</td>
                            <td>
                                <span class="badge {{ 'error' if player.status != 'Ready' else 'success' }}">{{ player.status }}</span>
                            </td>
                            <td>{{ player.effective_strength }}/{{ player.effective_speed }}/{{ player.effective_defense }}/{{ player.effective_dexterity }}</td>
                            <td class="action-row">
                                <a href="/player/{{ player.id }}" class="button subtle">Profile</a>
                                <a href="/attack/{{ player.id }}" class="button primary">Attack</a>
                            </td>
                        </tr>
                    {% endfor %}
                </tbody>
            </table>
        {% else %}
            <p class="muted">No other players yet. Create a second account to test attacks and mugging.</p>
        {% endif %}
    </section>
{% endblock %}