{% extends 'base.html' %}
{% load static %}

{% block content %}
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card shadow-lg p-4 custom-card">
                <h2 class="card-title text-center mb-4">
                    {% if student_profile %}Edit Your Profile{% else %}Create Your Profile{% endif %}
                </h2>
                <form method="post">
                    {% csrf_token %}
                    {% for field in form %}
                        <div class="mb-3">
                            <label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
                            {{ field }}
                            {% if field.help_text %}
                                <div class="form-text text-muted">{{ field.help_text }}</div>
                            {% endif %}
                            {% if field.errors %}
                                {% for error in field.errors %}
                                    <div class="text-danger">{{ error }}</div>
                                {% endfor %}
                            {% endif %}
                        </div>
                    {% endfor %}
                    <button type="submit" class="btn btn-primary w-100 mt-3">Save Profile</button>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock content %}
