Hamed744 commited on
Commit
94aeced
·
verified ·
1 Parent(s): e626b97

Update Msai.sakd

Browse files
Files changed (1) hide show
  1. Msai.sakd +167 -71
Msai.sakd CHANGED
@@ -92,7 +92,7 @@
92
  100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
93
  }
94
 
95
- /* --- START: Speaker Sample Player Styles (NEW for main models) --- */
96
  .sample-player-container {
97
  position: absolute;
98
  top: 50%;
@@ -100,12 +100,12 @@
100
  transform: translateY(-50%);
101
  display: flex;
102
  flex-direction: column;
103
- gap: 5px;
104
- z-index: 6; /* Higher than card elements */
105
  }
106
  .sample-play-btn {
107
- width: 28px;
108
- height: 28px;
109
  border-radius: 50%;
110
  cursor: pointer;
111
  display: flex;
@@ -125,15 +125,15 @@
125
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
126
  }
127
  .sample-play-btn .play-icon-svg {
128
- width: 13px;
129
- height: 13px;
130
  fill: #fff;
131
  transition: opacity 0.2s ease;
132
  }
133
  .sample-play-btn .playing-indicator {
134
  display: none;
135
- width: 12px;
136
- height: 10px;
137
  justify-content: space-between;
138
  align-items: flex-end;
139
  }
@@ -153,79 +153,158 @@
153
  }
154
  .sample-play-btn.playing .play-icon-svg { display: none; }
155
  .sample-play-btn.playing .playing-indicator { display: flex; }
156
- @keyframes sound-wave { 0% { height: 2px; } 25% { height: 10px; } 50% { height: 5px; } 100% { height: 2px; } }
157
 
158
- /* --- START: Sample Text Display (Premium Glass & RTL) --- */
159
  #sample-text-display {
160
  position: fixed;
161
  bottom: 25px;
162
  left: 50%;
163
  width: 90%;
164
  max-width: 600px;
165
- /* Premium Glassmorphism Effect */
166
- background: rgba(255, 255, 255, 0.85); /* Slightly transparent */
167
  backdrop-filter: blur(16px) saturate(180%);
168
  border: 1px solid rgba(255, 255, 255, 0.6);
169
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
170
  border-radius: 20px;
171
  padding: 20px 24px;
172
- box-shadow:
173
- 0 20px 40px -10px rgba(0, 0, 0, 0.15),
174
- 0 0 0 1px rgba(74, 108, 250, 0.1),
175
- inset 0 1px 0 rgba(255, 255, 255, 0.5);
176
  z-index: 2000;
177
-
178
- /* Text Alignment Properties */
179
  text-align: right;
180
  direction: rtl;
181
  display: flex;
182
  flex-direction: column;
183
- align-items: flex-start; /* Forces content to start from the right in RTL */
184
-
185
- /* Initial Animation State */
186
  opacity: 0;
187
  visibility: hidden;
188
  transform: translateX(-50%) translateY(30px) scale(0.95);
189
- transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy enter effect */
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  }
191
 
192
- #sample-text-display.active {
193
- opacity: 1;
194
- visibility: visible;
195
- transform: translateX(-50%) translateY(0) scale(1);
 
 
 
 
 
 
 
 
 
 
196
  }
197
 
198
- #sample-text-display h4 {
199
- margin: 0 0 10px;
200
- color: var(--accent-primary);
201
- font-size: 0.8em; /* Reduced size */
202
- font-weight: 800;
203
- letter-spacing: 0.5px;
204
- display: flex;
205
- align-items: center;
206
- gap: 8px;
207
- text-transform: uppercase;
208
  }
209
 
210
- #sample-text-display h4::before {
211
- content: '\f10d'; /* FontAwesome Quote Icon */
212
- font-family: 'Font Awesome 6 Free';
213
- font-weight: 900;
214
- font-size: 1.2em;
215
- opacity: 0.7;
 
 
 
 
 
 
 
216
  }
 
 
 
 
217
 
