Spaces:
Sleeping
Sleeping
| /* ======================================== | |
| GREEN PROMPTS OPTIMIZER - CUSTOM CSS | |
| Optimized for iframe embedding | |
| ======================================== */ | |
| /* Hide title and subtitle when embedded in iframe */ | |
| .gradio-container > div > div > div:nth-child(1), | |
| .gradio-container > div > div > div:nth-child(2) { | |
| display: none ; | |
| } | |
| /* Main container - dark blue background */ | |
| .gradio-container { | |
| background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%) ; | |
| padding: 1.5rem ; | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif ; | |
| } | |
| /* Primary button - orange gradient */ | |
| button.gr-button-primary { | |
| background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%) ; | |
| border: none ; | |
| border-radius: 10px ; | |
| font-weight: 600 ; | |
| padding: 14px 28px ; | |
| font-size: 1.1rem ; | |
| color: white ; | |
| text-shadow: 0 1px 2px rgba(0,0,0,0.2) ; | |
| box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4) ; | |
| transition: all 0.3s ease ; | |
| } | |
| button.gr-button-primary:hover { | |
| transform: translateY(-2px) ; | |
| box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6) ; | |
| } | |
| /* Input textareas - dark with teal border */ | |
| textarea { | |
| background: rgba(15, 32, 39, 0.95) ; | |
| border: 2px solid rgba(34, 211, 238, 0.4) ; | |
| color: #e2e8f0 ; | |
| border-radius: 10px ; | |
| padding: 1rem ; | |
| font-size: 1rem ; | |
| line-height: 1.6 ; | |
| } | |
| textarea:focus { | |
| border-color: #22d3ee ; | |
| box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2) ; | |
| outline: none ; | |
| } | |
| /* Labels - teal/cyan color */ | |
| label { | |
| color: #22d3ee ; | |
| font-weight: 600 ; | |
| font-size: 1.05rem ; | |
| margin-bottom: 0.5rem ; | |
| } | |
| /* Checkbox styling */ | |
| input[type="checkbox"] { | |
| accent-color: #22d3ee ; | |
| } | |
| .gr-checkbox { | |
| color: #cbd5e1 ; | |
| } | |
| .gr-form span { | |
| color: #94a3b8 ; | |
| font-size: 0.9rem ; | |
| } | |
| /* Section title - "Optimization Results" */ | |
| .gradio-container h3 { | |
| color: #22d3ee ; | |
| font-size: 1.4rem ; | |
| font-weight: 600 ; | |
| margin-top: 1.5rem ; | |
| margin-bottom: 1rem ; | |
| text-align: center ; | |
| } | |
| /* Result boxes base styling */ | |
| .gr-form .gr-box, | |
| .gr-textbox { | |
| background: rgba(15, 32, 39, 0.8) ; | |
| border-radius: 10px ; | |
| padding: 0.9rem ; | |
| } | |
| /* COLORFUL RESULT BOXES */ | |
| /* Token Count - Purple gradient */ | |
| .gr-form > div > div:nth-child(1) > div:nth-child(1) .gr-box, | |
| div:has(label:contains("Token Count")) .gr-box { | |
| background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(124, 58, 237, 0.25)) ; | |
| border: 2px solid #a78bfa ; | |
| box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2) ; | |
| } | |
| /* Tokens Saved - Pink/Magenta gradient */ | |
| .gr-form > div > div:nth-child(1) > div:nth-child(2) .gr-box, | |
| div:has(label:contains("Tokens Saved")) .gr-box { | |
| background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(219, 39, 119, 0.25)) ; | |
| border: 2px solid #f472b6 ; | |
| box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2) ; | |
| } | |
| /* Reduction % - Orange gradient */ | |
| .gr-form > div > div:nth-child(2) > div:nth-child(1) .gr-box, | |
| div:has(label:contains("Reduction")) .gr-box { | |
| background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(249, 115, 22, 0.25)) ; | |
| border: 2px solid #fb923c ; | |
| box-shadow: 0 4px 12px rgba(251, 146, 60, 0.2) ; | |
| } | |
| /* Energy Saved - Cyan/Teal gradient */ | |
| .gr-form > div > div:nth-child(2) > div:nth-child(2) .gr-box, | |
| div:has(label:contains("Energy")) .gr-box { | |
| background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(6, 182, 212, 0.25)) ; | |
| border: 2px solid #22d3ee ; | |
| box-shadow: 0 4px 12px rgba(34, 211, 238, 0.2) ; | |
| } | |
| /* CO2 Reduced - Green gradient */ | |
| .gr-form > div:last-child .gr-box, | |
| div:has(label:contains("CO")) .gr-box { | |
| background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(16, 185, 129, 0.25)) ; | |
| border: 2px solid #34d399 ; | |
| box-shadow: 0 4px 12px rgba(52, 211, 153, 0.2) ; | |
| } | |
| /* Input values - bright white */ | |
| textarea, | |
| input[type="text"] { | |
| color: #f8fafc ; | |
| font-weight: 500 ; | |
| } | |
| /* Read-only textboxes */ | |
| .gr-textbox.gr-textbox-readonly textarea { | |
| color: #f8fafc ; | |
| font-weight: 500 ; | |
| cursor: default ; | |
| } | |
| /* Bottom text - hide or style */ | |
| .gradio-container > div > div > div:last-child { | |
| text-align: center ; | |
| color: #94a3b8 ; | |
| margin-top: 1.5rem ; | |
| font-size: 0.9rem ; | |
| } | |
| /* Horizontal rule */ | |
| hr { | |
| border: none ; | |
| border-top: 1px solid rgba(52, 211, 153, 0.2) ; | |
| margin: 1rem 0 ; | |
| } | |
| /* Remove Gradio footer */ | |
| .footer { | |
| display: none ; | |
| } | |
| /* Compact spacing for iframe */ | |
| .gr-form { | |
| gap: 0.75rem ; | |
| } | |
| .gr-box { | |
| margin-bottom: 0.5rem ; | |
| } | |
| /* Responsive adjustments */ | |
| @media (max-width: 768px) { | |
| .gradio-container { | |
| padding: 1rem ; | |
| } | |
| button.gr-button-primary { | |
| padding: 12px 24px ; | |
| font-size: 1rem ; | |
| } | |
| label { | |
| font-size: 1rem ; | |
| } | |
| } |