{% with messages = get_flashed_messages(with_categories=true) %}
  {% if messages %}
    {% for category, message in messages %}
      <div class="alert alert-{{ category }}">
        <p style="text-align: center; font-weight: bold;">{{ message }}</p>
      </div>
    {% endfor %}
  {% endif %}
{% endwith %}