{% extends 'public_base.html' %}

{% block content %}
<style>
    body {
        font-family: Arial, sans-serif;
        background: #f5f5f5;
        display: flex;
        height: 100vh;
        justify-content: center;
        align-items: center;
    }
    .subscribe-box {
        background: #fff;
        padding: 25px;
        border-radius: 12px;
        box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
        text-align: center;
    }
    input[type="email"] {
        padding: 12px;
        width: 250px;
        border: 1px solid #ccc;
        border-radius: 8px;
        margin-right: 10px;
        outline: none;
    }
    button {
        padding: 12px 20px;
        border: none;
        background: #007bff;
        color: white;
        border-radius: 8px;
        cursor: pointer;
    }
    button:hover {
        background: #0056b3;
    }
    .message {
        margin-top: 15px;
        font-weight: bold;
    }
    .success {
        color: green;
    }
    .warning {
        color: red;
    }
</style>

<div class="subscribe-box">
    <h2>Subscribe to Our Newsletter</h2>
    <form method="post">
        {% csrf_token %}
        <input type="email" name="email" placeholder="Enter your email" required>
        <button type="submit">Subscribe</button>
    </form>

    {% if messages %}
        {% for message in messages %}
            <p class="message {{ message.tags }}">{{ message }}</p>
        {% endfor %}
    {% endif %}
</div>
{% endblock %}
