Update index.html
Browse files- index.html +843 -1252
index.html
CHANGED
|
@@ -1,1263 +1,854 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html data-theme="light" dir="rtl" lang="ar">
|
| 3 |
<head>
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 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 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 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 |
-
|
| 387 |
-
|
| 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 |
-
color: #fff;
|
| 543 |
-
width: 36px;
|
| 544 |
-
height: 36px;
|
| 545 |
-
border-radius: 50%;
|
| 546 |
-
display: flex;
|
| 547 |
-
align-items: center;
|
| 548 |
-
justify-content: center;
|
| 549 |
-
font-size: 13px;
|
| 550 |
-
transition: 0.2s;
|
| 551 |
-
}
|
| 552 |
-
.rich-vid-card:hover .rich-vid-play {
|
| 553 |
-
background: var(--accent);
|
| 554 |
-
}
|
| 555 |
-
.rich-vid-info {
|
| 556 |
-
padding: 14px;
|
| 557 |
-
}
|
| 558 |
-
.rich-vid-title {
|
| 559 |
-
font-size: 14px;
|
| 560 |
-
font-weight: 600;
|
| 561 |
-
color: var(--text-main);
|
| 562 |
-
display: -webkit-box;
|
| 563 |
-
-webkit-line-clamp: 2;
|
| 564 |
-
-webkit-box-orient: vertical;
|
| 565 |
-
overflow: hidden;
|
| 566 |
-
line-height: 1.5;
|
| 567 |
-
}
|
| 568 |
-
.rich-vid-meta {
|
| 569 |
-
font-size: 12px;
|
| 570 |
-
color: var(--text-faint);
|
| 571 |
-
margin-top: 8px;
|
| 572 |
-
display: flex;
|
| 573 |
-
align-items: center;
|
| 574 |
-
gap: 6px;
|
| 575 |
-
}
|
| 576 |
-
.discover-bubbles {
|
| 577 |
-
display: flex;
|
| 578 |
-
flex-direction: column;
|
| 579 |
-
gap: 10px;
|
| 580 |
-
}
|
| 581 |
-
.discover-bubble {
|
| 582 |
-
background: var(--bg-card);
|
| 583 |
-
border: 1.5px solid var(--border);
|
| 584 |
-
border-radius: 60px;
|
| 585 |
-
padding: 15px 24px;
|
| 586 |
-
display: flex;
|
| 587 |
-
align-items: center;
|
| 588 |
-
gap: 14px;
|
| 589 |
-
cursor: pointer;
|
| 590 |
-
transition: var(--transition);
|
| 591 |
-
font-family: 'Tajawal', sans-serif;
|
| 592 |
-
font-size: 16px;
|
| 593 |
-
font-weight: 500;
|
| 594 |
-
color: var(--text-main);
|
| 595 |
-
text-align: right;
|
| 596 |
-
box-shadow: var(--shadow-card);
|
| 597 |
-
backdrop-filter: blur(5px);
|
| 598 |
-
width: 100%;
|
| 599 |
-
}
|
| 600 |
-
.discover-bubble i {
|
| 601 |
-
color: var(--text-faint);
|
| 602 |
-
font-size: 16px;
|
| 603 |
-
transition: 0.2s;
|
| 604 |
-
}
|
| 605 |
-
.discover-bubble:hover {
|
| 606 |
-
background: var(--bg-input-focus);
|
| 607 |
-
border-color: var(--accent);
|
| 608 |
-
color: var(--accent);
|
| 609 |
-
transform: translateX(-6px);
|
| 610 |
-
box-shadow: var(--shadow-hover);
|
| 611 |
-
}
|
| 612 |
-
.discover-bubble:hover i {
|
| 613 |
-
color: var(--accent);
|
| 614 |
-
}
|
| 615 |
-
|
| 616 |
-
/* شبكات الصور والفيديو */
|
| 617 |
-
.images-grid {
|
| 618 |
-
display: grid;
|
| 619 |
-
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
| 620 |
-
gap: 16px;
|
| 621 |
-
width: 100%;
|
| 622 |
-
}
|
| 623 |
-
.image-card {
|
| 624 |
-
background: var(--bg-card);
|
| 625 |
-
border: 1.5px solid var(--border);
|
| 626 |
-
border-radius: var(--radius-card);
|
| 627 |
-
overflow: hidden;
|
| 628 |
-
transition: var(--transition);
|
| 629 |
-
box-shadow: var(--shadow-card);
|
| 630 |
-
display: flex;
|
| 631 |
-
flex-direction: column;
|
| 632 |
-
}
|
| 633 |
-
.image-card:hover {
|
| 634 |
-
border-color: var(--border-hover);
|
| 635 |
-
box-shadow: var(--shadow-hover);
|
| 636 |
-
transform: translateY(-5px);
|
| 637 |
-
}
|
| 638 |
-
.image-card-link {
|
| 639 |
-
display: block;
|
| 640 |
-
width: 100%;
|
| 641 |
-
height: 190px;
|
| 642 |
-
overflow: hidden;
|
| 643 |
-
background: var(--bg-input);
|
| 644 |
-
position: relative;
|
| 645 |
-
}
|
| 646 |
-
.image-card-link img {
|
| 647 |
-
width: 100%;
|
| 648 |
-
height: 100%;
|
| 649 |
-
object-fit: cover;
|
| 650 |
-
transition: transform 0.4s ease;
|
| 651 |
-
}
|
| 652 |
-
.image-card:hover .image-card-link img {
|
| 653 |
-
transform: scale(1.08);
|
| 654 |
-
}
|
| 655 |
-
.image-info {
|
| 656 |
-
padding: 10px 14px;
|
| 657 |
-
font-size: 13px;
|
| 658 |
-
color: var(--text-sub);
|
| 659 |
-
white-space: nowrap;
|
| 660 |
-
overflow: hidden;
|
| 661 |
-
text-overflow: ellipsis;
|
| 662 |
-
}
|
| 663 |
-
.videos-grid {
|
| 664 |
-
display: grid;
|
| 665 |
-
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
| 666 |
-
gap: 22px;
|
| 667 |
-
width: 100%;
|
| 668 |
-
}
|
| 669 |
-
.video-card {
|
| 670 |
-
background: var(--bg-card);
|
| 671 |
-
border: 1.5px solid var(--border);
|
| 672 |
-
border-radius: var(--radius-card);
|
| 673 |
-
overflow: hidden;
|
| 674 |
-
transition: var(--transition);
|
| 675 |
-
box-shadow: var(--shadow-card);
|
| 676 |
-
}
|
| 677 |
-
.video-card:hover {
|
| 678 |
-
transform: translateY(-4px);
|
| 679 |
-
box-shadow: var(--shadow-hover);
|
| 680 |
-
}
|
| 681 |
-
.video-thumb-wrap {
|
| 682 |
-
position: relative;
|
| 683 |
-
width: 100%;
|
| 684 |
-
height: 190px;
|
| 685 |
-
background: var(--bg-input);
|
| 686 |
-
display: block;
|
| 687 |
-
overflow: hidden;
|
| 688 |
-
}
|
| 689 |
-
.video-thumb-wrap img {
|
| 690 |
-
width: 100%;
|
| 691 |
-
height: 100%;
|
| 692 |
-
object-fit: cover;
|
| 693 |
-
transition: 0.3s;
|
| 694 |
-
}
|
| 695 |
-
.play-overlay {
|
| 696 |
-
position: absolute;
|
| 697 |
-
top: 50%;
|
| 698 |
-
left: 50%;
|
| 699 |
-
transform: translate(-50%, -50%);
|
| 700 |
-
width: 50px;
|
| 701 |
-
height: 50px;
|
| 702 |
-
background: rgba(91, 94, 244, 0.9);
|
| 703 |
-
color: white;
|
| 704 |
-
border-radius: 50%;
|
| 705 |
-
display: flex;
|
| 706 |
-
align-items: center;
|
| 707 |
-
justify-content: center;
|
| 708 |
-
font-size: 18px;
|
| 709 |
-
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
|
| 710 |
-
transition: var(--transition);
|
| 711 |
-
z-index: 2;
|
| 712 |
-
}
|
| 713 |
-
.video-details {
|
| 714 |
-
padding: 16px;
|
| 715 |
-
}
|
| 716 |
-
.video-title {
|
| 717 |
-
font-size: 15px;
|
| 718 |
-
font-weight: 700;
|
| 719 |
-
color: var(--text-main);
|
| 720 |
-
text-decoration: none;
|
| 721 |
-
display: block;
|
| 722 |
-
line-height: 1.5;
|
| 723 |
-
}
|
| 724 |
-
|
| 725 |
-
/* مساعد AI */
|
| 726 |
-
.sidebar {
|
| 727 |
-
width: 100%;
|
| 728 |
-
order: 2;
|
| 729 |
-
margin-top: 12px;
|
| 730 |
-
}
|
| 731 |
-
.ai-widget-wrap {
|
| 732 |
-
position: relative;
|
| 733 |
-
border-radius: var(--radius-card);
|
| 734 |
-
}
|
| 735 |
-
.ai-glow-ring {
|
| 736 |
-
position: absolute;
|
| 737 |
-
inset: -3px;
|
| 738 |
-
border-radius: calc(var(--radius-card) + 3px);
|
| 739 |
-
background: conic-gradient(from var(--angle, 0deg), var(--accent), var(--accent-2), #a78bfa, var(--accent), var(--accent-2), var(--accent));
|
| 740 |
-
z-index: 0;
|
| 741 |
-
animation: spin-glow 5s linear infinite;
|
| 742 |
-
filter: blur(1.5px);
|
| 743 |
-
}
|
| 744 |
-
@property --angle {
|
| 745 |
-
syntax: '<angle>';
|
| 746 |
-
initial-value: 0deg;
|
| 747 |
-
inherits: false;
|
| 748 |
-
}
|
| 749 |
-
@keyframes spin-glow {
|
| 750 |
-
to {
|
| 751 |
-
--angle: 360deg;
|
| 752 |
-
}
|
| 753 |
-
}
|
| 754 |
-
.ai-widget {
|
| 755 |
-
position: relative;
|
| 756 |
-
z-index: 1;
|
| 757 |
-
background: var(--bg-card);
|
| 758 |
-
border-radius: var(--radius-card);
|
| 759 |
-
padding: 20px 20px 18px;
|
| 760 |
-
box-shadow: var(--shadow-card);
|
| 761 |
-
backdrop-filter: blur(5px);
|
| 762 |
-
}
|
| 763 |
-
.ai-widget-header {
|
| 764 |
-
display: flex;
|
| 765 |
-
align-items: center;
|
| 766 |
-
gap: 10px;
|
| 767 |
-
margin-bottom: 16px;
|
| 768 |
-
}
|
| 769 |
-
.ai-widget-icon {
|
| 770 |
-
width: 34px;
|
| 771 |
-
height: 34px;
|
| 772 |
-
border-radius: 10px;
|
| 773 |
-
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
| 774 |
-
display: flex;
|
| 775 |
-
align-items: center;
|
| 776 |
-
justify-content: center;
|
| 777 |
-
color: #fff;
|
| 778 |
-
font-size: 14px;
|
| 779 |
-
}
|
| 780 |
-
.ai-widget-badge {
|
| 781 |
-
margin-right: auto;
|
| 782 |
-
font-size: 11px;
|
| 783 |
-
padding: 3px 10px;
|
| 784 |
-
border-radius: 20px;
|
| 785 |
-
background: var(--accent-glow);
|
| 786 |
-
color: var(--accent);
|
| 787 |
-
}
|
| 788 |
-
.ai-answer-body {
|
| 789 |
-
font-size: 14px;
|
| 790 |
-
color: var(--text-sub);
|
| 791 |
-
line-height: 1.8;
|
| 792 |
-
min-height: 60px;
|
| 793 |
-
}
|
| 794 |
-
.ai-skeleton {
|
| 795 |
-
height: 12px;
|
| 796 |
-
border-radius: 6px;
|
| 797 |
-
background: linear-gradient(90deg, var(--bg-input) 25%, var(--border) 50%, var(--bg-input) 75%);
|
| 798 |
-
background-size: 200% 100%;
|
| 799 |
-
animation: shimmer 1.4s ease-in-out infinite;
|
| 800 |
-
margin-bottom: 10px;
|
| 801 |
-
}
|
| 802 |
-
@keyframes shimmer {
|
| 803 |
-
0% {
|
| 804 |
-
background-position: 200% 0;
|
| 805 |
-
}
|
| 806 |
-
100% {
|
| 807 |
-
background-position: -200% 0;
|
| 808 |
-
}
|
| 809 |
-
}
|
| 810 |
-
.ai-sources {
|
| 811 |
-
margin-top: 12px;
|
| 812 |
-
display: flex;
|
| 813 |
-
flex-wrap: wrap;
|
| 814 |
-
gap: 6px;
|
| 815 |
-
}
|
| 816 |
-
.ai-source-chip {
|
| 817 |
-
font-size: 11px;
|
| 818 |
-
padding: 3px 10px;
|
| 819 |
-
border-radius: 20px;
|
| 820 |
-
background: var(--bg-input);
|
| 821 |
-
border: 1px solid var(--border);
|
| 822 |
-
color: var(--text-faint);
|
| 823 |
-
text-decoration: none;
|
| 824 |
-
display: flex;
|
| 825 |
-
align-items: center;
|
| 826 |
-
gap: 5px;
|
| 827 |
-
transition: var(--transition);
|
| 828 |
-
}
|
| 829 |
-
.ai-source-chip:hover {
|
| 830 |
-
border-color: var(--accent);
|
| 831 |
-
color: var(--accent);
|
| 832 |
-
}
|
| 833 |
-
.ai-copy-btn {
|
| 834 |
-
margin-top: 14px;
|
| 835 |
-
padding: 8px 16px;
|
| 836 |
-
background: var(--bg-input);
|
| 837 |
-
border: 1px solid var(--border);
|
| 838 |
-
border-radius: 30px;
|
| 839 |
-
cursor: pointer;
|
| 840 |
-
font-size: 12px;
|
| 841 |
-
color: var(--text-sub);
|
| 842 |
-
display: inline-flex;
|
| 843 |
-
align-items: center;
|
| 844 |
-
gap: 6px;
|
| 845 |
-
transition: var(--transition);
|
| 846 |
-
}
|
| 847 |
-
.ai-copy-btn:hover {
|
| 848 |
-
background: var(--accent);
|
| 849 |
-
color: #fff;
|
| 850 |
-
border-color: var(--accent);
|
| 851 |
-
}
|
| 852 |
-
.ai-widget-footer {
|
| 853 |
-
font-size: 10.5px;
|
| 854 |
-
color: var(--text-faint);
|
| 855 |
-
margin-top: 12px;
|
| 856 |
-
padding-top: 10px;
|
| 857 |
-
border-top: 1px solid var(--border);
|
| 858 |
-
display: flex;
|
| 859 |
-
align-items: center;
|
| 860 |
-
gap: 5px;
|
| 861 |
-
}
|
| 862 |
-
|
| 863 |
-
.back-to-top {
|
| 864 |
-
position: fixed;
|
| 865 |
-
bottom: 30px;
|
| 866 |
-
right: 30px;
|
| 867 |
-
z-index: 999;
|
| 868 |
-
width: 46px;
|
| 869 |
-
height: 46px;
|
| 870 |
-
border-radius: 50%;
|
| 871 |
-
background: var(--accent);
|
| 872 |
-
color: #fff;
|
| 873 |
-
display: flex;
|
| 874 |
-
align-items: center;
|
| 875 |
-
justify-content: center;
|
| 876 |
-
font-size: 18px;
|
| 877 |
-
cursor: pointer;
|
| 878 |
-
opacity: 0;
|
| 879 |
-
visibility: hidden;
|
| 880 |
-
transition: 0.3s;
|
| 881 |
-
box-shadow: 0 6px 20px var(--accent-glow);
|
| 882 |
-
border: none;
|
| 883 |
-
}
|
| 884 |
-
.back-to-top.show {
|
| 885 |
-
opacity: 1;
|
| 886 |
-
visibility: visible;
|
| 887 |
-
}
|
| 888 |
-
|
| 889 |
-
.ai-mobile-wrap {
|
| 890 |
-
display: none;
|
| 891 |
-
border-radius: var(--radius-card);
|
| 892 |
-
margin-bottom: 20px;
|
| 893 |
-
position: relative;
|
| 894 |
-
}
|
| 895 |
-
|
| 896 |
-
@media (max-width: 767px) {
|
| 897 |
-
.navbar {
|
| 898 |
-
top: 10px;
|
| 899 |
-
border-radius: 18px;
|
| 900 |
-
padding: 10px 16px;
|
| 901 |
-
}
|
| 902 |
-
.tabs-bar {
|
| 903 |
-
top: 140px;
|
| 904 |
-
gap: 4px;
|
| 905 |
-
}
|
| 906 |
-
.page-wrapper {
|
| 907 |
-
margin-top: 210px;
|
| 908 |
-
}
|
| 909 |
-
.sidebar {
|
| 910 |
-
display: none !important;
|
| 911 |
-
}
|
| 912 |
-
.ai-mobile-wrap {
|
| 913 |
-
display: block;
|
| 914 |
-
}
|
| 915 |
-
.rich-img-card {
|
| 916 |
-
height: 130px;
|
| 917 |
-
}
|
| 918 |
-
.images-grid {
|
| 919 |
-
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
| 920 |
-
}
|
| 921 |
-
.videos-grid {
|
| 922 |
-
grid-template-columns: 1fr;
|
| 923 |
-
}
|
| 924 |
-
}
|
| 925 |
-
@media (min-width: 768px) {
|
| 926 |
-
.navbar {
|
| 927 |
-
flex-wrap: nowrap;
|
| 928 |
-
padding: 0 24px;
|
| 929 |
-
height: 70px;
|
| 930 |
-
}
|
| 931 |
-
.page-wrapper {
|
| 932 |
-
display: grid;
|
| 933 |
-
grid-template-columns: 1fr 320px;
|
| 934 |
-
gap: 28px;
|
| 935 |
-
}
|
| 936 |
-
.sidebar {
|
| 937 |
-
order: unset;
|
| 938 |
-
margin-top: 0;
|
| 939 |
-
}
|
| 940 |
-
.ai-mobile-wrap {
|
| 941 |
-
display: none !important;
|
| 942 |
-
}
|
| 943 |
-
}
|
| 944 |
-
</style>
|
| 945 |
</head>
|
| 946 |
<body>
|
| 947 |
-
|
| 948 |
-
|
| 949 |
-
|
| 950 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 951 |
</div>
|
| 952 |
-
|
| 953 |
-
|
| 954 |
-
|
| 955 |
-
|
| 956 |
-
|
| 957 |
-
|
| 958 |
-
|
| 959 |
-
|
| 960 |
-
|
| 961 |
-
|
| 962 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 963 |
</div>
|
| 964 |
-
|
| 965 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 966 |
</div>
|
| 967 |
-
|
| 968 |
-
|
| 969 |
-
|
| 970 |
-
|
| 971 |
-
|
| 972 |
-
|
| 973 |
-
|
| 974 |
-
|
| 975 |
-
|
| 976 |
-
|
| 977 |
-
|
| 978 |
-
|
| 979 |
-
|
| 980 |
-
|
| 981 |
-
|
| 982 |
-
|
| 983 |
-
|
| 984 |
-
|
| 985 |
-
|
| 986 |
-
|
| 987 |
-
|
| 988 |
-
|
| 989 |
-
|
| 990 |
-
|
| 991 |
-
|
| 992 |
-
|
| 993 |
-
|
| 994 |
-
|
| 995 |
-
|
| 996 |
-
|
| 997 |
-
|
| 998 |
-
|
| 999 |
-
|
| 1000 |
-
|
| 1001 |
-
|
| 1002 |
-
|
| 1003 |
-
|
| 1004 |
-
|
| 1005 |
-
|
| 1006 |
-
|
| 1007 |
-
|
| 1008 |
-
|
| 1009 |
-
|
| 1010 |
-
|
| 1011 |
-
|
| 1012 |
-
|
| 1013 |
-
|
| 1014 |
-
|
| 1015 |
-
|
| 1016 |
-
|
| 1017 |
-
|
| 1018 |
-
|
| 1019 |
-
|
| 1020 |
-
|
| 1021 |
-
|
| 1022 |
-
|
| 1023 |
-
|
| 1024 |
-
|
| 1025 |
-
(
|
| 1026 |
-
|
| 1027 |
-
|
| 1028 |
-
|
| 1029 |
-
|
| 1030 |
-
|
| 1031 |
-
|
| 1032 |
-
|
| 1033 |
-
|
| 1034 |
-
|
| 1035 |
-
|
| 1036 |
-
|
| 1037 |
-
|
| 1038 |
-
|
| 1039 |
-
|
| 1040 |
-
|
| 1041 |
-
|
| 1042 |
-
|
| 1043 |
-
|
| 1044 |
-
|
| 1045 |
-
|
| 1046 |
-
|
| 1047 |
-
|
| 1048 |
-
|
| 1049 |
-
|
| 1050 |
-
|
| 1051 |
-
|
| 1052 |
-
|
| 1053 |
-
|
| 1054 |
-
|
| 1055 |
-
|
| 1056 |
-
|
| 1057 |
-
|
| 1058 |
-
|
| 1059 |
-
|
| 1060 |
-
|
| 1061 |
-
|
| 1062 |
-
|
| 1063 |
-
}
|
| 1064 |
-
|
| 1065 |
-
|
| 1066 |
-
}
|
| 1067 |
-
function faviconURL(domain) {
|
| 1068 |
-
return `https://www.google.com/s2/favicons?domain=${domain}&sz=32`;
|
| 1069 |
-
}
|
| 1070 |
-
function getBestImageUrl(r) {
|
| 1071 |
-
const candidates = [r.img_src, r.thumbnail_src, r.thumbnail, r.image, r.url, r.img];
|
| 1072 |
-
for (const c of candidates) if (c && typeof c === 'string' && c.match(/\.(jpg|jpeg|png|gif|webp)/i)) return c;
|
| 1073 |
-
return candidates.find(c => c && typeof c === 'string' && c.startsWith('http'));
|
| 1074 |
-
}
|
| 1075 |
-
|
| 1076 |
-
// نسخ نص AI
|
| 1077 |
-
let currentAIAnswer = '';
|
| 1078 |
-
document.getElementById('ai-copy-desktop')?.addEventListener('click', () => navigator.clipboard.writeText(currentAIAnswer));
|
| 1079 |
-
document.getElementById('ai-copy-mobile')?.addEventListener('click', () => navigator.clipboard.writeText(currentAIAnswer));
|
| 1080 |
-
|
| 1081 |
-
function updateAISources(sources) {
|
| 1082 |
-
const chipsHTML = sources.slice(0, 4).map(s => {
|
| 1083 |
-
let domain = '';
|
| 1084 |
-
try { domain = new URL(s.url).hostname.replace('www.', ''); } catch { domain = s.url; }
|
| 1085 |
-
return `<a class="ai-source-chip" href="${s.url}" target="_blank" rel="noopener"><i class="fa-solid fa-link"></i>${escapeHTML(domain)}</a>`;
|
| 1086 |
-
}).join('');
|
| 1087 |
-
document.getElementById('ai-sources-desktop').innerHTML = chipsHTML;
|
| 1088 |
-
document.getElementById('ai-sources-mobile').innerHTML = chipsHTML;
|
| 1089 |
-
}
|
| 1090 |
-
|
| 1091 |
-
function runAI(q, results) {
|
| 1092 |
-
const desktop = document.getElementById('ai-answer-body');
|
| 1093 |
-
const mobile = document.getElementById('ai-answer-body-mobile');
|
| 1094 |
-
const copyDesktop = document.getElementById('ai-copy-desktop');
|
| 1095 |
-
const copyMobile = document.getElementById('ai-copy-mobile');
|
| 1096 |
-
[desktop, mobile].forEach(el => { if(el) { el.classList.add('loading'); el.innerHTML = '<div class="ai-skeleton"></div><div class="ai-skeleton"></div>'; } });
|
| 1097 |
-
[copyDesktop, copyMobile].forEach(el => { if(el) el.style.display = 'none'; });
|
| 1098 |
-
document.getElementById('ai-sources-desktop').innerHTML = '';
|
| 1099 |
-
document.getElementById('ai-sources-mobile').innerHTML = '';
|
| 1100 |
-
|
| 1101 |
-
const bestResult = results[0];
|
| 1102 |
-
const fallbackText = bestResult ? `بناءً على البحث، ${bestResult.content.slice(0, 200)}...` : 'لا توجد معلومات كافية.';
|
| 1103 |
-
const sources = results.slice(0, 4);
|
| 1104 |
-
|
| 1105 |
-
setTimeout(() => {
|
| 1106 |
-
currentAIAnswer = fallbackText;
|
| 1107 |
-
[desktop, mobile].forEach(el => { if(el) { el.classList.remove('loading'); el.textContent = currentAIAnswer; } });
|
| 1108 |
-
[copyDesktop, copyMobile].forEach(el => { if(el) el.style.display = 'inline-flex'; });
|
| 1109 |
-
updateAISources(sources);
|
| 1110 |
-
}, 1200);
|
| 1111 |
-
}
|
| 1112 |
-
|
| 1113 |
-
// Intersection Observer للرسوم المتحركة
|
| 1114 |
-
const observer = new IntersectionObserver((entries) => {
|
| 1115 |
-
entries.forEach(entry => {
|
| 1116 |
-
if (entry.isIntersecting) entry.target.classList.add('visible');
|
| 1117 |
-
});
|
| 1118 |
-
}, { threshold: 0.1, rootMargin: '0px 0px -20px 0px' });
|
| 1119 |
-
|
| 1120 |
-
function observeNewElements() {
|
| 1121 |
-
document.querySelectorAll('.search-result, .image-card, .video-card, .rich-graph-container').forEach(el => observer.observe(el));
|
| 1122 |
-
}
|
| 1123 |
-
|
| 1124 |
-
// العودة إلى الأعلى
|
| 1125 |
-
const backBtn = document.getElementById('backToTop');
|
| 1126 |
-
window.addEventListener('scroll', () => { backBtn.classList.toggle('show', window.scrollY > 400); });
|
| 1127 |
-
backBtn.addEventListener('click', () => window.scrollTo({ top: 0, behavior: 'smooth' }));
|
| 1128 |
-
|
| 1129 |
-
// البحث
|
| 1130 |
-
async function performSearch(q, tab = 'all') {
|
| 1131 |
-
resultsEl.innerHTML = '';
|
| 1132 |
-
metaEl.style.display = 'none';
|
| 1133 |
-
loadMoreBtn.style.display = 'none';
|
| 1134 |
-
loadingEl.style.display = 'flex';
|
| 1135 |
-
const category = { all: 'general', news: 'news', images: 'images', videos: 'videos' }[tab] || 'general';
|
| 1136 |
-
|
| 1137 |
-
try {
|
| 1138 |
-
const response = await fetch(`${SEARXNG_URL}?q=${encodeURIComponent(q)}&format=json&categories=${category}&language=ar&safesearch=1`, { signal: AbortSignal.timeout(15000) });
|
| 1139 |
-
const data = await response.json();
|
| 1140 |
-
allResults = data.results || [];
|
| 1141 |
-
loadingEl.style.display = 'none';
|
| 1142 |
-
|
| 1143 |
-
if (allResults.length > 0) {
|
| 1144 |
-
metaEl.style.display = 'flex';
|
| 1145 |
-
metaEl.innerHTML = `تقريباً <span style="color:var(--accent);font-weight:700">${allResults.length}</span> نتيجة`;
|
| 1146 |
-
runAI(q, allResults);
|
| 1147 |
-
|
| 1148 |
-
if (tab === 'images') renderAllImages(allResults);
|
| 1149 |
-
else if (tab === 'videos') renderAllVideos(allResults);
|
| 1150 |
-
else renderRichWeb(q, allResults);
|
| 1151 |
-
observeNewElements();
|
| 1152 |
-
} else {
|
| 1153 |
-
resultsEl.innerHTML = `<div class="empty-state"><i class="fa-solid fa-face-frown"></i><p>لا توجد نتائج لـ "${escapeHTML(q)}"</p></div>`;
|
| 1154 |
-
}
|
| 1155 |
-
} catch (error) {
|
| 1156 |
-
loadingEl.style.display = 'none';
|
| 1157 |
-
resultsEl.innerHTML = `<div class="empty-state"><i class="fa-solid fa-triangle-exclamation"></i><p>تعذّر الاتصال بالمحرك.</p></div>`;
|
| 1158 |
-
}
|
| 1159 |
-
}
|
| 1160 |
-
|
| 1161 |
-
function renderRichWeb(q, results) {
|
| 1162 |
-
resultsEl.innerHTML = '';
|
| 1163 |
-
let mainCard = results.find(r => r.url.includes('wikipedia.org')) || results.find(r => !r.url.includes('youtube.com'));
|
| 1164 |
-
const ytResults = results.filter(r => r.url.includes('youtube.com/watch')).slice(0, 4);
|
| 1165 |
-
|
| 1166 |
-
const richContainer = document.createElement('div');
|
| 1167 |
-
richContainer.className = 'rich-graph-container';
|
| 1168 |
-
|
| 1169 |
-
const imagesRow = document.createElement('div');
|
| 1170 |
-
imagesRow.className = 'rich-images-row';
|
| 1171 |
-
imagesRow.innerHTML = '<div class="rich-img-skeleton"></div><div class="rich-img-skeleton"></div><div class="rich-img-skeleton"></div><div class="rich-img-skeleton"></div>';
|
| 1172 |
-
richContainer.appendChild(imagesRow);
|
| 1173 |
-
|
| 1174 |
-
fetch(`${SEARXNG_URL}?q=${encodeURIComponent(q)}&format=json&categories=images&language=ar`)
|
| 1175 |
-
.then(res => res.json())
|
| 1176 |
-
.then(data => {
|
| 1177 |
-
if (data.results) {
|
| 1178 |
-
const valid = data.results.filter(r => getBestImageUrl(r)).slice(0, 6);
|
| 1179 |
-
if (valid.length) {
|
| 1180 |
-
imagesRow.innerHTML = valid.map(r => {
|
| 1181 |
-
const img = proxyImage(getBestImageUrl(r));
|
| 1182 |
-
return `<a href="${escapeHTML(r.url||'#')}" target="_blank" class="rich-img-card">
|
| 1183 |
-
<img src="${escapeHTML(img)}" alt="صورة" loading="lazy" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'" />
|
| 1184 |
-
<div class="img-error-overlay"><i class="fa-solid fa-image-slash"></i> تعذّر التحميل</div>
|
| 1185 |
-
</a>`;
|
| 1186 |
-
}).join('');
|
| 1187 |
-
} else imagesRow.style.display = 'none';
|
| 1188 |
-
}
|
| 1189 |
-
}).catch(() => imagesRow.style.display = 'none');
|
| 1190 |
-
|
| 1191 |
-
if (mainCard) {
|
| 1192 |
-
const dmn = getDomain(mainCard.url);
|
| 1193 |
-
richContainer.innerHTML += `
|
| 1194 |
-
<div class="wiki-card search-result">
|
| 1195 |
-
<div class="wiki-header"><img src="${faviconURL(dmn)}" style="width:26px;height:26px;border-radius:6px" /><div><div class="wiki-domain">${escapeHTML(dmn)}</div><a href="${escapeHTML(mainCard.url)}" target="_blank" class="wiki-url">${escapeHTML(mainCard.url)}</a></div></div>
|
| 1196 |
-
<a href="${escapeHTML(mainCard.url)}" target="_blank" class="result-title" style="font-size:20px">${escapeHTML(mainCard.title)}</a>
|
| 1197 |
-
<p class="result-snippet">${escapeHTML(mainCard.content)}</p>
|
| 1198 |
-
</div>`;
|
| 1199 |
-
}
|
| 1200 |
-
if (ytResults.length) {
|
| 1201 |
-
richContainer.innerHTML += `<h3 class="rich-section-title">فيديوهات <i class="fa-solid fa-chevron-left"></i></h3><div class="rich-videos-row">${ytResults.map(r => {
|
| 1202 |
-
const vidMatch = r.url.match(/v=([^&]+)/);
|
| 1203 |
-
const thumb = vidMatch ? `https://img.youtube.com/vi/${vidMatch[1]}/mqdefault.jpg` : proxyImage(r.thumbnail);
|
| 1204 |
-
return `<a href="${escapeHTML(r.url)}" target="_blank" class="rich-vid-card"><div class="rich-vid-thumb"><img src="${escapeHTML(thumb)}" loading="lazy" /><div class="rich-vid-play"><i class="fa-solid fa-play"></i></div></div><div class="rich-vid-info"><div class="rich-vid-title">${escapeHTML(r.title)}</div><div class="rich-vid-meta"><img src="${faviconURL('youtube.com')}" /> YouTube</div></div></a>`;
|
| 1205 |
-
}).join('')}</div>`;
|
| 1206 |
-
}
|
| 1207 |
-
richContainer.innerHTML += `<h3 class="rich-section-title">استكشف ${escapeHTML(q)} بالتفصيل</h3><div class="discover-bubbles">${['جميلة جدا','أنواع','صور','فيديوهات','معلومات'].map(d => `<button class="discover-bubble" data-query="${escapeHTML(d+' '+q)}"><i class="fa-solid fa-magnifying-glass"></i> ${escapeHTML(d+' '+q)}</button>`).join('')}</div>`;
|
| 1208 |
-
resultsEl.appendChild(richContainer);
|
| 1209 |
-
|
| 1210 |
-
richContainer.querySelectorAll('.discover-bubble').forEach(btn => {
|
| 1211 |
-
btn.addEventListener('click', () => {
|
| 1212 |
-
inputEl.value = btn.dataset.query;
|
| 1213 |
-
document.getElementById('search-form').dispatchEvent(new Event('submit'));
|
| 1214 |
-
});
|
| 1215 |
-
});
|
| 1216 |
-
|
| 1217 |
-
const used = new Set([mainCard?.url, ...ytResults.map(r=>r.url)]);
|
| 1218 |
-
results.filter(r => !used.has(r.url)).forEach(r => {
|
| 1219 |
-
const domain = getDomain(r.url);
|
| 1220 |
-
const article = document.createElement('article');
|
| 1221 |
-
article.className = 'search-result';
|
| 1222 |
-
article.innerHTML = `<div class="favicon-wrap"><img src="${faviconURL(domain)}" loading="lazy" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'" /><i class="fa-solid fa-globe fallback-icon" style="display:none"></i></div><div class="result-content"><div class="result-domain"><i class="fa-solid fa-link"></i> ${escapeHTML(domain)}</div><a class="result-title" href="${escapeHTML(r.url)}" target="_blank">${escapeHTML(r.title)}</a><p class="result-snippet">${escapeHTML(r.content)}</p></div>`;
|
| 1223 |
-
resultsEl.appendChild(article);
|
| 1224 |
-
});
|
| 1225 |
-
}
|
| 1226 |
-
|
| 1227 |
-
function renderAllImages(results) {
|
| 1228 |
-
const wrap = document.createElement('div'); wrap.className = 'images-grid';
|
| 1229 |
-
results.forEach(r => {
|
| 1230 |
-
const raw = getBestImageUrl(r); if(!raw) return;
|
| 1231 |
-
wrap.innerHTML += `<div class="image-card"><a class="image-card-link" href="${escapeHTML(r.url)}" target="_blank"><img src="${escapeHTML(proxyImage(raw))}" alt="${escapeHTML(r.title)}" loading="lazy" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'" /><div class="img-error-overlay"><i class="fa-solid fa-image-slash"></i> تعذّر</div></a><div class="image-info">${escapeHTML(r.title)}</div></div>`;
|
| 1232 |
-
});
|
| 1233 |
-
resultsEl.appendChild(wrap);
|
| 1234 |
-
}
|
| 1235 |
-
|
| 1236 |
-
function renderAllVideos(results) {
|
| 1237 |
-
const wrap = document.createElement('div'); wrap.className = 'videos-grid';
|
| 1238 |
-
results.forEach(r => {
|
| 1239 |
-
wrap.innerHTML += `<div class="video-card"><a href="${escapeHTML(r.url)}" target="_blank" class="video-thumb-wrap"><img src="${proxyImage(r.thumbnail)}" loading="lazy" /><div class="play-overlay"><i class="fa-solid fa-play"></i></div></a><div class="video-details"><a class="video-title" href="${escapeHTML(r.url)}">${escapeHTML(r.title)}</a></div></div>`;
|
| 1240 |
-
});
|
| 1241 |
-
resultsEl.appendChild(wrap);
|
| 1242 |
-
}
|
| 1243 |
-
|
| 1244 |
-
// التهيئة
|
| 1245 |
-
if (query) { inputEl.value = query; performSearch(query, currentTab); }
|
| 1246 |
-
document.getElementById('search-form').addEventListener('submit', (e) => {
|
| 1247 |
-
e.preventDefault(); const q = inputEl.value.trim(); if(!q) return;
|
| 1248 |
-
window.history.pushState({}, '', `?q=${encodeURIComponent(q)}&tab=${currentTab}`);
|
| 1249 |
-
query = q; performSearch(q, currentTab);
|
| 1250 |
-
});
|
| 1251 |
-
document.querySelectorAll('.tab-pill').forEach(btn => {
|
| 1252 |
-
btn.addEventListener('click', () => {
|
| 1253 |
-
const tab = btn.dataset.tab; if(tab===currentTab) return;
|
| 1254 |
-
currentTab = tab; setActiveTab(tab);
|
| 1255 |
-
window.history.pushState({}, '', `?q=${encodeURIComponent(query)}&tab=${tab}`);
|
| 1256 |
-
if(query) performSearch(query, tab);
|
| 1257 |
-
});
|
| 1258 |
});
|
| 1259 |
-
|
| 1260 |
-
|
| 1261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1262 |
</body>
|
| 1263 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html data-theme="light" dir="rtl" lang="ar">
|
| 3 |
<head>
|
| 4 |
+
<meta charset="utf-8" />
|
| 5 |
+
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport" />
|
| 6 |
+
<title>SurfGO | نتائج البحث</title>
|
| 7 |
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
| 8 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Tajawal:wght@300;400;500;700&display=swap" rel="stylesheet" />
|
| 10 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" />
|
| 11 |
+
<style>
|
| 12 |
+
:root {
|
| 13 |
+
--bg-base: #f0f2f8;
|
| 14 |
+
--bg-nav: rgba(255, 255, 255, 0.82);
|
| 15 |
+
--bg-card: #ffffff;
|
| 16 |
+
--bg-input: #e8ebf5;
|
| 17 |
+
--bg-input-focus: #ffffff;
|
| 18 |
+
--border: rgba(99, 102, 241, 0.12);
|
| 19 |
+
--border-hover: rgba(99, 102, 241, 0.4);
|
| 20 |
+
--accent: #5b5ef4;
|
| 21 |
+
--accent-2: #e0427a;
|
| 22 |
+
--accent-glow: rgba(91, 94, 244, 0.18);
|
| 23 |
+
--text-main: #12132a;
|
| 24 |
+
--text-sub: #6b7280;
|
| 25 |
+
--text-faint: #9ca3af;
|
| 26 |
+
--shadow-card: 0 2px 12px rgba(91, 94, 244, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
|
| 27 |
+
--shadow-hover: 0 8px 32px rgba(91, 94, 244, 0.13), 0 2px 8px rgba(0, 0, 0, 0.06);
|
| 28 |
+
--radius-nav: 22px;
|
| 29 |
+
--radius-card: 18px;
|
| 30 |
+
--radius-pill: 100px;
|
| 31 |
+
--transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
| 32 |
+
--glass-blur: blur(28px) saturate(1.6);
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
[data-theme="dark"] {
|
| 36 |
+
--bg-base: #0c0d1d;
|
| 37 |
+
--bg-nav: rgba(18, 20, 40, 0.92);
|
| 38 |
+
--bg-card: #13152e;
|
| 39 |
+
--bg-input: #1c1f3d;
|
| 40 |
+
--bg-input-focus: #13152e;
|
| 41 |
+
--border: rgba(130, 133, 255, 0.13);
|
| 42 |
+
--border-hover: rgba(130, 133, 255, 0.4);
|
| 43 |
+
--accent: #8284fc;
|
| 44 |
+
--accent-2: #f472b6;
|
| 45 |
+
--accent-glow: rgba(130, 133, 255, 0.16);
|
| 46 |
+
--text-main: #eef0ff;
|
| 47 |
+
--text-sub: #9099c0;
|
| 48 |
+
--text-faint: #5a6080;
|
| 49 |
+
--shadow-card: 0 2px 14px rgba(0, 0, 0, 0.28);
|
| 50 |
+
--shadow-hover: 0 10px 36px rgba(130, 133, 255, 0.14);
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
*,
|
| 54 |
+
*::before,
|
| 55 |
+
*::after {
|
| 56 |
+
margin: 0;
|
| 57 |
+
padding: 0;
|
| 58 |
+
box-sizing: border-box;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
body {
|
| 62 |
+
font-family: 'Tajawal', sans-serif;
|
| 63 |
+
background: var(--bg-base);
|
| 64 |
+
color: var(--text-main);
|
| 65 |
+
min-height: 100vh;
|
| 66 |
+
overflow-x: hidden;
|
| 67 |
+
transition: background 0.35s, color 0.35s;
|
| 68 |
+
position: relative;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
.bg-mesh {
|
| 72 |
+
position: fixed;
|
| 73 |
+
inset: 0;
|
| 74 |
+
z-index: 0;
|
| 75 |
+
pointer-events: none;
|
| 76 |
+
overflow: hidden;
|
| 77 |
+
}
|
| 78 |
+
.orb {
|
| 79 |
+
position: absolute;
|
| 80 |
+
border-radius: 50%;
|
| 81 |
+
filter: blur(85px);
|
| 82 |
+
opacity: 0.4;
|
| 83 |
+
animation: drift 20s ease-in-out infinite alternate;
|
| 84 |
+
}
|
| 85 |
+
.orb-1 {
|
| 86 |
+
width: 55vw;
|
| 87 |
+
height: 55vw;
|
| 88 |
+
background: radial-gradient(circle, rgba(91, 94, 244, 0.15) 0%, transparent 70%);
|
| 89 |
+
top: -20%;
|
| 90 |
+
right: -15%;
|
| 91 |
+
}
|
| 92 |
+
.orb-2 {
|
| 93 |
+
width: 45vw;
|
| 94 |
+
height: 45vw;
|
| 95 |
+
background: radial-gradient(circle, rgba(224, 66, 122, 0.12) 0%, transparent 70%);
|
| 96 |
+
bottom: -15%;
|
| 97 |
+
left: -10%;
|
| 98 |
+
}
|
| 99 |
+
.orb-3 {
|
| 100 |
+
width: 35vw;
|
| 101 |
+
height: 35vw;
|
| 102 |
+
background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, transparent 70%);
|
| 103 |
+
top: 55%;
|
| 104 |
+
left: 55%;
|
| 105 |
+
}
|
| 106 |
+
@keyframes drift {
|
| 107 |
+
0% { transform: translate(0, 0) scale(1); }
|
| 108 |
+
100% { transform: translate(4%, 3%) scale(1.06); }
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
/* NAVBAR */
|
| 112 |
+
.navbar {
|
| 113 |
+
position: fixed;
|
| 114 |
+
top: 14px;
|
| 115 |
+
left: 50%;
|
| 116 |
+
transform: translateX(-50%);
|
| 117 |
+
width: 95%;
|
| 118 |
+
max-width: 1280px;
|
| 119 |
+
min-height: 68px;
|
| 120 |
+
background: var(--bg-nav);
|
| 121 |
+
backdrop-filter: var(--glass-blur);
|
| 122 |
+
-webkit-backdrop-filter: var(--glass-blur);
|
| 123 |
+
border: 1px solid var(--border);
|
| 124 |
+
border-radius: var(--radius-nav);
|
| 125 |
+
display: flex;
|
| 126 |
+
flex-wrap: wrap;
|
| 127 |
+
align-items: center;
|
| 128 |
+
justify-content: space-between;
|
| 129 |
+
padding: 10px 18px;
|
| 130 |
+
z-index: 1000;
|
| 131 |
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
|
| 132 |
+
gap: 12px;
|
| 133 |
+
transition: background 0.35s, border-color 0.35s;
|
| 134 |
+
}
|
| 135 |
+
.brand {
|
| 136 |
+
font-family: 'Syne', sans-serif;
|
| 137 |
+
font-weight: 400;
|
| 138 |
+
font-size: 21px;
|
| 139 |
+
text-decoration: none;
|
| 140 |
+
color: var(--text-main);
|
| 141 |
+
display: flex;
|
| 142 |
+
align-items: center;
|
| 143 |
+
gap: 10px;
|
| 144 |
+
letter-spacing: -0.01em;
|
| 145 |
+
flex-shrink: 0;
|
| 146 |
+
transition: transform 0.2s;
|
| 147 |
+
}
|
| 148 |
+
.brand:hover { transform: scale(1.03); }
|
| 149 |
+
.brand-icon {
|
| 150 |
+
width: 36px;
|
| 151 |
+
height: 36px;
|
| 152 |
+
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
| 153 |
+
border-radius: 10px;
|
| 154 |
+
display: flex;
|
| 155 |
+
align-items: center;
|
| 156 |
+
justify-content: center;
|
| 157 |
+
color: #fff;
|
| 158 |
+
font-size: 15px;
|
| 159 |
+
flex-shrink: 0;
|
| 160 |
+
box-shadow: 0 4px 14px var(--accent-glow);
|
| 161 |
+
}
|
| 162 |
+
.search-container {
|
| 163 |
+
flex: 1;
|
| 164 |
+
max-width: 580px;
|
| 165 |
+
width: 100%;
|
| 166 |
+
}
|
| 167 |
+
.search-bar {
|
| 168 |
+
display: flex;
|
| 169 |
+
align-items: center;
|
| 170 |
+
background: var(--bg-input);
|
| 171 |
+
border: 1.5px solid var(--border);
|
| 172 |
+
border-radius: var(--radius-pill);
|
| 173 |
+
padding: 4px 4px 4px 16px;
|
| 174 |
+
transition: var(--transition);
|
| 175 |
+
width: 100%;
|
| 176 |
+
}
|
| 177 |
+
.search-bar:focus-within {
|
| 178 |
+
border-color: var(--accent);
|
| 179 |
+
background: var(--bg-input-focus);
|
| 180 |
+
box-shadow: 0 0 0 4px var(--accent-glow);
|
| 181 |
+
}
|
| 182 |
+
.search-bar input {
|
| 183 |
+
flex: 1;
|
| 184 |
+
background: transparent;
|
| 185 |
+
border: none;
|
| 186 |
+
padding: 9px 0;
|
| 187 |
+
color: var(--text-main);
|
| 188 |
+
font-size: 14.5px;
|
| 189 |
+
min-width: 0;
|
| 190 |
+
font-family: 'Tajawal', sans-serif;
|
| 191 |
+
}
|
| 192 |
+
.search-bar input::placeholder { color: var(--text-faint); }
|
| 193 |
+
.search-btn {
|
| 194 |
+
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
| 195 |
+
border: none;
|
| 196 |
+
color: #fff;
|
| 197 |
+
cursor: pointer;
|
| 198 |
+
width: 40px;
|
| 199 |
+
height: 36px;
|
| 200 |
+
border-radius: var(--radius-pill);
|
| 201 |
+
display: flex;
|
| 202 |
+
align-items: center;
|
| 203 |
+
justify-content: center;
|
| 204 |
+
font-size: 14px;
|
| 205 |
+
flex-shrink: 0;
|
| 206 |
+
transition: var(--transition);
|
| 207 |
+
box-shadow: 0 2px 8px var(--accent-glow);
|
| 208 |
+
}
|
| 209 |
+
.search-btn:hover { opacity: 0.88; transform: scale(1.06); }
|
| 210 |
+
.nav-actions { display: flex; align-items: center; gap: 8px; }
|
| 211 |
+
#theme-toggle {
|
| 212 |
+
background: var(--bg-input);
|
| 213 |
+
border: 1.5px solid var(--border);
|
| 214 |
+
color: var(--text-sub);
|
| 215 |
+
cursor: pointer;
|
| 216 |
+
width: 38px;
|
| 217 |
+
height: 38px;
|
| 218 |
+
border-radius: 50%;
|
| 219 |
+
display: flex;
|
| 220 |
+
align-items: center;
|
| 221 |
+
justify-content: center;
|
| 222 |
+
font-size: 15px;
|
| 223 |
+
transition: var(--transition);
|
| 224 |
+
flex-shrink: 0;
|
| 225 |
+
}
|
| 226 |
+
#theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
|
| 227 |
+
|
| 228 |
+
/* TABS */
|
| 229 |
+
.tabs-bar {
|
| 230 |
+
position: fixed;
|
| 231 |
+
top: 98px;
|
| 232 |
+
left: 50%;
|
| 233 |
+
transform: translateX(-50%);
|
| 234 |
+
width: 95%;
|
| 235 |
+
max-width: 1280px;
|
| 236 |
+
display: flex;
|
| 237 |
+
gap: 6px;
|
| 238 |
+
z-index: 999;
|
| 239 |
+
overflow-x: auto;
|
| 240 |
+
padding: 6px 10px;
|
| 241 |
+
backdrop-filter: blur(16px);
|
| 242 |
+
background: rgba(255,255,255,0.2);
|
| 243 |
+
border: 1px solid var(--border);
|
| 244 |
+
border-radius: 40px;
|
| 245 |
+
scrollbar-width: none;
|
| 246 |
+
}
|
| 247 |
+
[data-theme="dark"] .tabs-bar { background: rgba(18,20,40,0.35); }
|
| 248 |
+
.tab-pill {
|
| 249 |
+
padding: 7px 16px;
|
| 250 |
+
border-radius: var(--radius-pill);
|
| 251 |
+
background: var(--bg-card);
|
| 252 |
+
border: 1.5px solid var(--border);
|
| 253 |
+
color: var(--text-sub);
|
| 254 |
+
font-family: 'Tajawal', sans-serif;
|
| 255 |
+
font-size: 13px;
|
| 256 |
+
font-weight: 500;
|
| 257 |
+
cursor: pointer;
|
| 258 |
+
transition: var(--transition);
|
| 259 |
+
display: flex;
|
| 260 |
+
align-items: center;
|
| 261 |
+
gap: 6px;
|
| 262 |
+
white-space: nowrap;
|
| 263 |
+
box-shadow: var(--shadow-card);
|
| 264 |
+
}
|
| 265 |
+
.tab-pill:hover { border-color: var(--border-hover); color: var(--accent); }
|
| 266 |
+
.tab-pill.active {
|
| 267 |
+
background: var(--accent);
|
| 268 |
+
color: #fff;
|
| 269 |
+
border-color: var(--accent);
|
| 270 |
+
box-shadow: 0 4px 16px var(--accent-glow);
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
/* LAYOUT */
|
| 274 |
+
.page-wrapper {
|
| 275 |
+
position: relative;
|
| 276 |
+
z-index: 1;
|
| 277 |
+
max-width: 1280px;
|
| 278 |
+
margin: 170px auto 60px;
|
| 279 |
+
padding: 0 16px;
|
| 280 |
+
display: flex;
|
| 281 |
+
flex-direction: column;
|
| 282 |
+
gap: 24px;
|
| 283 |
+
}
|
| 284 |
+
.results-area { min-width: 0; width: 100%; }
|
| 285 |
+
|
| 286 |
+
/* LOADING */
|
| 287 |
+
#loading-text {
|
| 288 |
+
color: var(--text-sub);
|
| 289 |
+
font-size: 13.5px;
|
| 290 |
+
margin-bottom: 18px;
|
| 291 |
+
display: flex;
|
| 292 |
+
align-items: center;
|
| 293 |
+
gap: 8px;
|
| 294 |
+
}
|
| 295 |
+
#loading-text.spinning::before {
|
| 296 |
+
content: '';
|
| 297 |
+
display: inline-block;
|
| 298 |
+
width: 14px;
|
| 299 |
+
height: 14px;
|
| 300 |
+
border: 2px solid var(--border);
|
| 301 |
+
border-top-color: var(--accent);
|
| 302 |
+
border-radius: 50%;
|
| 303 |
+
animation: spin 0.8s linear infinite;
|
| 304 |
+
flex-shrink: 0;
|
| 305 |
+
}
|
| 306 |
+
@keyframes spin { to { transform: rotate(360deg); } }
|
| 307 |
+
|
| 308 |
+
/* FADE IN */
|
| 309 |
+
.search-result,
|
| 310 |
+
.image-card,
|
| 311 |
+
.video-card,
|
| 312 |
+
.rich-graph-container {
|
| 313 |
+
opacity: 0;
|
| 314 |
+
transform: translateY(20px);
|
| 315 |
+
transition: opacity 0.5s ease, transform 0.5s ease;
|
| 316 |
+
}
|
| 317 |
+
.search-result.visible,
|
| 318 |
+
.image-card.visible,
|
| 319 |
+
.video-card.visible,
|
| 320 |
+
.rich-graph-container.visible {
|
| 321 |
+
opacity: 1;
|
| 322 |
+
transform: translateY(0);
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
/* CARDS */
|
| 326 |
+
.search-result {
|
| 327 |
+
background: var(--bg-card);
|
| 328 |
+
border: 1.5px solid var(--border);
|
| 329 |
+
border-radius: var(--radius-card);
|
| 330 |
+
padding: 18px 20px;
|
| 331 |
+
margin-bottom: 12px;
|
| 332 |
+
transition: var(--transition);
|
| 333 |
+
box-shadow: var(--shadow-card);
|
| 334 |
+
display: flex;
|
| 335 |
+
gap: 14px;
|
| 336 |
+
align-items: flex-start;
|
| 337 |
+
}
|
| 338 |
+
.search-result:hover {
|
| 339 |
+
border-color: var(--border-hover);
|
| 340 |
+
box-shadow: var(--shadow-hover);
|
| 341 |
+
transform: translateY(-2px);
|
| 342 |
+
}
|
| 343 |
+
.favicon-wrap {
|
| 344 |
+
width: 22px;
|
| 345 |
+
height: 22px;
|
| 346 |
+
border-radius: 5px;
|
| 347 |
+
overflow: hidden;
|
| 348 |
+
flex-shrink: 0;
|
| 349 |
+
margin-top: 3px;
|
| 350 |
+
background: var(--bg-input);
|
| 351 |
+
display: flex;
|
| 352 |
+
align-items: center;
|
| 353 |
+
justify-content: center;
|
| 354 |
+
}
|
| 355 |
+
.favicon-wrap img { width: 16px; height: 16px; object-fit: contain; }
|
| 356 |
+
.fallback-icon { color: var(--text-faint); font-size: 11px; }
|
| 357 |
+
.result-content { flex: 1; min-width: 0; }
|
| 358 |
+
.result-domain { font-size: 11.5px; color: var(--text-faint); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
|
| 359 |
+
.result-title {
|
| 360 |
+
font-size: 16px;
|
| 361 |
+
font-weight: 700;
|
| 362 |
+
color: var(--accent);
|
| 363 |
+
text-decoration: none;
|
| 364 |
+
display: inline-block;
|
| 365 |
+
margin-bottom: 6px;
|
| 366 |
+
line-height: 1.4;
|
| 367 |
+
transition: color 0.2s;
|
| 368 |
+
}
|
| 369 |
+
.result-title:hover { color: var(--accent-2); text-decoration: underline; }
|
| 370 |
+
.result-snippet { font-size: 13.5px; color: var(--text-sub); line-height: 1.65; }
|
| 371 |
+
|
| 372 |
+
/* RICH GRAPH */
|
| 373 |
+
.rich-graph-container { display: flex; flex-direction: column; gap: 22px; margin-bottom: 28px; }
|
| 374 |
+
.rich-images-row {
|
| 375 |
+
display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; min-height: 170px; align-items: center;
|
| 376 |
+
}
|
| 377 |
+
.rich-img-card {
|
| 378 |
+
flex-shrink: 0; height: 170px; border-radius: 16px; overflow: hidden; background: var(--bg-input);
|
| 379 |
+
border: 1px solid var(--border); box-shadow: var(--shadow-card); transition: var(--transition); position: relative;
|
| 380 |
+
}
|
| 381 |
+
.rich-img-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: var(--shadow-hover); }
|
| 382 |
+
.rich-img-card img { height: 100%; width: auto; object-fit: cover; display: block; }
|
| 383 |
+
.img-error-overlay {
|
| 384 |
+
position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
|
| 385 |
+
background: var(--bg-input); color: var(--text-faint); flex-direction: column; gap: 6px; font-size: 13px;
|
| 386 |
+
}
|
| 387 |
+
.rich-section-title {
|
| 388 |
+
font-size: 20px; font-weight: 700; margin: 12px 0 8px; color: var(--text-main);
|
| 389 |
+
display: flex; align-items: center; gap: 10px;
|
| 390 |
+
}
|
| 391 |
+
.rich-videos-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
|
| 392 |
+
.rich-vid-card {
|
| 393 |
+
flex: 0 0 250px; text-decoration: none; background: var(--bg-card); border-radius: 16px;
|
| 394 |
+
overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-card); transition: var(--transition);
|
| 395 |
+
}
|
| 396 |
+
.rich-vid-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
|
| 397 |
+
.rich-vid-thumb { height: 140px; position: relative; background: var(--bg-input); }
|
| 398 |
+
.rich-vid-thumb img { width: 100%; height: 100%; object-fit: cover; }
|
| 399 |
+
.rich-vid-play {
|
| 400 |
+
position: absolute; bottom: 12px; left: 12px; background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
|
| 401 |
+
color: #fff; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center;
|
| 402 |
+
justify-content: center; font-size: 13px; transition: 0.2s;
|
| 403 |
+
}
|
| 404 |
+
.rich-vid-card:hover .rich-vid-play { background: var(--accent); }
|
| 405 |
+
.rich-vid-info { padding: 14px; }
|
| 406 |
+
.rich-vid-title {
|
| 407 |
+
font-size: 14px; font-weight: 600; color: var(--text-main);
|
| 408 |
+
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5;
|
| 409 |
+
}
|
| 410 |
+
.rich-vid-meta { font-size: 12px; color: var(--text-faint); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
|
| 411 |
+
.discover-bubbles { display: flex; flex-direction: column; gap: 10px; }
|
| 412 |
+
.discover-bubble {
|
| 413 |
+
background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 60px;
|
| 414 |
+
padding: 15px 24px; display: flex; align-items: center; gap: 14px; cursor: pointer;
|
| 415 |
+
transition: var(--transition); font-family: 'Tajawal', sans-serif; font-size: 16px;
|
| 416 |
+
font-weight: 500; color: var(--text-main); text-align: right; box-shadow: var(--shadow-card);
|
| 417 |
+
backdrop-filter: blur(5px); width: 100%;
|
| 418 |
+
}
|
| 419 |
+
.discover-bubble i { color: var(--text-faint); font-size: 16px; transition: 0.2s; }
|
| 420 |
+
.discover-bubble:hover {
|
| 421 |
+
background: var(--bg-input-focus); border-color: var(--accent); color: var(--accent);
|
| 422 |
+
transform: translateX(-6px); box-shadow: var(--shadow-hover);
|
| 423 |
+
}
|
| 424 |
+
.discover-bubble:hover i { color: var(--accent); }
|
| 425 |
+
|
| 426 |
+
/* IMAGES & VIDEOS GRID */
|
| 427 |
+
.images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; width: 100%; }
|
| 428 |
+
.image-card {
|
| 429 |
+
background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-card);
|
| 430 |
+
overflow: hidden; transition: var(--transition); box-shadow: var(--shadow-card); display: flex; flex-direction: column;
|
| 431 |
+
}
|
| 432 |
+
.image-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-hover); transform: translateY(-5px); }
|
| 433 |
+
.image-card-link { display: block; width: 100%; height: 170px; overflow: hidden; background: var(--bg-input); position: relative; }
|
| 434 |
+
.image-card-link img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
|
| 435 |
+
.image-card:hover .image-card-link img { transform: scale(1.06); }
|
| 436 |
+
.image-info {
|
| 437 |
+
padding: 9px 10px; font-size: 11.5px; color: var(--text-sub);
|
| 438 |
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 1px solid var(--border); background: var(--bg-card);
|
| 439 |
+
}
|
| 440 |
+
.videos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; width: 100%; }
|
| 441 |
+
.video-card {
|
| 442 |
+
background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-card);
|
| 443 |
+
overflow: hidden; transition: var(--transition); box-shadow: var(--shadow-card);
|
| 444 |
+
}
|
| 445 |
+
.video-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
|
| 446 |
+
.video-thumb-wrap { position: relative; width: 100%; height: 170px; background: var(--bg-input); display: block; overflow: hidden; }
|
| 447 |
+
.video-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: 0.3s; }
|
| 448 |
+
.video-card:hover .video-thumb-wrap img { opacity: 1; }
|
| 449 |
+
.play-overlay {
|
| 450 |
+
position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px;
|
| 451 |
+
background: rgba(91,94,244,0.92); color: white; border-radius: 50%; display: flex;
|
| 452 |
+
align-items: center; justify-content: center; font-size: 17px; box-shadow: 0 0 20px var(--accent-glow);
|
| 453 |
+
}
|
| 454 |
+
.video-details { padding: 12px; }
|
| 455 |
+
.video-title { font-size: 14px; font-weight: 700; color: var(--text-main); text-decoration: none; display: block; line-height: 1.4; }
|
| 456 |
+
.video-title:hover { color: var(--accent); }
|
| 457 |
+
|
| 458 |
+
/* AI WIDGET */
|
| 459 |
+
.sidebar { width: 100%; order: 2; margin-top: 12px; }
|
| 460 |
+
.ai-widget-wrap { position: relative; border-radius: var(--radius-card); }
|
| 461 |
+
.ai-glow-ring {
|
| 462 |
+
position: absolute; inset: -2px; border-radius: calc(var(--radius-card) + 2px);
|
| 463 |
+
background: conic-gradient(from var(--angle, 0deg), var(--accent), var(--accent-2), #a78bfa, var(--accent), var(--accent-2), var(--accent));
|
| 464 |
+
z-index: 0; animation: spin-glow 4s linear infinite; filter: blur(1px);
|
| 465 |
+
}
|
| 466 |
+
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
|
| 467 |
+
@keyframes spin-glow { to { --angle: 360deg; } }
|
| 468 |
+
.ai-widget {
|
| 469 |
+
position: relative; z-index: 1; background: var(--bg-card); border-radius: var(--radius-card);
|
| 470 |
+
padding: 18px 18px 16px; box-shadow: var(--shadow-card);
|
| 471 |
+
}
|
| 472 |
+
.ai-widget-header { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
|
| 473 |
+
.ai-widget-icon {
|
| 474 |
+
width: 30px; height: 30px; border-radius: 8px;
|
| 475 |
+
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
| 476 |
+
display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex-shrink: 0;
|
| 477 |
+
}
|
| 478 |
+
.ai-widget-badge {
|
| 479 |
+
margin-right: auto; font-size: 10px; padding: 2px 8px; border-radius: 20px;
|
| 480 |
+
background: var(--accent-glow); color: var(--accent); font-weight: 600; border: 1px solid rgba(91,94,244,0.2);
|
| 481 |
+
}
|
| 482 |
+
.ai-answer-body { font-size: 13.5px; color: var(--text-sub); line-height: 1.75; min-height: 60px; }
|
| 483 |
+
.ai-answer-body.loading { display: flex; flex-direction: column; gap: 8px; }
|
| 484 |
+
.ai-skeleton {
|
| 485 |
+
height: 12px; border-radius: 6px;
|
| 486 |
+
background: linear-gradient(90deg, var(--bg-input) 25%, var(--border) 50%, var(--bg-input) 75%);
|
| 487 |
+
background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite;
|
| 488 |
+
}
|
| 489 |
+
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
|
| 490 |
+
.ai-copy-btn {
|
| 491 |
+
margin-top: 14px; padding: 8px 16px; background: var(--bg-input); border: 1px solid var(--border);
|
| 492 |
+
border-radius: 30px; cursor: pointer; font-size: 12px; color: var(--text-sub);
|
| 493 |
+
display: inline-flex; align-items: center; gap: 6px; transition: var(--transition);
|
| 494 |
+
}
|
| 495 |
+
.ai-copy-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
|
| 496 |
+
.ai-widget-footer {
|
| 497 |
+
font-size: 10.5px; color: var(--text-faint); margin-top: 12px; padding-top: 10px;
|
| 498 |
+
border-top: 1px solid var(--border); display: flex; align-items: center; gap: 5px;
|
| 499 |
+
}
|
| 500 |
+
.ai-sources { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
|
| 501 |
+
.ai-source-chip {
|
| 502 |
+
font-size: 11px; padding: 3px 10px; border-radius: 20px; background: var(--bg-input);
|
| 503 |
+
border: 1px solid var(--border); color: var(--text-faint); text-decoration: none;
|
| 504 |
+
display: flex; align-items: center; gap: 5px; transition: var(--transition);
|
| 505 |
+
}
|
| 506 |
+
.ai-source-chip:hover { border-color: var(--accent); color: var(--accent); }
|
| 507 |
+
.ai-cursor {
|
| 508 |
+
display: inline-block; width: 2px; height: 14px; background: var(--accent);
|
| 509 |
+
margin-right: 2px; vertical-align: middle; animation: blink 0.9s step-end infinite;
|
| 510 |
+
}
|
| 511 |
+
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
|
| 512 |
+
|
| 513 |
+
.ai-mobile-wrap { display: none; border-radius: var(--radius-card); margin-bottom: 16px; position: relative; }
|
| 514 |
+
|
| 515 |
+
.back-to-top {
|
| 516 |
+
position: fixed; bottom: 30px; right: 30px; z-index: 999; width: 46px; height: 46px;
|
| 517 |
+
border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center;
|
| 518 |
+
justify-content: center; font-size: 18px; cursor: pointer; opacity: 0; visibility: hidden;
|
| 519 |
+
transition: 0.3s; box-shadow: 0 6px 20px var(--accent-glow); border: none;
|
| 520 |
+
}
|
| 521 |
+
.back-to-top.show { opacity: 1; visibility: visible; }
|
| 522 |
+
|
| 523 |
+
.results-meta { font-size: 12px; color: var(--text-faint); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
|
| 524 |
+
.results-meta span { color: var(--accent); font-weight: 600; }
|
| 525 |
+
|
| 526 |
+
@media (max-width: 767px) {
|
| 527 |
+
.navbar { top: 10px; border-radius: 16px; padding: 10px 14px; }
|
| 528 |
+
.tabs-bar { top: 125px; }
|
| 529 |
+
.page-wrapper { margin-top: 176px; }
|
| 530 |
+
.sidebar { display: none !important; }
|
| 531 |
+
.ai-mobile-wrap { display: block; }
|
| 532 |
+
.images-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
|
| 533 |
+
.videos-grid { grid-template-columns: 1fr; }
|
| 534 |
+
}
|
| 535 |
+
@media (min-width: 768px) {
|
| 536 |
+
.navbar { flex-wrap: nowrap; padding: 0 22px; height: 68px; }
|
| 537 |
+
.page-wrapper { display: grid; grid-template-columns: 1fr 300px; gap: 24px; margin: 176px auto 60px; }
|
| 538 |
+
.sidebar { order: unset; margin-top: 0; }
|
| 539 |
+
.ai-mobile-wrap { display: none !important; }
|
| 540 |
+
}
|
| 541 |
+
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 542 |
</head>
|
| 543 |
<body>
|
| 544 |
+
<div class="bg-mesh">
|
| 545 |
+
<div class="orb orb-1"></div>
|
| 546 |
+
<div class="orb orb-2"></div>
|
| 547 |
+
<div class="orb orb-3"></div>
|
| 548 |
+
</div>
|
| 549 |
+
|
| 550 |
+
<nav class="navbar">
|
| 551 |
+
<a class="brand" href="#">
|
| 552 |
+
<div class="brand-icon"><i class="fa-solid fa-bolt"></i></div>
|
| 553 |
+
<span>SurfGO</span>
|
| 554 |
+
</a>
|
| 555 |
+
<div class="search-container">
|
| 556 |
+
<form class="search-bar" id="search-form">
|
| 557 |
+
<input id="main-input" placeholder="ابحث في الويب..." type="text" autocomplete="off" />
|
| 558 |
+
<button class="search-btn" type="submit"><i class="fa-solid fa-magnifying-glass"></i></button>
|
| 559 |
+
</form>
|
| 560 |
</div>
|
| 561 |
+
<div class="nav-actions">
|
| 562 |
+
<button id="theme-toggle" aria-label="تغيير السمة"></button>
|
| 563 |
+
</div>
|
| 564 |
+
</nav>
|
| 565 |
+
|
| 566 |
+
<div class="tabs-bar">
|
| 567 |
+
<button class="tab-pill active" data-tab="all"><i class="fa-solid fa-globe"></i> الويب</button>
|
| 568 |
+
<button class="tab-pill" data-tab="news"><i class="fa-solid fa-newspaper"></i> أخبار</button>
|
| 569 |
+
<button class="tab-pill" data-tab="images"><i class="fa-solid fa-image"></i> صور</button>
|
| 570 |
+
<button class="tab-pill" data-tab="videos"><i class="fa-solid fa-play"></i> فيديو</button>
|
| 571 |
+
</div>
|
| 572 |
+
|
| 573 |
+
<div class="page-wrapper">
|
| 574 |
+
<main class="results-area">
|
| 575 |
+
<div id="loading-text" class="spinning">جاري جلب النتائج…</div>
|
| 576 |
+
|
| 577 |
+
<div class="ai-mobile-wrap" id="ai-mobile-wrap">
|
| 578 |
+
<div class="ai-glow-ring"></div>
|
| 579 |
+
<div class="ai-widget">
|
| 580 |
+
<div class="ai-widget-header">
|
| 581 |
+
<div class="ai-widget-icon"><i class="fa-solid fa-robot"></i></div>
|
| 582 |
+
<span>إجابة الذكاء الاصطناعي</span>
|
| 583 |
+
<span class="ai-widget-badge">AI</span>
|
| 584 |
+
</div>
|
| 585 |
+
<div class="ai-answer-body loading" id="ai-answer-body-mobile">
|
| 586 |
+
<div class="ai-skeleton"></div><div class="ai-skeleton"></div><div class="ai-skeleton"></div>
|
| 587 |
+
</div>
|
| 588 |
+
<div class="ai-sources" id="ai-sources-mobile"></div>
|
| 589 |
+
<button class="ai-copy-btn" id="ai-copy-mobile" style="display:none"><i class="fa-regular fa-copy"></i> نسخ</button>
|
| 590 |
+
<div class="ai-widget-footer"><i class="fa-solid fa-bolt"></i> مدعوم بواسطة AnesNT</div>
|
| 591 |
</div>
|
| 592 |
+
</div>
|
| 593 |
+
|
| 594 |
+
<div id="results-meta" class="results-meta" style="display:none"></div>
|
| 595 |
+
<div id="results-container"></div>
|
| 596 |
+
</main>
|
| 597 |
+
|
| 598 |
+
<aside class="sidebar">
|
| 599 |
+
<div class="ai-widget-wrap">
|
| 600 |
+
<div class="ai-glow-ring"></div>
|
| 601 |
+
<div class="ai-widget">
|
| 602 |
+
<div class="ai-widget-header">
|
| 603 |
+
<div class="ai-widget-icon"><i class="fa-solid fa-robot"></i></div>
|
| 604 |
+
<span>إجابة الذكاء الاصطناعي</span>
|
| 605 |
+
<span class="ai-widget-badge">AI</span>
|
| 606 |
+
</div>
|
| 607 |
+
<div class="ai-answer-body loading" id="ai-answer-body">
|
| 608 |
+
<div class="ai-skeleton"></div><div class="ai-skeleton"></div><div class="ai-skeleton"></div>
|
| 609 |
+
</div>
|
| 610 |
+
<div class="ai-sources" id="ai-sources-desktop"></div>
|
| 611 |
+
<button class="ai-copy-btn" id="ai-copy-desktop" style="display:none"><i class="fa-regular fa-copy"></i> نسخ</button>
|
| 612 |
+
<div class="ai-widget-footer"><i class="fa-solid fa-bolt"></i> مدعوم بواسطة AnesNT</div>
|
| 613 |
</div>
|
| 614 |
+
</div>
|
| 615 |
+
</aside>
|
| 616 |
+
</div>
|
| 617 |
+
|
| 618 |
+
<button class="back-to-top" id="backToTop"><i class="fa-solid fa-arrow-up"></i></button>
|
| 619 |
+
|
| 620 |
+
<script>
|
| 621 |
+
(function() {
|
| 622 |
+
const SEARXNG_URL = "https://cjj-on-hf-searxng.hf.space/search";
|
| 623 |
+
const GEMINI_API = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent";
|
| 624 |
+
const GEMINI_API_KEY = "";
|
| 625 |
+
|
| 626 |
+
const themeBtn = document.getElementById('theme-toggle');
|
| 627 |
+
function setTheme(t) {
|
| 628 |
+
document.documentElement.setAttribute('data-theme', t);
|
| 629 |
+
localStorage.setItem('surfgo-theme', t);
|
| 630 |
+
themeBtn.innerHTML = t === 'dark' ? '<i class="fa-solid fa-sun"></i>' : '<i class="fa-solid fa-moon"></i>';
|
| 631 |
+
}
|
| 632 |
+
setTheme(localStorage.getItem('surfgo-theme') || 'light');
|
| 633 |
+
themeBtn.addEventListener('click', () => setTheme(document.documentElement.getAttribute('data-theme') === 'dark' ? 'light' : 'dark'));
|
| 634 |
+
|
| 635 |
+
const params = new URLSearchParams(window.location.search);
|
| 636 |
+
let query = params.get('q') || '';
|
| 637 |
+
let currentTab = params.get('tab') || 'all';
|
| 638 |
+
let allResults = [];
|
| 639 |
+
|
| 640 |
+
const inputEl = document.getElementById('main-input');
|
| 641 |
+
const resultsEl = document.getElementById('results-container');
|
| 642 |
+
const loadingEl = document.getElementById('loading-text');
|
| 643 |
+
const metaEl = document.getElementById('results-meta');
|
| 644 |
+
|
| 645 |
+
function setActiveTab(tab) {
|
| 646 |
+
document.querySelectorAll('.tab-pill').forEach(btn => btn.classList.toggle('active', btn.dataset.tab === tab));
|
| 647 |
+
}
|
| 648 |
+
setActiveTab(currentTab);
|
| 649 |
+
|
| 650 |
+
// Helpers
|
| 651 |
+
function escapeHTML(str) { return str ? str.replace(/[&<>'"]/g, t => ({'&':'&','<':'<','>':'>',"'":''','"':'"'}[t]||t)) : ''; }
|
| 652 |
+
function getDomain(url) { try { return new URL(url).hostname.replace('www.',''); } catch { return url||''; } }
|
| 653 |
+
function proxyImage(url) { return url && !url.startsWith('data:') ? `https://wsrv.nl/?url=${encodeURIComponent(url)}&output=webp&maxage=7d&default=placeholder` : url; }
|
| 654 |
+
function faviconURL(domain) { return `https://www.google.com/s2/favicons?domain=${domain}&sz=32`; }
|
| 655 |
+
function getBestImageUrl(r) {
|
| 656 |
+
const c = [r.img_src, r.thumbnail_src, r.thumbnail, r.image, r.url, r.img];
|
| 657 |
+
for (const u of c) if (u && typeof u === 'string' && u.match(/\.(jpg|jpeg|png|gif|webp)/i)) return u;
|
| 658 |
+
return c.find(u => u && typeof u === 'string' && u.startsWith('http'));
|
| 659 |
+
}
|
| 660 |
+
|
| 661 |
+
// AI Copy
|
| 662 |
+
let currentAIAnswer = '';
|
| 663 |
+
document.getElementById('ai-copy-desktop')?.addEventListener('click', () => navigator.clipboard.writeText(currentAIAnswer));
|
| 664 |
+
document.getElementById('ai-copy-mobile')?.addEventListener('click', () => navigator.clipboard.writeText(currentAIAnswer));
|
| 665 |
+
|
| 666 |
+
function updateAISources(sources) {
|
| 667 |
+
const chips = sources.slice(0,4).map(s => {
|
| 668 |
+
const d = getDomain(s.url);
|
| 669 |
+
return `<a class="ai-source-chip" href="${s.url}" target="_blank"><i class="fa-solid fa-link"></i>${escapeHTML(d)}</a>`;
|
| 670 |
+
}).join('');
|
| 671 |
+
document.getElementById('ai-sources-desktop').innerHTML = chips;
|
| 672 |
+
document.getElementById('ai-sources-mobile').innerHTML = chips;
|
| 673 |
+
}
|
| 674 |
+
|
| 675 |
+
function typeAIResponse(fullText, sources) {
|
| 676 |
+
const desktop = document.getElementById('ai-answer-body');
|
| 677 |
+
const mobile = document.getElementById('ai-answer-body-mobile');
|
| 678 |
+
[desktop, mobile].forEach(el => { if(el) { el.className = 'ai-answer-body'; el.innerHTML = '<span class="ai-cursor"></span>'; } });
|
| 679 |
+
let i = 0;
|
| 680 |
+
const interval = setInterval(() => {
|
| 681 |
+
i += 3;
|
| 682 |
+
const shown = fullText.slice(0,i);
|
| 683 |
+
const still = i < fullText.length;
|
| 684 |
+
[desktop, mobile].forEach(el => {
|
| 685 |
+
if(!el) return;
|
| 686 |
+
el.innerHTML = escapeHTML(shown) + (still ? '<span class="ai-cursor"></span>' : '');
|
| 687 |
+
});
|
| 688 |
+
if(!still) {
|
| 689 |
+
clearInterval(interval);
|
| 690 |
+
currentAIAnswer = fullText;
|
| 691 |
+
updateAISources(sources);
|
| 692 |
+
document.getElementById('ai-copy-desktop').style.display = 'inline-flex';
|
| 693 |
+
document.getElementById('ai-copy-mobile').style.display = 'inline-flex';
|
| 694 |
+
}
|
| 695 |
+
}, 18);
|
| 696 |
+
}
|
| 697 |
+
|
| 698 |
+
async function runAI(q, results) {
|
| 699 |
+
const desktop = document.getElementById('ai-answer-body');
|
| 700 |
+
const mobile = document.getElementById('ai-answer-body-mobile');
|
| 701 |
+
[desktop, mobile].forEach(el => { if(el) { el.className = 'ai-answer-body loading'; el.innerHTML = '<div class="ai-skeleton"></div><div class="ai-skeleton"></div><div class="ai-skeleton"></div>'; } });
|
| 702 |
+
document.getElementById('ai-copy-desktop').style.display = 'none';
|
| 703 |
+
document.getElementById('ai-copy-mobile').style.display = 'none';
|
| 704 |
+
document.getElementById('ai-sources-desktop').innerHTML = '';
|
| 705 |
+
document.getElementById('ai-sources-mobile').innerHTML = '';
|
| 706 |
+
|
| 707 |
+
if (GEMINI_API_KEY.trim()) {
|
| 708 |
+
try {
|
| 709 |
+
const snippets = results.slice(0,5).map((r,i) => `[${i+1}] ${r.title||''}: ${r.content||r.url||''}`).join('\n');
|
| 710 |
+
const resp = await fetch(`${GEMINI_API}?key=${GEMINI_API_KEY}`, {
|
| 711 |
+
method:'POST', headers:{'Content-Type':'application/json'},
|
| 712 |
+
body: JSON.stringify({contents:[{parts:[{text:`أنت مساعد بحث ذكي. أجب بإجابة مختصرة بالعربية:\nالسؤال: "${q}"\nنتائج:\n${snippets}`}]}], generationConfig:{maxOutputTokens:400,temperature:0.4}})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 713 |
});
|
| 714 |
+
const data = await resp.json();
|
| 715 |
+
const text = data.candidates?.[0]?.content?.parts?.[0]?.text || '';
|
| 716 |
+
typeAIResponse(text || 'لا توجد إجابة.', results.slice(0,4));
|
| 717 |
+
return;
|
| 718 |
+
} catch(e) { console.warn('Gemini fallback'); }
|
| 719 |
+
}
|
| 720 |
+
const best = results[0];
|
| 721 |
+
const summary = best ? (best.content||'').slice(0,400).trim() : '';
|
| 722 |
+
typeAIResponse(summary ? `🔍 أفضل نتيجة:\n\n${summary}` : 'لا توجد معلومات كافية.', results.slice(0,3));
|
| 723 |
+
}
|
| 724 |
+
|
| 725 |
+
// Observer animations
|
| 726 |
+
const observer = new IntersectionObserver(entries => {
|
| 727 |
+
entries.forEach(e => { if(e.isIntersecting) e.target.classList.add('visible'); });
|
| 728 |
+
}, { threshold: 0.1 });
|
| 729 |
+
function observeNew() {
|
| 730 |
+
document.querySelectorAll('.search-result, .image-card, .video-card, .rich-graph-container').forEach(el => observer.observe(el));
|
| 731 |
+
}
|
| 732 |
+
|
| 733 |
+
// Back to top
|
| 734 |
+
const backBtn = document.getElementById('backToTop');
|
| 735 |
+
window.addEventListener('scroll', () => backBtn.classList.toggle('show', window.scrollY > 400));
|
| 736 |
+
backBtn.addEventListener('click', () => window.scrollTo({top:0, behavior:'smooth'}));
|
| 737 |
+
|
| 738 |
+
// Search
|
| 739 |
+
async function performSearch(q, tab) {
|
| 740 |
+
resultsEl.innerHTML = '';
|
| 741 |
+
metaEl.style.display = 'none';
|
| 742 |
+
loadingEl.style.display = 'flex';
|
| 743 |
+
loadingEl.classList.add('spinning');
|
| 744 |
+
const cat = {all:'general', news:'news', images:'images', videos:'videos'}[tab]||'general';
|
| 745 |
+
try {
|
| 746 |
+
const res = await fetch(`${SEARXNG_URL}?q=${encodeURIComponent(q)}&format=json&categories=${cat}&language=ar&safesearch=1`, {signal: AbortSignal.timeout(15000)});
|
| 747 |
+
const data = await res.json();
|
| 748 |
+
allResults = data.results || [];
|
| 749 |
+
loadingEl.style.display = 'none';
|
| 750 |
+
loadingEl.classList.remove('spinning');
|
| 751 |
+
if (allResults.length) {
|
| 752 |
+
metaEl.style.display = 'flex';
|
| 753 |
+
metaEl.innerHTML = `تقريباً <span>${allResults.length}</span> نتيجة`;
|
| 754 |
+
runAI(q, allResults);
|
| 755 |
+
if (tab === 'images') renderAllImages(allResults);
|
| 756 |
+
else if (tab === 'videos') renderAllVideos(allResults);
|
| 757 |
+
else renderRichWeb(q, allResults);
|
| 758 |
+
observeNew();
|
| 759 |
+
} else {
|
| 760 |
+
resultsEl.innerHTML = `<div class="empty-state"><i class="fa-solid fa-face-frown"></i><p>لا توجد نتائج</p></div>`;
|
| 761 |
+
}
|
| 762 |
+
} catch(e) {
|
| 763 |
+
loadingEl.style.display = 'none';
|
| 764 |
+
resultsEl.innerHTML = `<div class="empty-state"><i class="fa-solid fa-triangle-exclamation"></i><p>تعذّر الاتصال</p></div>`;
|
| 765 |
+
}
|
| 766 |
+
}
|
| 767 |
+
|
| 768 |
+
function renderRichWeb(q, results) {
|
| 769 |
+
resultsEl.innerHTML = '';
|
| 770 |
+
const mainCard = results.find(r => r.url.includes('wikipedia.org')) || results[0];
|
| 771 |
+
const ytResults = results.filter(r => r.url.includes('youtube.com/watch')).slice(0,4);
|
| 772 |
+
const rich = document.createElement('div');
|
| 773 |
+
rich.className = 'rich-graph-container';
|
| 774 |
+
|
| 775 |
+
const imgRow = document.createElement('div');
|
| 776 |
+
imgRow.className = 'rich-images-row';
|
| 777 |
+
rich.appendChild(imgRow);
|
| 778 |
+
fetch(`${SEARXNG_URL}?q=${encodeURIComponent(q)}&format=json&categories=images&language=ar`)
|
| 779 |
+
.then(r=>r.json()).then(d=>{
|
| 780 |
+
const valid = (d.results||[]).filter(r=>getBestImageUrl(r)).slice(0,6);
|
| 781 |
+
imgRow.innerHTML = valid.length ? valid.map(r=>{
|
| 782 |
+
const img = proxyImage(getBestImageUrl(r));
|
| 783 |
+
return `<a href="${escapeHTML(r.url||'#')}" target="_blank" class="rich-img-card"><img src="${escapeHTML(img)}" loading="lazy" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'" /><div class="img-error-overlay"><i class="fa-solid fa-image-slash"></i></div></a>`;
|
| 784 |
+
}).join('') : '';
|
| 785 |
+
}).catch(()=>{});
|
| 786 |
+
|
| 787 |
+
if (mainCard) {
|
| 788 |
+
rich.innerHTML += `<div class="search-result"><div class="favicon-wrap"><img src="${faviconURL(getDomain(mainCard.url))}" /></div><div class="result-content"><div class="result-domain">${escapeHTML(getDomain(mainCard.url))}</div><a class="result-title" href="${escapeHTML(mainCard.url)}" target="_blank">${escapeHTML(mainCard.title)}</a><p class="result-snippet">${escapeHTML(mainCard.content)}</p></div></div>`;
|
| 789 |
+
}
|
| 790 |
+
if (ytResults.length) {
|
| 791 |
+
rich.innerHTML += `<h3 class="rich-section-title">فيديوهات</h3><div class="rich-videos-row">${ytResults.map(r=>{
|
| 792 |
+
const vid = r.url.match(/v=([^&]+)/);
|
| 793 |
+
const thumb = vid ? `https://img.youtube.com/vi/${vid[1]}/mqdefault.jpg` : proxyImage(r.thumbnail);
|
| 794 |
+
return `<a href="${escapeHTML(r.url)}" target="_blank" class="rich-vid-card"><div class="rich-vid-thumb"><img src="${escapeHTML(thumb)}" /><div class="rich-vid-play"><i class="fa-solid fa-play"></i></div></div><div class="rich-vid-info"><div class="rich-vid-title">${escapeHTML(r.title)}</div><div class="rich-vid-meta">YouTube</div></div></a>`;
|
| 795 |
+
}).join('')}</div>`;
|
| 796 |
+
}
|
| 797 |
+
rich.innerHTML += `<h3 class="rich-section-title">استكشف</h3><div class="discover-bubbles">${['جميلة','أنواع','صور','فيديوهات','معلومات'].map(d => `<button class="discover-bubble" data-query="${escapeHTML(d+' '+q)}"><i class="fa-solid fa-magnifying-glass"></i> ${escapeHTML(d+' '+q)}</button>`).join('')}</div>`;
|
| 798 |
+
resultsEl.appendChild(rich);
|
| 799 |
+
|
| 800 |
+
rich.querySelectorAll('.discover-bubble').forEach(btn => {
|
| 801 |
+
btn.addEventListener('click', () => {
|
| 802 |
+
inputEl.value = btn.dataset.query;
|
| 803 |
+
document.getElementById('search-form').dispatchEvent(new Event('submit'));
|
| 804 |
+
});
|
| 805 |
+
});
|
| 806 |
+
|
| 807 |
+
const used = new Set([mainCard?.url, ...ytResults.map(r=>r.url)]);
|
| 808 |
+
results.filter(r=>!used.has(r.url)).forEach(r=>{
|
| 809 |
+
const d = getDomain(r.url);
|
| 810 |
+
const art = document.createElement('article');
|
| 811 |
+
art.className = 'search-result';
|
| 812 |
+
art.innerHTML = `<div class="favicon-wrap"><img src="${faviconURL(d)}" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'" /><i class="fa-solid fa-globe fallback-icon" style="display:none"></i></div><div class="result-content"><div class="result-domain">${escapeHTML(d)}</div><a class="result-title" href="${escapeHTML(r.url)}" target="_blank">${escapeHTML(r.title)}</a><p class="result-snippet">${escapeHTML(r.content)}</p></div>`;
|
| 813 |
+
resultsEl.appendChild(art);
|
| 814 |
+
});
|
| 815 |
+
}
|
| 816 |
+
|
| 817 |
+
function renderAllImages(results) {
|
| 818 |
+
const wrap = document.createElement('div'); wrap.className = 'images-grid';
|
| 819 |
+
results.forEach(r => {
|
| 820 |
+
const raw = getBestImageUrl(r); if(!raw) return;
|
| 821 |
+
wrap.innerHTML += `<div class="image-card"><a class="image-card-link" href="${escapeHTML(r.url)}" target="_blank"><img src="${escapeHTML(proxyImage(raw))}" loading="lazy" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'" /><div class="img-error-overlay"><i class="fa-solid fa-image-slash"></i></div></a><div class="image-info">${escapeHTML(r.title)}</div></div>`;
|
| 822 |
+
});
|
| 823 |
+
resultsEl.appendChild(wrap);
|
| 824 |
+
}
|
| 825 |
+
|
| 826 |
+
function renderAllVideos(results) {
|
| 827 |
+
const wrap = document.createElement('div'); wrap.className = 'videos-grid';
|
| 828 |
+
results.forEach(r => {
|
| 829 |
+
wrap.innerHTML += `<div class="video-card"><a href="${escapeHTML(r.url)}" target="_blank" class="video-thumb-wrap"><img src="${proxyImage(r.thumbnail)}" /><div class="play-overlay"><i class="fa-solid fa-play"></i></div></a><div class="video-details"><a class="video-title" href="${escapeHTML(r.url)}">${escapeHTML(r.title)}</a></div></div>`;
|
| 830 |
+
});
|
| 831 |
+
resultsEl.appendChild(wrap);
|
| 832 |
+
}
|
| 833 |
+
|
| 834 |
+
if (query) { inputEl.value = query; performSearch(query, currentTab); }
|
| 835 |
+
else { loadingEl.style.display = 'block'; loadingEl.classList.remove('spinning'); loadingEl.textContent = 'يرجى إدخال كلمة بحث للبدء.'; }
|
| 836 |
+
|
| 837 |
+
document.getElementById('search-form').addEventListener('submit', e => {
|
| 838 |
+
e.preventDefault(); const q = inputEl.value.trim(); if(!q) return;
|
| 839 |
+
window.history.pushState({}, '', `?q=${encodeURIComponent(q)}&tab=${currentTab}`);
|
| 840 |
+
query = q; performSearch(q, currentTab);
|
| 841 |
+
});
|
| 842 |
+
|
| 843 |
+
document.querySelectorAll('.tab-pill').forEach(btn => {
|
| 844 |
+
btn.addEventListener('click', () => {
|
| 845 |
+
const tab = btn.dataset.tab; if(tab===currentTab) return;
|
| 846 |
+
currentTab = tab; setActiveTab(tab);
|
| 847 |
+
window.history.pushState({}, '', `?q=${encodeURIComponent(query)}&tab=${tab}`);
|
| 848 |
+
if(query) performSearch(query, tab);
|
| 849 |
+
});
|
| 850 |
+
});
|
| 851 |
+
})();
|
| 852 |
+
</script>
|
| 853 |
</body>
|
| 854 |
</html>
|