promptmaster / index.html
olinux's picture
Add 1 files
3edf9d7 verified
Raw History Blame Contribute Delete
66.8 kB
<!DOCTYPE html> <html lang="fr"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>PromptMaster - Auto-évaluation de vos prompts</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> .token-counter { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.1); padding: 2px 6px; border-radius: 10px; font-size: 12px; } .token-limit { background-color: #FECACA; animation: pulse 2s infinite; } @keyframes pulse { 0% { background-color: #FECACA; } 50% { background-color: #FEE2E2; } 100% { background-color: #FECACA; } } .highlight { background-color: #FEF08A; transition: background-color 0.5s; } #collaboration-feed, #prompt-history { max-height: 400px; overflow-y: auto; } .rating-star { cursor: pointer; transition: transform 0.2s; } .rating-star:hover { transform: scale(1.2); } .active-star { color: #F59E0B; } .prompt-card { transition: all 0.3s; } .prompt-card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); } .selected-prompt { border: 2px solid #3B82F6; background-color: #EFF6FF; } .badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; } .progress-bar { height: 10px; border-radius: 5px; background-color: #E5E7EB; } .progress-fill { height: 100%; border-radius: 5px; background-color: #10B981; transition: width 0.5s ease; } .achievement-card { transition: all 0.3s; transform-style: preserve-3d; } .achievement-card:hover { transform: translateY(-5px) rotateX(5deg); } .unlocked { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(16, 185, 129, 0.2); } .locked { filter: grayscale(80%); opacity: 0.7; } .floating-notification { animation: floatUp 3s forwards; } @keyframes floatUp { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-100px); opacity: 0; } } #assistant-modal { transition: all 0.3s ease; } .modal-hidden { opacity: 0; pointer-events: none; } .modal-visible { opacity: 1; } #share-modal { transition: all 0.3s ease; } .feedback-option { transition: all 0.2s; } .feedback-option:hover { transform: scale(1.05); } .selected-feedback { background-color: #EFF6FF; border-color: #3B82F6; } .social-tab { transition: all 0.3s; } .social-tab.active { border-bottom: 3px solid #3B82F6; font-weight: 600; color: #1E40AF; } .challenge-active { box-shadow: 0 0 0 3px #3B82F6; animation: pulse-border 2s infinite; } @keyframes pulse-border { 0% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.7); } 50% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); } 100% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.7); } } </style> </head> <body class="bg-gray-50 min-h-screen"> <!-- Game Header --> <header class="bg-gradient-to-r from-blue-600 to-indigo-700 text-white shadow-lg"> <div class="container mx-auto px-4 py-6"> <div class="flex flex-col md:flex-row justify-between items-center"> <div class="flex items-center mb-4 md:mb-0"> <i class="fas fa-robot text-3xl mr-3"></i> <div> <h1 class="text-2xl md:text-3xl font-bold">PromptMaster</h1> <p class="text-sm md:text-base opacity-90">Auto-évaluation et amélioration de vos prompts</p> </div> </div> <div class="flex items-center space-x-4"> <div class="bg-white bg-opacity-20 p-2 rounded-lg flex items-center"> <i class="fas fa-coins text-yellow-300 mr-2"></i> <span id="user-points" class="font-bold">0</span> </div> <div class="bg-white bg-opacity-20 p-2 rounded-lg flex items-center"> <i class="fas fa-trophy text-yellow-300 mr-2"></i> <span id="user-level" class="font-bold">1</span> </div> <div class="relative group"> <img src="https://ui-avatars.com/api/?name=Joueur&background=random" class="w-10 h-10 rounded-full cursor-pointer" id="user-avatar"> <div class="absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-50 hidden group-hover:block"> <span class="block px-4 py-2 text-sm text-gray-700 font-medium border-b">Joueur</span> <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Profil</a> <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Déconnexion</a> </div> </div> </div> </div> </div> </header> <!-- Level Progress --> <div class="bg-white shadow-sm"> <div class="container mx-auto px-4 py-2"> <div class="flex items-center"> <span class="text-sm font-medium text-gray-600 mr-2">Niveau 1</span> <div class="flex-1 progress-bar"> <div id="level-progress" class="progress-fill" style="width: 0%"></div> </div> <span class="text-sm font-medium text-gray-600 ml-2">Niveau 2</span> </div> </div> </div> <!-- Main Game Area --> <div class="container mx-auto px-4 py-8"> <!-- Game Grid --> <div class="grid md:grid-cols-3 gap-8"> <!-- Left Column - Challenge Board --> <div class="bg-white rounded-lg shadow-md p-6"> <div class="flex justify-between items-center mb-4"> <h2 class="text-xl font-semibold text-gray-800"> <i class="fas fa-flag-checkered text-blue-500 mr-2"></i> Défis du Jour </h2> <span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded" id="challenge-count">3 défis disponibles</span> </div> <div class="space-y-4 mb-6" id="daily-challenges"> <div class="p-4 border rounded-lg bg-gradient-to-r from-blue-50 to-indigo-50 challenge-card" data-challenge="basic"> <div class="flex justify-between items-start mb-2"> <h3 class="font-medium text-blue-800">Défi de Base</h3> <span class="badge bg-blue-100 text-blue-800">+10 pts</span> </div> <p class="text-sm text-gray-600 mb-3">Crée et évalue un prompt aujourd'hui</p> <div class="flex justify-between items-center"> <div class="text-xs text-gray-500">0/1 complété</div> <button class="start-challenge text-xs bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded" data-challenge="basic"> Commencer </button> </div> </div> <div class="p-4 border rounded-lg bg-gradient-to-r from-purple-50 to-pink-50 challenge-card" data-challenge="technical"> <div class="flex justify-between items-start mb-2"> <h3 class="font-medium text-purple-800">Défi Technique</h3> <span class="badge bg-purple-100 text-purple-800">+25 pts</span> </div> <p class="text-sm text-gray-600 mb-3">Crée un prompt avec plus de 3 éléments spécifiques</p> <div class="flex justify-between items-center"> <div class="text-xs text-gray-500">0/1 complété</div> <button class="start-challenge text-xs bg-purple-600 hover:bg-purple-700 text-white px-3 py-1 rounded" data-challenge="technical"> Commencer </button> </div> </div> <div class="p-4 border rounded-lg bg-gradient-to-r from-green-50 to-teal-50 challenge-card" data-challenge="expert"> <div class="flex justify-between items-start mb-2"> <h3 class="font-medium text-green-800">Défi Expert</h3> <span class="badge bg-green-100 text-green-800">+50 pts</span> </div> <p class="text-sm text-gray-600 mb-3">Obtenir un score d'auto-évaluation supérieur à 80%</p> <div class="flex justify-between items-center"> <div class="text-xs text-gray-500">0/1 complété</div> <button class="start-challenge text-xs bg-green-600 hover:bg-green-700 text-white px-3 py-1 rounded" data-challenge="expert"> Commencer </button> </div> </div> </div> <div class="bg-yellow-50 p-4 rounded-lg border border-yellow-200"> <h3 class="font-semibold text-yellow-800 mb-2"> <i class="fas fa-lightbulb mr-2"></i> Astuce du Jour </h3> <p class="text-sm text-gray-700" id="daily-tip">Les prompts bien structurés incluent: 1) Rôle de l'IA, 2) Tâche spécifique, 3) Format de réponse, 4) Exigences supplémentaires.</p> </div> </div> <!-- Middle Column - Prompt Editor --> <div class="bg-white rounded-lg shadow-md p-6"> <div class="flex justify-between items-center mb-4"> <h2 class="text-xl font-semibold text-gray-800"> <i class="fas fa-edit text-indigo-500 mr-2"></i> Atelier de Création </h2> <div class="flex space-x-2"> <button id="random-theme" class="text-indigo-600 hover:text-indigo-800 text-sm"> <i class="fas fa-random mr-1"></i> Thème </button> <button id="open-assistant" class="text-indigo-600 hover:text-indigo-800 text-sm"> <i class="fas fa-magic mr-1"></i> Assistant </button> </div> </div> <div id="challenge-indicator" class="hidden mb-4 bg-blue-100 border-l-4 border-blue-500 text-blue-700 p-3 rounded"> <p class="font-medium"><i class="fas fa-flag mr-2"></i> Défi en cours: <span id="current-challenge-name"></span></p> <p class="text-sm mt-1" id="current-challenge-desc"></p> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">Titre du prompt</label> <input type="text" id="prompt-title" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500" placeholder="Donnez un titre accrocheur..."> </div> <div class="relative mb-4"> <label class="block text-gray-700 mb-2">Votre prompt</label> <textarea id="prompt-content" rows="8" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500" placeholder="Écrivez votre prompt ici..."></textarea> <div class="token-counter" id="prompt-counter">0/512</div> </div> <div class="flex flex-wrap gap-2 mb-4"> <button id="save-prompt" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-4 rounded-lg transition duration-300 flex-1"> <i class="fas fa-save mr-2"></i> Évaluer </button> <button id="send-group" class="bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded-lg transition duration-300 flex-1"> <i class="fas fa-share-alt mr-2"></i> Partager </button> <button id="clear-prompt" class="bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium py-2 px-4 rounded-lg transition duration-300"> <i class="fas fa-trash-alt mr-2"></i> Effacer </button> </div> <div class="bg-blue-50 p-4 rounded-lg"> <h3 class="font-semibold text-blue-800 mb-2"> <i class="fas fa-chart-line mr-2"></i> Auto-évaluation </h3> <div class="grid grid-cols-3 gap-2 text-center text-xs"> <div class="bg-white p-2 rounded shadow-sm"> <div class="font-bold text-blue-600" id="structure-score">0%</div> <div class="text-gray-600">Structure</div> </div> <div class="bg-white p-2 rounded shadow-sm"> <div class="font-bold text-purple-600" id="specificity-score">0%</div> <div class="text-gray-600">Précision</div> </div> <div class="bg-white p-2 rounded shadow-sm"> <div class="font-bold text-green-600" id="quality-score">0%</div> <div class="text-gray-600">Qualité</div> </div> </div> <div class="mt-3 text-xs text-gray-600" id="evaluation-feedback"> Évaluez votre prompt pour obtenir des suggestions d'amélioration. </div> </div> </div> <!-- Right Column - Community Feed --> <div class="bg-white rounded-lg shadow-md p-6"> <div class="flex justify-between items-center mb-4"> <h2 class="text-xl font-semibold text-gray-800"> <i class="fas fa-history text-green-500 mr-2"></i> Historique </h2> <div class="flex items-center space-x-2"> <button id="refresh-feed" class="text-green-600 hover:text-green-800"> <i class="fas fa-sync-alt"></i> </button> <span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded" id="prompt-count">0 prompts</span> </div> </div> <div id="collaboration-feed" class="space-y-4 mb-4 p-2"> <div class="p-4 rounded-lg bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200"> <div class="flex justify-between items-start mb-2"> <h3 class="font-medium text-blue-800">Analyse de sentiment</h3> <div class="flex"> <span class="badge bg-blue-100 text-blue-800 mr-2">78%</span> </div> </div> <p class="text-sm text-gray-600 mb-3">"Analyse le sentiment de ce texte et donne une note de 1 à 5, avec 1 étant très négatif et 5 très positif."</p> <div class="flex justify-between items-center text-xs text-gray-500"> <span>Créé: 10/06/2023</span> <button class="text-blue-600 hover:text-blue-800">Voir détails</button> </div> </div> </div> <div class="bg-indigo-50 p-4 rounded-lg"> <h3 class="font-semibold text-indigo-800 mb-2"> <i class="fas fa-trophy mr-2"></i> Progression </h3> <div class="space-y-2"> <div class="flex items-center justify-between"> <span class="text-sm">Prompts créés</span> <span class="text-sm font-bold">3/10</span> </div> <div class="w-full bg-gray-200 rounded-full h-2.5"> <div class="bg-blue-600 h-2.5 rounded-full" style="width: 30%"></div> </div> <div class="flex items-center justify-between mt-3"> <span class="text-sm">Score moyen</span> <span class="text-sm font-bold">72%</span> </div> <div class="w-full bg-gray-200 rounded-full h-2.5"> <div class="bg-purple-600 h-2.5 rounded-full" style="width: 72%"></div> </div> </div> </div> </div> </div> <!-- Achievements Section --> <section class="mt-8 bg-white rounded-lg shadow-md p-6"> <h2 class="text-2xl font-semibold text-gray-800 mb-4"> <i class="fas fa-medal text-yellow-500 mr-2"></i> Vos Récompenses </h2> <div class="grid grid-cols-2 md:grid-cols-4 gap-4"> <div class="achievement-card unlocked bg-gradient-to-br from-yellow-50 to-yellow-100 border border-yellow-200 p-4 rounded-lg text-center"> <div class="w-16 h-16 bg-yellow-100 rounded-full flex items-center justify-center mx-auto mb-3"> <i class="fas fa-star text-yellow-500 text-2xl"></i> </div> <h3 class="font-medium text-yellow-800 mb-1">Premier Pas</h3> <p class="text-xs text-gray-600">Créez votre premier prompt</p> </div> <div class="achievement-card unlocked bg-gradient-to-br from-blue-50 to-blue-100 border border-blue-200 p-4 rounded-lg text-center"> <div class="w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-3"> <i class="fas fa-chart-line text-blue-500 text-2xl"></i> </div> <h3 class="font-medium text-blue-800 mb-1">Bonne Structure</h3> <p class="text-xs text-gray-600">Score de structure > 80%</p> </div> <div class="achievement-card locked bg-gradient-to-br from-purple-50 to-purple-100 border border-purple-200 p-4 rounded-lg text-center"> <div class="w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-3"> <i class="fas fa-crown text-purple-500 text-2xl"></i> </div> <h3 class="font-medium text-purple-800 mb-1">Maître Prompt</h3> <p class="text-xs text-gray-600">Score moyen > 90%</p> </div> <div class="achievement-card locked bg-gradient-to-br from-green-50 to-green-100 border border-green-200 p-4 rounded-lg text-center"> <div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-3"> <i class="fas fa-share-alt text-green-500 text-2xl"></i> </div> <h3 class="font-medium text-green-800 mb-1">Partageur</h3> <p class="text-xs text-gray-600">Partagez 5 prompts</p> </div> </div> </section> </div> <!-- Prompt Assistant Modal --> <div id="assistant-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 modal-hidden"> <div class="bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[90vh] flex flex-col"> <div class="p-4 border-b border-gray-200 flex justify-between items-center bg-indigo-50"> <h3 class="text-lg font-semibold text-indigo-800"> <i class="fas fa-magic mr-2"></i> Assistant de Création de Prompts </h3> <button id="close-assistant" class="text-gray-500 hover:text-gray-700"> <i class="fas fa-times"></i> </button> </div> <div class="p-4 overflow-y-auto flex-1"> <div class="mb-4"> <label class="block text-gray-700 mb-2">Type de prompt</label> <select id="assistant-type" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500"> <option value="creative">Création de contenu</option> <option value="analysis">Analyse de texte</option> <option value="translation">Traduction</option> <option value="coding">Assistance au codage</option> <option value="summary">Résumé de texte</option> <option value="ideas">Génération d'idées</option> </select> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">Domaine spécifique</label> <input type="text" id="assistant-domain" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500" placeholder="Ex: marketing, programmation, médecine..."> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">Ton souhaité</label> <div class="flex flex-wrap gap-2"> <button data-tone="professional" class="tone-btn bg-indigo-600 text-white px-3 py-1 rounded-lg text-sm">Professionnel</button> <button data-tone="friendly" class="tone-btn bg-gray-200 hover:bg-gray-300 px-3 py-1 rounded-lg text-sm">Amical</button> <button data-tone="academic" class="tone-btn bg-gray-200 hover:bg-gray-300 px-3 py-1 rounded-lg text-sm">Académique</button> <button data-tone="casual" class="tone-btn bg-gray-200 hover:bg-gray-300 px-3 py-1 rounded-lg text-sm">Décontracté</button> <button data-tone="authoritative" class="tone-btn bg-gray-200 hover:bg-gray-300 px-3 py-1 rounded-lg text-sm">Autoritaire</button> </div> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">Détails supplémentaires</label> <textarea id="assistant-details" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500" placeholder="Décrivez ce que vous souhaitez obtenir..."></textarea> </div> <div class="bg-blue-50 p-4 rounded-lg mb-4"> <h4 class="font-medium text-blue-800 mb-2">Bonnes pratiques</h4> <ul class="list-disc pl-5 text-sm text-gray-700 space-y-1"> <li>Définissez clairement le rôle de l'IA (ex: "Agis comme un expert en...")</li> <li>Spécifiez la tâche de manière précise et concrète</li> <li>Indiquez le format de réponse souhaité</li> <li>Ajoutez des contraintes ou exigences supplémentaires</li> <li>Évitez les ambiguïtés et soyez le plus spécifique possible</li> </ul> </div> </div> <div class="p-4 border-t border-gray-200 flex justify-end space-x-3 bg-gray-50"> <button id="cancel-assistant" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-100"> Annuler </button> <button id="generate-prompt" class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700"> <i class="fas fa-bolt mr-2"></i> Générer Prompt </button> </div> </div> </div> <!-- Share Prompt Modal --> <div id="share-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 modal-hidden"> <div class="bg-white rounded-lg shadow-xl w-full max-w-md max-h-[90vh] flex flex-col"> <div class="p-4 border-b border-gray-200 flex justify-between items-center bg-indigo-50"> <h3 class="text-lg font-semibold text-indigo-800"> <i class="fas fa-share-alt mr-2"></i> Partagez votre Prompt </h3> <button id="close-share" class="text-gray-500 hover:text-gray-700"> <i class="fas fa-times"></i> </button> </div> <div class="p-4 overflow-y-auto flex-1"> <div class="mb-4"> <label class="block text-gray-700 mb-2">Message d'accompagnement</label> <textarea id="share-message" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-indigo-500">J'ai créé ce prompt avec PromptMaster - un outil génial pour améliorer vos interactions avec l'IA ! Créez vos propres prompts avec l'aide d'Olivier Vogler, expert en développement web et IA : https://www.linkedin.com/in/olivier-vogler-342827100/</textarea> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">Plateforme de partage</label> <div class="flex space-x-2"> <button data-platform="twitter" class="social-tab px-4 py-2 active"> <i class="fab fa-twitter mr-2 text-blue-400"></i> Twitter </button> <button data-platform="linkedin" class="social-tab px-4 py-2"> <i class="fab fa-linkedin mr-2 text-blue-600"></i> LinkedIn </button> <button data-platform="facebook" class="social-tab px-4 py-2"> <i class="fab fa-facebook mr-2 text-blue-700"></i> Facebook </button> </div> </div> <div class="mb-4"> <label class="block text-gray-700 mb-2">Votre prompt</label> <div class="bg-gray-50 p-4 rounded-lg border border-gray-200"> <h4 class="font-medium text-gray-800" id="share-prompt-title">Titre du Prompt</h4> <p class="text-sm text-gray-600 mt-2 whitespace-pre-wrap" id="share-prompt-content">Contenu du prompt...</p> </div> </div> <div class="bg-blue-50 p-4 rounded-lg"> <h4 class="font-medium text-blue-800 mb-2">Suggestions de hashtags</h4> <div class="flex flex-wrap gap-2" id="hashtags-container"> <span class="bg-white px-2 py-1 rounded-full text-xs text-blue-600 border border-blue-200 cursor-pointer hover:bg-blue-50">#IA</span> <span class="bg-white px-2 py-1 rounded-full text-xs text-blue-600 border border-blue-200 cursor-pointer hover:bg-blue-50">#PromptEngineering</span> <span class="bg-white px-2 py-1 rounded-full text-xs text-blue-600 border border-blue-200 cursor-pointer hover:bg-blue-50">#ChatGPT</span> <span class="bg-white px-2 py-1 rounded-full text-xs text-blue-600 border border-blue-200 cursor-pointer hover:bg-blue-50">#IntelligenceArtificielle</span> <span class="bg-white px-2 py-1 rounded-full text-xs text-blue-600 border border-blue-200 cursor-pointer hover:bg-blue-50">#Tech</span> </div> </div> </div> <div class="p-4 border-t border-gray-200 flex justify-end space-x-3 bg-gray-50"> <button id="cancel-share" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-100"> Annuler </button> <button id="copy-share" class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700"> <i class="fas fa-copy mr-2"></i> Copier </button> <button id="open-share" class="px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700"> <i class="fas fa-external-link-alt mr-2"></i> Ouvrir </button> </div> </div> </div> <!-- Notification Container --> <div id="notification-container" class="fixed bottom-4 right-4 space-y-2 z-50"></div> <script> // Game State const gameState = { points: 0, level: 1, xp: 0, xpToNextLevel: 100, achievements: { firstPrompt: false, goodStructure: false, masterPrompt: false, sharer: false }, dailyChallenges: { createPrompt: false, specificPrompt: false, highScore: false }, promptsCreated: 0, averageScore: 0, currentChallenge: null }; // Prompt database let promptDB = []; // Initialize the game document.addEventListener('DOMContentLoaded', function() { // Update UI with game state updateGameUI(); // Token counter function countTokens(text) { return Math.ceil(text.length / 4); } function updateCounter() { const text = document.getElementById('prompt-content').value; const counter = document.getElementById('prompt-counter'); const tokenCount = countTokens(text); counter.textContent = `${tokenCount}/512`; if (tokenCount > 512) { counter.classList.add('token-limit'); } else { counter.classList.remove('token-limit'); } } // Evaluate prompt quality function evaluatePrompt(promptText) { let structureScore = 0; let specificityScore = 0; let qualityScore = 0; // Check for structure elements const hasRole = /agis comme|sois|comportes-toi comme/i.test(promptText); const hasTask = /analyse|crée|génère|traduis|résume/i.test(promptText); const hasFormat = /fournis|présente|sous forme de|format/i.test(promptText); const hasDetails = /inclut|avec|détails|spécifique/i.test(promptText); // Structure score (0-100) structureScore += hasRole ? 25 : 0; structureScore += hasTask ? 25 : 0; structureScore += hasFormat ? 25 : 0; structureScore += hasDetails ? 25 : 0; // Specificity score (based on word count and specificity indicators) const wordCount = promptText.split(/\s+/).length; const specificIndicators = (promptText.match(/[0-9]+|spécifique|précis|concret/g) || []).length; specificityScore = Math.min(25 + (wordCount / 2) + (specificIndicators * 5), 100); // Quality score (combination of structure and specificity with bonus for length) qualityScore = Math.min((structureScore * 0.4) + (specificityScore * 0.6), 100); // Update UI document.getElementById('structure-score').textContent = `${Math.round(structureScore)}%`; document.getElementById('specificity-score').textContent = `${Math.round(specificityScore)}%`; document.getElementById('quality-score').textContent = `${Math.round(qualityScore)}%`; // Provide feedback let feedback = ""; if (structureScore < 50) { feedback = "Votre prompt manque de structure. Essayez d'inclure: 1) Rôle de l'IA, 2) Tâche spécifique, 3) Format de réponse."; } else if (specificityScore < 50) { feedback = "Votre prompt pourrait être plus précis. Ajoutez des détails concrets et des exigences spécifiques."; } else if (qualityScore < 70) { feedback = "Bon début! Pour améliorer: précisez le contexte et ajoutez des contraintes si nécessaire."; } else { feedback = "Excellent prompt! Bien structuré et précis, il devrait donner de bons résultats."; } document.getElementById('evaluation-feedback').textContent = feedback; return { structure: Math.round(structureScore), specificity: Math.round(specificityScore), quality: Math.round(qualityScore) }; } // Update game UI function updateGameUI() { document.getElementById('user-points').textContent = gameState.points; document.getElementById('user-level').textContent = gameState.level; document.getElementById('level-progress').style.width = `${(gameState.xp / gameState.xpToNextLevel) * 100}%`; document.getElementById('prompt-count').textContent = `${promptDB.length} prompts`; // Update challenges count const completedChallenges = Object.values(gameState.dailyChallenges).filter(c => c).length; const totalChallenges = Object.keys(gameState.dailyChallenges).length; document.getElementById('challenge-count').textContent = `${totalChallenges - completedChallenges}/${totalChallenges} défis`; // Update daily tip based on level const tips = [ "Les prompts bien structurés incluent: 1) Rôle de l'IA, 2) Tâche spécifique, 3) Format de réponse, 4) Exigences supplémentaires.", "Pour des analyses précises, spécifiez l'échelle et les dimensions à évaluer (ex: sentiment de 1 à 5 avec sous-catégories).", "Utilisez des exemples concrets dans vos prompts pour guider l'IA vers le type de réponse souhaité.", "Pour des traductions, précisez le style (formel, informel) et les termes techniques à conserver.", "En génération de code, spécifiez le langage, les bibliothèques et les bonnes pratiques à suivre." ]; document.getElementById('daily-tip').textContent = tips[Math.min(gameState.level - 1, tips.length - 1)]; } // Show notification function showNotification(message, icon, color) { const notification = document.createElement('div'); notification.className = `floating-notification bg-${color}-100 border border-${color}-200 text-${color}-800 px-4 py-3 rounded-lg flex items-center`; notification.innerHTML = `<i class="fas fa-${icon} mr-2"></i> ${message}`; const container = document.getElementById('notification-container'); container.appendChild(notification); setTimeout(() => { notification.remove(); }, 3000); } // Add points to player function addPoints(amount, reason) { gameState.points += amount; gameState.xp += amount; // Check for level up if (gameState.xp >= gameState.xpToNextLevel) { gameState.level++; gameState.xp = gameState.xp - gameState.xpToNextLevel; gameState.xpToNextLevel = Math.floor(gameState.xpToNextLevel * 1.2); showNotification(`Niveau ${gameState.level} atteint!`, 'trophy', 'yellow'); updateGameUI(); } updateGameUI(); showNotification(`+${amount} points: ${reason}`, 'coins', 'yellow'); } // Start a challenge function startChallenge(challengeType) { // Reset any active challenge document.querySelectorAll('.challenge-card').forEach(card => { card.classList.remove('challenge-active'); }); // Set the new challenge gameState.currentChallenge = challengeType; // Highlight the selected challenge document.querySelector(`.challenge-card[data-challenge="${challengeType}"]`).classList.add('challenge-active'); // Update challenge indicator in editor const challengeIndicator = document.getElementById('challenge-indicator'); challengeIndicator.classList.remove('hidden'); let challengeName = ''; let challengeDesc = ''; switch(challengeType) { case 'basic': challengeName = 'Défi de Base'; challengeDesc = 'Crée et évalue un prompt pour compléter ce défi'; break; case 'technical': challengeName = 'Défi Technique'; challengeDesc = 'Crée un prompt avec plus de 3 éléments spécifiques'; break; case 'expert': challengeName = 'Défi Expert'; challengeDesc = 'Obtenez un score d\'auto-évaluation supérieur à 80%'; break; } document.getElementById('current-challenge-name').textContent = challengeName; document.getElementById('current-challenge-desc').textContent = challengeDesc; showNotification(`Défi "${challengeName}" commencé!`, 'flag', 'blue'); } // Complete a challenge function completeChallenge(challengeType, evaluation) { if (!gameState.currentChallenge || gameState.currentChallenge !== challengeType) { return false; } let completed = false; let points = 0; switch(challengeType) { case 'basic': completed = true; points = 10; break; case 'technical': // Check if prompt has at least 3 specific elements const specificElements = document.getElementById('prompt-content').value.match(/[0-9]+|spécifique|précis|concret/g) || []; if (specificElements.length >= 3) { completed = true; points = 25; } break; case 'expert': if (evaluation.quality > 80) { completed = true; points = 50; } break; } if (completed) { gameState.dailyChallenges[challengeType] = true; // Add bonus points based on quality const qualityBonus = Math.floor(points * (evaluation.quality / 100)); const totalPoints = points + qualityBonus; addPoints(totalPoints, `Défi ${challengeType === 'basic' ? 'de Base' : challengeType === 'technical' ? 'Technique' : 'Expert'} complété`); // Reset challenge gameState.currentChallenge = null; document.querySelector(`.challenge-card[data-challenge="${challengeType}"]`).classList.remove('challenge-active'); document.getElementById('challenge-indicator').classList.add('hidden'); // Update challenge status const challengeCard = document.querySelector(`.challenge-card[data-challenge="${challengeType}"]`); challengeCard.querySelector('.text-xs.text-gray-500').textContent = '1/1 complété'; challengeCard.querySelector('.start-challenge').classList.add('hidden'); return true; } return false; } // Save and evaluate prompt document.getElementById('save-prompt').addEventListener('click', function() { const title = document.getElementById('prompt-title').value.trim(); const content = document.getElementById('prompt-content').value.trim(); if (!content) { showNotification("Veuillez écrire un prompt avant d'évaluer", 'exclamation-triangle', 'red'); return; } if (countTokens(content) > 512) { showNotification("Votre prompt dépasse la limite de 512 tokens", 'exclamation-triangle', 'red'); return; } // Evaluate prompt const evaluation = evaluatePrompt(content); // Add to database const newPrompt = { id: Date.now(), title: title || "Sans titre", content: content, timestamp: new Date().toISOString(), evaluation: evaluation }; promptDB.push(newPrompt); gameState.promptsCreated++; // Update average score const totalScores = promptDB.reduce((sum, prompt) => sum + prompt.evaluation.quality, 0); gameState.averageScore = Math.round(totalScores / promptDB.length); // Check if completing a challenge if (gameState.currentChallenge) { const challengeCompleted = completeChallenge(gameState.currentChallenge, evaluation); if (challengeCompleted) { // Don't add regular points if completing a challenge updateGameUI(); updatePromptHistory(); return; } } // Complete daily challenge if not already completed if (!gameState.dailyChallenges.createPrompt) { gameState.dailyChallenges.createPrompt = true; addPoints(10, "Défi du jour: Création"); } // Check for specific prompt challenge if (!gameState.dailyChallenges.specificPrompt && content.split(/[0-9]+|spécifique|précis|concret/g).length >= 4) { gameState.dailyChallenges.specificPrompt = true; addPoints(25, "Défi du jour: Précision"); } // Check for high score challenge if (!gameState.dailyChallenges.highScore && evaluation.quality > 80) { gameState.dailyChallenges.highScore = true; addPoints(50, "Défi du jour: Score élevé"); } // Check for first prompt achievement if (!gameState.achievements.firstPrompt) { gameState.achievements.firstPrompt = true; addPoints(20, "Récompense: Premier Prompt"); } // Check for good structure achievement if (!gameState.achievements.goodStructure && evaluation.structure > 80) { gameState.achievements.goodStructure = true; addPoints(30, "Récompense: Bonne Structure"); } // Update UI updateGameUI(); updatePromptHistory(); showNotification("Prompt évalué avec succès", 'check-circle', 'green'); }); // Share prompt document.getElementById('send-group').addEventListener('click', function() { const title = document.getElementById('prompt-title').value.trim(); const content = document.getElementById('prompt-content').value.trim(); if (!content) { showNotification("Veuillez écrire un prompt avant de partager", 'exclamation-triangle', 'red'); return; } if (countTokens(content) > 512) { showNotification("Votre prompt dépasse la limite de 512 tokens", 'exclamation-triangle', 'red'); return; } // Open share modal document.getElementById('share-prompt-title').textContent = title || "Prompt sans titre"; document.getElementById('share-prompt-content').textContent = content; // Show modal document.getElementById('share-modal').classList.remove('modal-hidden'); document.getElementById('share-modal').classList.add('modal-visible'); }); // Clear prompt document.getElementById('clear-prompt').addEventListener('click', function() { document.getElementById('prompt-title').value = ""; document.getElementById('prompt-content').value = ""; updateCounter(); // Reset evaluation document.getElementById('structure-score').textContent = "0%"; document.getElementById('specificity-score').textContent = "0%"; document.getElementById('quality-score').textContent = "0%"; document.getElementById('evaluation-feedback').textContent = "Évaluez votre prompt pour obtenir des suggestions d'amélioration."; }); // Random theme button document.getElementById('random-theme').addEventListener('click', function() { const themes = [ "Générateur de noms de produits", "Analyse de sentiment avancée", "Assistant de rédaction créative", "Extracteur d'informations clés", "Traducteur technique", "Générateur d'idées innovantes", "Assistant de codage", "Analyseur de texte juridique" ]; const randomTheme = themes[Math.floor(Math.random() * themes.length)]; document.getElementById('prompt-title').value = randomTheme; showNotification(`Thème suggéré: ${randomTheme}`, 'lightbulb', 'purple'); }); // Refresh feed document.getElementById('refresh-feed').addEventListener('click', function() { updatePromptHistory(); // Rotate icon const icon = this.querySelector('i'); icon.classList.add('animate-spin'); setTimeout(() => { icon.classList.remove('animate-spin'); }, 500); }); // Start challenge buttons document.querySelectorAll('.start-challenge').forEach(button => { button.addEventListener('click', function() { const challengeType = this.dataset.challenge; startChallenge(challengeType); }); }); // Update prompt history function updatePromptHistory() { const feed = document.getElementById('collaboration-feed'); feed.innerHTML = ""; if (promptDB.length === 0) { feed.innerHTML = '<div class="p-4 rounded-lg bg-gray-50"><p class="text-gray-500 text-center">Aucun prompt sauvegardé</p></div>'; return; } // Sort by timestamp (newest first) const sortedPrompts = [...promptDB].sort((a, b) => new Date(b.timestamp) - new Date(a.timestamp)); sortedPrompts.forEach(prompt => { const promptDiv = document.createElement('div'); promptDiv.className = 'p-4 rounded-lg bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200'; const title = document.createElement('h3'); title.className = 'font-medium text-blue-800 mb-2'; title.textContent = prompt.title; const scoreBadge = document.createElement('span'); scoreBadge.className = 'badge bg-blue-100 text-blue-800'; scoreBadge.textContent = `${prompt.evaluation.quality}%`; const headerDiv = document.createElement('div'); headerDiv.className = 'flex justify-between items-start mb-2'; headerDiv.appendChild(title); headerDiv.appendChild(scoreBadge); const content = document.createElement('p'); content.className = 'text-sm text-gray-600 mb-3'; content.textContent = prompt.content.substring(0, 200) + (prompt.content.length > 200 ? "..." : ""); const date = document.createElement('span'); date.className = 'text-xs text-gray-500'; date.textContent = `Créé: ${new Date(prompt.timestamp).toLocaleDateString()}`; const detailsBtn = document.createElement('button'); detailsBtn.className = 'text-blue-600 hover:text-blue-800 text-xs'; detailsBtn.textContent = 'Voir détails'; detailsBtn.addEventListener('click', function() { // Load prompt into editor document.getElementById('prompt-title').value = prompt.title; document.getElementById('prompt-content').value = prompt.content; updateCounter(); evaluatePrompt(prompt.content); }); const footerDiv = document.createElement('div'); footerDiv.className = 'flex justify-between items-center'; footerDiv.appendChild(date); footerDiv.appendChild(detailsBtn); promptDiv.appendChild(headerDiv); promptDiv.appendChild(content); promptDiv.appendChild(footerDiv); feed.appendChild(promptDiv); }); } // Prompt Assistant Functions const assistantModal = document.getElementById('assistant-modal'); const openAssistantBtn = document.getElementById('open-assistant'); const closeAssistantBtn = document.getElementById('close-assistant'); const cancelAssistantBtn = document.getElementById('cancel-assistant'); const generatePromptBtn = document.getElementById('generate-prompt'); const toneButtons = document.querySelectorAll('.tone-btn'); // Open assistant modal openAssistantBtn.addEventListener('click', function() { assistantModal.classList.remove('modal-hidden'); assistantModal.classList.add('modal-visible'); }); // Close assistant modal function closeAssistant() { assistantModal.classList.remove('modal-visible'); assistantModal.classList.add('modal-hidden'); } closeAssistantBtn.addEventListener('click', closeAssistant); cancelAssistantBtn.addEventListener('click', closeAssistant); // Tone selection let selectedTone = 'professional'; toneButtons.forEach(button => { button.addEventListener('click', function() { toneButtons.forEach(btn => btn.classList.remove('bg-indigo-600', 'text-white')); this.classList.add('bg-indigo-600', 'text-white'); selectedTone = this.dataset.tone; }); }); // Generate prompt generatePromptBtn.addEventListener('click', function() { const type = document.getElementById('assistant-type').value; const domain = document.getElementById('assistant-domain').value; const details = document.getElementById('assistant-details').value; if (!domain) { showNotification("Veuillez spécifier un domaine", 'exclamation-triangle', 'red'); return; } let generatedPrompt = ""; switch(type) { case 'creative': generatedPrompt = `Agis comme un expert en ${domain} avec une grande créativité. ${details || "Crée un contenu original et engageant qui captivera le public cible."} Utilise un ton ${getToneDescription()}. Structure ta réponse de manière claire et inclut des exemples concrets si pertinent.`; break; case 'analysis': generatedPrompt = `Agis comme un analyste expert en ${domain}. ${details || "Analyse le texte ou les données fournies de manière approfondie."} Utilise un ton ${getToneDescription()}. Fournis une analyse structurée avec: 1) Points clés, 2) Observations détaillées, 3) Conclusions et recommandations.`; break; case 'translation': generatedPrompt = `Agis comme un traductur professionnel spécialisé en ${domain}. ${details || "Traduis le texte fourni en conservant le sens original tout en l'adaptant culturellement."} Utilise un ton ${getToneDescription()}. Pour les termes techniques ou ambigus, fournis des alternatives avec des explications.`; break; case 'coding': generatedPrompt = `Agis comme un développeur senior expert en ${domain}. ${details || "Résous le problème de programmation suivant de manière optimale."} Utilise un ton ${getToneDescription()}. Fournis: 1) Une solution fonctionnelle, 2) Une explication claire du code, 3) Des alternatives possibles, 4) Des bonnes pratiques associées.`; break; case 'summary': generatedPrompt = `Agis comme un expert en synthèse d'information en ${domain}. ${details || "Résume le texte fourni en conservant l'essentiel."} Utilise un ton ${getToneDescription()}. Le résumé doit être concis mais complet, avec une hiérarchie claire des informations. Inclus les points clés et les conclusions principales.`; break; case 'ideas': generatedPrompt = `Agis comme un expert en innovation et créativité en ${domain}. ${details || "Génère des idées originales et pertinentes pour le sujet donné."} Utilise un ton ${getToneDescription()}. Fournis plusieurs options avec pour chacune: 1) Description, 2) Avantages, 3) Mise en œuvre possible, 4) Potentiels défis.`; break; default: generatedPrompt = `Agis comme un expert en ${domain}. ${details || "Effectue la tâche demandée avec professionnalisme et précision."} Utilise un ton ${getToneDescription()}. Structure ta réponse de manière claire et logique, en fournissant des détails pertinents et des exemples si nécessaire.`; } // Insert generated prompt into editor document.getElementById('prompt-content').value = generatedPrompt; updateCounter(); // Suggest a title if empty if (!document.getElementById('prompt-title').value) { const typeNames = { 'creative': 'Création de contenu', 'analysis': 'Analyse experte', 'translation': 'Traduction professionnelle', 'coding': 'Solution de codage', 'summary': 'Résumé expert', 'ideas': 'Génération d\'idées' }; document.getElementById('prompt-title').value = `${typeNames[type]} en ${domain}`; } closeAssistant(); showNotification("Prompt généré avec succès!", 'check-circle', 'green'); }); function getToneDescription() { switch(selectedTone) { case 'professional': return 'professionnel et technique'; case 'friendly': return 'amical et accessible'; case 'academic': return 'académique et précis'; case 'casual': return 'décontracté et conversationnel'; case 'authoritative': return 'autoritaire et direct'; default: return 'professionnel'; } } // Share Modal Functions const shareModal = document.getElementById('share-modal'); const closeShareBtn = document.getElementById('close-share'); const cancelShareBtn = document.getElementById('cancel-share'); const copyShareBtn = document.getElementById('copy-share'); const openShareBtn = document.getElementById('open-share'); const socialTabs = document.querySelectorAll('.social-tab'); let currentPlatform = 'twitter'; // Close share modal function closeShare() { shareModal.classList.remove('modal-visible'); shareModal.classList.add('modal-hidden'); } closeShareBtn.addEventListener('click', closeShare); cancelShareBtn.addEventListener('click', closeShare); // Social tab selection socialTabs.forEach(tab => { tab.addEventListener('click', function() { socialTabs.forEach(t => t.classList.remove('active')); this.classList.add('active'); currentPlatform = this.dataset.platform; }); }); // Copy share content copyShareBtn.addEventListener('click', function() { const message = document.getElementById('share-message').value; const title = document.getElementById('share-prompt-title').textContent; const content = document.getElementById('share-prompt-content').textContent; const fullText = `${message}\n\n${title}:\n${content}\n\n#IA #PromptEngineering #ChatGPT`; navigator.clipboard.writeText(fullText).then(() => { showNotification("Contenu copié dans le presse-papier!", 'copy', 'blue'); // Check for sharer achievement if (!gameState.achievements.sharer) { gameState.promptsShared = (gameState.promptsShared || 0) + 1; if (gameState.promptsShared >= 5) { gameState.achievements.sharer = true; addPoints(50, "Récompense: Partageur"); } } }); }); // Open share in platform (simulated) openShareBtn.addEventListener('click', function() { let platformName = ""; switch(currentPlatform) { case 'twitter': platformName = "Twitter"; break; case 'linkedin': platformName = "LinkedIn"; break; case 'facebook': platformName = "Facebook"; break; } showNotification(`Ouverture dans ${platformName} (simulé)`, 'share-alt', 'green'); closeShare(); }); // Initialize with some mock data function initializeMockData() { // Add some prompts promptDB.push({ id: 1, title: "Analyse de sentiment", content: "Analyse le sentiment de ce texte et donne une note de 1 à 5, avec 1 étant très négatif et 5 très positif. Fournis une brève explication pour justifier la note.", timestamp: "2023-06-10T09:15:00", evaluation: { structure: 75, specificity: 80, quality: 78 } }); promptDB.push({ id: 2, title: "Générateur de noms de produits", content: "Génère 5 noms créatifs pour un nouveau produit technologique. Les noms doivent être: 1) Accrocheurs, 2) Faciles à retenir, 3) Refléter l'innovation, 4) Disponibles en .com. Fournis une courte explication pour chaque nom.", timestamp: "2023-06-11T11:20:00", evaluation: { structure: 90, specificity: 85, quality: 88 } }); // Set initial game state gameState.points = 35; gameState.xp = 35; gameState.achievements.firstPrompt = true; gameState.achievements.goodStructure = true; gameState.dailyChallenges.createPrompt = true; gameState.promptsCreated = 2; gameState.averageScore = 83; } // Initialize initializeMockData(); updateGameUI(); updatePromptHistory(); // Set up event listeners for prompt content document.getElementById('prompt-content').addEventListener('input', updateCounter); }); </script> <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=olinux/promptmaster" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> </html>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PromptMaster - Auto-évaluation de vos prompts</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.token-counter {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
background: rgba(0,0,0,0.1);
padding: 2px 6px;
border-radius: 10px;
font-size: 12px;
}
.token-limit {
background-color: #FECACA;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { background-color: #FECACA; }
50% { background-color: #FEE2E2; }
100% { background-color: #FECACA; }
}
.highlight {
background-color: #FEF08A;
transition: background-color 0.5s;
}
#collaboration-feed, #prompt-history {
max-height: 400px;
overflow-y: auto;
}
.rating-star {
cursor: pointer;
transition: transform 0.2s;
}
.rating-star:hover {
transform: scale(1.2);
}
.active-star {
color: #F59E0B;
}
.prompt-card {
transition: all 0.3s;
}
.prompt-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.selected-prompt {
border: 2px solid #3B82F6;
background-color: #EFF6FF;
}
.badge {
display: inline-block;
padding: 2px 8px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
}
.progress-bar {
height: 10px;
border-radius: 5px;
background-color: #E5E7EB;
}
.progress-fill {
height: 100%;
border-radius: 5px;
background-color: #10B981;
transition: width 0.5s ease;
}
.achievement-card {
transition: all 0.3s;
transform-style: preserve-3d;
}
.achievement-card:hover {
transform: translateY(-5px) rotateX(5deg);
}
.unlocked {
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(16, 185, 129, 0.2);
}
.locked {
filter: grayscale(80%);
opacity: 0.7;
}
.floating-notification {
animation: floatUp 3s forwards;
}
@keyframes floatUp {
0% { transform: translateY(0); opacity: 1; }
100% { transform: translateY(-100px); opacity: 0; }
}
#assistant-modal {
transition: all 0.3s ease;
}
.modal-hidden {