<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ title }}</title>
    <link rel="icon" type="image/png" href="/static/favicon.png">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #1a2424 0%, #2d3838 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .container {
            max-width: 500px;
            width: 100%;
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }

        .header {
            padding: 32px;
            text-align: center;
        }

        .header.success {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
        }

        .header.error {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        }

        .icon {
            width: 64px;
            height: 64px;
            margin: 0 auto 16px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .icon svg {
            width: 32px;
            height: 32px;
            color: white;
        }

        .header h1 {
            color: white;
            font-size: 24px;
            font-weight: 600;
        }

        .content {
            padding: 32px;
            text-align: center;
        }

        .message {
            font-size: 16px;
            color: #4b5563;
            line-height: 1.6;
            margin-bottom: 24px;
        }

        .action-badge {
            display: inline-block;
            padding: 8px 20px;
            border-radius: 20px;
            font-weight: 600;
            font-size: 14px;
            margin-bottom: 24px;
        }

        .action-badge.approved {
            background: #dcfce7;
            color: #166534;
        }

        .action-badge.rejected {
            background: #fef3c7;
            color: #92400e;
        }

        .info-box {
            background: #f8fafc;
            border-radius: 12px;
            padding: 20px;
            margin-top: 16px;
        }

        .info-box p {
            font-size: 14px;
            color: #64748b;
        }

        .footer {
            padding: 20px 32px;
            background: #f8fafc;
            text-align: center;
            border-top: 1px solid #e2e8f0;
        }

        .footer p {
            font-size: 12px;
            color: #94a3b8;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header {% if success %}success{% else %}error{% endif %}">
            <div class="icon">
                {% if success %}
                <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
                </svg>
                {% else %}
                <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
                </svg>
                {% endif %}
            </div>
            <h1>{{ title }}</h1>
        </div>

        <div class="content">
            {% if success and action %}
            <div class="action-badge {% if action == 'approve' %}approved{% else %}rejected{% endif %}">
                {% if action == 'approve' %}
                Freigegeben
                {% else %}
                Zur Überarbeitung
                {% endif %}
            </div>
            {% endif %}

            <p class="message">{{ message }}</p>

            {% if success %}
            <div class="info-box">
                {% if action == 'approve' %}
                <p>Der Post wurde in die Spalte "Veröffentlicht" verschoben und kann nun auf LinkedIn gepostet werden.</p>
                {% else %}
                <p>Der Post wurde zurück in die Spalte "Vorschläge" verschoben. Der Creator wurde benachrichtigt und wird die gewünschten Änderungen vornehmen.</p>
                {% endif %}
            </div>
            {% endif %}
        </div>

        <div class="footer">
            <p>Du kannst dieses Fenster jetzt schließen.</p>
        </div>
    </div>
</body>
</html>
