{% extends '_types/root/_index.html' %}

{% block content %}
<div class="flex flex-col items-center justify-center min-h-[50vh] p-8">
  <div class="max-w-md w-full bg-white rounded-lg shadow-lg p-6">
    <div class="flex items-center justify-center w-12 h-12 mx-auto mb-4 rounded-full bg-red-100">
      <svg class="w-6 h-6 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/>
      </svg>
    </div>
    
    <h1 class="text-xl font-semibold text-center text-stone-800 mb-4">
      Something went wrong
    </h1>
    
    {% if messages %}
    <div class="space-y-2 mb-6">
      {% for message in messages %}
      <div class="p-3 bg-red-50 border border-red-200 rounded text-sm text-red-700">
        {{ message }}
      </div>
      {% endfor %}
    </div>
    {% endif %}
    
    <div class="flex flex-col sm:flex-row gap-3 justify-center">
      <button 
        onclick="history.back()"
        class="px-4 py-2 border border-stone-300 text-stone-700 rounded hover:bg-stone-50 transition-colors"
      >
        ← Go Back
      </button>
      <a 
        href="{{ blog_url('/') }}"
        class="px-4 py-2 bg-stone-800 text-white rounded hover:bg-stone-700 transition-colors text-center"
      >
        Home
      </a>
    </div>
  </div>
</div>
{% endblock %}
