{% extends "base.html" %}

{% block content %}
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header bg-danger text-white">
                    <h4 class="mb-0">Error {{ code }}</h4>
                </div>
                <div class="card-body">
                    <h5 class="card-title">{{ message }}</h5>
                    <p class="card-text">
                        {% if code == 404 %}
                            The page you're looking for doesn't exist.
                        {% elif code == 403 %}
                            You don't have permission to access this resource.
                        {% elif code == 400 %}
                            The request was invalid.
                        {% else %}
                            An unexpected error occurred. Please try again later.
                        {% endif %}
                    </p>
                    <a href="{{ url_for('main.home') }}" class="btn btn-primary">Return to Home</a>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 