{% extends "base.html" %}
{% block content %}
    <section class="grid-3">
        <article class="panel">
            <h2>{{ target.username }}</h2>
            <p class="muted">Level {{ target.level }} • {{ target.xp }} xp</p>
            <p class="muted">Wallet cash at risk: ${{ target.wallet_money }}</p>
            <p class="muted">Status: {{ target.status }}</p>
        </article>
        <article class="panel">
            <h2>Stats</h2>
            <p class="muted">Strength {{ target.effective_strength }}</p>
            <p class="muted">Speed {{ target.effective_speed }}</p>
            <p class="muted">Defense {{ target.effective_defense }}</p>
            <p class="muted">Dexterity {{ target.effective_dexterity }}</p>
        </article>
        <article class="panel">
            <h2>Gear</h2>
            <p class="muted">Weapon: {{ target.weapon_item.name if target.weapon_item else "Fists" }}</p>
            <p class="muted">Armor: {{ target.armor_item.name if target.armor_item else "None" }}</p>
            <p class="muted">Home: {{ target.home_item.name if target.home_item else "Street" }}</p>
            <a href="/attack/{{ target.id }}" class="button primary">Start Attack</a>
        </article>
    </section>

    <section class="panel">
        <h2>Recent Combat</h2>
        {% if combat_logs %}
            <ul class="log-list">
                {% for log in combat_logs %}
                    <li>
                        <strong>{{ log.summary }}</strong>
                        <p class="muted mini">{{ format_ts(log.created_at) }}</p>
                    </li>
                {% endfor %}
            </ul>
        {% else %}
            <p class="muted">No combat recorded for this player yet.</p>
        {% endif %}
    </section>
{% endblock %}
