AdronX commited on
Commit
6c2cd43
·
verified ·
1 Parent(s): 4717209

🐳 20/02 - 00:14 - this is a gpt congiuration so add this a seprate tab MASTER PROMPT 👇 You are a professional AI prompt engineer. Your task is to generate 10 different miniature, realistic, compact

Browse files
Files changed (1) hide show
  1. index.html +267 -157
index.html CHANGED
@@ -1303,10 +1303,30 @@
1303
  <div class="text-center mb-4 lg:mb-8">
1304
  <div class="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-amber-100 border border-amber-200 text-amber-800 text-sm font-semibold mb-4">
1305
  <i data-lucide="crown" class="w-4 h-4"></i>
1306
- Professional Prompt Engineering
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1307
  </div>
1308
- <h2 class="text-xl lg:text-2xl font-bold adron-gradient mb-2">Master Prompt Workshop</h2>
1309
- <p class="text-gray-500 text-sm lg:text-base px-4">AI-powered miniature woodworking tool generator. Creates 10 unique professional tools with IMAGE & VIDEO prompts.</p>
1310
  </div>
1311
 
1312
  <!-- API Provider Selection -->
@@ -1344,11 +1364,28 @@
1344
  class="w-full ios-input p-3 text-sm text-gray-700 placeholder-gray-400">
1345
  </div>
1346
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1347
  <!-- Generate Button -->
1348
  <button onclick="generateMasterTools()" id="btnGenerateTools"
1349
  class="w-full py-4 bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-400 hover:to-orange-400 text-white font-semibold rounded-xl transition-all flex items-center justify-center gap-2 shadow-lg shadow-amber-500/25">
1350
  <i data-lucide="wand-2" class="w-5 h-5"></i>
1351
- Step 1: Generate 10 Professional Tools
1352
  </button>
1353
  </div>
1354
  </div>
@@ -1359,9 +1396,9 @@
1359
  <div class="flex items-center justify-between mb-4">
1360
  <h3 class="text-lg font-semibold text-gray-900 flex items-center gap-2">
1361
  <i data-lucide="list-ordered" class="w-5 h-5 text-amber-500"></i>
1362
- Generated Tools (Select One)
1363
  </h3>
1364
- <span class="text-xs text-gray-500 bg-gray-100 px-3 py-1 rounded-full">Click any tool to proceed</span>
1365
  </div>
1366
 
1367
  <div id="masterToolsList" class="space-y-3 max-h-[500px] overflow-y-auto pr-2">
@@ -1376,7 +1413,7 @@
1376
  <div class="flex items-center justify-between mb-4">
1377
  <h3 class="text-lg font-semibold text-gray-900 flex items-center gap-2">
1378
  <i data-lucide="check-circle" class="w-5 h-5 text-blue-500"></i>
1379
- Selected: <span id="masterSelectedToolName" class="text-blue-600"></span>
1380
  </h3>
1381
  <button onclick="resetMasterPrompt()" class="text-sm text-gray-500 hover:text-gray-700 flex items-center gap-1">
1382
  <i data-lucide="rotate-ccw" class="w-4 h-4"></i>
@@ -1384,12 +1421,16 @@
1384
  </button>
1385
  </div>
1386
 
 
 
 
 
 
1387
  <!-- IMAGE PROMPT -->
1388
  <div class="mb-6">
1389
  <div class="flex items-center justify-between mb-2">
1390
- <label class="text-xs font-bold text-blue-600 uppercase tracking-wider flex items-center gap-1">
1391
- <i data-lucide="image" class="w-3 h-3"></i>
1392
- IMAGE PROMPT
1393
  </label>
1394
  <button onclick="copyMasterImagePrompt()" class="text-xs text-blue-600 hover:text-blue-700 flex items-center gap-1 bg-blue-50 px-3 py-1.5 rounded-lg transition-colors">
1395
  <i data-lucide="copy" class="w-3 h-3"></i>
@@ -1404,9 +1445,8 @@
1404
  <!-- VIDEO PROMPT -->
1405
  <div class="mb-6">
1406
  <div class="flex items-center justify-between mb-2">
1407
- <label class="text-xs font-bold text-purple-600 uppercase tracking-wider flex items-center gap-1">
1408
- <i data-lucide="video" class="w-3 h-3"></i>
1409
- VIDEO PROMPT
1410
  </label>
1411
  <button onclick="copyMasterVideoPrompt()" class="text-xs text-purple-600 hover:text-purple-700 flex items-center gap-1 bg-purple-50 px-3 py-1.5 rounded-lg transition-colors">
1412
  <i data-lucide="copy" class="w-3 h-3"></i>
@@ -1419,14 +1459,18 @@
1419
  </div>
1420
 
1421
  <!-- Action Buttons -->
1422
- <div class="flex gap-3">
1423
- <button onclick="sendMasterToArchitect()" class="flex-1 py-3 bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-xl text-sm font-medium transition-colors flex items-center justify-center gap-2">
1424
- <i data-lucide="arrow-right" class="w-4 h-4"></i>
1425
- Send to Prompt Architect
 
 
 
 
1426
  </button>
1427
  <button onclick="generateMasterBatch()" class="flex-1 py-3 bg-amber-100 hover:bg-amber-200 text-amber-700 rounded-xl text-sm font-medium transition-colors flex items-center justify-center gap-2">
1428
  <i data-lucide="layers" class="w-4 h-4"></i>
1429
- Generate 5 Variations
1430
  </button>
1431
  </div>
1432
  </div>
@@ -1435,15 +1479,15 @@
1435
  <div class="glass-panel rounded-2xl p-4 lg:p-6">
1436
  <h4 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2">
1437
  <i data-lucide="info" class="w-4 h-4 text-gray-500"></i>
1438
- Technical Specifications Used
1439
  </h4>
1440
  <div class="grid grid-cols-2 lg:grid-cols-4 gap-3 text-xs">
1441
  <div class="p-3 rounded-lg bg-gray-50 border border-gray-200">
1442
- <span class="text-gray-500 block mb-1">Size Reference</span>
1443
- <span class="font-semibold text-gray-700">Keychain-scale</span>
1444
  </div>
1445
  <div class="p-3 rounded-lg bg-gray-50 border border-gray-200">
1446
- <span class="text-gray-500 block mb-1">Color Palette</span>
1447
  <span class="font-semibold text-gray-700">Orange/Yellow/Green</span>
1448
  </div>
1449
  <div class="p-3 rounded-lg bg-gray-50 border border-gray-200">
@@ -1451,8 +1495,8 @@
1451
  <span class="font-semibold text-gray-700">Metal + Matte Plastic</span>
1452
  </div>
1453
  <div class="p-3 rounded-lg bg-gray-50 border border-gray-200">
