<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JustEmbed - Setup</title>
    <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-50 min-h-screen flex items-center justify-center">
    <div class="max-w-2xl w-full mx-4">
        <div class="bg-white rounded-lg shadow-lg p-8">
            <div class="text-center mb-8">
                <h1 class="text-4xl font-bold text-gray-900 mb-2">🚀 JustEmbed</h1>
                <p class="text-gray-600">Choose a workspace folder to get started</p>
            </div>

            <form method="post" action="/set-workspace" class="space-y-6">
                <div class="bg-blue-50 border border-blue-200 rounded-lg p-4">
                    <h3 class="text-sm font-semibold text-blue-900 mb-3">📁 Example Paths:</h3>
                    <div class="space-y-2 text-sm font-mono">
                        <div class="bg-white p-2 rounded border border-blue-100">
                            <span class="text-gray-500">Windows:</span> <span class="text-blue-700">C:\Users\YourName\Documents\justembed</span>
                        </div>
                        <div class="bg-white p-2 rounded border border-blue-100">
                            <span class="text-gray-500">macOS:</span> <span class="text-blue-700">/Users/YourName/Documents/justembed</span>
                        </div>
                        <div class="bg-white p-2 rounded border border-blue-100">
                            <span class="text-gray-500">Linux:</span> <span class="text-blue-700">/home/yourname/Documents/justembed</span>
                        </div>
                    </div>
                </div>

                <div>
                    <label for="workspace" class="block text-sm font-medium text-gray-700 mb-2">
                        Workspace Folder Path
                    </label>
                    <input 
                        type="text" 
                        id="workspace"
                        name="workspace" 
                        required 
                        class="w-full px-4 py-3 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent font-mono text-sm"
                        placeholder="Enter full path to your workspace folder"
                    >
                </div>

                <div class="bg-yellow-50 border border-yellow-200 rounded-lg p-4">
                    <p class="text-sm text-yellow-800 mb-2">
                        <strong>Note:</strong> The folder will be created if it doesn't exist.
                    </p>
                    <div class="mt-3 bg-white rounded p-3 font-mono text-xs text-gray-700">
                        <div>workspace/</div>
                        <div class="ml-4">├── kb/ <span class="text-gray-500">(knowledge bases)</span></div>
                        <div class="ml-4">└── custom_models/ <span class="text-gray-500">(trained models)</span></div>
                    </div>
                </div>

                <button 
                    type="submit" 
                    class="w-full px-6 py-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors font-medium text-lg"
                >
                    Create Workspace & Continue
                </button>
            </form>
        </div>

        <footer class="mt-8 text-center text-sm text-gray-500">
            Copyright © Krishnamoorthy Sankaran | 
            <a href="https://github.com/sekarkrishna/justembed" target="_blank" class="text-blue-600 hover:text-blue-800">GitHub</a> | 
            <a href="https://pypi.org/project/justembed" target="_blank" class="text-blue-600 hover:text-blue-800">PyPI</a>
        </footer>
    </div>
</body>
</html>
