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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
transition: color 0.3s ease;
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
.anycoder-link:hover {
|
| 65 |
-
color: var(--primary);
|
| 66 |
-
text-shadow: 0 0 8px var(--primary);
|
| 67 |
-
}
|
| 68 |
-
|
| 69 |
-
/* کانتینر اصلی کارت */
|
| 70 |
-
.container {
|
| 71 |
-
width: 100%;
|
| 72 |
-
max-width: 420px;
|
| 73 |
-
padding: 20px;
|
| 74 |
-
perspective: 1000px;
|
| 75 |
-
}
|
| 76 |
-
|
| 77 |
-
.card {
|
| 78 |
-
background: var(--card-bg);
|
| 79 |
-
backdrop-filter: blur(12px);
|
| 80 |
-
-webkit-backdrop-filter: blur(12px);
|
| 81 |
-
border: 1px solid var(--border-color);
|
| 82 |
-
border-radius: 20px;
|
| 83 |
-
padding: 40px 30px;
|
| 84 |
-
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
|
| 85 |
-
animation: fadeIn 0.8s ease-out;
|
| 86 |
-
position: relative;
|
| 87 |
-
overflow: hidden;
|
| 88 |
-
}
|
| 89 |
-
|
| 90 |
-
@keyframes fadeIn {
|
| 91 |
-
from { opacity: 0; transform: translateY(20px); }
|
| 92 |
-
to { opacity: 1; transform: translateY(0); }
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
/* تبهای سوئیچ */
|
| 96 |
-
.tabs {
|
| 97 |
-
display: flex;
|
| 98 |
-
justify-content: center;
|
| 99 |
-
margin-bottom: 30px;
|
| 100 |
-
position: relative;
|
| 101 |
-
border-bottom: 1px solid var(--border-color);
|
| 102 |
-
}
|
| 103 |
-
|
| 104 |
-
.tab-btn {
|
| 105 |
-
background: transparent;
|
| 106 |
-
border: none;
|
| 107 |
-
color: var(--text-muted);
|
| 108 |
-
font-family: inherit;
|
| 109 |
-
font-size: 1rem;
|
| 110 |
-
padding: 10px 20px;
|
| 111 |
-
cursor: pointer;
|
| 112 |
-
transition: all 0.3s ease;
|
| 113 |
-
position: relative;
|
| 114 |
-
z-index: 1;
|
| 115 |
-
}
|
| 116 |
-
|
| 117 |
-
.tab-btn.active {
|
| 118 |
-
color: var(--text-main);
|
| 119 |
-
font-weight: bold;
|
| 120 |
-
}
|
| 121 |
-
|
| 122 |
-
.tab-btn.active::after {
|
| 123 |
-
content: '';
|
| 124 |
-
position: absolute;
|
| 125 |
-
bottom: -1px;
|
| 126 |
-
left: 0;
|
| 127 |
-
width: 100%;
|
| 128 |
-
height: 3px;
|
| 129 |
-
background: var(--primary);
|
| 130 |
-
border-radius: 3px 3px 0 0;
|
| 131 |
-
box-shadow: 0 -2px 10px var(--primary);
|
| 132 |
-
}
|
| 133 |
-
|
| 134 |
-
/* فرمها */
|
| 135 |
-
.form-wrapper {
|
| 136 |
-
position: relative;
|
| 137 |
-
min-height: 320px; /* ارتفاع ثابت برای جلوگیری از پرش */
|
| 138 |
-
}
|
| 139 |
-
|
| 140 |
-
.form-content {
|
| 141 |
-
position: absolute;
|
| 142 |
-
top: 0;
|
| 143 |
-
left: 0;
|
| 144 |
-
width: 100%;
|
| 145 |
-
transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
| 146 |
-
opacity: 0;
|
| 147 |
-
visibility: hidden;
|
| 148 |
-
transform: translateX(50px);
|
| 149 |
-
}
|
| 150 |
-
|
| 151 |
-
.form-content.active {
|
| 152 |
-
opacity: 1;
|
| 153 |
-
visibility: visible;
|
| 154 |
-
transform: translateX(0);
|
| 155 |
-
position: relative;
|
| 156 |
-
}
|
| 157 |
-
|
| 158 |
-
/* استایل ورودیها */
|
| 159 |
-
.input-group {
|
| 160 |
-
position: relative;
|
| 161 |
-
margin-bottom: 20px;
|
| 162 |
-
}
|
| 163 |
-
|
| 164 |
-
.input-group i {
|
| 165 |
-
position: absolute;
|
| 166 |
-
top: 50%;
|
| 167 |
-
right: 15px;
|
| 168 |
-
transform: translateY(-50%);
|
| 169 |
-
color: var(--text-muted);
|
| 170 |
-
transition: color 0.3s;
|
| 171 |
-
}
|
| 172 |
-
|
| 173 |
-
.form-input {
|
| 174 |
-
width: 100%;
|
| 175 |
-
background: rgba(15, 23, 42, 0.6);
|
| 176 |
-
border: 1px solid var(--border-color);
|
| 177 |
-
border-radius: 12px;
|
| 178 |
-
padding: 12px 45px 12px 15px;
|
| 179 |
-
color: var(--text-main);
|
| 180 |
-
font-size: 0.95rem;
|
| 181 |
-
transition: all 0.3s ease;
|
| 182 |
-
}
|
| 183 |
-
|
| 184 |
-
.form-input:focus {
|
| 185 |
-
border-color: var(--primary);
|
| 186 |
-
box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
|
| 187 |
-
}
|
| 188 |
-
|
| 189 |
-
.form-input:focus + i {
|
| 190 |
-
color: var(--primary);
|
| 191 |
-
}
|
| 192 |
-
|
| 193 |
-
/* دکمه نمایش رمز عبور */
|
| 194 |
-
.toggle-password {
|
| 195 |
-
position: absolute;
|
| 196 |
-
left: 15px;
|
| 197 |
-
right: auto !important;
|
| 198 |
-
cursor: pointer;
|
| 199 |
-
}
|
| 200 |
-
|
| 201 |
-
/* بخش کپچا */
|
| 202 |
-
.captcha-area {
|
| 203 |
-
display: flex;
|
| 204 |
-
align-items: center;
|
| 205 |
-
gap: 10px;
|
| 206 |
-
margin-bottom: 20px;
|
| 207 |
-
background: rgba(255, 255, 255, 0.05);
|
| 208 |
-
padding: 10px;
|
| 209 |
-
border-radius: 12px;
|
| 210 |
-
}
|
| 211 |
-
|
| 212 |
-
#captchaCanvas {
|
| 213 |
-
background: #fff;
|
| 214 |
-
border-radius: 8px;
|
| 215 |
-
cursor: pointer;
|
| 216 |
-
}
|
| 217 |
-
|
| 218 |
-
.captcha-input {
|
| 219 |
-
flex: 1;
|
| 220 |
-
background: transparent;
|
| 221 |
-
border: none;
|
| 222 |
-
border-bottom: 1px solid var(--border-color);
|
| 223 |
-
color: var(--text-main);
|
| 224 |
-
padding: 5px;
|
| 225 |
-
text-align: center;
|
| 226 |
-
font-family: monospace;
|
| 227 |
-
font-size: 1.1rem;
|
| 228 |
-
letter-spacing: 2px;
|
| 229 |
-
}
|
| 230 |
-
|
| 231 |
-
.captcha-input:focus {
|
| 232 |
-
border-bottom-color: var(--primary);
|
| 233 |
-
}
|
| 234 |
-
|
| 235 |
-
/* دکمه اصلی */
|
| 236 |
-
.submit-btn {
|
| 237 |
-
width: 100%;
|
| 238 |
-
padding: 14px;
|
| 239 |
-
background: linear-gradient(135deg, var(--primary), #818cf8);
|
| 240 |
-
color: white;
|
| 241 |
-
border: none;
|
| 242 |
-
border-radius: 12px;
|
| 243 |
-
font-size: 1rem;
|
| 244 |
-
font-weight: bold;
|
| 245 |
-
cursor: pointer;
|
| 246 |
-
transition: transform 0.2s, box-shadow 0.2s;
|
| 247 |
-
font-family: inherit;
|
| 248 |
-
display: flex;
|
| 249 |
-
justify-content: center;
|
| 250 |
-
align-items: center;
|
| 251 |
-
gap: 10px;
|
| 252 |
-
}
|
| 253 |
-
|
| 254 |
-
.submit-btn:hover {
|
| 255 |
-
transform: translateY(-2px);
|
| 256 |
-
box-shadow: 0 10px 20px -10px var(--primary);
|
| 257 |
-
}
|
| 258 |
-
|
| 259 |
-
.submit-btn:active {
|
| 260 |
-
transform: translateY(0);
|
| 261 |
-
}
|
| 262 |
-
|
| 263 |
-
/* سیستم Toast Notification */
|
| 264 |
-
.toast-container {
|
| 265 |
-
position: fixed;
|
| 266 |
-
top: 20px;
|
| 267 |
-
left: 50%;
|
| 268 |
-
transform: translateX(-50%);
|
| 269 |
-
z-index: 1000;
|
| 270 |
-
display: flex;
|
| 271 |
-
flex-direction: column;
|
| 272 |
-
gap: 10px;
|
| 273 |
-
}
|
| 274 |
-
|
| 275 |
-
.toast {
|
| 276 |
-
min-width: 300px;
|
| 277 |
-
padding: 16px;
|
| 278 |
-
border-radius: 10px;
|
| 279 |
-
color: white;
|
| 280 |
-
font-size: 0.9rem;
|
| 281 |
-
display: flex;
|
| 282 |
-
align-items: center;
|
| 283 |
-
gap: 12px;
|
| 284 |
-
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
|
| 285 |
-
animation: slideDown 0.4s ease forwards;
|
| 286 |
-
backdrop-filter: blur(5px);
|
| 287 |
-
}
|
| 288 |
-
|
| 289 |
-
.toast.success { background: rgba(16, 185, 129, 0.9); border-right: 4px solid #059669; }
|
| 290 |
-
.toast.error { background: rgba(239, 68, 68, 0.9); border-right: 4px solid #dc2626; }
|
| 291 |
-
.toast.info { background: rgba(59, 130, 246, 0.9); border-right: 4px solid #2563eb; }
|
| 292 |
-
|
| 293 |
-
@keyframes slideDown {
|
| 294 |
-
from { opacity: 0; transform: translateY(-20px); }
|
| 295 |
-
to { opacity: 1; transform: translateY(0); }
|
| 296 |
-
}
|
| 297 |
-
|
| 298 |
-
@keyframes fadeOut {
|
| 299 |
-
to { opacity: 0; transform: translateY(-20px); }
|
| 300 |
-
}
|
| 301 |
-
|
| 302 |
-
/* ریسپانسیو */
|
| 303 |
-
@media (max-width: 480px) {
|
| 304 |
-
.card {
|
| 305 |
-
padding: 30px 20px;
|
| 306 |
-
width: 95%;
|
| 307 |
-
}
|
| 308 |
-
.container {
|
| 309 |
-
padding: 10px;
|
| 310 |
-
}
|
| 311 |
-
}
|
| 312 |
-
</style>
|
| 313 |
</head>
|
|
|
|
| 314 |
<body>
|
| 315 |
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
</div>
|
| 387 |
</div>
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
| 459 |
-
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
|
| 478 |
-
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
| 505 |
-
|
| 506 |
-
|
| 507 |
-
|
| 508 |
-
|
| 509 |
-
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
|
| 529 |
-
|
| 530 |
-
|
| 531 |
-
|
| 532 |
-
|
| 533 |
-
|
| 534 |
-
|
| 535 |
-
|
| 536 |
-
|
| 537 |
-
|
| 538 |
-
|
| 539 |
-
|
| 540 |
-
|
| 541 |
-
|
| 542 |
-
|
| 543 |
-
|
| 544 |
-
|
| 545 |
-
|
| 546 |
-
|
| 547 |
-
|
| 548 |
-
|
| 549 |
-
|
| 550 |
-
|
| 551 |
-
|
| 552 |
-
|
| 553 |
-
|
| 554 |
-
|
| 555 |
-
|
| 556 |
-
|
| 557 |
-
|
| 558 |
-
|
| 559 |
-
|
| 560 |
-
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
|
| 564 |
-
|
| 565 |
-
|
| 566 |
-
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
|
| 576 |
-
|
| 577 |
-
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 586 |
</body>
|
|
|
|
| 587 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="fa" dir="rtl">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>ورود به چت روم | Chat Room Login</title>
|
| 8 |
+
<!-- استفاده از FontAwesome برای آیکونها -->
|
| 9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 10 |
+
|
| 11 |
+
<style>
|
| 12 |
+
/* تنظیمات کلی و متغیرهای رنگی - تم دارک پیشرفته */
|
| 13 |
+
:root {
|
| 14 |
+
--bg-color: #020617; /* بسیار تیره (Slate 950) */
|
| 15 |
+
--card-bg: rgba(15, 23, 42, 0.4); /* شیشهای تیره */
|
| 16 |
+
--card-border: rgba(255, 255, 255, 0.08);
|
| 17 |
+
--primary: #6366f1; /* Indigo */
|
| 18 |
+
--primary-glow: rgba(99, 102, 241, 0.5);
|
| 19 |
+
--primary-hover: #4f46e5;
|
| 20 |
+
--text-main: #f1f5f9;
|
| 21 |
+
--text-muted: #94a3b8;
|
| 22 |
+
--input-bg: rgba(2, 6, 23, 0.6);
|
| 23 |
+
--border-color: rgba(148, 163, 184, 0.1);
|
| 24 |
+
--error: #ef4444;
|
| 25 |
+
--success: #10b981;
|
| 26 |
+
--font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
* {
|
| 30 |
+
box-sizing: border-box;
|
| 31 |
+
margin: 0;
|
| 32 |
+
padding: 0;
|
| 33 |
+
outline: none;
|
| 34 |
+
-webkit-tap-highlight-color: transparent;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
body {
|
| 38 |
+
font-family: var(--font-family);
|
| 39 |
+
background-color: var(--bg-color);
|
| 40 |
+
/* گرادینت متحرک و عمیق برای پسزمینه */
|
| 41 |
+
background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e1b4b 100%);
|
| 42 |
+
background-size: 400% 400%;
|
| 43 |
+
animation: gradientBG 15s ease infinite;
|
| 44 |
+
color: var(--text-main);
|
| 45 |
+
height: 100vh;
|
| 46 |
+
display: flex;
|
| 47 |
+
flex-direction: column;
|
| 48 |
+
justify-content: center;
|
| 49 |
+
align-items: center;
|
| 50 |
+
overflow: hidden;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
@keyframes gradientBG {
|
| 54 |
+
0% { background-position: 0% 50%; }
|
| 55 |
+
50% { background-position: 100% 50%; }
|
| 56 |
+
100% { background-position: 0% 50%; }
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/* هدر و لینک anycoder */
|
| 60 |
+
header {
|
| 61 |
+
position: absolute;
|
| 62 |
+
top: 20px;
|
| 63 |
+
width: 100%;
|
| 64 |
+
text-align: center;
|
| 65 |
+
z-index: 10;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.anycoder-link {
|
| 69 |
+
color: var(--text-muted);
|
| 70 |
+
text-decoration: none;
|
| 71 |
+
font-size: 0.9rem;
|
| 72 |
+
padding: 8px 16px;
|
| 73 |
+
border-radius: 20px;
|
| 74 |
+
background: rgba(255, 255, 255, 0.03);
|
| 75 |
+
border: 1px solid var(--border-color);
|
| 76 |
+
transition: all 0.3s ease;
|
| 77 |
+
display: inline-flex;
|
| 78 |
+
align-items: center;
|
| 79 |
+
gap: 8px;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.anycoder-link:hover {
|
| 83 |
+
color: var(--primary);
|
| 84 |
+
background: rgba(99, 102, 241, 0.1);
|
| 85 |
+
border-color: var(--primary);
|
| 86 |
+
box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
/* کانتینر اصلی کارت */
|
| 90 |
+
.container {
|
| 91 |
+
width: 100%;
|
| 92 |
+
max-width: 420px;
|
| 93 |
+
padding: 20px;
|
| 94 |
+
perspective: 1000px;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.card {
|
| 98 |
+
background: var(--card-bg);
|
| 99 |
+
backdrop-filter: blur(20px);
|
| 100 |
+
-webkit-backdrop-filter: blur(20px);
|
| 101 |
+
border: 1px solid var(--card-border);
|
| 102 |
+
border-radius: 24px;
|
| 103 |
+
padding: 40px 30px;
|
| 104 |
+
box-shadow:
|
| 105 |
+
0 25px 50px -12px rgba(0, 0, 0, 0.7),
|
| 106 |
+
inset 0 0 0 1px rgba(255, 255, 255, 0.05);
|
| 107 |
+
animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
|
| 108 |
+
position: relative;
|
| 109 |
+
overflow: hidden;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
/* افکت نورانی ملایم پشت کارت */
|
| 113 |
+
.card::before {
|
| 114 |
+
content: '';
|
| 115 |
+
position: absolute;
|
| 116 |
+
top: -50%;
|
| 117 |
+
left: -50%;
|
| 118 |
+
width: 200%;
|
| 119 |
+
height: 200%;
|
| 120 |
+
background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
|
| 121 |
+
pointer-events: none;
|
| 122 |
+
z-index: -1;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
@keyframes fadeIn {
|
| 126 |
+
from { opacity: 0; transform: translateY(30px) scale(0.98); }
|
| 127 |
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
/* تبهای سوئیچ */
|
| 131 |
+
.tabs {
|
| 132 |
+
display: flex;
|
| 133 |
+
justify-content: center;
|
| 134 |
+
margin-bottom: 35px;
|
| 135 |
+
position: relative;
|
| 136 |
+
background: rgba(0, 0, 0, 0.2);
|
| 137 |
+
padding: 5px;
|
| 138 |
+
border-radius: 12px;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.tab-btn {
|
| 142 |
+
background: transparent;
|
| 143 |
+
border: none;
|
| 144 |
+
color: var(--text-muted);
|
| 145 |
+
font-family: inherit;
|
| 146 |
+
font-size: 0.95rem;
|
| 147 |
+
padding: 10px 25px;
|
| 148 |
+
cursor: pointer;
|
| 149 |
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 150 |
+
position: relative;
|
| 151 |
+
z-index: 1;
|
| 152 |
+
border-radius: 8px;
|
| 153 |
+
width: 50%;
|
| 154 |
+
font-weight: 500;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
.tab-btn.active {
|
| 158 |
+
color: #fff;
|
| 159 |
+
background: var(--primary);
|
| 160 |
+
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
/* فرمها */
|
| 164 |
+
.form-wrapper {
|
| 165 |
+
position: relative;
|
| 166 |
+
min-height: 340px;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
.form-content {
|
| 170 |
+
position: absolute;
|
| 171 |
+
top: 0;
|
| 172 |
+
left: 0;
|
| 173 |
+
width: 100%;
|
| 174 |
+
transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
| 175 |
+
opacity: 0;
|
| 176 |
+
visibility: hidden;
|
| 177 |
+
transform: translateX(30px);
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
.form-content.active {
|
| 181 |
+
opacity: 1;
|
| 182 |
+
visibility: visible;
|
| 183 |
+
transform: translateX(0);
|
| 184 |
+
position: relative;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
/* استایل ورودیها */
|
| 188 |
+
.input-group {
|
| 189 |
+
position: relative;
|
| 190 |
+
margin-bottom: 22px;
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
.input-group i.icon-main {
|
| 194 |
+
position: absolute;
|
| 195 |
+
top: 50%;
|
| 196 |
+
right: 16px;
|
| 197 |
+
transform: translateY(-50%);
|
| 198 |
+
color: var(--text-muted);
|
| 199 |
+
transition: color 0.3s;
|
| 200 |
+
pointer-events: none;
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
.form-input {
|
| 204 |
+
width: 100%;
|
| 205 |
+
background: var(--input-bg);
|
| 206 |
+
border: 1px solid var(--border-color);
|
| 207 |
+
border-radius: 14px;
|
| 208 |
+
padding: 14px 45px 14px 15px;
|
| 209 |
+
color: var(--text-main);
|
| 210 |
+
font-size: 0.95rem;
|
| 211 |
+
transition: all 0.3s ease;
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
.form-input::placeholder {
|
| 215 |
+
color: rgba(148, 163, 184, 0.5);
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
.form-input:focus {
|
| 219 |
+
border-color: var(--primary);
|
| 220 |
+
box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
|
| 221 |
+
background: rgba(2, 6, 23, 0.8);
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
.form-input:focus + .icon-main {
|
| 225 |
+
color: var(--primary);
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
/* دکمه نمایش رمز عبور */
|
| 229 |
+
.toggle-password {
|
| 230 |
+
position: absolute;
|
| 231 |
+
left: 16px;
|
| 232 |
+
right: auto !important;
|
| 233 |
+
top: 50%;
|
| 234 |
+
transform: translateY(-50%);
|
| 235 |
+
cursor: pointer;
|
| 236 |
+
color: var(--text-muted);
|
| 237 |
+
transition: color 0.3s;
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
.toggle-password:hover {
|
| 241 |
+
color: var(--text-main);
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
/* بخش کپچا - استایل دارک */
|
| 245 |
+
.captcha-area {
|
| 246 |
+
display: flex;
|
| 247 |
+
align-items: center;
|
| 248 |
+
gap: 12px;
|
| 249 |
+
margin-bottom: 25px;
|
| 250 |
+
background: rgba(255, 255, 255, 0.03);
|
| 251 |
+
padding: 8px 12px;
|
| 252 |
+
border-radius: 14px;
|
| 253 |
+
border: 1px solid var(--border-color);
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
#captchaCanvas {
|
| 257 |
+
border-radius: 8px;
|
| 258 |
+
cursor: pointer;
|
| 259 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
.captcha-input {
|
| 263 |
+
flex: 1;
|
| 264 |
+
background: transparent;
|
| 265 |
+
border: none;
|
| 266 |
+
border-bottom: 2px solid var(--border-color);
|
| 267 |
+
color: var(--text-main);
|
| 268 |
+
padding: 8px 5px;
|
| 269 |
+
text-align: center;
|
| 270 |
+
font-family: monospace;
|
| 271 |
+
font-size: 1.2rem;
|
| 272 |
+
letter-spacing: 3px;
|
| 273 |
+
transition: border-color 0.3s;
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
.captcha-input:focus {
|
| 277 |
+
border-bottom-color: var(--primary);
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
.captcha-refresh {
|
| 281 |
+
cursor: pointer;
|
| 282 |
+
color: var(--text-muted);
|
| 283 |
+
transition: transform 0.3s, color 0.3s;
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
.captcha-refresh:hover {
|
| 287 |
+
color: var(--primary);
|
| 288 |
+
transform: rotate(180deg);
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
+
/* دکمه اصلی */
|
| 292 |
+
.submit-btn {
|
| 293 |
+
width: 100%;
|
| 294 |
+
padding: 15px;
|
| 295 |
+
background: linear-gradient(135deg, var(--primary), #4338ca);
|
| 296 |
+
color: white;
|
| 297 |
+
border: none;
|
| 298 |
+
border-radius: 14px;
|
| 299 |
+
font-size: 1rem;
|
| 300 |
+
font-weight: 600;
|
| 301 |
+
cursor: pointer;
|
| 302 |
+
transition: all 0.3s ease;
|
| 303 |
+
font-family: inherit;
|
| 304 |
+
display: flex;
|
| 305 |
+
justify-content: center;
|
| 306 |
+
align-items: center;
|
| 307 |
+
gap: 10px;
|
| 308 |
+
box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
.submit-btn:hover {
|
| 312 |
+
transform: translateY(-2px);
|
| 313 |
+
box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
|
| 314 |
+
background: linear-gradient(135deg, var(--primary-hover), #3730a3);
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
.submit-btn:active {
|
| 318 |
+
transform: scale(0.98);
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
.submit-btn:disabled {
|
| 322 |
+
opacity: 0.7;
|
| 323 |
+
cursor: not-allowed;
|
| 324 |
+
transform: none;
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
/* سیستم Toast Notification - نسخه دارک */
|
| 328 |
+
.toast-container {
|
| 329 |
+
position: fixed;
|
| 330 |
+
top: 30px;
|
| 331 |
+
left: 50%;
|
| 332 |
+
transform: translateX(-50%);
|
| 333 |
+
z-index: 1000;
|
| 334 |
+
display: flex;
|
| 335 |
+
flex-direction: column;
|
| 336 |
+
gap: 10px;
|
| 337 |
+
width: 90%;
|
| 338 |
+
max-width: 350px;
|
| 339 |
+
pointer-events: none; /* اجازه کلیک روی فضای خالی */
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
.toast {
|
| 343 |
+
padding: 16px 20px;
|
| 344 |
+
border-radius: 12px;
|
| 345 |
+
color: white;
|
| 346 |
+
font-size: 0.9rem;
|
| 347 |
+
display: flex;
|
| 348 |
+
align-items: center;
|
| 349 |
+
gap: 12px;
|
| 350 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
|
| 351 |
+
animation: slideDown 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
|
| 352 |
+
backdrop-filter: blur(10px);
|
| 353 |
+
pointer-events: auto;
|
| 354 |
+
position: relative;
|
| 355 |
+
overflow: hidden;
|
| 356 |
+
}
|
| 357 |
|
| 358 |
+
/* خط رنگی کنار توست */
|
| 359 |
+
.toast::after {
|
| 360 |
+
content: '';
|
| 361 |
+
position: absolute;
|
| 362 |
+
right: 0;
|
| 363 |
+
top: 0;
|
| 364 |
+
bottom: 0;
|
| 365 |
+
width: 4px;
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
.toast.success {
|
| 369 |
+
background: rgba(5, 150, 105, 0.2);
|
| 370 |
+
border: 1px solid rgba(16, 185, 129, 0.3);
|
| 371 |
+
}
|
| 372 |
+
.toast.success::after { background: var(--success); }
|
| 373 |
+
|
| 374 |
+
.toast.error {
|
| 375 |
+
background: rgba(220, 38, 38, 0.2);
|
| 376 |
+
border: 1px solid rgba(239, 68, 68, 0.3);
|
| 377 |
+
}
|
| 378 |
+
.toast.error::after { background: var(--error); }
|
| 379 |
+
|
| 380 |
+
.toast.info {
|
| 381 |
+
background: rgba(37, 99, 235, 0.2);
|
| 382 |
+
border: 1px solid rgba(59, 130, 246, 0.3);
|
| 383 |
+
}
|
| 384 |
+
.toast.info::after { background: #3b82f6; }
|
| 385 |
+
|
| 386 |
+
@keyframes slideDown {
|
| 387 |
+
from { opacity: 0; transform: translateY(-30px) scale(0.9); }
|
| 388 |
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
| 389 |
+
}
|
| 390 |
+
|
| 391 |
+
@keyframes fadeOut {
|
| 392 |
+
to { opacity: 0; transform: translateY(-20px) scale(0.95); }
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
/* ریسپانسیو */
|
| 396 |
+
@media (max-width: 480px) {
|
| 397 |
+
.card {
|
| 398 |
+
padding: 30px 20px;
|
| 399 |
+
width: 90%;
|
| 400 |
+
}
|
| 401 |
+
.container {
|
| 402 |
+
padding: 10px;
|
| 403 |
+
}
|
| 404 |
+
header {
|
| 405 |
+
top: 10px;
|
| 406 |
+
}
|
| 407 |
+
}
|
| 408 |
+
</style>
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 409 |
</head>
|
| 410 |
+
|
| 411 |
<body>
|
| 412 |
|
| 413 |
+
<!-- هدر شامل لینک مورد نظر -->
|
| 414 |
+
<header>
|
| 415 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
|
| 416 |
+
Built with anycoder <i class="fas fa-code"></i>
|
| 417 |
+
</a>
|
| 418 |
+
</header>
|
| 419 |
+
|
| 420 |
+
<!-- کانتینر اصلی -->
|
| 421 |
+
<div class="container">
|
| 422 |
+
<div class="card">
|
| 423 |
+
|
| 424 |
+
<!-- تبهای تغییر وضعیت -->
|
| 425 |
+
<div class="tabs">
|
| 426 |
+
<button class="tab-btn active" onclick="switchTab('login')">ورود</button>
|
| 427 |
+
<button class="tab-btn" onclick="switchTab('register')">ثبتنام</button>
|
| 428 |
+
</div>
|
| 429 |
+
|
| 430 |
+
<div class="form-wrapper">
|
| 431 |
+
<!-- فرم ورود -->
|
| 432 |
+
<form id="loginForm" class="form-content active" novalidate onsubmit="handleLogin(event)">
|
| 433 |
+
<div class="input-group">
|
| 434 |
+
<input type="text" class="form-input" placeholder="نام کاربری" required>
|
| 435 |
+
<i class="fas fa-user icon-main"></i>
|
| 436 |
+
</div>
|
| 437 |
+
<div class="input-group">
|
| 438 |
+
<input type="password" class="form-input" placeholder="رمز عبور" required>
|
| 439 |
+
<i class="fas fa-lock icon-main"></i>
|
| 440 |
+
<i class="fas fa-eye toggle-password" onclick="togglePassword(this)"></i>
|
| 441 |
+
</div>
|
| 442 |
+
|
| 443 |
+
<div class="captcha-area">
|
| 444 |
+
<canvas id="loginCaptcha" width="100" height="40" onclick="generateCaptcha('loginCaptcha')"></canvas>
|
| 445 |
+
<input type="text" class="captcha-input" placeholder="کد تصویر" maxlength="5">
|
| 446 |
+
<i class="fas fa-sync-alt captcha-refresh" onclick="generateCaptcha('loginCaptcha')"></i>
|
| 447 |
+
</div>
|
| 448 |
+
|
| 449 |
+
<button type="submit" class="submit-btn">
|
| 450 |
+
<span>ورود به حساب</span>
|
| 451 |
+
<i class="fas fa-arrow-left"></i>
|
| 452 |
+
</button>
|
| 453 |
+
</form>
|
| 454 |
+
|
| 455 |
+
<!-- فرم ثبتنام -->
|
| 456 |
+
<form id="registerForm" class="form-content" novalidate onsubmit="handleRegister(event)">
|
| 457 |
+
<div class="input-group">
|
| 458 |
+
<input type="text" class="form-input" placeholder="نام کاربری جدید" required>
|
| 459 |
+
<i class="fas fa-user-plus icon-main"></i>
|
| 460 |
+
</div>
|
| 461 |
+
<div class="input-group">
|
| 462 |
+
<input type="password" class="form-input" id="regPass" placeholder="رمز عبور" required>
|
| 463 |
+
<i class="fas fa-lock icon-main"></i>
|
| 464 |
+
<i class="fas fa-eye toggle-password" onclick="togglePassword(this)"></i>
|
| 465 |
+
</div>
|
| 466 |
+
<div class="input-group">
|
| 467 |
+
<input type="password" class="form-input" placeholder="تکرار رمز عبور" required>
|
| 468 |
+
<i class="fas fa-check-double icon-main"></i>
|
| 469 |
+
</div>
|
| 470 |
+
|
| 471 |
+
<div class="captcha-area">
|
| 472 |
+
<canvas id="regCaptcha" width="100" height="40" onclick="generateCaptcha('regCaptcha')"></canvas>
|
| 473 |
+
<input type="text" class="captcha-input" placeholder="کد تصویر" maxlength="5">
|
| 474 |
+
<i class="fas fa-sync-alt captcha-refresh" onclick="generateCaptcha('regCaptcha')"></i>
|
| 475 |
+
</div>
|
| 476 |
+
|
| 477 |
+
<button type="submit" class="submit-btn">
|
| 478 |
+
<span>ساخت حساب کاربری</span>
|
| 479 |
+
<i class="fas fa-user-check"></i>
|
| 480 |
+
</button>
|
| 481 |
+
</form>
|
| 482 |
+
</div>
|
|
|
|
| 483 |
</div>
|
| 484 |
+
</div>
|
| 485 |
+
|
| 486 |
+
<!-- کانتینر پیامها -->
|
| 487 |
+
<div class="toast-container" id="toastContainer"></div>
|
| 488 |
+
|
| 489 |
+
<script>
|
| 490 |
+
// --- مدیریت تبها ---
|
| 491 |
+
function switchTab(tab) {
|
| 492 |
+
const loginForm = document.getElementById('loginForm');
|
| 493 |
+
const registerForm = document.getElementById('registerForm');
|
| 494 |
+
const btns = document.querySelectorAll('.tab-btn');
|
| 495 |
+
|
| 496 |
+
if (tab === 'login') {
|
| 497 |
+
loginForm.classList.add('active');
|
| 498 |
+
registerForm.classList.remove('active');
|
| 499 |
+
btns[0].classList.add('active');
|
| 500 |
+
btns[1].classList.remove('active');
|
| 501 |
+
generateCaptcha('loginCaptcha');
|
| 502 |
+
} else {
|
| 503 |
+
loginForm.classList.remove('active');
|
| 504 |
+
registerForm.classList.add('active');
|
| 505 |
+
btns[0].classList.remove('active');
|
| 506 |
+
btns[1].classList.add('active');
|
| 507 |
+
generateCaptcha('regCaptcha');
|
| 508 |
+
}
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
// --- مدیریت نمایش/مخفی کردن رمز عبور ---
|
| 512 |
+
function togglePassword(icon) {
|
| 513 |
+
const input = icon.previousElementSibling.previousElementSibling;
|
| 514 |
+
if (input.type === 'password') {
|
| 515 |
+
input.type = 'text';
|
| 516 |
+
icon.classList.remove('fa-eye');
|
| 517 |
+
icon.classList.add('fa-eye-slash');
|
| 518 |
+
} else {
|
| 519 |
+
input.type = 'password';
|
| 520 |
+
icon.classList.remove('fa-eye-slash');
|
| 521 |
+
icon.classList.add('fa-eye');
|
| 522 |
+
}
|
| 523 |
+
}
|
| 524 |
+
|
| 525 |
+
// --- سیستم تولید کپچا (تطبیق یافته با تم دارک) ---
|
| 526 |
+
const captchaCodes = {};
|
| 527 |
+
|
| 528 |
+
function generateCaptcha(canvasId) {
|
| 529 |
+
const canvas = document.getElementById(canvasId);
|
| 530 |
+
const ctx = canvas.getContext('2d');
|
| 531 |
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
| 532 |
+
|
| 533 |
+
// پسزمینه تیره برای سازگاری با دارک مود
|
| 534 |
+
ctx.fillStyle = '#1e293b';
|
| 535 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 536 |
+
|
| 537 |
+
// اضافه کردن نویز پسزمینه (دایرههای کمرنگ)
|
| 538 |
+
for(let i=0; i<30; i++) {
|
| 539 |
+
ctx.fillStyle = `rgba(255, 255, 255, ${Math.random() * 0.05})`;
|
| 540 |
+
ctx.beginPath();
|
| 541 |
+
ctx.arc(Math.random() * canvas.width, Math.random() * canvas.height, Math.random() * 20, 0, 2 * Math.PI);
|
| 542 |
+
ctx.fill();
|
| 543 |
+
}
|
| 544 |
+
|
| 545 |
+
// تولید کد رندوم 5 کاراکتری
|
| 546 |
+
const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
| 547 |
+
let code = '';
|
| 548 |
+
for (let i = 0; i < 5; i++) {
|
| 549 |
+
code += chars[Math.floor(Math.random() * chars.length)];
|
| 550 |
+
}
|
| 551 |
+
captchaCodes[canvasId] = code;
|
| 552 |
+
|
| 553 |
+
// رسم متن (رنگ روشن)
|
| 554 |
+
ctx.font = 'bold 24px monospace';
|
| 555 |
+
ctx.textBaseline = 'middle';
|
| 556 |
+
for (let i = 0; i < code.length; i++) {
|
| 557 |
+
ctx.save();
|
| 558 |
+
const x = 15 + i * 18;
|
| 559 |
+
const y = 20 + (Math.random() - 0.5) * 8;
|
| 560 |
+
const angle = (Math.random() - 0.5) * 0.4;
|
| 561 |
+
|
| 562 |
+
ctx.translate(x, y);
|
| 563 |
+
ctx.rotate(angle);
|
| 564 |
+
// متن به رنگ سفید/خاکستری روشن
|
| 565 |
+
ctx.fillStyle = `rgb(${200 + Math.random()*55}, ${200 + Math.random()*55}, ${255})`;
|
| 566 |
+
ctx.shadowColor = "rgba(0,0,0,0.5)";
|
| 567 |
+
ctx.shadowBlur = 4;
|
| 568 |
+
ctx.fillText(code[i], 0, 0);
|
| 569 |
+
ctx.restore();
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
// اضافه کردن خطوط نویز (رنگ روشن)
|
| 573 |
+
for (let i = 0; i < 5; i++) {
|
| 574 |
+
ctx.strokeStyle = `rgba(255,255,255,0.15)`;
|
| 575 |
+
ctx.lineWidth = 1;
|
| 576 |
+
ctx.beginPath();
|
| 577 |
+
ctx.moveTo(Math.random() * canvas.width, Math.random() * canvas.height);
|
| 578 |
+
ctx.lineTo(Math.random() * canvas.width, Math.random() * canvas.height);
|
| 579 |
+
ctx.stroke();
|
| 580 |
+
}
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
// --- سیستم نمایش پیام (Toast) ---
|
| 584 |
+
function showToast(message, type = 'info') {
|
| 585 |
+
const container = document.getElementById('toastContainer');
|
| 586 |
+
const toast = document.createElement('div');
|
| 587 |
+
toast.className = `toast ${type}`;
|
| 588 |
+
|
| 589 |
+
let icon = 'fa-info-circle';
|
| 590 |
+
if (type === 'success') icon = 'fa-check-circle';
|
| 591 |
+
if (type === 'error') icon = 'fa-exclamation-triangle';
|
| 592 |
+
|
| 593 |
+
toast.innerHTML = `<i class="fas ${icon}"></i> <span>${message}</span>`;
|
| 594 |
+
|
| 595 |
+
container.appendChild(toast);
|
| 596 |
+
|
| 597 |
+
// حذف خودکار بعد از 3.5 ثانیه
|
| 598 |
+
setTimeout(() => {
|
| 599 |
+
toast.style.animation = 'fadeOut 0.4s ease forwards';
|
| 600 |
+
toast.addEventListener('animationend', () => {
|
| 601 |
+
toast.remove();
|
| 602 |
+
});
|
| 603 |
+
}, 3500);
|
| 604 |
+
}
|
| 605 |
+
|
| 606 |
+
// --- منطق فرم ورود ---
|
| 607 |
+
function handleLogin(e) {
|
| 608 |
+
e.preventDefault();
|
| 609 |
+
const inputs = e.target.querySelectorAll('input');
|
| 610 |
+
const username = inputs[0].value.trim();
|
| 611 |
+
const password = inputs[1].value.trim();
|
| 612 |
+
const captchaInput = inputs[2].value.trim();
|
| 613 |
+
const canvasId = 'loginCaptcha';
|
| 614 |
+
|
| 615 |
+
if (!username || !password) {
|
| 616 |
+
showToast('لطفا تمام فیلدها را پر کنید', 'error');
|
| 617 |
+
return;
|
| 618 |
+
}
|
| 619 |
+
if (captchaInput.toLowerCase() !== captchaCodes[canvasId].toLowerCase()) {
|
| 620 |
+
showToast('کد تصویر اشتباه است', 'error');
|
| 621 |
+
generateCaptcha(canvasId);
|
| 622 |
+
inputs[2].value = '';
|
| 623 |
+
return;
|
| 624 |
+
}
|
| 625 |
+
|
| 626 |
+
// شبیهسازی ارسال به سرور
|
| 627 |
+
const btn = e.target.querySelector('button');
|
| 628 |
+
const originalText = btn.innerHTML;
|
| 629 |
+
btn.innerHTML = '<i class="fas fa-circle-notch fa-spin"></i> بررسی...';
|
| 630 |
+
btn.disabled = true;
|
| 631 |
+
|
| 632 |
+
setTimeout(() => {
|
| 633 |
+
btn.innerHTML = originalText;
|
| 634 |
+
btn.disabled = false;
|
| 635 |
+
showToast('خوش آمدید! ورود موفقیت آمیز بود.', 'success');
|
| 636 |
+
}, 1500);
|
| 637 |
+
}
|
| 638 |
+
|
| 639 |
+
// --- منطق فرم ثبتنام ---
|
| 640 |
+
function handleRegister(e) {
|
| 641 |
+
e.preventDefault();
|
| 642 |
+
const inputs = e.target.querySelectorAll('input');
|
| 643 |
+
const username = inputs[0].value.trim();
|
| 644 |
+
const pass = inputs[1].value.trim();
|
| 645 |
+
const confirmPass = inputs[2].value.trim();
|
| 646 |
+
const captchaInput = inputs[3].value.trim();
|
| 647 |
+
const canvasId = 'regCaptcha';
|
| 648 |
+
|
| 649 |
+
if (!username || !pass || !confirmPass) {
|
| 650 |
+
showToast('لطفا تمام فیلدها را پر کنید', 'error');
|
| 651 |
+
return;
|
| 652 |
+
}
|
| 653 |
+
if (pass.length < 4) {
|
| 654 |
+
showToast('رمز عبور باید حداقل ۴ کاراکتر باشد', 'error');
|
| 655 |
+
return;
|
| 656 |
+
}
|
| 657 |
+
if (pass !== confirmPass) {
|
| 658 |
+
showToast('رمز عبور و تکرار آن مطابقت ندارند', 'error');
|
| 659 |
+
return;
|
| 660 |
+
}
|
| 661 |
+
if (captchaInput.toLowerCase() !== captchaCodes[canvasId].toLowerCase()) {
|
| 662 |
+
showToast('کد تصویر اشتباه است', 'error');
|
| 663 |
+
generateCaptcha(canvasId);
|
| 664 |
+
inputs[3].value = '';
|
| 665 |
+
return;
|
| 666 |
+
}
|
| 667 |
+
|
| 668 |
+
// شبیهسازی ثبتنام
|
| 669 |
+
const btn = e.target.querySelector('button');
|
| 670 |
+
const originalText = btn.innerHTML;
|
| 671 |
+
btn.innerHTML = '<i class="fas fa-circle-notch fa-spin"></i> در حال ثبت...';
|
| 672 |
+
btn.disabled = true;
|
| 673 |
+
|
| 674 |
+
setTimeout(() => {
|
| 675 |
+
btn.innerHTML = originalText;
|
| 676 |
+
btn.disabled = false;
|
| 677 |
+
showToast('حساب کاربری با موفقیت ساخته شد!', 'success');
|
| 678 |
+
e.target.reset();
|
| 679 |
+
switchTab('login');
|
| 680 |
+
}, 1500);
|
| 681 |
+
}
|
| 682 |
+
|
| 683 |
+
// مقداردهی اولیه کپچاها
|
| 684 |
+
window.onload = function() {
|
| 685 |
+
generateCaptcha('loginCaptcha');
|
| 686 |
+
generateCaptcha('regCaptcha');
|
| 687 |
+
};
|
| 688 |
+
|
| 689 |
+
</script>
|
| 690 |
</body>
|
| 691 |
+
|
| 692 |
</html>
|