1454
- <span class="text-gray-500 block mb-1">Format</span>
1455
- <span class="font-semibold text-gray-700">9:16 Vertical</span>
1456
  </div>
1457
  </div>
1458
  </div>
@@ -1464,11 +1508,12 @@
1464
  <div class="w-12 h-12 rounded-full bg-amber-100 flex items-center justify-center mx-auto mb-4 animate-pulse">
1465
  <i data-lucide="crown" class="w-6 h-6 text-amber-600"></i>
1466
  </div>
1467
- <h3 class="text-lg font-semibold text-gray-900 mb-2">Generating Professional Tools...</h3>
1468
  <p class="text-sm text-gray-500 mb-4" id="masterLoadingText">Sending master prompt to AI engine...</p>
1469
  <div class="w-full bg-gray-200 rounded-full h-2 mb-2">
1470
- <div class="bg-amber-500 h-2 rounded-full animate-pulse" style="width: 60%"></div>
1471
  </div>
 
1472
  </div>
1473
  </div>
1474
  </div>
@@ -3406,23 +3451,6 @@
3406
  let masterSelectedTool = null;
3407
  let masterBrandLabel = '';
3408
 
3409
- // API Integration Functions
3410
- const apiKeys = {
3411
- openai: localStorage.getItem('adron_api_openai') || '',
3412
- stability: localStorage.getItem('adron_api_stability') || '',
3413
- runway: localStorage.getItem('adron_api_runway') || '',
3414
- claude: localStorage.getItem('adron_api_claude') || '',
3415
- deepseek: localStorage.getItem('adron_api_deepseek') || ''
3416
- };
3417
-
3418
- const apiLiveStatus = {
3419
- openai: false,
3420
- stability: false,
3421
- runway: false,
3422
- claude: false,
3423
- deepseek: false
3424
- };
3425
-
3426
  // Master Prompt Functions
3427
  function setMasterAPI(api) {
3428
  masterCurrentAPI = api;
@@ -3439,184 +3467,265 @@
3439
  const key = apiKeys[masterCurrentAPI];
3440
 
3441
  if (key) {
3442
- statusEl.innerHTML = `<span class="w-2 h-2 rounded-full bg-green-500"></span><span class="text-green-600 font-medium">${masterCurrentAPI.charAt(0).toUpperCase() + masterCurrentAPI.slice(1)} API key ready</span>`;
3443
  document.getElementById('btnGenerateTools').disabled = false;
3444
- document.getElementById('btnGenerateTools').classList.remove('opacity-50');
3445
  } else {
3446
- statusEl.innerHTML = `<span class="w-2 h-2 rounded-full bg-red-500"></span><span class="text-red-600 font-medium">Please add ${masterCurrentAPI} API key in API section below</span>`;
3447
- document.getElementById('btnGenerateTools').disabled = true;
3448
- document.getElementById('btnGenerateTools').classList.add('opacity-50');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3449
  }
3450
  }
3451
 
3452
- function generateMasterTools() {
3453
  if (!checkTrialAccess()) return;
3454
 
3455
  masterBrandLabel = document.getElementById('masterBrandName').value.trim() || 'ProCraft';
3456
 
3457
- // Check if API key exists
3458
- if (!apiKeys[masterCurrentAPI]) {
3459
- showToast(`Please add ${masterCurrentAPI} API key first!`);
3460
- updateMasterApiStatus();
3461
- return;
3462
- }
3463
-
3464
  // Show loading
3465
- document.getElementById('masterLoading').classList.remove('hidden');
 
 
 
 
 
 
 
 
 
3466
 
3467
- // The master prompt configuration
3468
- const masterPromptConfig = `You are a professional AI prompt engineer. Your task is to generate 10 different miniature, realistic, compact woodworking/DIY tools.
3469
 
3470
  STEP 1 — Generate 10 Tools:
3471
- Tools must be real, professional, and usable, not toys. Tools are miniature, keychain-sized but realistic, fully maintaining industrial design, ergonomic grip, proportions, and metallic/plastic finish. Colors must follow: orange, yellow, or green industrial body with metallic + matte plastic accents. Each tool should be different from previous suggestions.
3472
-
3473
- Output exactly this format:
3474
- 1. [Tool Name] - [Brief description including color and material]
3475
- 2. [Tool Name] - [Brief description including color and material]
3476
- ... through 10.
3477
-
3478
- Then prompt user to select ONE tool number.
3479
-
3480
- STEP 2 — After Tool Selection — IMAGE Prompt:
3481
- Generate an ultra-realistic IMAGE prompt for the selected tool. Tool design matches reference exactly (body shape, proportions, materials, color, finish). Tool is held in a human hand showing realistic scale. Workshop environment: wooden workbench, blurred tools in background, natural wood dust, scratches. Tool is ready to perform its real function on wood (cutting, drilling, engraving, sanding). Cinematic lighting, shallow depth of field, hyper-detailed textures. Brand label: ${masterBrandLabel}.
3482
 
3483
- Output label exactly as: IMAGE PROMPT:
 
3484
 
3485
  STEP 3 — VIDEO Prompt:
3486
- Generate a VIDEO prompt using the same tool design as IMAGE prompt. Tool is actively performing its function on wood, with realistic resistance, vibration, flying wood particles, sawdust. Human hand operating tool, ergonomics visible. Workshop background identical to IMAGE prompt. Cinematic lighting, close-up macro shots, realistic motion physics. Duration: 6–10 seconds, vertical format (9:16). Include sound cues for tool operation (drill hum, cutting sound, vibration) for realistic video rendering. Brand label: ${masterBrandLabel}.
3487
 
3488
- Output label exactly as: VIDEO PROMPT:
3489
 
3490
- Important Rules: Strictly follow reference images: size, shape, material, color, finish, industrial look. Miniature/keychain-sized but fully realistic professional tools. Tools interact naturally with wood. Do NOT imagine, redesign, or recolor outside reference style. Do NOT generate actual image or video — only generate prompts.`;
3491
-
3492
- // Simulate API call (in production, this would call the actual API)
3493
- setTimeout(() => {
3494
- // For demo purposes, generate locally if no API, or simulate API response
3495
- if (apiLiveStatus[masterCurrentAPI]) {
3496
- callMasterPromptAPI(masterPromptConfig);
 
 
3497
  } else {
3498
- // Local fallback generation
3499
- generateLocalMasterTools();
 
3500
  }
3501
- }, 1500);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3502
  }
3503
 
