sirenice's picture
Update custom.css
798adf9 verified
/* ========================================
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 !important;
}
/* Main container - dark blue background */
.gradio-container {
background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%) !important;
padding: 1.5rem !important;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
/* Primary button - orange gradient */
button.gr-button-primary {
background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%) !important;
border: none !important;
border-radius: 10px !important;
font-weight: 600 !important;
padding: 14px 28px !important;
font-size: 1.1rem !important;
color: white !important;
text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4) !important;
transition: all 0.3s ease !important;
}
button.gr-button-primary:hover {
transform: translateY(-2px) !important;
box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6) !important;
}
/* Input textareas - dark with teal border */
textarea {
background: rgba(15, 32, 39, 0.95) !important;
border: 2px solid rgba(34, 211, 238, 0.4) !important;
color: #e2e8f0 !important;
border-radius: 10px !important;
padding: 1rem !important;
font-size: 1rem !important;
line-height: 1.6 !important;
}
textarea:focus {
border-color: #22d3ee !important;
box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2) !important;
outline: none !important;
}
/* Labels - teal/cyan color */
label {
color: #22d3ee !important;
font-weight: 600 !important;
font-size: 1.05rem !important;
margin-bottom: 0.5rem !important;
}
/* Checkbox styling */
input[type="checkbox"] {
accent-color: #22d3ee !important;
}
.gr-checkbox {
color: #cbd5e1 !important;
}
.gr-form span {
color: #94a3b8 !important;
font-size: 0.9rem !important;
}
/* Section title - "Optimization Results" */
.gradio-container h3 {
color: #22d3ee !important;
font-size: 1.4rem !important;
font-weight: 600 !important;
margin-top: 1.5rem !important;
margin-bottom: 1rem !important;
text-align: center !important;
}
/* Result boxes base styling */
.gr-form .gr-box,
.gr-textbox {
background: rgba(15, 32, 39, 0.8) !important;
border-radius: 10px !important;
padding: 0.9rem !important;
}
/* 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)) !important;
border: 2px solid #a78bfa !important;
box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2) !important;
}
/* 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)) !important;
border: 2px solid #f472b6 !important;
box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2) !important;
}
/* 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)) !important;
border: 2px solid #fb923c !important;
box-shadow: 0 4px 12px rgba(251, 146, 60, 0.2) !important;
}
/* 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)) !important;
border: 2px solid #22d3ee !important;
box-shadow: 0 4px 12px rgba(34, 211, 238, 0.2) !important;
}
/* 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)) !important;
border: 2px solid #34d399 !important;
box-shadow: 0 4px 12px rgba(52, 211, 153, 0.2) !important;
}
/* Input values - bright white */
textarea,
input[type="text"] {
color: #f8fafc !important;
font-weight: 500 !important;
}
/* Read-only textboxes */
.gr-textbox.gr-textbox-readonly textarea {
color: #f8fafc !important;
font-weight: 500 !important;
cursor: default !important;
}
/* Bottom text - hide or style */
.gradio-container > div > div > div:last-child {
text-align: center !important;
color: #94a3b8 !important;
margin-top: 1.5rem !important;
font-size: 0.9rem !important;
}
/* Horizontal rule */
hr {
border: none !important;
border-top: 1px solid rgba(52, 211, 153, 0.2) !important;
margin: 1rem 0 !important;
}
/* Remove Gradio footer */
.footer {
display: none !important;
}
/* Compact spacing for iframe */
.gr-form {
gap: 0.75rem !important;
}
.gr-box {
margin-bottom: 0.5rem !important;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.gradio-container {
padding: 1rem !important;
}
button.gr-button-primary {
padding: 12px 24px !important;
font-size: 1rem !important;
}
label {
font-size: 1rem !important;
}
}