218
- #sample-text-display p {
219
- margin: 0;
220
- color: var(--text-primary);
221
- font-weight: 500;
222
- font-size: 0.9em; /* Reduced size */
223
- line-height: 1.7;
224
- text-shadow: 0 1px 0 rgba(255,255,255,0.5);
 
 
 
 
 
 
225
  }
226
 
227
- /* Grid with dynamic padding transition */
228
- #speaker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; transition: padding-bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  /* ----------------------------------------- */
230
 
231
  html { scroll-behavior: smooth; }
@@ -356,24 +435,6 @@
356
  .close-modal-btn:hover { transform: rotate(90deg) scale(1.1); opacity: 0.8; }
357
  #speaker-modal .modal-dialog { max-width: 750px; max-height: 85vh; overflow-y: auto; }
358
 
359
- .speaker-card { cursor: pointer; transition: var(--transition-smooth); text-align: center; position: relative; border-radius: var(--radius-card); padding: 0.5rem; }
360
- .speaker-card:hover { transform: translateY(-8px); }
361
- .speaker-card input[type="radio"] { display: none; }
362
- .speaker-card .speaker-visual { border: 3px solid transparent; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-md); position: relative; background-color: var(--input-bg); transition: var(--transition-bounce); }
363
- .speaker-card:hover .speaker-visual { box-shadow: var(--shadow-lg); }
364
- .speaker-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background-color: #e0e0e0; border-radius: 14px; transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
365
- .speaker-card:hover img { transform: scale(1.1); }
366
- .speaker-card .speaker-name { padding: 0.8rem 0.4rem 0.2rem; font-weight: 600; font-size: 0.95em; color: var(--text-secondary); transition: color 0.2s; }
367
- .speaker-card input[type="radio"]:checked + .speaker-visual { border-color: var(--accent-secondary); box-shadow: 0 0 25px -5px var(--accent-secondary-glow); transform: scale(1.05); }
368
- .special-card .speaker-visual { background: linear-gradient(135deg, hsl(230, 96%, 62%), hsl(230, 96%, 50%)); display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1 / 1; color: white; border-color: transparent; }
369
- .special-card:hover .speaker-visual { background: linear-gradient(135deg, hsl(230, 96%, 65%), hsl(230, 96%, 55%)); box-shadow: 0 8px 25px -5px var(--accent-primary-glow); }
370
- .special-card .speaker-visual svg { width: 40%; height: 40%; opacity: 0.8; margin-bottom: 8px; }
371
- .special-card .speaker-name { font-weight: 700; color: var(--text-primary); }
372
-
373
- .add-model-card .speaker-visual { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1 / 1; color: white; border-color: transparent; }
374
- .add-model-card:hover .speaker-visual { box-shadow: 0 8px 25px -5px rgba(118, 75, 162, 0.4); transform: scale(1.05); }
375
- .add-model-card .speaker-visual svg { width: 40%; height: 40%; opacity: 0.9; animation: pulse-soft 2s infinite; }
376
-
377
  .model-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 5px; opacity: 0; transition: opacity 0.3s; z-index: 5; }
378
  .speaker-card:hover .model-actions { opacity: 1; }
379
  .model-action-btn { background: rgba(0,0,0,0.6); color: white; border: none; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; font-size: 14px; }
@@ -439,7 +500,7 @@
439
  #standard-view #selected-speaker-card img { margin-left: 0; margin-bottom: 1rem; }
440
  #back-to-standard-btn { top: 1rem; left: 1rem; padding: 0.5rem 0.8rem; font-size: 0.8em; }
441
  }
442
- @media (max-width: 500px) { #speaker-grid { grid-template-columns: repeat(2, 1fr); } }
443
  .landing-section { padding: 4rem 0; text-align: center; border-top: 1px solid var(--panel-border); }
444
  .landing-section .subtitle { font-size: 1.1em; color: var(--text-secondary); max-width: 600px; margin: 0 auto 3rem auto; }
445
  .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-top: 3rem; }
@@ -1021,6 +1082,20 @@
1021
  </div>
