Spaces:
Sleeping
Sleeping
File size: 5,567 Bytes
bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b 798adf9 bd4fa7b | 1 2 3 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 | /* ========================================
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;
}
} |