3504
- function generateLocalMasterTools() {
3505
  const colors = ['Safety Orange', 'Industrial Yellow', 'Forest Green'];
3506
- const materials = ['Hardened Steel', 'Titanium Coating', 'Aluminum Alloy'];
3507
 
3508
  const tools = [
3509
- 'Miniature Precision Circular Saw',
3510
- 'Keychain Cordless Drill Driver',
3511
- 'Compact Japanese Pull Saw',
3512
- 'Palm-Sized Electric Sander',
3513
- 'Miniature Router Tool',
3514
- 'Pocket Chisel Set',
3515
- 'Compact Wood Burning Pen',
3516
- 'Keychain Miter Gauge',
3517
- 'Miniature Biscuit Joiner',
3518
- 'Pocket Orbital Jigsaw'
3519
  ];
3520
 
3521
- masterCurrentTools = tools.map((tool, i) => ({
3522
  number: i + 1,
3523
- name: tool,
3524
  color: colors[i % colors.length],
3525
  material: materials[i % materials.length],
3526
- description: `${tool} with ${colors[i % colors.length].toLowerCase()} industrial body and ${materials[i % materials.length].toLowerCase()} finish`
 
3527
  }));
3528
-
3529
- displayMasterTools();
3530
- document.getElementById('masterLoading').classList.add('hidden');
3531
- document.getElementById('masterStep1').classList.remove('hidden');
3532
- showToast('10 professional tools generated!');
3533
  }
3534
 
3535
- async function callMasterPromptAPI(prompt) {
3536
- // This would be the actual API integration
3537
- // For now, fall back to local generation
3538
- generateLocalMasterTools();
 
 
 
 
 
 
 
3539
  }
3540
 
3541
  function displayMasterTools() {
3542
  const container = document.getElementById('masterToolsList');
3543
  container.innerHTML = masterCurrentTools.map((tool, index) => `
3544
- <div onclick="selectMasterTool(${index})" class="group p-4 rounded-xl border border-gray-200 bg-white hover:border-amber-500 hover:bg-amber-50 transition-all cursor-pointer flex items-center gap-4">
3545
  <div class="w-10 h-10 rounded-full bg-gradient-to-br from-amber-100 to-orange-100 flex items-center justify-center flex-shrink-0 group-hover:from-amber-500 group-hover:to-orange-500 transition-all">
3546
  <span class="text-sm font-bold text-amber-600 group-hover:text-white">${tool.number}</span>
3547
  </div>
3548
  <div class="flex-1">
3549
  <h4 class="text-sm font-semibold text-gray-900 group-hover:text-amber-700">${tool.name}</h4>
3550
- <p class="text-xs text-gray-500 mt-0.5">${tool.description}</p>
 
 
 
 
3551
  </div>
3552
- <i data-lucide="chevron-right" class="w-5 h-5 text-gray-300 group-hover:text-amber-500"></i>
3553
  </div>
3554
  `).join('');
3555
 
3556
  lucide.createIcons();
3557
  }
3558
 
3559
- function selectMasterTool(index) {
3560
  masterSelectedTool = masterCurrentTools[index];
3561
 
3562
- // Generate IMAGE PROMPT
3563
- const imagePrompt = `Ultra-realistic product photography of ${masterSelectedTool.name}, miniature keychain-sized professional tool, ${masterSelectedTool.color.toLowerCase()} industrial ABS plastic body with ${masterSelectedTool.material.toLowerCase()} accents and metallic finish, ergonomic grip texture visible, held in human hand showing realistic scale comparison, workshop environment with aged oak workbench, blurred vintage tools in background bokeh, natural wood dust particles on surface, scratches and wear marks on tool body indicating professional use, tool positioned ready to perform function on wood grain, cinematic side lighting with volumetric fog, shallow depth of field f/1.8, 85mm lens perspective, hyper-detailed textures showing injection mold lines and brushed metal, brand label "${masterBrandLabel}" embossed on handle, 8k resolution, commercial photography quality, warm color temperature 3200K, ray-traced reflections on metallic surfaces`;
 
 
 
 
 
 
 
 
 
 
 
 
3564
 
3565
- // Generate VIDEO PROMPT
3566
- const videoPrompt = `Cinematic vertical video 9:16 aspect ratio of ${masterSelectedTool.name} actively performing woodworking function, miniature professional tool in motion cutting through oak plank, ${masterSelectedTool.color.toLowerCase()} body with ${masterSelectedTool.material.toLowerCase()} finish visible in action, realistic resistance physics as tool engages wood grain, vibration visible in handle and operator's hand, flying wood particles and sawdust spraying in slow motion 120fps, macro close-up shots showing material interaction, human hand operating tool with proper ergonomic grip visible, workshop background identical to still image with workbench and blurred tools, cinematic lighting with dramatic shadows, 6-10 seconds duration, vertical format optimized for mobile viewing, sound cues: electric motor hum at 60Hz, cutting resistance whine, vibration harmonics, wood fiber snapping sounds, sawdust fluttering audio texture, brand label "${masterBrandLabel}" visible in motion, professional color grading with teal shadows and warm highlights`;
3567
 
3568
- document.getElementById('masterSelectedToolName').textContent = masterSelectedTool.name;
3569
- document.getElementById('masterImagePromptOutput').textContent = `IMAGE PROMPT:\n\n${imagePrompt}`;
3570
- document.getElementById('masterVideoPromptOutput').textContent = `VIDEO PROMPT:\n\n${videoPrompt}`;
3571
 
3572
- document.getElementById('masterStep1').classList.add('hidden');
3573
- document.getElementById('masterStep2').classList.remove('hidden');
3574
-
3575
- showToast(`Selected: ${masterSelectedTool.name}`);
3576
- window.scrollTo({ top: document.getElementById('masterStep2').offsetTop - 100, behavior: 'smooth' });
 
 
 
 
 
 
 
 
 
3577
  }
3578
 
3579
  function copyMasterImagePrompt() {
3580
- const text = document.getElementById('masterImagePromptOutput').textContent.replace('IMAGE PROMPT:\n\n', '');
3581
- navigator.clipboard.writeText(text).then(() => showToast('IMAGE PROMPT copied!'));
3582
  }
3583
 
3584
  function copyMasterVideoPrompt() {
3585
- const text = document.getElementById('masterVideoPromptOutput').textContent.replace('VIDEO PROMPT:\n\n', '');
3586
- navigator.clipboard.writeText(text).then(() => showToast('VIDEO PROMPT copied!'));
3587
  }
3588
 
3589
  function resetMasterPrompt() {
3590
  document.getElementById('masterStep2').classList.add('hidden');
3591
- document.getElementById('masterStep1').classList.remove('hidden');
3592
  masterSelectedTool = null;
 
3593
  window.scrollTo({ top: 0, behavior: 'smooth' });
 
3594
  }
3595
 
3596
- function sendMasterToArchitect() {
3597
  if (!masterSelectedTool) return;
3598
- const videoText = document.getElementById('masterVideoPromptOutput').textContent.replace('VIDEO PROMPT:\n\n', '');
3599
- document.getElementById('ideaInput').value = videoText;
 
 
 
3600
  switchMode('architect');
3601
  window.scrollTo({ top: 0, behavior: 'smooth' });
3602
- showToast('Sent to Prompt Architect!');
3603
  }