1022
  </div>
1023
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1024
  <input type="hidden" id="selected_speaker_id_storage" value="Charon">
1025
 
1026
  <section id="pricing-section" class="landing-section pricing">
@@ -1530,6 +1605,12 @@ document.addEventListener('DOMContentLoaded', () => {
1530
 
1531
  const uploadGuideModal = document.getElementById('upload-guide-modal');
1532
  const uploadGuideBtn = document.getElementById('upload-guide-confirm-btn');
 
 
 
 
 
 
1533
  let pendingUploadTarget = null;
1534
  let isProgrammaticClick = false;
1535
 
@@ -2304,6 +2385,14 @@ document.addEventListener('DOMContentLoaded', () => {
2304
  if (!textInput.value.trim()) { showResultState(false, '<b>خطا:</b> متن ورودی خالی است.'); return; }
2305
  if (textInput.value.length > MAX_CHARS) { showResultState(false, `<b>خطا:</b> طول متن بیش از حد مجاز (${MAX_CHARS.toLocaleString('fa-IR')} نویسه) است.`); return; }
2306
 
 
 
 
 
 
 
 
 
2307
  const turnstileToken = turnstile.getResponse(widgetIdStandard);
2308
  if (!turnstileToken) {
2309
  showResultState(false, '<b>خطا:</b> لطفا تایید کنید که ربات نیستید (کپچا). اگر گزینه ای دیده نمیشه بخاطر اختلالات شبکه اینترنت است فیلترشکن روشن کنید و صفحه رو رفرش کنید');
@@ -2592,6 +2681,13 @@ document.addEventListener('DOMContentLoaded', () => {
2592
  pendingUploadTarget.click();
2593
  }
2594
  });
 
 
 
 
 
 
 
2595
  }
2596
 
2597
  async function initializeApp() {
 
92
  100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
93
  }
94
 
95
+ /* --- START: Speaker Sample Player Styles --- */
96
  .sample-player-container {
97
  position: absolute;
98
  top: 50%;
 
100
  transform: translateY(-50%);
101
  display: flex;
102
  flex-direction: column;
103
+ gap: 4px; /* Reduced gap */
104
+ z-index: 6;
105
  }
106
  .sample-play-btn {
107
+ width: 24px; /* Reduced size */
108
+ height: 24px; /* Reduced size */
109
  border-radius: 50%;
110
  cursor: pointer;
111
  display: flex;
 
125
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
126
  }
127
  .sample-play-btn .play-icon-svg {
128
+ width: 11px; /* Reduced size */
129
+ height: 11px; /* Reduced size */
130
  fill: #fff;
131
  transition: opacity 0.2s ease;
132
  }
133
  .sample-play-btn .playing-indicator {
134
  display: none;
135
+ width: 10px; /* Reduced */
136
+ height: 8px; /* Reduced */
137
  justify-content: space-between;
138
  align-items: flex-end;
139
  }
 
153
  }
154
  .sample-play-btn.playing .play-icon-svg { display: none; }
155
  .sample-play-btn.playing .playing-indicator { display: flex; }
156
+ @keyframes sound-wave { 0% { height: 2px; } 25% { height: 8px; } 50% { height: 4px; } 100% { height: 2px; } }
157
 
158
+ /* --- START: Sample Text Display --- */
159
  #sample-text-display {
160
  position: fixed;
161
  bottom: 25px;
162
  left: 50%;
163
  width: 90%;
164
  max-width: 600px;
165
+ background: rgba(255, 255, 255, 0.85);
 
166
  backdrop-filter: blur(16px) saturate(180%);
167
  border: 1px solid rgba(255, 255, 255, 0.6);
168
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
169
  border-radius: 20px;
170
  padding: 20px 24px;
171
+ box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(74, 108, 250, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
 
 
 
172
  z-index: 2000;
 
 
173
  text-align: right;
174
  direction: rtl;
175
  display: flex;
176
  flex-direction: column;
177
+ align-items: flex-start;
 
 
178
  opacity: 0;
179
  visibility: hidden;
180
  transform: translateX(-50%) translateY(30px) scale(0.95);
181
+ transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
182
+ }
183
+ #sample-text-display.active { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) scale(1); }
184
+ #sample-text-display h4 { margin: 0 0 10px; color: var(--accent-primary); font-size: 0.8em; font-weight: 800; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
185
+ #sample-text-display h4::before { content: '\f10d'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 1.2em; opacity: 0.7; }
186
+ #sample-text-display p { margin: 0; color: var(--text-primary); font-weight: 500; font-size: 0.9em; line-height: 1.7; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
187
+
188
+ /* --- FIXED GRID SYSTEM --- */
189
+ #speaker-grid {
190
+ display: grid;
191
+ grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
192
+ gap: 1.5rem;
193
+ padding-bottom: 0;
194
+ transition: padding-bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
195
  }
196
 
197
+ .speaker-card { cursor: pointer; transition: var(--transition-smooth); text-align: center; position: relative; border-radius: var(--radius-card); padding: 0.5rem; }
198
+ .speaker-card:hover { transform: translateY(-8px); }
199
+ .speaker-card input[type="radio"] { display: none; }
200
+
201
+ .speaker-card .speaker-visual {
202
+ border: 3px solid transparent;
203
+ border-radius: 18px;
204
+ overflow: hidden;
205
+ box-shadow: var(--shadow-md);
206
+ position: relative;
207
+ background-color: var(--input-bg);
208
+ transition: var(--transition-bounce);
209
+ height: 130px;
210
+ width: 100%;
211
  }
212
 
213
+ .speaker-card:hover .speaker-visual { box-shadow: var(--shadow-lg); }
214
+
215
+ .speaker-card img {
216
+ width: 100%;
217
+ height: 100%;
218
+ object-fit: cover;
219
+ display: block;
220
+ background-color: #e0e0e0;
221
+ border-radius: 14px;
222
+ transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
223
  }
224
 
225
+ .speaker-card:hover img { transform: scale(1.1); }
226
+ .speaker-card .speaker-name { padding: 0.8rem 0.4rem 0.2rem; font-weight: 600; font-size: 0.95em; color: var(--text-secondary); transition: color 0.2s; }
227
+ .speaker-card input[type="radio"]:checked + .speaker-visual { border-color: var(--accent-secondary); box-shadow: 0 0 25px -5px var(--accent-secondary-glow); transform: scale(1.05); }
228
+
229
+ /* Special cards adjustments */
230
+ .special-card .speaker-visual, .add-model-card .speaker-visual {
231
+ display: flex;
232
+ flex-direction: column;
233
+ align-items: center;
234
+ justify-content: center;
235
+ height: 130px;
236
+ color: white;
237
+ border-color: transparent;
238
  }
239
+ .special-card .speaker-visual { background: linear-gradient(135deg, hsl(230, 96%, 62%), hsl(230, 96%, 50%)); }
240
+ .special-card:hover .speaker-visual { background: linear-gradient(135deg, hsl(230, 96%, 65%), hsl(230, 96%, 55%)); box-shadow: 0 8px 25px -5px var(--accent-primary-glow); }
241
+ .special-card .speaker-visual svg { width: 40px; height: 40px; opacity: 0.8; margin-bottom: 8px; }
242
+ .special-card .speaker-name { font-weight: 700; color: var(--text-primary); }
243
 
244
+ .add-model-card .speaker-visual { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
245
+ .add-model-card:hover .speaker-visual { box-shadow: 0 8px 25px -5px rgba(118, 75, 162, 0.4); transform: scale(1.05); }
246
+ .add-model-card .speaker-visual svg { width: 40px; height: 40px; opacity: 0.9; animation: pulse-soft 2s infinite; }
247
+
248
+ /* --- FORCE 2 COLUMNS ON MOBILE --- */
249
+ @media (max-width: 500px) {
250
+ #speaker-grid {
251
+ grid-template-columns: repeat(2, 1fr);
252
+ gap: 1rem;
253
+ }
254
+ #speaker-modal .modal-dialog {
255
+ padding: 1.5rem;
256
+ }
257
  }
