<div class="bg-white p-4 rounded shadow-sm border border-gray-100 h-full transition-all duration-500 ease-in-out transform hover:scale-105"
    x-data="{ showReasoning: false }">
    <div class="flex justify-between items-start mb-2">
        <span class="text-sm text-gray-500 font-medium">{{ name }}</span>
        <button @click="showReasoning = !showReasoning" class="text-gray-400 hover:text-gray-600 focus:outline-none"
            title="Show Reasoning">
            <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                    d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
            </svg>
        </button>
    </div>

    <div class="flex items-baseline">
        <span class="text-3xl font-bold 
            {% if score >= 0.7 %}text-green-600
            {% elif score >= 0.4 %}text-yellow-600
            {% else %}text-red-600{% endif %}">
            {{ score | round(2) }}
        </span>
        <span class="ml-1 text-xs text-gray-400">/ 1.0</span>
    </div>

    <div x-show="showReasoning" x-transition:enter="transition ease-out duration-200"
        x-transition:enter-start="opacity-0 transform scale-95" x-transition:enter-end="opacity-100 transform scale-100"
        class="mt-3 text-xs text-gray-600 bg-gray-50 p-2 rounded border border-gray-100">
        {{ reasoning }}
    </div>
</div>