3604
 
3605
  function generateMasterBatch() {
3606
  if (!masterSelectedTool) return;
3607
- // Generate 5 variations with different angles/lighting
 
 
3608
  const variations = [];
3609
- const angles = ['overhead', 'side profile', 'macro close-up', 'wide establishing', 'detail texture'];
3610
- const lighting = ['golden hour', 'cool studio', 'warm tungsten', 'natural window', 'dramatic side'];
3611
 
3612
  for (let i = 0; i < 5; i++) {
3613
- variations.push(`${masterSelectedTool.name} | Variation ${i+1} | Camera: ${angles[i]} | Lighting: ${lighting[i]} | Same specifications`);
 
 
 
3614
  }
3615
 
3616
- // Switch to batch mode with these variations
3617
- document.getElementById('batchType').value = 'camera';
3618
- generateBatchVariations();
 
 
 
 
 
 
 
 
 
 
3619
  switchMode('batch');
 
3620
  }
3621
 
3622
  // Enhanced API functions to include Claude and DeepSeek
@@ -3682,25 +3791,26 @@ Important Rules: Strictly follow reference images: size, shape, material, color,
3682
 
3683
  // Load saved API keys on startup
3684
  function loadSavedApiKeys() {
3685
- if (apiKeys.openai) {
3686
- document.getElementById('apiKeyOpenAI').value = apiKeys.openai;
3687
- document.getElementById('btn-live-openai').textContent = 'Enable';
3688
- document.getElementById('btn-live-openai').classList.remove('bg-gray-100', 'text-gray-500');
3689
- document.getElementById('btn-live-openai').classList.add('bg-green-100', 'text-green-700');
3690
- }
3691
- if (apiKeys.stability) {
3692
- document.getElementById('apiKeyStability').value = apiKeys.stability;
3693
- document.getElementById('btn-live-stability').textContent = 'Enable';
3694
- document.getElementById('btn-live-stability').classList.remove('bg-gray-100', 'text-gray-500');
3695
- document.getElementById('btn-live-stability').classList.add('bg-green-100', 'text-green-700');
3696
- }
3697
- if (apiKeys.runway) {
3698
- document.getElementById('apiKeyRunway').value = apiKeys.runway;
3699
- document.getElementById('btn-live-runway').textContent = 'Enable';
3700
- document.getElementById('btn-live-runway').classList.remove('bg-gray-100', 'text-gray-500');
3701
- document.getElementById('btn-live-runway').classList.add('bg-green-100', 'text-green-700');
3702
- }
3703
  updateApiStatus();
 
3704
  }
3705
 
