{% for perk in farm.perks %}
<div class="perk-card">
    <span class="perk-icon" aria-hidden="true">{{ perk.icon }}</span>
    <strong class="perk-name">{{ perk.name }}</strong>
    <span class="perk-level">Lv {{ perk.level }}/{{ perk.max_level }}</span>
    <span class="perk-effect">{{ perk.effect or perk.description }}</span>
    {% if perk.maxed %}
    <span class="perk-maxed">Maxed</span>
    {% else %}
    <form method="post" action="/game/perk" data-game-action="perk">
        <input type="hidden" name="perk" value="{{ perk.key }}">
        <button type="submit" class="btn btn-sm">Upgrade ({{ format_coins(perk.cost) }})</button>
    </form>
    {% endif %}
</div>
{% endfor %}
