@socialgen_user/socialgen 2.3.6 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{WNF4vvWg.js → AG4bRgGu.js} +1 -1
  3. package/.output/public/_nuxt/{ztWrJaao.js → BETWg864.js} +1 -1
  4. package/.output/public/_nuxt/{BkcabsD-.js → BLYectCX.js} +1 -1
  5. package/.output/public/_nuxt/{Yv0VQg56.js → Cq3K0UDH.js} +2 -2
  6. package/.output/public/_nuxt/DP0BHYkh.js +91 -0
  7. package/.output/public/_nuxt/{C5k0IulZ.js → DszeSBqN.js} +1 -1
  8. package/.output/public/_nuxt/{BnHqhu28.js → RbQ85fIq.js} +1 -1
  9. package/.output/public/_nuxt/builds/latest.json +1 -1
  10. package/.output/public/_nuxt/builds/meta/e4bcda54-37b9-414a-891f-80bc074eb01c.json +1 -0
  11. package/.output/public/_nuxt/pages.BNNMR0bP.css +1 -0
  12. package/.output/public/mobile-demo.html +788 -0
  13. package/.output/server/chunks/_/nitro.mjs +108 -101
  14. package/.output/server/chunks/build/LivePreview-styles.BbGT7KVf.mjs +8 -0
  15. package/.output/server/chunks/build/LivePreview-styles.BbGT7KVf.mjs.map +1 -0
  16. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  17. package/.output/server/chunks/build/client.precomputed.mjs.map +1 -1
  18. package/.output/server/chunks/build/entry-styles.ZVVAUeV7.mjs +8 -0
  19. package/.output/server/chunks/build/entry-styles.ZVVAUeV7.mjs.map +1 -0
  20. package/.output/server/chunks/build/index-styles-1.mjs-CBmp9qkk.mjs +4 -0
  21. package/.output/server/chunks/build/index-styles-1.mjs-CBmp9qkk.mjs.map +1 -0
  22. package/.output/server/chunks/build/index-styles.B8HyMUMp.mjs +11 -0
  23. package/.output/server/chunks/build/index-styles.B8HyMUMp.mjs.map +1 -0
  24. package/.output/server/chunks/build/{pages-BsPKZpHw.mjs → pages-ClwYJnbM.mjs} +529 -164
  25. package/.output/server/chunks/build/pages-ClwYJnbM.mjs.map +1 -0
  26. package/.output/server/chunks/build/server.mjs +1 -1
  27. package/.output/server/chunks/build/styles.mjs +3 -2
  28. package/.output/server/chunks/build/styles.mjs.map +1 -1
  29. package/.output/server/chunks/routes/api/files/_...path_.get.mjs +1 -0
  30. package/.output/server/chunks/routes/api/files/_...path_.get.mjs.map +1 -1
  31. package/.output/server/chunks/routes/api/media.get.mjs +80 -50
  32. package/.output/server/chunks/routes/api/media.get.mjs.map +1 -1
  33. package/.output/server/package.json +1 -1
  34. package/data/history.json +31 -11
  35. package/data/history_generations.json +303 -0
  36. package/data/templates.json +103 -0
  37. package/package.json +1 -1
  38. package/public/mobile-demo.html +788 -0
  39. package/.output/public/_nuxt/CDdFfo0w.js +0 -91
  40. package/.output/public/_nuxt/builds/meta/4b90bf55-5441-4724-8537-3192f91ec217.json +0 -1
  41. package/.output/public/_nuxt/pages.Df3hoeGN.css +0 -1
  42. package/.output/server/chunks/build/entry-styles.BPr_nTP3.mjs +0 -8
  43. package/.output/server/chunks/build/entry-styles.BPr_nTP3.mjs.map +0 -1
  44. package/.output/server/chunks/build/index-styles.CQioNwpv.mjs +0 -8
  45. package/.output/server/chunks/build/index-styles.CQioNwpv.mjs.map +0 -1
  46. package/.output/server/chunks/build/pages-BsPKZpHw.mjs.map +0 -1