258
 
259
+ /* --- PREMIUM LIMIT MODAL STYLES --- */
260
+ .premium-icon-wrapper {
261
+ width: 100px; height: 100px;
262
+ background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
263
+ border-radius: 50%;
264
+ display: flex; align-items: center; justify-content: center;
265
+ margin: 0 auto 1.5rem;
266
+ box-shadow: 0 10px 30px rgba(74, 108, 250, 0.3);
267
+ animation: pulse-glow-premium 2s infinite;
268
+ }
269
+ @keyframes pulse-glow-premium {
270
+ 0% { box-shadow: 0 0 0 0 rgba(74, 108, 250, 0.4); }
271
+ 70% { box-shadow: 0 0 0 20px rgba(74, 108, 250, 0); }
272
+ 100% { box-shadow: 0 0 0 0 rgba(74, 108, 250, 0); }
273
+ }
274
+ .premium-icon-wrapper svg {
275
+ width: 50px; height: 50px; fill: white;
276
+ animation: shake 3s infinite ease-in-out;
277
+ }
278
+ @keyframes shake {
279
+ 0%, 100% { transform: rotate(0deg); }
280
+ 10%, 30%, 50%, 70%, 90% { transform: rotate(-5deg); }
281
+ 20%, 40%, 60%, 80% { transform: rotate(5deg); }
282
+ }
283
+ .premium-title {
284
+ font-size: 1.6em; font-weight: 900; margin-bottom: 0.5rem;
285
+ background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
286
+ -webkit-background-clip: text; -webkit-text-fill-color: transparent;
287
+ text-align: center;
288
+ }
289
+ .premium-desc {
290
+ color: var(--text-secondary); font-size: 1.05em; margin-bottom: 2rem;
291
+ line-height: 1.6; padding: 0 1rem; text-align: center;
292
+ }
293
+ .premium-action-btn {
294
+ width: 100%; padding: 1rem; font-size: 1.1em; font-weight: 800; color: #fff;
295
+ background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
296
+ border: none; border-radius: var(--radius-btn); cursor: pointer;
297
+ transition: all 0.3s; box-shadow: 0 5px 15px rgba(74, 108, 250, 0.3);
298
+ margin-bottom: 0.8rem;
299
+ }
300
+ .premium-action-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(74, 108, 250, 0.4); }
301
+ .premium-close-link {
302
+ font-size: 0.9em; color: var(--text-tertiary); text-decoration: none;
303
+ font-weight: 500; cursor: pointer; text-align: center;
304
+ }
305
+ .premium-close-link:hover { color: var(--text-secondary); }
306
+ #char-limit-modal .modal-dialog { max-width: 450px; }
307
+
308
  /* ----------------------------------------- */
