Spaces:
Running
Running
Update ui/components.py
Browse files- ui/components.py +179 -0
ui/components.py
CHANGED
@@ -510,6 +510,185 @@ button {
|
|
510 |
color: #1e40af;
|
511 |
}
|
512 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
513 |
"""
|
514 |
return css
|
515 |
|
|
|
510 |
color: #1e40af;
|
511 |
}
|
512 |
|
513 |
+
|
514 |
+
|
515 |
+
.scenario-generator-container {
|
516 |
+
background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
|
517 |
+
border-radius: 20px;
|
518 |
+
padding: 30px;
|
519 |
+
margin: 20px;
|
520 |
+
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
|
521 |
+
border: 2px solid #667eea;
|
522 |
+
transition: all 0.3s ease;
|
523 |
+
}
|
524 |
+
|
525 |
+
.scenario-generator-container:hover {
|
526 |
+
transform: translateY(-2px);
|
527 |
+
box-shadow: 0 25px 50px rgba(102, 126, 234, 0.15);
|
528 |
+
}
|
529 |
+
|
530 |
+
.scenario-generator-container .gr-textbox {
|
531 |
+
background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
|
532 |
+
border-radius: 12px;
|
533 |
+
border: 2px solid #e3f2fd;
|
534 |
+
padding: 15px;
|
535 |
+
font-size: 1rem;
|
536 |
+
transition: all 0.3s ease;
|
537 |
+
}
|
538 |
+
|
539 |
+
.scenario-generator-container .gr-textbox:focus {
|
540 |
+
border-color: #667eea;
|
541 |
+
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
542 |
+
transform: translateY(-1px);
|
543 |
+
}
|
544 |
+
|
545 |
+
.scenario-generator-container .gr-slider {
|
546 |
+
background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
|
547 |
+
border-radius: 12px;
|
548 |
+
border: 2px solid #e3f2fd;
|
549 |
+
padding: 15px;
|
550 |
+
margin: 10px 0;
|
551 |
+
}
|
552 |
+
|
553 |
+
.scenario-generator-container .gr-button {
|
554 |
+
border-radius: 12px;
|
555 |
+
padding: 15px 30px;
|
556 |
+
font-size: 16px;
|
557 |
+
font-weight: 600;
|
558 |
+
cursor: pointer;
|
559 |
+
transition: all 0.3s ease;
|
560 |
+
text-transform: uppercase;
|
561 |
+
letter-spacing: 1px;
|
562 |
+
}
|
563 |
+
|
564 |
+
.scenario-generator-container .gr-button[variant="primary"] {
|
565 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
566 |
+
color: white !important;
|
567 |
+
border: none !important;
|
568 |
+
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
|
569 |
+
}
|
570 |
+
|
571 |
+
.scenario-generator-container .gr-button[variant="primary"]:hover {
|
572 |
+
transform: translateY(-3px) scale(1.02) !important;
|
573 |
+
box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4) !important;
|
574 |
+
background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
|
575 |
+
}
|
576 |
+
|
577 |
+
.scenario-generator-container .gr-label {
|
578 |
+
font-weight: 600;
|
579 |
+
color: #2c3e50;
|
580 |
+
font-size: 1.1rem;
|
581 |
+
margin-bottom: 8px;
|
582 |
+
}
|
583 |
+
|
584 |
+
.scenario-generator-container .gr-markdown h3 {
|
585 |
+
color: #2c3e50;
|
586 |
+
font-size: 1.8em;
|
587 |
+
font-weight: 700;
|
588 |
+
margin-bottom: 1.5em;
|
589 |
+
text-align: center;
|
590 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
591 |
+
-webkit-background-clip: text;
|
592 |
+
-webkit-text-fill-color: transparent;
|
593 |
+
background-clip: text;
|
594 |
+
}
|
595 |
+
|
596 |
+
.scenario-generator-container .gr-markdown {
|
597 |
+
background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
|
598 |
+
border-radius: 12px;
|
599 |
+
padding: 15px;
|
600 |
+
margin: 10px 0;
|
601 |
+
border-left: 4px solid #667eea;
|
602 |
+
font-size: 1rem;
|
603 |
+
line-height: 1.6;
|
604 |
+
}
|
605 |
+
|
606 |
+
/* Enhanced quiz styling within scenario generator */
|
607 |
+
.scenario-generator-container .quiz-result-output {
|
608 |
+
background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
|
609 |
+
border-radius: 15px;
|
610 |
+
padding: 25px;
|
611 |
+
margin: 20px 0;
|
612 |
+
border-left: 5px solid #f39c12;
|
613 |
+
box-shadow: 0 10px 25px rgba(243, 156, 18, 0.15);
|
614 |
+
font-size: 1.05rem;
|
615 |
+
line-height: 1.6;
|
616 |
+
}
|
617 |
+
|
618 |
+
.scenario-generator-container .gr-radio {
|
619 |
+
background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
|
620 |
+
border-radius: 10px;
|
621 |
+
padding: 10px;
|
622 |
+
margin: 10px 0;
|
623 |
+
border: 1px solid #e3f2fd;
|
624 |
+
}
|
625 |
+
|
626 |
+
/* Dark mode adjustments for scenario generator */
|
627 |
+
@media (prefers-color-scheme: dark) {
|
628 |
+
.scenario-generator-container {
|
629 |
+
background: linear-gradient(135deg, #303030 0%, #252525 100%);
|
630 |
+
color: #e0e0e0;
|
631 |
+
border: 2px solid #555;
|
632 |
+
}
|
633 |
+
|
634 |
+
.scenario-generator-container .gr-textbox {
|
635 |
+
background: linear-gradient(135deg, #2a2a2a 0%, #353535 100%);
|
636 |
+
border: 2px solid #444;
|
637 |
+
color: #e0e0e0;
|
638 |
+
}
|
639 |
+
|
640 |
+
.scenario-generator-container .gr-textbox:focus {
|
641 |
+
border-color: #888;
|
642 |
+
box-shadow: 0 0 0 3px rgba(136, 136, 136, 0.1);
|
643 |
+
}
|
644 |
+
|
645 |
+
.scenario-generator-container .gr-slider {
|
646 |
+
background: linear-gradient(135deg, #2a2a2a 0%, #353535 100%);
|
647 |
+
border: 2px solid #444;
|
648 |
+
}
|
649 |
+
|
650 |
+
.scenario-generator-container .gr-label {
|
651 |
+
color: #e0e0e0;
|
652 |
+
}
|
653 |
+
|
654 |
+
.scenario-generator-container .gr-markdown h3 {
|
655 |
+
color: #e0e0e0;
|
656 |
+
background: linear-gradient(135deg, #888 0%, #666 100%);
|
657 |
+
-webkit-background-clip: text;
|
658 |
+
-webkit-text-fill-color: transparent;
|
659 |
+
background-clip: text;
|
660 |
+
}
|
661 |
+
|
662 |
+
.scenario-generator-container .gr-markdown {
|
663 |
+
background: linear-gradient(135deg, #2a2a2a 0%, #353535 100%);
|
664 |
+
border-left: 4px solid #666;
|
665 |
+
color: #e0e0e0;
|
666 |
+
}
|
667 |
+
|
668 |
+
.scenario-generator-container .gr-button[variant="primary"] {
|
669 |
+
background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%) !important;
|
670 |
+
color: #e0e0e0 !important;
|
671 |
+
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
|
672 |
+
}
|
673 |
+
|
674 |
+
.scenario-generator-container .gr-button[variant="primary"]:hover {
|
675 |
+
background: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 100%) !important;
|
676 |
+
box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4) !important;
|
677 |
+
}
|
678 |
+
|
679 |
+
.scenario-generator-container .quiz-result-output {
|
680 |
+
background: linear-gradient(135deg, #303030 0%, #252525 100%);
|
681 |
+
border-left: 5px solid #888;
|
682 |
+
color: #e0e0e0;
|
683 |
+
}
|
684 |
+
|
685 |
+
.scenario-generator-container .gr-radio {
|
686 |
+
background: linear-gradient(135deg, #2a2a2a 0%, #353535 100%);
|
687 |
+
border: 1px solid #444;
|
688 |
+
}
|
689 |
+
}
|
690 |
+
|
691 |
+
|
692 |
"""
|
693 |
return css
|
694 |
|