@@ -0,0 +1,788 @@
1
+ <!DOCTYPE html>
2
+ <html lang="id">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
6
+ <title>SocialGen Mobile UX Redesign Prototype</title>
7
+ <script src="https://www.gstatic.com/antigravity/web/dev/tailwindcss.min.js"></script>
8
+ <style>
9
+ /* Custom mobile styling & smooth scroll */
10
+ * { -webkit-tap-highlight-color: transparent; }
11
+ .no-scrollbar::-webkit-scrollbar { display: none; }
12
+ .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
13
+ .custom-scroll::-webkit-scrollbar { width: 4px; }
14
+ .custom-scroll::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.4); }
15
+ .custom-scroll::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.3); border-radius: 999px; }
16
+
17
+ /* Device frame simulation */
18
+ @media (min-width: 640px) {
19
+ .phone-wrapper {
20
+ box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 10px #1e293b, 0 0 0 12px #334155;
21
+ border-radius: 46px;
22
+ }
23
+ }
24
+ </style>
25
+ </head>
26
+ <body class="bg-slate-950 text-slate-100 min-h-screen flex flex-col items-center justify-center p-0 sm:p-6 font-sans select-none antialiased">
27
+
28
+ <!-- Desktop Controls & Concept Switcher -->
29
+ <header class="w-full max-w-md mb-3 px-4 flex items-center justify-between text-xs text-slate-400">
30
+ <div class="flex items-center gap-2">
31
+ <div class="w-2.5 h-2.5 rounded-full bg-emerald-400 animate-ping"></div>
32
+ <span class="font-bold text-slate-200">Interactive Prototype</span>
33
+ </div>
34
+ <!-- Mode Switcher -->
35
+ <div class="flex items-center bg-slate-900 p-1 rounded-xl border border-slate-800">
36
+ <button id="modeBtnA" onclick="switchConcept('A')" class="px-3 py-1 rounded-lg text-[11px] font-bold bg-sky-500 text-white shadow transition">
37
+ Konsep A (Split)
38
+ </button>
39
+ <button id="modeBtnB" onclick="switchConcept('B')" class="px-3 py-1 rounded-lg text-[11px] font-bold text-slate-400 hover:text-white transition">
40
+ Konsep B (Full)
41
+ </button>
42
+ </div>
43
+ </header>
44
+
45
+ <!-- Phone Screen Container (iPhone 15 aspect 390x844) -->
46
+ <main class="phone-wrapper w-full max-w-[400px] h-[844px] bg-slate-950 sm:border border-slate-800 overflow-hidden relative flex flex-col justify-between shadow-2xl">
47
+
48
+ <!-- Top App Bar -->
49
+ <div class="shrink-0 h-12 px-4 bg-slate-900/90 backdrop-blur-md border-b border-slate-800/80 flex items-center justify-between z-20">
50
+ <div class="flex items-center gap-2">
51
+ <div class="w-7 h-7 rounded-lg bg-gradient-to-tr from-sky-500 to-indigo-600 flex items-center justify-center font-black text-xs text-white shadow-md shadow-sky-500/20">
52
+ SG
53
+ </div>
54
+ <div class="flex flex-col">
55
+ <span class="text-xs font-black text-white tracking-wide">SocialGen</span>
56
+ <span class="text-[9px] text-sky-400 font-mono font-medium -mt-0.5">v2.4.0 Mobile</span>
57
+ </div>
58
+ </div>
59
+
60
+ <div class="flex items-center gap-2">
61
+ <button onclick="toggleBottomSheet('rawJson')" class="px-2 py-1 rounded-lg bg-slate-800 hover:bg-slate-700 text-[10px] font-mono font-bold text-sky-300 border border-slate-700 flex items-center gap-1 transition">
62
+ <span>&lt;/&gt; JSON</span>
63
+ </button>
64
+ <div class="w-2 h-2 rounded-full bg-emerald-400" title="AI Ready"></div>
65
+ </div>
66
+ </div>
67
+
68
+ <!-- MAIN BODY CONTAINER -->
69
+ <div class="flex-1 flex flex-col min-h-0 overflow-hidden relative">
70
+
71
+ <!-- ==================== TOP ZONE: LIVE CANVAS PREVIEW ==================== -->
72
+ <section id="topPreviewZone" class="shrink-0 bg-slate-900/40 p-2.5 border-b border-slate-800/80 flex flex-col items-center justify-center relative transition-all duration-300">
73
+ <!-- Canvas Aspect Ratio & Format Bar -->
74
+ <div class="w-full flex items-center justify-between mb-1.5 px-1">
75
+ <div class="flex items-center gap-1 bg-slate-950/80 p-0.5 rounded-lg border border-slate-800 text-[10px]">
76
+ <button onclick="setFormat('feed')" id="fmtFeed" class="px-2 py-0.5 rounded-md font-bold bg-sky-500 text-white transition">Feed 4:5</button>
77
+ <button onclick="setFormat('reels')" id="fmtReels" class="px-2 py-0.5 rounded-md font-bold text-slate-400 hover:text-white transition">Reels 9:16</button>
78
+ </div>
79
+ <div class="flex items-center gap-2 text-[10px] text-slate-400">
80
+ <span id="playingBadge" class="flex items-center gap-1 text-emerald-400 font-mono text-[9px]">
81
+ <span class="w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"></span>
82
+ LIVE
83
+ </span>
84
+ </div>
85
+ </div>
86
+
87
+ <!-- Simulated Scaled Canvas Card -->
88
+ <div id="canvasCard" class="w-[210px] h-[262px] rounded-2xl bg-gradient-to-br from-slate-900 to-indigo-950 border border-white/10 p-3 shadow-xl flex flex-col justify-between relative overflow-hidden transition-all duration-300 group">
89
+ <!-- Ambient Glow Background -->
90
+ <div id="canvasGlow" class="absolute -top-10 -right-10 w-28 h-28 bg-sky-500/20 rounded-full blur-2xl pointer-events-none"></div>
91
+
92
+ <!-- Top Badge & Watermark -->
93
+ <div class="flex items-center justify-between text-[8px] z-10">
94
+ <span id="cardCategory" class="px-1.5 py-0.5 rounded bg-sky-500/20 text-sky-300 border border-sky-400/30 font-bold uppercase tracking-wider">
95
+ TECH & AI INSIGHTS
96
+ </span>
97
+ <span class="text-slate-400 font-mono">@SocialGen</span>
98
+ </div>
99
+
100
+ <!-- Middle Content (Title + Bullets) -->
101
+ <div class="my-auto z-10 space-y-1.5">
102
+ <h2 id="cardTitle" class="text-[13px] font-black leading-tight text-white drop-shadow tracking-tight uppercase line-clamp-2">
103
+ CRASHED 99% INFERENCE
104
+ </h2>
105
+ <p id="cardSubtitle" class="text-[8.5px] font-semibold text-sky-200/90 leading-snug line-clamp-2">
106
+ Biaya API AI anjlok drastis dalam 3 tahun terakhir, memicu era disrupsi komoditas cerdas.
107
+ </p>
108
+ <div id="cardPills" class="space-y-1 pt-1">
109
+ <div class="p-1 rounded-md bg-white/5 border border-white/10 text-[7.5px] text-slate-200 leading-tight">
110
+ ⚡ Dari $30/M token menjadi &lt;$0.30 per 1M token.
111
+ </div>
112
+ <div class="p-1 rounded-md bg-white/5 border border-white/10 text-[7.5px] text-slate-200 leading-tight">
113
+ 🚀 Arsitektur MoE & chip kustom mempercepat deflasi 10x.
114
+ </div>
115
+ </div>
116
+ </div>
117
+
118
+ <!-- Bottom Footer Info -->
119
+ <div class="pt-1 border-t border-white/10 flex items-center justify-between text-[7px] text-slate-400 z-10">
120
+ <span id="cardFooter">Source: Stanford HAI & Epoch AI 2026</span>
121
+ <span class="text-sky-400 font-bold">Verified Data</span>
122
+ </div>
123
+ </div>
124
+ </section>
125
+
126
+ <!-- ==================== BOTTOM ZONE: MODULAR TOOL PANELS ==================== -->
127
+ <section class="flex-1 flex flex-col min-h-0 bg-slate-950 overflow-hidden relative">
128
+
129
+ <!-- Modular Sub-Tabs Bar (Scrollable horizontally if needed) -->
130
+ <div class="shrink-0 px-2.5 py-2 bg-slate-900/60 border-b border-slate-800/80 flex items-center justify-between gap-1 overflow-x-auto no-scrollbar">
131
+ <button onclick="switchTab('content')" id="tabContent" class="tab-btn px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1.5 bg-sky-500/20 text-sky-400 border border-sky-500/30 transition shrink-0">
132
+ <span>📝 Konten</span>
133
+ </button>
134
+ <button onclick="switchTab('design')" id="tabDesign" class="tab-btn px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1.5 text-slate-400 hover:text-slate-200 transition shrink-0">
135
+ <span>🎨 Template</span>
136
+ </button>
137
+ <button onclick="switchTab('media')" id="tabMedia" class="tab-btn px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1.5 text-slate-400 hover:text-slate-200 transition shrink-0">
138
+ <span>🎬 Media</span>
139
+ </button>
140
+ <button onclick="switchTab('ai')" id="tabAi" class="tab-btn px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1.5 text-slate-400 hover:text-slate-200 transition shrink-0">
141
+ <span>⚡ AI Topic</span>
142
+ </button>
143
+ <button onclick="switchTab('history')" id="tabHistory" class="tab-btn px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1.5 text-slate-400 hover:text-slate-200 transition shrink-0">
144
+ <span>💾 Draft</span>
145
+ </button>
146
+ </div>
147
+
148
+ <!-- Scrollable Active Module Container -->
149
+ <div class="flex-1 overflow-y-auto custom-scroll p-3 pb-20 space-y-3">
150
+
151
+ <!-- ==================== PANEL 1: KONTEN (TEXT & DATA) ==================== -->
152
+ <div id="panelContent" class="space-y-3">
153
+ <!-- Title Input with AI Rewrite Magic Pill -->
154
+ <div class="space-y-1">
155
+ <div class="flex items-center justify-between">
156
+ <label class="text-[11px] font-bold text-slate-300">Judul Konten (Title)</label>
157
+ <button onclick="magicRewrite()" class="px-1.5 py-0.5 rounded bg-purple-500/20 text-purple-300 border border-purple-500/40 text-[9px] font-bold flex items-center gap-1 hover:bg-purple-500/30 transition">
158
+ <span>✨ Bikin Menarik</span>
159
+ </button>
160
+ </div>
161
+ <input
162
+ id="inputTitle"
163
+ type="text"
164
+ value="CRASHED 99% INFERENCE"
165
+ oninput="updateCard()"
166
+ class="w-full bg-slate-900 border border-slate-800 rounded-xl px-3 py-2 text-xs text-white font-bold focus:outline-none focus:border-sky-500 transition"
167
+ />
168
+ </div>
169
+
170
+ <!-- Subtitle Input -->
171
+ <div class="space-y-1">
172
+ <label class="text-[11px] font-bold text-slate-300">Subtitle / Penjelasan Ringkas</label>
173
+ <textarea
174
+ id="inputSubtitle"
175
+ rows="2"
176
+ oninput="updateCard()"
177
+ class="w-full bg-slate-900 border border-slate-800 rounded-xl p-2.5 text-xs text-slate-200 focus:outline-none focus:border-sky-500 transition resize-none"
178
+ >Biaya API AI anjlok drastis dalam 3 tahun terakhir, memicu era disrupsi komoditas cerdas.</textarea>
179
+ </div>
180
+
181
+ <!-- Bullet Points / Data Items (Card List) -->
182
+ <div class="space-y-1.5">
183
+ <div class="flex items-center justify-between">
184
+ <label class="text-[11px] font-bold text-slate-300">Poin Informasi (Items)</label>
185
+ <span class="text-[9px] text-slate-500">2 Poin Aktif</span>
186
+ </div>
187
+ <div class="space-y-1.5">
188
+ <div class="flex items-center gap-1.5 bg-slate-900/90 border border-slate-800/80 p-2 rounded-xl">
189
+ <span class="text-xs text-sky-400 font-bold">1</span>
190
+ <input type="text" value="Dari $30/M token menjadi <$0.30 per 1M token." class="flex-1 bg-transparent text-xs text-slate-200 focus:outline-none" />
191
+ </div>
192
+ <div class="flex items-center gap-1.5 bg-slate-900/90 border border-slate-800/80 p-2 rounded-xl">
193
+ <span class="text-xs text-sky-400 font-bold">2</span>
194
+ <input type="text" value="Arsitektur MoE & chip kustom mempercepat deflasi 10x." class="flex-1 bg-transparent text-xs text-slate-200 focus:outline-none" />
195
+ </div>
196
+ </div>
197
+ </div>
198
+
199
+ <!-- Footer Note / Sumber -->
200
+ <div class="space-y-1">
201
+ <label class="text-[11px] font-bold text-slate-300">Catatan Sumber (Footer Note)</label>
202
+ <input
203
+ id="inputFooter"
204
+ type="text"
205
+ value="Source: Stanford HAI & Epoch AI 2026"
206
+ oninput="updateCard()"
207
+ class="w-full bg-slate-900 border border-slate-800 rounded-xl px-3 py-2 text-xs text-slate-300 focus:outline-none focus:border-sky-500"
208
+ />
209
+ </div>
210
+
211
+ <!-- Caption Box -->
212
+ <div class="p-2.5 bg-slate-900/90 border border-slate-800 rounded-xl space-y-1.5">
213
+ <div class="flex items-center justify-between">
214
+ <span class="text-[10px] font-bold text-slate-400 uppercase tracking-wider">Viral Caption & Hashtags</span>
215
+ <button onclick="toast('Caption disalin!')" class="text-[10px] text-sky-400 font-bold flex items-center gap-1 hover:underline">
216
+ <span>📋 Salin</span>
217
+ </button>
218
+ </div>
219
+ <p class="text-[11px] text-slate-300 leading-relaxed font-sans">
220
+ Intelligence just became a cheap utility. Are you still paying 2023 prices for 2026 AI? 👇 #AITrends2026 #TechData
221
+ </p>
222
+ </div>
223
+ </div>
224
+
225
+ <!-- ==================== PANEL 2: TEMPLATE & GAYA ==================== -->
226
+ <div id="panelDesign" class="space-y-3.5 hidden">
227
+ <!-- 1. Horizontal Template Carousel with Visual Thumbnails -->
228
+ <div class="space-y-1.5">
229
+ <div class="flex items-center justify-between">
230
+ <label class="text-[11px] font-bold text-slate-300">Pilih Template Visual (17 Pilihan)</label>
231
+ <span class="text-[9px] text-sky-400 font-bold">Geser & Sentuh ➔</span>
232
+ </div>
233
+ <div class="flex gap-2 overflow-x-auto no-scrollbar py-1">
234
+ <!-- Tpl 1 -->
235
+ <button onclick="selectTemplate('orange-pill-hero', this)" class="tpl-card shrink-0 w-28 p-2.5 rounded-2xl bg-slate-900 border-2 border-sky-500 flex flex-col items-center gap-1.5 shadow-lg shadow-sky-500/10 transition">
236
+ <div class="w-8 h-8 rounded-xl bg-orange-500/20 text-orange-400 flex items-center justify-center text-sm font-bold">📰</div>
237
+ <span class="text-[10px] font-black text-white text-center leading-tight">Orange Pill Hero</span>
238
+ <span class="text-[8px] text-orange-400 font-bold bg-orange-500/10 px-1 rounded">Baru</span>
239
+ </button>
240
+ <!-- Tpl 2 -->
241
+ <button onclick="selectTemplate('infografis-education', this)" class="tpl-card shrink-0 w-28 p-2.5 rounded-2xl bg-slate-900 border border-slate-800 flex flex-col items-center gap-1.5 hover:border-slate-700 transition">
242
+ <div class="w-8 h-8 rounded-xl bg-blue-500/20 text-blue-400 flex items-center justify-center text-sm font-bold">📜</div>
243
+ <span class="text-[10px] font-black text-white text-center leading-tight">Edu Pill Frame</span>
244
+ <span class="text-[8px] text-blue-400 font-bold bg-blue-500/10 px-1 rounded">Edukasi</span>
245
+ </button>
246
+ <!-- Tpl 3 -->
247
+ <button onclick="selectTemplate('breaking-notifications', this)" class="tpl-card shrink-0 w-28 p-2.5 rounded-2xl bg-slate-900 border border-slate-800 flex flex-col items-center gap-1.5 hover:border-slate-700 transition">
248
+ <div class="w-8 h-8 rounded-xl bg-rose-500/20 text-rose-400 flex items-center justify-center text-sm font-bold">🚨</div>
249
+ <span class="text-[10px] font-black text-white text-center leading-tight">Alert Stack</span>
250
+ <span class="text-[8px] text-rose-400 font-bold bg-rose-500/10 px-1 rounded">Viral</span>
251
+ </button>
252
+ <!-- Tpl 4 -->
253
+ <button onclick="selectTemplate('stat', this)" class="tpl-card shrink-0 w-28 p-2.5 rounded-2xl bg-slate-900 border border-slate-800 flex flex-col items-center gap-1.5 hover:border-slate-700 transition">
254
+ <div class="w-8 h-8 rounded-xl bg-emerald-500/20 text-emerald-400 flex items-center justify-center text-sm font-bold">📊</div>
255
+ <span class="text-[10px] font-black text-white text-center leading-tight">Big Stat Trend</span>
256
+ <span class="text-[8px] text-emerald-400 font-bold bg-emerald-500/10 px-1 rounded">Finansial</span>
257
+ </button>
258
+ <!-- Tpl 5 -->
259
+ <button onclick="selectTemplate('table', this)" class="tpl-card shrink-0 w-28 p-2.5 rounded-2xl bg-slate-900 border border-slate-800 flex flex-col items-center gap-1.5 hover:border-slate-700 transition">
260
+ <div class="w-8 h-8 rounded-xl bg-purple-500/20 text-purple-400 flex items-center justify-center text-sm font-bold">📋</div>
261
+ <span class="text-[10px] font-black text-white text-center leading-tight">Data Grid Table</span>
262
+ <span class="text-[8px] text-purple-400 font-bold bg-purple-500/10 px-1 rounded">Komparasi</span>
263
+ </button>
264
+ </div>
265
+ </div>
266
+
267
+ <!-- 2. Visual Color Swatches (No More Text Dropdown) -->
268
+ <div class="space-y-1.5">
269
+ <label class="text-[11px] font-bold text-slate-300">Tema Warna (Visual Swatches)</label>
270
+ <div class="flex items-center gap-2.5 py-1">
271
+ <button onclick="setTheme('blue-tech', '#0284c7')" class="theme-dot w-7 h-7 rounded-full bg-sky-600 ring-2 ring-white ring-offset-2 ring-offset-slate-950 transition" title="Blue Tech"></button>
272
+ <button onclick="setTheme('dark-contrast', '#1e293b')" class="theme-dot w-7 h-7 rounded-full bg-slate-800 ring-1 ring-slate-700 transition" title="Dark Contrast"></button>
273
+ <button onclick="setTheme('nordic-frost', '#06b6d4')" class="theme-dot w-7 h-7 rounded-full bg-cyan-600 ring-1 ring-slate-700 transition" title="Nordic Frost"></button>
274
+ <button onclick="setTheme('crimson-alert', '#e11d48')" class="theme-dot w-7 h-7 rounded-full bg-rose-600 ring-1 ring-slate-700 transition" title="Crimson Alert"></button>
275
+ <button onclick="setTheme('emerald-finance', '#059669')" class="theme-dot w-7 h-7 rounded-full bg-emerald-600 ring-1 ring-slate-700 transition" title="Emerald Finance"></button>
276
+ <button onclick="setTheme('neon-cyber', '#9333ea')" class="theme-dot w-7 h-7 rounded-full bg-purple-600 ring-1 ring-slate-700 transition" title="Neon Cyber"></button>
277
+ </div>
278
+ </div>
279
+
280
+ <!-- Custom Template Manager Button -->
281
+ <div class="pt-2 border-t border-slate-800 flex items-center justify-between">
282
+ <div class="text-[10px] text-slate-400">Punya referensi kartu baru?</div>
283
+ <button onclick="toast('Membuka modal template kustom!')" class="px-2.5 py-1 rounded-xl bg-slate-800 hover:bg-slate-700 text-sky-300 text-[10px] font-bold border border-slate-700">
284
+ ⚙️ Kelola Template Kustom
285
+ </button>
286
+ </div>
287
+ </div>
288
+
289
+ <!-- ==================== PANEL 3: MEDIA (VIDEO & AUDIO) ==================== -->
290
+ <div id="panelMedia" class="space-y-3 hidden">
291
+ <!-- Background Video Picker & Auto 0s Reset -->
292
+ <div class="p-3 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2">
293
+ <div class="flex items-center justify-between">
294
+ <span class="text-xs font-bold text-sky-400 flex items-center gap-1.5">
295
+ 🎥 Background Video
296
+ </span>
297
+ <span class="text-[9px] text-slate-400">Otomatis reset 0s</span>
298
+ </div>
299
+ <div class="grid grid-cols-2 gap-1.5">
300
+ <button onclick="setBg('cyber_pulse.mp4', this)" class="bg-card px-2.5 py-2 rounded-xl bg-slate-950 border-2 border-sky-500 text-left text-xs font-bold text-white transition">
301
+ 🌌 Cyber Pulse
302
+ </button>
303
+ <button onclick="setBg('dark_luxury.mp4', this)" class="bg-card px-2.5 py-2 rounded-xl bg-slate-950 border border-slate-800 text-left text-xs font-bold text-slate-300 transition">
304
+ ✨ Dark Luxury
305
+ </button>
306
+ <button onclick="setBg('emerald_flow.mp4', this)" class="bg-card px-2.5 py-2 rounded-xl bg-slate-950 border border-slate-800 text-left text-xs font-bold text-slate-300 transition">
307
+ 🌊 Emerald Flow
308
+ </button>
309
+ <button onclick="setBg('pexels', this)" class="bg-card px-2.5 py-2 rounded-xl bg-slate-950 border border-slate-800 text-left text-xs font-bold text-sky-300 transition">
310
+ 🌐 Pexels HD
311
+ </button>
312
+ </div>
313
+
314
+ <!-- Video Start Offset Scrubber -->
315
+ <div class="pt-1.5 space-y-1">
316
+ <div class="flex items-center justify-between text-[10px]">
317
+ <span class="text-slate-400 font-mono">✂️ Mulai Detik: <strong id="vOffsetReadout" class="text-sky-300">0s</strong> / 15s</span>
318
+ <button onclick="resetOffset('video')" class="text-[9px] text-slate-400 hover:text-white">Reset 0s</button>
319
+ </div>
320
+ <input id="vSlider" type="range" min="0" max="14" value="0" oninput="onOffsetChange('video', this.value)" class="w-full h-1.5 bg-slate-950 rounded appearance-none cursor-pointer accent-sky-400" />
321
+ </div>
322
+ </div>
323
+
324
+ <!-- Music Reels Audio Picker -->
325
+ <div class="p-3 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-2">
326
+ <div class="flex items-center justify-between">
327
+ <span class="text-xs font-bold text-purple-400 flex items-center gap-1.5">
328
+ 🎵 Musik Reels
329
+ </span>
330
+ <span class="text-[9px] text-slate-400">Otomatis reset 0s</span>
331
+ </div>
332
+ <div class="grid grid-cols-2 gap-1.5">
333
+ <button onclick="setAudio('lofi_study.mp3', this)" class="aud-card px-2.5 py-2 rounded-xl bg-slate-950 border-2 border-purple-500 text-left text-xs font-bold text-white transition">
334
+ ☕ Lofi Viral Study
335
+ </button>
336
+ <button onclick="setAudio('dark_phonk.mp3', this)" class="aud-card px-2.5 py-2 rounded-xl bg-slate-950 border border-slate-800 text-left text-xs font-bold text-slate-300 transition">
337
+ 🏎️ Dark Phonk
338
+ </button>
339
+ <button onclick="setAudio('deep_finance.mp3', this)" class="aud-card px-2.5 py-2 rounded-xl bg-slate-950 border border-slate-800 text-left text-xs font-bold text-slate-300 transition">
340
+ 📈 Deep Finance
341
+ </button>
342
+ <button onclick="setAudio('random', this)" class="aud-card px-2.5 py-2 rounded-xl bg-slate-950 border border-slate-800 text-left text-xs font-bold text-purple-300 transition">
343
+ 🔀 Acak Musik
344
+ </button>
345
+ </div>
346
+
347
+ <!-- Audio Offset Scrubber -->
348
+ <div class="pt-1.5 space-y-1">
349
+ <div class="flex items-center justify-between text-[10px]">
350
+ <span class="text-slate-400 font-mono">✂️ Mulai Intro: <strong id="aOffsetReadout" class="text-purple-300">0s</strong> / 30s</span>
351
+ <button onclick="resetOffset('audio')" class="text-[9px] text-slate-400 hover:text-white">Reset 0s</button>
352
+ </div>
353
+ <input id="aSlider" type="range" min="0" max="29" value="0" oninput="onOffsetChange('audio', this.value)" class="w-full h-1.5 bg-slate-950 rounded appearance-none cursor-pointer accent-purple-400" />
354
+ </div>
355
+ </div>
356
+
357
+ <!-- Reels Duration Selector -->
358
+ <div class="flex items-center justify-between p-2.5 bg-slate-900/90 border border-slate-800 rounded-xl">
359
+ <span class="text-[11px] font-bold text-slate-300">⏱️ Durasi Video Reels</span>
360
+ <div class="flex gap-1">
361
+ <button onclick="setDuration(15, this)" class="dur-btn px-2 py-0.5 rounded-lg text-xs font-bold bg-slate-800 text-slate-300">15s</button>
362
+ <button onclick="setDuration(30, this)" class="dur-btn px-2 py-0.5 rounded-lg text-xs font-bold bg-emerald-500 text-white">30s</button>
363
+ <button onclick="setDuration(60, this)" class="dur-btn px-2 py-0.5 rounded-lg text-xs font-bold bg-slate-800 text-slate-300">60s</button>
364
+ </div>
365
+ </div>
366
+ </div>
367
+
368
+ <!-- ==================== PANEL 4: AI TOPIC GENERATOR ==================== -->
369
+ <div id="panelAi" class="space-y-3 hidden">
370
+ <div class="p-3 rounded-2xl bg-gradient-to-br from-indigo-950/70 to-slate-900 border border-indigo-500/30 space-y-2.5">
371
+ <div class="flex items-center justify-between">
372
+ <span class="text-xs font-black text-indigo-300 uppercase tracking-wider flex items-center gap-1.5">
373
+ ⚡ Auto-Topic Generator
374
+ </span>
375
+ <span class="text-[9px] px-2 py-0.5 rounded-full bg-emerald-500/20 text-emerald-400 font-bold border border-emerald-500/30">
376
+ Gemini 2.5 Pro
377
+ </span>
378
+ </div>
379
+
380
+ <div class="space-y-1">
381
+ <label class="text-[10px] font-bold text-slate-400">Pilih Niche Konten:</label>
382
+ <select class="w-full bg-slate-950 border border-slate-800 rounded-xl p-2 text-xs text-white focus:outline-none">
383
+ <option>🤖 Teknologi & AI (Default)</option>
384
+ <option>💼 Karier & Gaji Global</option>
385
+ <option>💰 Investasi & Finansial</option>
386
+ <option>🏥 Kesehatan & Sains</option>
387
+ </select>
388
+ </div>
389
+
390
+ <!-- Big One-Click Auto Topic Button -->
391
+ <button onclick="simulateAiGenerate()" class="w-full py-2.5 rounded-xl bg-gradient-to-r from-indigo-500 via-sky-500 to-emerald-400 text-white font-extrabold text-xs shadow-lg shadow-sky-500/25 flex items-center justify-center gap-2 hover:opacity-95 active:scale-98 transition">
392
+ <span>✨ Generate Topik Viral Baru</span>
393
+ </button>
394
+ </div>
395
+
396
+ <!-- Master Vision Prompt AI Box -->
397
+ <div class="p-3 bg-slate-900/90 border border-slate-800 rounded-2xl space-y-1.5">
398
+ <div class="flex items-center justify-between">
399
+ <span class="text-[11px] font-bold text-slate-300">Prompt Bantuan AI (Custom Template)</span>
400
+ <button onclick="toast('Prompt Bantuan AI Tersalin!')" class="px-2 py-1 rounded-lg bg-sky-500/20 text-sky-300 text-[10px] font-bold border border-sky-500/30">
401
+ 📋 Salin Prompt
402
+ </button>
403
+ </div>
404
+ <p class="text-[10px] text-slate-400 leading-relaxed">
405
+ Kirim prompt ini bersama screenshot referensi kartu ke ChatGPT / Claude / Gemini untuk membuat template baru secara otomatis.
406
+ </p>
407
+ </div>
408
+ </div>
409
+
410
+ <!-- ==================== PANEL 5: DRAFTS & RIWAYAT ==================== -->
411
+ <div id="panelHistory" class="space-y-2.5 hidden">
412
+ <div class="flex items-center justify-between">
413
+ <span class="text-xs font-bold text-slate-300">Riwayat Generasi Terakhir</span>
414
+ <button onclick="toast('Riwayat dibersihkan')" class="text-[10px] text-rose-400 hover:underline">Hapus Semua</button>
415
+ </div>
416
+
417
+ <div class="space-y-1.5">
418
+ <div onclick="toast('Draft dipulihkan!')" class="p-2.5 rounded-xl bg-slate-900 border border-slate-800 flex items-center justify-between active:bg-slate-800 transition cursor-pointer">
419
+ <div class="flex flex-col">
420
+ <span class="text-xs font-bold text-white">CRASHED 99% INFERENCE</span>
421
+ <span class="text-[9px] text-slate-400 font-mono">Template: Orange Pill Hero • 2 menit lalu</span>
422
+ </div>
423
+ <span class="text-xs text-sky-400 font-bold">Muat ➔</span>
424
+ </div>
425
+ <div onclick="toast('Draft dipulihkan!')" class="p-2.5 rounded-xl bg-slate-900 border border-slate-800 flex items-center justify-between active:bg-slate-800 transition cursor-pointer">
426
+ <div class="flex flex-col">
427
+ <span class="text-xs font-bold text-white">JURANG UPAH RIIL 2026</span>
428
+ <span class="text-[9px] text-slate-400 font-mono">Template: Special News • 1 jam lalu</span>
429
+ </div>
430
+ <span class="text-xs text-sky-400 font-bold">Muat ➔</span>
431
+ </div>
432
+ </div>
433
+ </div>
434
+
435
+ </div>
436
+ </section>
437
+
438
+ </div>
439
+
440
+ <!-- ==================== FLOATING QUICK PEEK BUTTON FOR KONSEP B ==================== -->
441
+ <button
442
+ id="floatingPeekBtn"
443
+ onclick="toggleCanvasModal(true)"
444
+ class="hidden absolute bottom-20 right-3 z-30 px-3.5 py-2 rounded-full bg-gradient-to-r from-sky-500 to-indigo-600 hover:from-sky-400 hover:to-indigo-500 text-white font-black text-xs shadow-2xl border border-sky-400/40 flex items-center gap-1.5 active:scale-95 transition animate-bounce"
445
+ >
446
+ <span class="text-sm">👁️</span>
447
+ <span>Intip Canvas</span>
448
+ </button>
449
+
450
+ <!-- ==================== FULLSCREEN CANVAS PREVIEW MODAL (FOR KONSEP B) ==================== -->
451
+ <div id="canvasModal" class="absolute inset-0 bg-slate-950/95 backdrop-blur-md z-50 hidden flex flex-col justify-between p-4 transition-all">
452
+ <!-- Modal Header -->
453
+ <div class="flex items-center justify-between pb-2 border-b border-slate-800">
454
+ <div class="flex items-center gap-2">
455
+ <span class="text-xs font-bold text-white flex items-center gap-1.5">
456
+ <span class="w-2 h-2 rounded-full bg-emerald-400 animate-ping"></span>
457
+ Preview Kanvas Penuh
458
+ </span>
459
+ <div class="flex items-center gap-1 bg-slate-900 p-0.5 rounded-lg border border-slate-800 text-[10px]">
460
+ <button onclick="setModalFormat('feed')" id="modalFmtFeed" class="px-2 py-0.5 rounded-md font-bold bg-sky-500 text-white">Feed 4:5</button>
461
+ <button onclick="setModalFormat('reels')" id="modalFmtReels" class="px-2 py-0.5 rounded-md font-bold text-slate-400">Reels 9:16</button>
462
+ </div>
463
+ </div>
464
+ <button onclick="toggleCanvasModal(false)" class="px-2.5 py-1 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs text-slate-300 font-bold border border-slate-700 flex items-center gap-1">
465
+ <span>✕ Tutup</span>
466
+ </button>
467
+ </div>
468
+
469
+ <!-- Modal Canvas Content Area -->
470
+ <div class="flex-1 flex items-center justify-center py-2 overflow-hidden">
471
+ <div id="modalCanvasCard" class="w-[230px] h-[287px] rounded-2xl bg-gradient-to-br from-slate-900 to-indigo-950 border border-white/10 p-3.5 shadow-2xl flex flex-col justify-between relative overflow-hidden transition-all duration-300">
472
+ <div class="flex items-center justify-between text-[8.5px] z-10">
473
+ <span id="modalCardCategory" class="px-1.5 py-0.5 rounded bg-sky-500/20 text-sky-300 border border-sky-400/30 font-bold uppercase tracking-wider">
474
+ TECH & AI INSIGHTS
475
+ </span>
476
+ <span class="text-slate-400 font-mono">@SocialGen</span>
477
+ </div>
478
+
479
+ <div class="my-auto z-10 space-y-2">
480
+ <h2 id="modalCardTitle" class="text-[15px] font-black leading-tight text-white drop-shadow tracking-tight uppercase line-clamp-2">
481
+ CRASHED 99% INFERENCE
482
+ </h2>
483
+ <p id="modalCardSubtitle" class="text-[9.5px] font-semibold text-sky-200/90 leading-snug line-clamp-2">
484
+ Biaya API AI anjlok drastis dalam 3 tahun terakhir, memicu era disrupsi komoditas cerdas.
485
+ </p>
486
+ <div class="space-y-1 pt-1">
487
+ <div class="p-1 rounded-md bg-white/5 border border-white/10 text-[8px] text-slate-200 leading-tight">
488
+ ⚡ Dari $30/M token menjadi &lt;$0.30 per 1M token.
489
+ </div>
490
+ <div class="p-1 rounded-md bg-white/5 border border-white/10 text-[8px] text-slate-200 leading-tight">
491
+ 🚀 Arsitektur MoE & chip kustom mempercepat deflasi 10x.
492
+ </div>
493
+ </div>
494
+ </div>
495
+
496
+ <div class="pt-1.5 border-t border-white/10 flex items-center justify-between text-[7.5px] text-slate-400 z-10">
497
+ <span id="modalCardFooter">Source: Stanford HAI & Epoch AI 2026</span>
498
+ <span class="text-sky-400 font-bold">Verified Data</span>
499
+ </div>
500
+ </div>
501
+ </div>
502
+
503
+ <!-- Modal Bottom Actions -->
504
+ <div class="pt-2 border-t border-slate-800 flex items-center justify-between gap-2">
505
+ <button onclick="toggleCanvasModal(false)" class="flex-1 py-2.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs font-bold text-slate-200">
506
+ ✏️ Lanjut Edit Form
507
+ </button>
508
+ <button onclick="toggleCanvasModal(false); simulateGenerateAction()" class="flex-1 py-2.5 rounded-xl bg-gradient-to-r from-sky-500 to-indigo-600 text-xs font-bold text-white shadow-lg">
509
+ 🚀 Langsung Render
510
+ </button>
511
+ </div>
512
+ </div>
513
+
514
+ <!-- ==================== STICKY THUMB-FRIENDLY BOTTOM ACTION BAR ==================== -->
515
+ <footer class="shrink-0 h-16 px-4 bg-slate-900/95 backdrop-blur-lg border-t border-slate-800 flex items-center justify-between gap-3 z-30">
516
+ <div class="flex flex-col">
517
+ <span class="text-[9px] font-bold text-slate-400 uppercase tracking-wider">Output Aktif</span>
518
+ <div class="flex items-center gap-1.5 text-[10px] font-bold text-sky-400">
519
+ <span>✓ Feed</span>
520
+ <span class="text-slate-600">•</span>
521
+ <span>✓ Reels</span>
522
+ </div>
523
+ </div>
524
+
525
+ <button onclick="simulateGenerateAction()" class="flex-1 py-3 px-4 rounded-2xl bg-gradient-to-r from-sky-500 to-indigo-600 hover:from-sky-400 hover:to-indigo-500 text-white font-black text-xs tracking-wide shadow-xl shadow-sky-500/25 flex items-center justify-center gap-2 active:scale-95 transition">
526
+ <span>🚀 GENERATE SEKARANG</span>
527
+ </button>
528
+ </footer>
529
+
530
+ <!-- ==================== SLIDE-UP BOTTOM SHEET FOR RAW JSON ==================== -->
531
+ <div id="rawJsonSheet" class="absolute inset-0 bg-black/70 backdrop-blur-sm z-40 hidden flex flex-col justify-end transition-opacity">
532
+ <div class="w-full h-[70%] bg-slate-900 border-t border-slate-700 rounded-t-3xl p-4 flex flex-col justify-between shadow-2xl animate-in slide-in-from-bottom">
533
+ <div class="flex items-center justify-between pb-2 border-b border-slate-800">
534
+ <div class="flex items-center gap-2">
535
+ <span class="text-xs font-bold text-white font-mono">&lt;/&gt; RAW JSON SocialGen</span>
536
+ <span class="text-[9px] px-1.5 py-0.5 rounded bg-sky-500/20 text-sky-300 font-mono">Format V2</span>
537
+ </div>
538
+ <button onclick="toggleBottomSheet('rawJson')" class="w-6 h-6 rounded-full bg-slate-800 flex items-center justify-center text-xs text-slate-400 hover:text-white">✕</button>
539
+ </div>
540
+
541
+ <textarea
542
+ class="flex-1 my-2.5 w-full bg-slate-950 border border-slate-800 rounded-xl p-3 text-[11px] font-mono text-sky-200 focus:outline-none resize-none custom-scroll"
543
+ >{
544
+ "title": "CRASHED 99% INFERENCE",
545
+ "category": "TECH & AI INSIGHTS",
546
+ "theme": "blue-tech",
547
+ "watermark": "@SocialGen",
548
+ "footerNote": "Source: Stanford HAI 2026",
549
+ "reelsDuration": 30
550
+ }</textarea>
551
+
552
+ <div class="flex items-center gap-2">
553
+ <button onclick="toast('JSON disalin!')" class="flex-1 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs font-bold text-slate-200">
554
+ Salin JSON
555
+ </button>
556
+ <button onclick="toggleBottomSheet('rawJson'); toast('JSON Berhasil Diimpor!')" class="flex-1 py-2 rounded-xl bg-sky-500 hover:bg-sky-400 text-xs font-bold text-white shadow-lg">
557
+ Terapkan ke Canvas
558
+ </button>
559
+ </div>
560
+ </div>
561
+ </div>
562
+
563
+ <!-- Toast Notification Float -->
564
+ <div id="toastBox" class="absolute top-14 left-1/2 -translate-x-1/2 px-4 py-2 rounded-full bg-sky-500 text-white font-bold text-xs shadow-2xl z-50 pointer-events-none opacity-0 transition-opacity duration-300 flex items-center gap-1.5">
565
+ <span>✓</span>
566
+ <span id="toastMsg">Tindakan Berhasil</span>
567
+ </div>
568
+
569
+ </main>
570
+
571
+ <script>
572
+ // State management for prototype
573
+ let currentFormat = 'feed';
574
+ let currentConcept = 'A';
575
+
576
+ function setFormat(fmt) {
577
+ currentFormat = fmt;
578
+ const card = document.getElementById('canvasCard');
579
+ const btnFeed = document.getElementById('fmtFeed');
580
+ const btnReels = document.getElementById('fmtReels');
581
+
582
+ if (fmt === 'reels') {
583
+ card.style.width = '160px';
584
+ card.style.height = '284px'; // 9:16 aspect ratio
585
+ btnReels.className = 'px-2 py-0.5 rounded-md font-bold bg-sky-500 text-white transition';
586
+ btnFeed.className = 'px-2 py-0.5 rounded-md font-bold text-slate-400 hover:text-white transition';
587
+ } else {
588
+ card.style.width = '210px';
589
+ card.style.height = '262px'; // 4:5 aspect ratio
590
+ btnFeed.className = 'px-2 py-0.5 rounded-md font-bold bg-sky-500 text-white transition';
591
+ btnReels.className = 'px-2 py-0.5 rounded-md font-bold text-slate-400 hover:text-white transition';
592
+ }
593
+ }
594
+
595
+ function switchTab(tabId) {
596
+ const tabs = ['content', 'design', 'media', 'ai', 'history'];
597
+ tabs.forEach(t => {
598
+ const panel = document.getElementById('panel' + t.charAt(0).toUpperCase() + t.slice(1));
599
+ const btn = document.getElementById('tab' + t.charAt(0).toUpperCase() + t.slice(1));
600
+ if (t === tabId) {
601
+ panel.classList.remove('hidden');
602
+ btn.className = 'tab-btn px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1.5 bg-sky-500/20 text-sky-400 border border-sky-500/30 transition shrink-0';
603
+ } else {
604
+ panel.classList.add('hidden');
605
+ btn.className = 'tab-btn px-2.5 py-1.5 rounded-xl text-xs font-bold flex items-center gap-1.5 text-slate-400 hover:text-slate-200 transition shrink-0';
606
+ }
607
+ });
608
+ }
609
+
610
+ function updateCard() {
611
+ const title = document.getElementById('inputTitle').value;
612
+ const subtitle = document.getElementById('inputSubtitle').value;
613
+ const footer = document.getElementById('inputFooter').value;
614
+
615
+ document.getElementById('cardTitle').innerText = title || 'JUDUL KOSONG';
616
+ document.getElementById('cardSubtitle').innerText = subtitle || '';
617
+ document.getElementById('cardFooter').innerText = footer || '';
618
+
619
+ const modalTitle = document.getElementById('modalCardTitle');
620
+ const modalSubtitle = document.getElementById('modalCardSubtitle');
621
+ const modalFooter = document.getElementById('modalCardFooter');
622
+ if (modalTitle) modalTitle.innerText = title || 'JUDUL KOSONG';
623
+ if (modalSubtitle) modalSubtitle.innerText = subtitle || '';
624
+ if (modalFooter) modalFooter.innerText = footer || '';
625
+ }
626
+
627
+ function selectTemplate(name, btn) {
628
+ document.querySelectorAll('.tpl-card').forEach(c => {
629
+ c.className = 'tpl-card shrink-0 w-28 p-2.5 rounded-2xl bg-slate-900 border border-slate-800 flex flex-col items-center gap-1.5 hover:border-slate-700 transition';
630
+ });
631
+ btn.className = 'tpl-card shrink-0 w-28 p-2.5 rounded-2xl bg-slate-900 border-2 border-sky-500 flex flex-col items-center gap-1.5 shadow-lg shadow-sky-500/10 transition';
632
+ toast('Template diubah: ' + name);
633
+ }
634
+
635
+ function setTheme(name, hex) {
636
+ const card = document.getElementById('canvasCard');
637
+ const glow = document.getElementById('canvasGlow');
638
+ glow.style.background = hex;
639
+ toast('Tema diubah: ' + name);
640
+ }
641
+
642
+ function setBg(bgName, btn) {
643
+ document.querySelectorAll('.bg-card').forEach(b => {
644
+ b.className = 'bg-card px-2.5 py-2 rounded-xl bg-slate-950 border border-slate-800 text-left text-xs font-bold text-slate-300 transition';
645
+ });
646
+ btn.className = 'bg-card px-2.5 py-2 rounded-xl bg-slate-950 border-2 border-sky-500 text-left text-xs font-bold text-white transition';
647
+
648
+ // Automatic Reset to 0s
649
+ document.getElementById('vSlider').value = 0;
650
+ document.getElementById('vOffsetReadout').innerText = '0s';
651
+ toast('Background diubah! Offset reset ke 0s');
652
+ }
653
+
654
+ function setAudio(audName, btn) {
655
+ document.querySelectorAll('.aud-card').forEach(b => {
656
+ b.className = 'aud-card px-2.5 py-2 rounded-xl bg-slate-950 border border-slate-800 text-left text-xs font-bold text-slate-300 transition';
657
+ });
658
+ btn.className = 'aud-card px-2.5 py-2 rounded-xl bg-slate-950 border-2 border-purple-500 text-left text-xs font-bold text-white transition';
659
+
660
+ // Automatic Reset to 0s
661
+ document.getElementById('aSlider').value = 0;
662
+ document.getElementById('aOffsetReadout').innerText = '0s';
663
+ toast('Musik diubah! Offset reset ke 0s');
664
+ }
665
+
666
+ function onOffsetChange(type, val) {
667
+ if (type === 'video') {
668
+ document.getElementById('vOffsetReadout').innerText = val + 's';
669
+ } else {
670
+ document.getElementById('aOffsetReadout').innerText = val + 's';
671
+ }
672
+ }
673
+
674
+ function resetOffset(type) {
675
+ if (type === 'video') {
676
+ document.getElementById('vSlider').value = 0;
677
+ document.getElementById('vOffsetReadout').innerText = '0s';
678
+ } else {
679
+ document.getElementById('aSlider').value = 0;
680
+ document.getElementById('aOffsetReadout').innerText = '0s';
681
+ }
682
+ toast('Offset direset ke 0s');
683
+ }
684
+
685
+ function setDuration(dur, btn) {
686
+ document.querySelectorAll('.dur-btn').forEach(b => {
687
+ b.className = 'dur-btn px-2 py-0.5 rounded-lg text-xs font-bold bg-slate-800 text-slate-300';
688
+ });
689
+ btn.className = 'dur-btn px-2 py-0.5 rounded-lg text-xs font-bold bg-emerald-500 text-white';
690
+ toast('Durasi Reels diubah: ' + dur + ' detik');
691
+ }
692
+
693
+ function magicRewrite() {
694
+ const titles = [
695
+ 'CRASHED 99%: THE NEW AI REALITY',
696
+ 'WHY 2026 AI COSTS ALMOST ZERO',
697
+ 'THE MASSIVE AI DEFLATION SHOCK'
698
+ ];
699
+ const randomTitle = titles[Math.floor(Math.random() * titles.length)];
700
+ document.getElementById('inputTitle').value = randomTitle;
701
+ updateCard();
702
+ toast('✨ Judul dioptimalkan oleh AI!');
703
+ }
704
+
705
+ function simulateAiGenerate() {
706
+ toast('⚡ Menghasilkan topik viral...');
707
+ setTimeout(() => {
708
+ document.getElementById('inputTitle').value = 'THE AI SALARY PARADOX 2026';
709
+ document.getElementById('inputSubtitle').value = 'Mengapa lonjakan pendapatan AI tidak merata bagi semua software engineer?';
710
+ updateCard();
711
+ toast('Topik baru berhasil dimuat!');
712
+ switchTab('content');
713
+ }, 700);
714
+ }
715
+
716
+ function simulateGenerateAction() {
717
+ toast('🚀 Render Feed & Reels dimulai...');
718
+ }
719
+
720
+ function toggleBottomSheet(id) {
721
+ const sheet = document.getElementById(id + 'Sheet');
722
+ if (sheet.classList.contains('hidden')) {
723
+ sheet.classList.remove('hidden');
724
+ } else {
725
+ sheet.classList.add('hidden');
726
+ }
727
+ }
728
+
729
+ function toggleCanvasModal(show) {
730
+ const modal = document.getElementById('canvasModal');
731
+ if (show) {
732
+ modal.classList.remove('hidden');
733
+ } else {
734
+ modal.classList.add('hidden');
735
+ }
736
+ }
737
+
738
+ function setModalFormat(fmt) {
739
+ const card = document.getElementById('modalCanvasCard');
740
+ const btnFeed = document.getElementById('modalFmtFeed');
741
+ const btnReels = document.getElementById('modalFmtReels');
742
+ if (fmt === 'reels') {
743
+ card.style.width = '180px';
744
+ card.style.height = '320px';
745
+ btnReels.className = 'px-2 py-0.5 rounded-md font-bold bg-sky-500 text-white';
746
+ btnFeed.className = 'px-2 py-0.5 rounded-md font-bold text-slate-400';
747
+ } else {
748
+ card.style.width = '230px';
749
+ card.style.height = '287px';
750
+ btnFeed.className = 'px-2 py-0.5 rounded-md font-bold bg-sky-500 text-white';
751
+ btnReels.className = 'px-2 py-0.5 rounded-md font-bold text-slate-400';
752
+ }
753
+ }
754
+
755
+ function switchConcept(concept) {
756
+ currentConcept = concept;
757
+ const previewZone = document.getElementById('topPreviewZone');
758
+ const btnA = document.getElementById('modeBtnA');
759
+ const btnB = document.getElementById('modeBtnB');
760
+ const peekBtn = document.getElementById('floatingPeekBtn');
761
+
762
+ if (concept === 'B') {
763
+ previewZone.classList.add('hidden');
764
+ peekBtn.classList.remove('hidden');
765
+ btnB.className = 'px-3 py-1 rounded-lg text-[11px] font-bold bg-sky-500 text-white shadow transition';
766
+ btnA.className = 'px-3 py-1 rounded-lg text-[11px] font-bold text-slate-400 hover:text-white transition';
767
+ toast('Konsep B Aktif: Layar form penuh! Tap "👁️ Intip Canvas" untuk preview.');
768
+ } else {
769
+ previewZone.classList.remove('hidden');
770
+ peekBtn.classList.add('hidden');
771
+ toggleCanvasModal(false);
772
+ btnA.className = 'px-3 py-1 rounded-lg text-[11px] font-bold bg-sky-500 text-white shadow transition';
773
+ btnB.className = 'px-3 py-1 rounded-lg text-[11px] font-bold text-slate-400 hover:text-white transition';
774
+ toast('Mode: Konsep A (Hybrid Split-View)');
775
+ }
776
+ }
777
+
778
+ function toast(msg) {
779
+ const box = document.getElementById('toastBox');
780
+ document.getElementById('toastMsg').innerText = msg;
781
+ box.style.opacity = '1';
782
+ setTimeout(() => {
783
+ box.style.opacity = '0';
784
+ }, 2000);
785
+ }
786
+ </script>
787
+ </body>
788
+ </html>