309
 
310
  html { scroll-behavior: smooth; }
 
435
  .close-modal-btn:hover { transform: rotate(90deg) scale(1.1); opacity: 0.8; }
436
  #speaker-modal .modal-dialog { max-width: 750px; max-height: 85vh; overflow-y: auto; }
437
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
438
  .model-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 5px; opacity: 0; transition: opacity 0.3s; z-index: 5; }
439
  .speaker-card:hover .model-actions { opacity: 1; }
440
  .model-action-btn { background: rgba(0,0,0,0.6); color: white; border: none; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; font-size: 14px; }
 
500
  #standard-view #selected-speaker-card img { margin-left: 0; margin-bottom: 1rem; }
501
  #back-to-standard-btn { top: 1rem; left: 1rem; padding: 0.5rem 0.8rem; font-size: 0.8em; }
502
  }
503
+
504
  .landing-section { padding: 4rem 0; text-align: center; border-top: 1px solid var(--panel-border); }
505
  .landing-section .subtitle { font-size: 1.1em; color: var(--text-secondary); max-width: 600px; margin: 0 auto 3rem auto; }
506
  .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-top: 3rem; }
 
1082
  </div>
1083
  </div>
1084
 
1085
+ <!-- Character Limit Modal (New) -->
1086
+ <div id="char-limit-modal" class="modal-overlay">
1087
+ <div class="modal-dialog">
1088
+ <div class="premium-icon-wrapper">
1089
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20M8,12V14H10V12H8M8,16V18H10V16H8M12,12V14H16V12H12M12,16V18H16V16H12Z" /></svg>
1090
+ </div>
1091
+ <h2 class="premium-title">محدودیت تعداد کاراکتر</h2>
1092
+ <p class="premium-desc">کاربر گرامی، در نسخه رایگان شما تنها مجاز به تبدیل متن‌های کوتاه (زیر ۵۰۰ کاراکتر) هستید. متن شما طولانی‌تر از حد مجاز است.</p>
1093
+ <p class="premium-desc" style="font-size: 0.95em; margin-top: -1rem;">با ارتقا به نسخه نامحدود، ��ی‌توانید متن‌های طولانی را با بالاترین کیفیت و بدون هیچ محدودیتی به صدا تبدیل کنید.</p>
1094
+ <button class="premium-action-btn" id="char-limit-upgrade-btn">ارتقا به نسخه نامحدود</button>
1095
+ <div class="premium-close-link" id="char-limit-close-link">متوجه شدم، متن را کوتاه می‌کنم</div>
1096
+ </div>
1097
+ </div>
1098
+
1099
  <input type="hidden" id="selected_speaker_id_storage" value="Charon">
