{% extends "onboarding/base.html" %}

{% block title %}Setup abgeschlossen{% endblock %}

{% block content %}
<div class="text-center">
    <!-- Success Icon -->
    <div class="w-20 h-20 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-6">
        <svg class="w-10 h-10 text-green-500" 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>
    </div>

    <h1 class="text-2xl font-bold text-white mb-2">Setup abgeschlossen!</h1>
    <p class="text-gray-400 mb-8">Dein Profil wurde erfolgreich eingerichtet. Du kannst jetzt mit dem Erstellen von Posts beginnen.</p>

    <!-- Summary -->
    <div class="bg-brand-bg border border-gray-600 rounded-lg p-6 mb-8 text-left">
        <h3 class="text-lg font-medium text-white mb-4">Zusammenfassung</h3>

        <div class="space-y-3 text-sm">
            <div class="flex justify-between">
                <span class="text-gray-400">LinkedIn-Profil</span>
                <span class="text-white">{{ profile.linkedin_url }}</span>
            </div>
            <div class="flex justify-between">
                <span class="text-gray-400">Posts analysiert</span>
                <span class="text-white">{{ posts_count }}</span>
            </div>
            <div class="flex justify-between">
                <span class="text-gray-400">Post-Typen definiert</span>
                <span class="text-white">{{ post_types_count }}</span>
            </div>
            <div class="flex justify-between">
                <span class="text-gray-400">Profil-Analyse</span>
                {% if profile_analysis %}
                <span class="text-green-400">Abgeschlossen</span>
                {% elif analysis_started %}
                <span class="text-brand-highlight animate-pulse">Läuft im Hintergrund...</span>
                {% else %}
                <span class="text-gray-500">Ausstehend</span>
                {% endif %}
            </div>
        </div>
    </div>

    {% if analysis_started %}
    <!-- Analysis Running Info -->
    <div class="bg-brand-highlight/10 border border-brand-highlight/30 rounded-lg p-4 mb-8 text-left">
        <div class="flex items-start gap-3">
            <svg class="w-5 h-5 text-brand-highlight mt-0.5 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
            </svg>
            <div>
                <h4 class="font-medium text-brand-highlight">Analyse läuft im Hintergrund</h4>
                <p class="text-sm text-gray-400 mt-1">
                    Wir analysieren jetzt dein Profil, kategorisieren deine Posts und analysieren deine Post-Typen.
                    Du kannst das Dashboard bereits nutzen - die Fortschrittsanzeige siehst du unten rechts.
                </p>
            </div>
        </div>
    </div>
    {% endif %}

    <!-- Next Steps -->
    <div class="grid md:grid-cols-3 gap-4 mb-8">
        <div class="bg-brand-bg border border-gray-600 rounded-lg p-4">
            <div class="w-10 h-10 bg-brand-highlight/20 rounded-lg flex items-center justify-center mb-3 mx-auto">
                <svg class="w-5 h-5 text-brand-highlight" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
                </svg>
            </div>
            <h4 class="font-medium text-white mb-1">Topics recherchieren</h4>
            <p class="text-xs text-gray-400">Finde relevante Themen für deine nächsten Posts</p>
        </div>

        <div class="bg-brand-bg border border-gray-600 rounded-lg p-4">
            <div class="w-10 h-10 bg-brand-highlight/20 rounded-lg flex items-center justify-center mb-3 mx-auto">
                <svg class="w-5 h-5 text-brand-highlight" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"/>
                </svg>
            </div>
            <h4 class="font-medium text-white mb-1">Post erstellen</h4>
            <p class="text-xs text-gray-400">Schreibe deinen ersten KI-unterstützten Post</p>
        </div>

        <div class="bg-brand-bg border border-gray-600 rounded-lg p-4">
            <div class="w-10 h-10 bg-brand-highlight/20 rounded-lg flex items-center justify-center mb-3 mx-auto">
                <svg class="w-5 h-5 text-brand-highlight" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/>
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
                </svg>
            </div>
            <h4 class="font-medium text-white mb-1">Einstellungen</h4>
            <p class="text-xs text-gray-400">Passe dein Profil weiter an</p>
        </div>
    </div>

    <!-- CTA -->
    <a href="/" class="inline-block btn-primary font-medium py-3 px-8 rounded-lg transition-colors">
        Zum Dashboard
    </a>
</div>
{% endblock %}