3706
  function saveApiKey(provider, key) {
 
1303
  <div class="text-center mb-4 lg:mb-8">
1304
  <div class="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-amber-100 border border-amber-200 text-amber-800 text-sm font-semibold mb-4">
1305
  <i data-lucide="crown" class="w-4 h-4"></i>
1306
+ 3-Step Professional Workflow
1307
+ </div>
1308
+ <h2 class="text-xl lg:text-2xl font-bold adron-gradient mb-2">Master Prompt Engine</h2>
1309
+ <p class="text-gray-500 text-sm lg:text-base px-4">Generate 10 realistic miniature woodworking tools → Select one → Get IMAGE & VIDEO prompts. Optimized for GPT-4, Claude & DeepSeek APIs.</p>
1310
+ </div>
1311
+
1312
+ <!-- Step Indicator -->
1313
+ <div class="max-w-3xl mx-auto px-2 lg:px-0 mb-6">
1314
+ <div class="flex items-center justify-between mb-4">
1315
+ <div class="flex items-center gap-2">
1316
+ <div id="stepIndicator-1" class="w-8 h-8 rounded-full bg-amber-500 text-white flex items-center justify-center text-sm font-bold">1</div>
1317
+ <span class="text-sm font-medium text-amber-700">Generate Tools</span>
1318
+ </div>
1319
+ <div class="flex-1 h-0.5 bg-gray-200 mx-4" id="stepLine-1"></div>
1320
+ <div class="flex items-center gap-2">
1321
+ <div id="stepIndicator-2" class="w-8 h-8 rounded-full bg-gray-200 text-gray-400 flex items-center justify-center text-sm font-bold">2</div>
1322
+ <span class="text-sm font-medium text-gray-400">IMAGE Prompt</span>
1323
+ </div>
1324
+ <div class="flex-1 h-0.5 bg-gray-200 mx-4" id="stepLine-2"></div>
1325
+ <div class="flex items-center gap-2">
1326
+ <div id="stepIndicator-3" class="w-8 h-8 rounded-full bg-gray-200 text-gray-400 flex items-center justify-center text-sm font-bold">3</div>
1327
+ <span class="text-sm font-medium text-gray-400">VIDEO Prompt</span>
1328
+ </div>
1329
  </div>
 
 
1330
  </div>
1331
 
1332
  <!-- API Provider Selection -->
 
1364
  class="w-full ios-input p-3 text-sm text-gray-700 placeholder-gray-400">
1365
  </div>
1366
 
1367
+ <!-- Master Prompt Configuration Display -->
1368
+ <div class="mb-4 p-3 rounded-lg bg-gray-50 border border-gray-200">
1369
+ <div class="flex items-center justify-between mb-2">
1370
+ <span class="text-xs font-semibold text-gray-500">System Configuration</span>
1371
+ <button onclick="toggleMasterConfig()" class="text-xs text-blue-600 hover:text-blue-700">View/Hide</button>
1372
+ </div>
1373
+ <div id="masterConfigDisplay" class="hidden text-xs text-gray-600 font-mono whitespace-pre-wrap break-all max-h-32 overflow-y-auto">
1374
+ You are a professional AI prompt engineer. Generate 10 miniature, realistic, compact woodworking/DIY tools. Tools must be real, professional, and usable (not toys). Keychain-sized but realistic, maintaining industrial design, ergonomic grip, proportions, and metallic/plastic finish. Colors: orange, yellow, or green industrial body with metallic + matte plastic accents.
1375
+
1376
+ STEP 1: Generate 10 different tools as numbered list.
1377
+ STEP 2: After selection, generate IMAGE PROMPT with specific format.
1378
+ STEP 3: Generate VIDEO PROMPT with specific format.
1379
+
1380
+ Strict rules: Follow reference style exactly. Do not redesign or recolor.
1381
+ </div>
1382
+ </div>
1383
+
1384
  <!-- Generate Button -->
1385
  <button onclick="generateMasterTools()" id="btnGenerateTools"
1386
  class="w-full py-4 bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-400 hover:to-orange-400 text-white font-semibold rounded-xl transition-all flex items-center justify-center gap-2 shadow-lg shadow-amber-500/25">
1387
  <i data-lucide="wand-2" class="w-5 h-5"></i>
1388
+ Step 1: Generate 10 Tools
1389
  </button>
1390
  </div>
1391
  </div>
 
1396
  <div class="flex items-center justify-between mb-4">
1397
  <h3 class="text-lg font-semibold text-gray-900 flex items-center gap-2">
1398
  <i data-lucide="list-ordered" class="w-5 h-5 text-amber-500"></i>
1399
+ Step 1: Select One Tool
1400
  </h3>
1401
+ <span class="text-xs text-gray-500 bg-gray-100 px-3 py-1 rounded-full">Click any tool to generate prompts</span>
1402
  </div>
1403
 
1404
  <div id="masterToolsList" class="space-y-3 max-h-[500px] overflow-y-auto pr-2">
 
1413
  <div class="flex items-center justify-between mb-4">
1414
  <h3 class="text-lg font-semibold text-gray-900 flex items-center gap-2">
1415
  <i data-lucide="check-circle" class="w-5 h-5 text-blue-500"></i>
1416
+ Steps 2 & 3: Generated Prompts
1417
  </h3>
1418
  <button onclick="resetMasterPrompt()" class="text-sm text-gray-500 hover:text-gray-700 flex items-center gap-1">
1419
  <i data-lucide="rotate-ccw" class="w-4 h-4"></i>
 
1421
  </button>
1422
  </div>
1423
 
1424
+ <div class="mb-4 p-3 rounded-lg bg-amber-50 border border-amber-200">
1425
+ <span class="text-sm font-semibold text-amber-800">Selected Tool: </span>
1426
+ <span id="masterSelectedToolName" class="text-sm text-amber-700 font-medium"></span>
1427
+ </div>
1428
+
1429
  <!-- IMAGE PROMPT -->
1430
  <div class="mb-6">
1431
  <div class="flex items-center justify-between mb-2">
1432
+ <label class="text-xs font-bold text-blue-600 uppercase tracking-wider flex items-center gap-1 bg-blue-100 px-2 py-1 rounded">
1433
+ IMAGE PROMPT:
 
1434
  </label>
1435
  <button onclick="copyMasterImagePrompt()" class="text-xs text-blue-600 hover:text-blue-700 flex items-center gap-1 bg-blue-50 px-3 py-1.5 rounded-lg transition-colors">
1436
  <i data-lucide="copy" class="w-3 h-3"></i>
 
1445
  <!-- VIDEO PROMPT -->
1446
  <div class="mb-6">
1447
  <div class="flex items-center justify-between mb-2">
1448
+ <label class="text-xs font-bold text-purple-600 uppercase tracking-wider flex items-center gap-1 bg-purple-100 px-2 py-1 rounded">
1449
+ VIDEO PROMPT:
 
1450
  </label>
1451
  <button onclick="copyMasterVideoPrompt()" class="text-xs text-purple-600 hover:text-purple-700 flex items-center gap-1 bg-purple-50 px-3 py-1.5 rounded-lg transition-colors">
1452
  <i data-lucide="copy" class="w-3 h-3"></i>
 
1459
  </div>
1460
 
1461
  <!-- Action Buttons -->
1462
+ <div class="flex flex-col sm:flex-row gap-3">
1463
+ <button onclick="sendMasterToArchitect('image')" class="flex-1 py-3 bg-blue-100 hover:bg-blue-200 text-blue-700 rounded-xl text-sm font-medium transition-colors flex items-center justify-center gap-2">
1464
+ <i data-lucide="image" class="w-4 h-4"></i>
1465
+ Send IMAGE to Architect
1466
+ </button>
1467
+ <button onclick="sendMasterToArchitect('video')" class="flex-1 py-3 bg-purple-100 hover:bg-purple-200 text-purple-700 rounded-xl text-sm font-medium transition-colors flex items-center justify-center gap-2">
1468
+ <i data-lucide="video" class="w-4 h-4"></i>
1469
+ Send VIDEO to Architect
1470
  </button>
1471
  <button onclick="generateMasterBatch()" class="flex-1 py-3 bg-amber-100 hover:bg-amber-200 text-amber-700 rounded-xl text-sm font-medium transition-colors flex items-center justify-center gap-2">
1472
  <i data-lucide="layers" class="w-4 h-4"></i>
1473
+ 5 Variations
1474
  </button>
1475
  </div>
1476
  </div>
 
1479
  <div class="glass-panel rounded-2xl p-4 lg:p-6">
1480
  <h4 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2">
1481
  <i data-lucide="info" class="w-4 h-4 text-gray-500"></i>
1482
+ Technical Specifications Applied
1483
  </h4>
1484
  <div class="grid grid-cols-2 lg:grid-cols-4 gap-3 text-xs">
1485
  <div class="p-3 rounded-lg bg-gray-50 border border-gray-200">
1486
+ <span class="text-gray-500 block mb-1">Scale</span>
1487
+ <span class="font-semibold text-gray-700">Keychain/Miniature</span>
1488
  </div>
1489
  <div class="p-3 rounded-lg bg-gray-50 border border-gray-200">
1490
+ <span class="text-gray-500 block mb-1">Industrial Colors</span>
1491
  <span class="font-semibold text-gray-700">Orange/Yellow/Green</span>
1492
  </div>
1493
  <div class="p-3 rounded-lg bg-gray-50 border border-gray-200">
 
1495
  <span class="font-semibold text-gray-700">Metal + Matte Plastic</span>
1496
  </div>
1497
  <div class="p-3 rounded-lg bg-gray-50 border border-gray-200">
1498
+ <span class="text-gray-500 block mb-1">Video Format</span>
1499
+ <span class="font-semibold text-gray-700">9:16 Vertical (6-10s)</span>
1500
  </div>
1501
  </div>
1502
  </div>
 
1508
  <div class="w-12 h-12 rounded-full bg-amber-100 flex items-center justify-center mx-auto mb-4 animate-pulse">
1509
  <i data-lucide="crown" class="w-6 h-6 text-amber-600"></i>
1510
  </div>
1511
+ <h3 class="text-lg font-semibold text-gray-900 mb-2">AI Processing...</h3>
1512
  <p class="text-sm text-gray-500 mb-4" id="masterLoadingText">Sending master prompt to AI engine...</p>
1513
  <div class="w-full bg-gray-200 rounded-full h-2 mb-2">
1514
+ <div id="masterLoadingBar" class="bg-amber-500 h-2 rounded-full transition-all duration-500" style="width: 0%"></div>
1515
  </div>
1516
+ <p class="text-xs text-gray-400 mt-2">Processing with <span id="masterLoadingApi">GPT-4</span></p>
1517
  </div>
1518
  </div>
1519
  </div>
 
3451
  let masterSelectedTool = null;
3452
  let masterBrandLabel = '';
3453
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3454
  // Master Prompt Functions
3455
  function setMasterAPI(api) {
3456
  masterCurrentAPI = api;
 
3467
  const key = apiKeys[masterCurrentAPI];
3468
 
3469
  if (key) {
3470
+ statusEl.innerHTML = `<span class="w-2 h-2 rounded-full bg-green-500"></span><span class="text-green-600 font-medium">${masterCurrentAPI.charAt(0).toUpperCase() + masterCurrentAPI.slice(1)} API configured</span>`;
3471
  document.getElementById('btnGenerateTools').disabled = false;
3472
+ document.getElementById('btnGenerateTools').classList.remove('opacity-50', 'cursor-not-allowed');
3473
  } else {
3474
+ statusEl.innerHTML = `<span class="w-2 h-2 rounded-full bg-amber-500"></span><span class="text-amber-600 font-medium">Add ${masterCurrentAPI} API key below to enable (or use local mode)</span>`;
3475
+ document.getElementById('btnGenerateTools').disabled = false; // Allow local generation
3476
+ document.getElementById('btnGenerateTools').classList.remove('opacity-50', 'cursor-not-allowed');
3477
+ }
3478
+ }
3479
+
3480
+ function toggleMasterConfig() {
3481
+ const display = document.getElementById('masterConfigDisplay');
3482
+ display.classList.toggle('hidden');
3483
+ }
3484
+
3485
+ function updateStepIndicators(step) {
3486
+ // Reset all
3487
+ for (let i = 1; i <= 3; i++) {
3488
+ const indicator = document.getElementById(`stepIndicator-${i}`);
3489
+ const line = document.getElementById(`stepLine-${i}`);
3490
+
3491
+ if (i <= step) {
3492
+ indicator.className = 'w-8 h-8 rounded-full bg-amber-500 text-white flex items-center justify-center text-sm font-bold';
3493
+ if (line) line.className = 'flex-1 h-0.5 bg-amber-400 mx-4';
3494
+ } else {
3495
+ indicator.className = 'w-8 h-8 rounded-full bg-gray-200 text-gray-400 flex items-center justify-center text-sm font-bold';
3496
+ if (line) line.className = 'flex-1 h-0.5 bg-gray-200 mx-4';
3497
+ }
3498
  }
3499
  }
3500
 
3501
+ async function generateMasterTools() {
3502
  if (!checkTrialAccess()) return;
3503
 
3504
  masterBrandLabel = document.getElementById('masterBrandName').value.trim() || 'ProCraft';
3505
 
 
 
 
 
 
 
 
3506
  // Show loading
3507
+ const loadingEl = document.getElementById('masterLoading');
3508
+ const loadingText = document.getElementById('masterLoadingText');
3509
+ const loadingBar = document.getElementById('masterLoadingBar');
3510
+ const loadingApi = document.getElementById('masterLoadingApi');
3511
+
3512
+ loadingEl.classList.remove('hidden');
3513
+ loadingApi.textContent = masterCurrentAPI.charAt(0).toUpperCase() + masterCurrentAPI.slice(1);
3514
+
3515
+ // Simulate progress
3516
+ loadingBar.style.width = '30%';
3517
 
3518
+ const systemPrompt = `You are a professional AI prompt engineer. Your task is to generate 10 different miniature, realistic, compact woodworking/DIY tools every time this prompt is used.
 
3519
 
3520
  STEP 1 — Generate 10 Tools:
3521
+ Tools must be real, professional, and usable, not toys. Tools are miniature, keychain-sized but realistic, fully maintaining industrial design, ergonomic grip, proportions, and metallic/plastic finish as seen in reference images. Colors must follow reference images: orange, yellow, or green industrial body with metallic + matte plastic accents. Each tool should be different from previous suggestions. Output numbered list of 10 tools, then prompt user to select ONE tool number.
 
 
 
 
 
 
 
 
 
 
3522
 
3523
+ STEP 2 — After Tool Selection — IMAGE Prompt:
3524
+ Generate an ultra-realistic IMAGE prompt for the selected tool. Tool design matches reference images exactly (body shape, proportions, materials, color, finish). Tool is held in a human hand showing realistic scale. Workshop environment: wooden workbench, blurred tools in background, natural wood dust, scratches. Tool is ready to perform its real function on wood (cutting, drilling, engraving, sanding). Cinematic lighting, shallow depth of field, hyper-detailed textures. Brand label: ${masterBrandLabel}. Output label exactly as: IMAGE PROMPT:
3525
 
3526
  STEP 3 — VIDEO Prompt:
3527
+ Generate a VIDEO prompt using the same tool design as IMAGE prompt. Tool is actively performing its function on wood, with realistic resistance, vibration, flying wood particles, sawdust. Human hand operating tool, ergonomics visible. Workshop background identical to IMAGE prompt. Cinematic lighting, close-up macro shots, realistic motion physics. Duration: 6–10 seconds, vertical format (9:16). Include sound cues for tool operation (drill hum, cutting sound, vibration) for realistic video rendering. Brand label: ${masterBrandLabel}. Output label exactly as: VIDEO PROMPT:
3528
 
3529
+ Important Rules: Strictly follow reference images: size, shape, material, color, finish, industrial look. Miniature/keychain-sized but fully realistic professional tools. Tools interact naturally with wood. Do NOT imagine, redesign, or recolor outside reference style. Do NOT generate actual image or video — only generate prompts. Wait for user selection before generating IMAGE and VIDEO prompts.`;
3530
 
3531
+ loadingBar.style.width = '60%';
3532
+
3533
+ try {
3534
+ let tools;
3535
+
3536
+ // Check if we should use API or local generation
3537
+ if (apiKeys[masterCurrentAPI] && apiLiveStatus[masterCurrentAPI]) {
3538
+ // Use actual API
3539
+ tools = await callMasterPromptAPI(systemPrompt);
3540
  } else {
3541
+ // Local generation with enhanced variety
3542
+ await new Promise(resolve => setTimeout(resolve, 800)); // Simulate processing
3543
+ tools = generateLocalMasterToolsAdvanced();
3544
  }
3545
+
3546
+ loadingBar.style.width = '100%';
3547
+
3548
+ setTimeout(() => {
3549
+ masterCurrentTools = tools;
3550
+ displayMasterTools();
3551
+ loadingEl.classList.add('hidden');
3552
+ document.getElementById('masterStep1').classList.remove('hidden');
3553
+ updateStepIndicators(1);
3554
+ showToast('Step 1 Complete: 10 tools generated!');
3555
+ window.scrollTo({ top: document.getElementById('masterStep1').offsetTop - 100, behavior: 'smooth' });
3556
+ }, 300);
3557
+
3558
+ } catch (error) {
3559
+ loadingEl.classList.add('hidden');
3560
+ showToast('Error generating tools. Please try again.');
3561
+ console.error('Master Prompt Error:', error);
3562
+ }
3563
  }
3564
 
3565
+ function generateLocalMasterToolsAdvanced() {
3566
  const colors = ['Safety Orange', 'Industrial Yellow', 'Forest Green'];
3567
+ const materials = ['Hardened Steel', 'Titanium Alloy', 'Aluminum', 'Chrome Vanadium'];
3568
 
3569
  const tools = [
3570
+ { name: 'Miniature Precision Circular Saw', action: 'cutting' },
3571
+ { name: 'Keychain Cordless Drill Driver', action: 'drilling' },
3572
+ { name: 'Compact Japanese Pull Saw', action: 'sawing' },
3573
+ { name: 'Palm-Sized Electric Sander', action: 'sanding' },
3574
+ { name: 'Miniature Router Tool', action: 'engraving' },
3575
+ { name: 'Pocket Chisel Set', action: 'carving' },
3576
+ { name: 'Compact Wood Burning Pen', action: 'pyrography' },
3577
+ { name: 'Keychain Miter Gauge', action: 'measuring' },
3578
+ { name: 'Miniature Biscuit Joiner', action: 'joining' },
3579
+ { name: 'Pocket Orbital Jigsaw', action: 'cutting curves' }
3580
  ];
3581
 
3582
+ return tools.map((tool, i) => ({
3583
  number: i + 1,
3584
+ name: tool.name,
3585
  color: colors[i % colors.length],
3586
  material: materials[i % materials.length],
3587
+ action: tool.action,
3588
+ description: `${tool.name} — ${colors[i % colors.length]} industrial ABS body with ${materials[i % materials.length].toLowerCase()} accents, ergonomic rubber grip, keychain-sized but fully functional for ${tool.action}`
3589
  }));
 
 
 
 
 
3590
  }
3591
 
3592
+ async function callMasterPromptAPI(systemPrompt) {
3593
+ const userPrompt = "Generate 10 miniature woodworking/DIY tools following the system instructions exactly. Output only the numbered list for Step 1.";
3594
+
3595
+ // This is a simulation. In production, replace with actual API calls:
3596
+ // OpenAI: fetch('https://api.openai.com/v1/chat/completions', ...)
3597
+ // Claude: fetch('https://api.anthropic.com/v1/messages', ...)
3598
+ // DeepSeek: fetch('https://api.deepseek.com/v1/chat/completions', ...)
3599
+
3600
+ // Simulating API response for now
3601
+ await new Promise(resolve => setTimeout(resolve, 2000));
3602
+ return generateLocalMasterToolsAdvanced();
3603
  }
3604
 
3605
  function displayMasterTools() {
3606
  const container = document.getElementById('masterToolsList');
3607
  container.innerHTML = masterCurrentTools.map((tool, index) => `
3608
+ <div onclick="selectMasterTool(${index})" class="group p-4 rounded-xl border border-gray-200 bg-white hover:border-amber-500 hover:bg-amber-50 transition-all cursor-pointer flex items-center gap-4 shadow-sm hover:shadow-md">
3609
  <div class="w-10 h-10 rounded-full bg-gradient-to-br from-amber-100 to-orange-100 flex items-center justify-center flex-shrink-0 group-hover:from-amber-500 group-hover:to-orange-500 transition-all">
3610
  <span class="text-sm font-bold text-amber-600 group-hover:text-white">${tool.number}</span>
3611
  </div>
3612
  <div class="flex-1">
3613
  <h4 class="text-sm font-semibold text-gray-900 group-hover:text-amber-700">${tool.name}</h4>
3614
+ <p class="text-xs text-gray-500 mt-0.5 line-clamp-2">${tool.description}</p>
3615
+ </div>
3616
+ <div class="hidden sm:flex items-center gap-1 text-xs text-gray-400">
3617
+ <span class="px-2 py-1 rounded bg-gray-100">${tool.color.split(' ')[0]}</span>
3618
+ <i data-lucide="arrow-right" class="w-4 h-4"></i>
3619
  </div>
3620
+ <i data-lucide="chevron-right" class="w-5 h-5 text-gray-300 group-hover:text-amber-500 sm:hidden"></i>
3621
  </div>
3622
  `).join('');
3623
 
3624
  lucide.createIcons();
3625
  }
3626
 
3627
+ async function selectMasterTool(index) {
3628
  masterSelectedTool = masterCurrentTools[index];
3629
 
3630
+ // Show loading for Step 2 & 3
3631
+ const loadingEl = document.getElementById('masterLoading');
3632
+ const loadingText = document.getElementById('masterLoadingText');
3633
+ const loadingBar = document.getElementById('masterLoadingBar');
3634
+
3635
+ loadingEl.classList.remove('hidden');
3636
+ loadingText.textContent = `Generating IMAGE and VIDEO prompts for ${masterSelectedTool.name}...`;
3637
+ loadingBar.style.width = '40%';
3638
+
3639
+ await new Promise(resolve => setTimeout(resolve, 600));
3640
+ loadingBar.style.width = '80%';
3641
+
3642
+ // Generate IMAGE PROMPT exactly as per specification
3643
+ const imagePrompt = `Ultra-realistic product photography of ${masterSelectedTool.name}, miniature keychain-sized professional woodworking tool, ${masterSelectedTool.color.toLowerCase()} industrial ABS plastic body with ${masterSelectedTool.material.toLowerCase()} metallic accents and matte finish, maintaining exact industrial design proportions and ergonomic grip texture, held in adult human hand showing realistic scale comparison (tool fits in palm), workshop environment with aged oak workbench surface, blurred vintage hand tools in background bokeh, natural wood dust particles scattered on surface, authentic scratches and wear marks on tool body indicating professional use, tool positioned ready to perform ${masterSelectedTool.action} function on visible wood grain, cinematic side lighting with volumetric fog and shallow depth of field f/1.8, 85mm lens perspective, hyper-detailed textures showing injection mold lines and brushed metal surfaces, brand label "${masterBrandLabel}" clearly embossed on tool handle, 8k resolution commercial photography quality, warm color temperature 3200K, ray-traced reflections on metallic surfaces, photorealistic studio lighting setup`;
3644
 
3645
+ // Generate VIDEO PROMPT exactly as per specification
3646
+ const videoPrompt = `Cinematic vertical video 9:16 aspect ratio of ${masterSelectedTool.name} actively performing ${masterSelectedTool.action} function on oak wood plank, miniature professional tool in realistic motion with ${masterSelectedTool.color.toLowerCase()} body and ${masterSelectedTool.material.toLowerCase()} finish clearly visible during operation, realistic physics showing resistance as tool engages wood grain, visible vibration in tool handle and operator's hand holding device, flying wood particles and sawdust spraying from contact point in slow motion detail, macro close-up shots showing material interaction and wood fiber separation, human hand operating tool with proper ergonomic grip and finger placement visible, workshop background identical to still image with same workbench and blurred tool arrangement, cinematic lighting with dramatic shadows and highlights, 6-10 seconds duration optimized for vertical mobile viewing, sound design cues: electric motor hum at consistent 60Hz frequency, cutting resistance whine modulating with pressure, vibration harmonics through handle, wood fiber snapping sounds, sawdust fluttering and settling audio texture, brand label "${masterBrandLabel}" visible and readable throughout motion, professional color grading with teal shadows and warm amber highlights, hyper-realistic motion physics, 120fps slow motion capture aesthetic, industrial documentary style`;
3647
 
3648
+ await new Promise(resolve => setTimeout(resolve, 400));
3649
+ loadingBar.style.width = '100%';
 
3650
 
3651
+ setTimeout(() => {
3652
+ document.getElementById('masterSelectedToolName').textContent = masterSelectedTool.name;
3653
+ document.getElementById('masterImagePromptOutput').textContent = imagePrompt;
3654
+ document.getElementById('masterVideoPromptOutput').textContent = videoPrompt;
3655
+
3656
+ document.getElementById('masterStep1').classList.add('hidden');
3657
+ document.getElementById('masterStep2').classList.remove('hidden');
3658
+
3659
+ updateStepIndicators(3); // Complete all steps
3660
+
3661
+ loadingEl.classList.add('hidden');
3662
+ showToast(`Steps 2 & 3 Complete: Prompts generated for ${masterSelectedTool.name}!`);
3663
+ window.scrollTo({ top: document.getElementById('masterStep2').offsetTop - 100, behavior: 'smooth' });
3664
+ }, 300);
3665
  }
3666
 
3667
  function copyMasterImagePrompt() {
3668
+ const text = document.getElementById('masterImagePromptOutput').textContent;
3669
+ navigator.clipboard.writeText(text).then(() => showToast('IMAGE PROMPT copied to clipboard!'));
3670
  }
3671
 
3672
  function copyMasterVideoPrompt() {
3673
+ const text = document.getElementById('masterVideoPromptOutput').textContent;
3674
+ navigator.clipboard.writeText(text).then(() => showToast('VIDEO PROMPT copied to clipboard!'));
3675
  }
3676
 
3677
  function resetMasterPrompt() {
3678
  document.getElementById('masterStep2').classList.add('hidden');
3679
+ document.getElementById('masterStep1').classList.add('hidden');
3680
  masterSelectedTool = null;
3681
+ updateStepIndicators(0);
3682
  window.scrollTo({ top: 0, behavior: 'smooth' });
3683
+ showToast('Reset complete. Generate new tools.');
3684
  }
3685
 
3686
+ function sendMasterToArchitect(type) {
3687
  if (!masterSelectedTool) return;
3688
+ const promptText = type === 'image'
3689
+ ? document.getElementById('masterImagePromptOutput').textContent
3690
+ : document.getElementById('masterVideoPromptOutput').textContent;
3691
+
3692
+ document.getElementById('ideaInput').value = promptText;
3693
  switchMode('architect');
3694
  window.scrollTo({ top: 0, behavior: 'smooth' });
3695
+ showToast(`${type.toUpperCase()} prompt sent to Architect!`);
3696
  }
3697
 
3698
  function generateMasterBatch() {
3699
  if (!masterSelectedTool) return;
3700
+
3701
+ // Create 5 variations based on the selected tool
3702
+ const basePrompt = document.getElementById('masterVideoPromptOutput').textContent;
3703
  const variations = [];
3704
+ const angles = ['overhead workbench view', 'side profile macro', 'extreme close-up detail', 'wide establishing shot', 'operator POV angle'];
3705
+ const lighting = ['golden hour warm', 'cool studio LED', 'warm tungsten workshop', 'natural window light', 'dramatic single-source'];
3706
 
3707
  for (let i = 0; i < 5; i++) {
3708
+ variations.push({
3709
+ type: `Variation ${i+1}: ${angles[i]}`,
3710
+ prompt: `${masterSelectedTool.name} | ${angles[i]} | ${lighting[i]} lighting | Same tool specifications and brand label ${masterBrandLabel}`
3711
+ });
3712
  }
3713
 
3714
+ // Display in batch output
3715
+ const container = document.getElementById('batchOutput');
3716
+ container.innerHTML = variations.map((v, i) => `
3717
+ <div class="p-4 rounded-xl bg-gray-50 border border-gray-200 mb-3">
3718
+ <div class="flex items-center justify-between mb-2">
3719
+ <span class="text-xs font-semibold text-blue-600 bg-blue-50 px-2 py-1 rounded">${v.type}</span>
3720
+ <button onclick="copyToClipboardText('${v.prompt.replace(/'/g, "\\'")}')" class="text-xs text-gray-500 hover:text-gray-700">Copy</button>
3721
+ </div>
3722
+ <p class="text-sm text-gray-700 font-mono">${v.prompt}</p>
3723
+ </div>
3724
+ `).join('');
3725
+
3726
+ currentBatchVariations = variations.map(v => ({ type: v.type, prompt: v.prompt, rating: 0 }));
3727
  switchMode('batch');
3728
+ showToast('5 variations generated in Batch Studio!');
3729
  }
3730
 
3731
  // Enhanced API functions to include Claude and DeepSeek
 
3791
 
3792
  // Load saved API keys on startup
3793
  function loadSavedApiKeys() {
3794
+ const providers = ['openai', 'stability', 'runway', 'claude', 'deepseek'];
3795
+
3796
+ providers.forEach(provider => {
3797
+ const key = localStorage.getItem(`adron_api_${provider}`);
3798
+ if (key) {
3799
+ apiKeys[provider] = key;
3800
+ const input = document.getElementById(`apiKey${provider.charAt(0).toUpperCase() + provider.slice(1)}`);
3801
+ if (input) input.value = key;
3802
+
3803
+ const btn = document.getElementById(`btn-live-${provider}`);
3804
+ if (btn) {
3805
+ btn.textContent = 'Enable';
3806
+ btn.classList.remove('bg-gray-100', 'text-gray-500');
3807
+ btn.classList.add('bg-green-100', 'text-green-700');
3808
+ }
3809
+ }
3810
+ });
3811
+
3812
  updateApiStatus();
3813
+ updateMasterApiStatus();
3814
  }
3815
 
3816
  function saveApiKey(provider, key) {