1100
 
1101
  <section id="pricing-section" class="landing-section pricing">
 
1605
 
1606
  const uploadGuideModal = document.getElementById('upload-guide-modal');
1607
  const uploadGuideBtn = document.getElementById('upload-guide-confirm-btn');
1608
+
1609
+ // --- Elements for Char Limit Modal ---
1610
+ const charLimitModal = document.getElementById('char-limit-modal');
1611
+ const charLimitUpgradeBtn = document.getElementById('char-limit-upgrade-btn');
1612
+ const charLimitCloseLink = document.getElementById('char-limit-close-link');
1613
+
1614
  let pendingUploadTarget = null;
1615
  let isProgrammaticClick = false;
1616
 
 
2385
  if (!textInput.value.trim()) { showResultState(false, '<b>خطا:</b> متن ورودی خالی است.'); return; }
2386
  if (textInput.value.length > MAX_CHARS) { showResultState(false, `<b>خطا:</b> طول متن بیش از حد مجاز (${MAX_CHARS.toLocaleString('fa-IR')} نویسه) است.`); return; }
2387
 
2388
+ // --- START: Character Limit for Free Users ---
2389
+ const FREE_USER_CHAR_LIMIT = 500;
2390
+ if (currentUser.status !== 'paid' && textInput.value.length > FREE_USER_CHAR_LIMIT) {
2391
+ showModal(charLimitModal);
2392
+ return;
2393
+ }
2394
+ // --- END: Character Limit for Free Users ---
2395
+
2396
  const turnstileToken = turnstile.getResponse(widgetIdStandard);
2397
  if (!turnstileToken) {
2398
  showResultState(false, '<b>خطا:</b> لطفا تایید کنید که ربات نیستید (کپچا). اگر گزینه ای دیده نمیشه بخاطر اختلالات شبکه اینترنت است فیلترشکن روشن کنید و صفحه رو رفرش کنید');
 
2681
  pendingUploadTarget.click();
2682
  }
2683
  });
2684
+
2685
+ // --- Limit Modal Event Listeners ---
2686
+ charLimitUpgradeBtn.addEventListener('click', () => {
2687
+ hideModal(charLimitModal);
2688
+ pricingSection.scrollIntoView({ behavior: 'smooth' });
2689
+ });
2690
+ charLimitCloseLink.addEventListener('click', () => hideModal(charLimitModal));
2691
  }
2692
 
2693
  async function initializeApp() {