Spaces:
Running
Running
File size: 11,855 Bytes
076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec 035bfeb 076b6ec |
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 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 |
/* coder.css */
/* Define CSS Variables at the Root */
:root {
/* Colors */
--primary-color: #00796B;
--primary-gradient: linear-gradient(135deg, #00796B, #004D40);
--primary-hover-gradient: linear-gradient(135deg, #005D56, #00332E);
--secondary-color: #E53935;
--secondary-gradient: linear-gradient(135deg, #FF5252, #E53935);
--secondary-hover-gradient: linear-gradient(135deg, #E53935, #D32F2F);
--disabled-gradient: linear-gradient(135deg, #A5D6A7, #81C784);
--background-color: #ffffff;
--hover-background-color: #f9f9f9;
--text-color: #333333;
--border-color: #cccccc;
/* Existing Spacing Variables */
--padding: 20px;
--padding-small: 15px;
--gap: 15px;
--gap-large: 25px;
/* New Reduced Spacing Variables */
--padding-compact: 10px;
--gap-compact: 10px;
/* Font Sizes */
--font-size-base: 1em;
--font-size-small: 0.85em;
--font-size-large: 1.2em;
/* Border Radius */
--border-radius: 12px;
/* Box Shadows */
--box-shadow-base: 0 2px 8px rgba(0, 0, 0, 0.05);
--box-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.2);
}
/* Reset and Base Styles */
#coder * {
box-sizing: border-box;
font-family: Arial, sans-serif;
}
/* Card Styling */
.coder-card {
display: flex;
flex-direction: column; /* Stack options and main content vertically */
gap: var(--gap-large); /* Large gap between sections */
background: var(--background-color);
border-radius: var(--border-radius);
box-shadow: var(--box-shadow-base);
padding: var(--padding);
margin: 25px auto;
transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
.coder-card:hover {
transform: translateY(-5px);
box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
background: linear-gradient(135deg, #e0f7fa, #ffffff);
}
/* Flex Layout for Coder Options */
.coder-options {
width: 100%; /* Full width */
display: flex;
flex-direction: row; /* Arrange options side by side */
flex-wrap: wrap; /* Allow wrapping on smaller screens */
gap: var(--gap-compact); /* Reduced gap for compactness */
}
/* Option Sections Styling */
.option-section {
background-color: var(--background-color);
padding: var(--padding-compact); /* Reduced padding */
border-radius: var(--border-radius);
box-shadow: var(--box-shadow-base);
transition: background 0.3s, box-shadow 0.3s;
flex: 1 1 200px; /* Flexible basis */
display: flex;
flex-direction: column; /* Stack labels and inputs vertically */
gap: var(--gap-compact); /* Reduced gap */
}
.option-section:hover {
background-color: var(--hover-background-color);
}
/* Labels Styling */
.option-section label {
font-size: 0.95em; /* Slightly reduced font size */
color: var(--text-color);
font-weight: 600;
margin-bottom: 3px; /* Reduced margin */
}
/* Select Dropdown Styling */
.option-section select {
width: 100%;
padding: 8px 12px; /* Reduced padding */
border: 1px solid var(--border-color);
border-radius: 8px;
font-size: 0.95em; /* Slightly reduced font size */
background-color: var(--background-color);
transition: border-color 0.3s, box-shadow 0.3s;
}
.option-section select:focus {
border-color: var(--primary-color);
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
outline: none;
}
/* Grouped Controls Styling */
.option-control-group {
display: flex;
flex-direction: row;
gap: 10px;
align-items: center;
}
/* Range Inputs Styling */
.option-section input[type="range"] {
width: 100%;
margin: 5px 0; /* Reduced margin */
}
/* Button Styling within Option Sections */
.option-section button {
background: var(--primary-gradient);
border: none;
color: white;
padding: 8px 12px; /* Reduced padding */
font-size: 0.9em; /* Slightly reduced font size */
border-radius: 8px;
cursor: pointer;
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.option-section button:hover:not(:disabled) {
background: var(--primary-hover-gradient);
transform: translateY(-1px); /* Slightly less translate */
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.option-section button:disabled {
background: var(--disabled-gradient);
cursor: not-allowed;
box-shadow: none;
}
/* Logs Container Styling */
#coder-logs-container {
display: flex;
flex-direction: column;
gap: var(--gap-small); /* Small gap */
max-height: 150px; /* Fixed height to prevent infinite expansion */
overflow: hidden; /* Hide overflow to maintain layout */
}
/* Logs Content Styling */
#coder-logs {
flex: 1;
max-height: 200px; /* Adjust based on container height */
border: 1px solid #e0e0e0;
border-radius: var(--border-radius);
overflow-y: auto; /* Enable vertical scrolling */
padding: 10px;
background-color: #f9f9f9;
font-size: var(--font-size-small);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}
/* Clear Logs Button Styling */
#coder-clear-logs {
align-self: flex-end;
background: var(--secondary-gradient);
border: none;
color: white;
padding: 6px 12px; /* Reduced padding */
font-size: 0.85em; /* Reduced font size */
cursor: pointer;
border-radius: 8px;
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
#coder-clear-logs:hover {
background: var(--secondary-hover-gradient);
transform: scale(1.01); /* Less scaling */
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
/* Chat Box Styling */
#coder-chat-box {
height: 500px;
border: 1px solid #e0e0e0;
border-radius: var(--border-radius);
overflow-y: auto;
padding: 15px; /* Reduced padding */
background-color: var(--background-color);
position: relative;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
margin-bottom: 15px; /* Reduced margin */
}
/* Message Styling */
#coder .message-container {
margin-bottom: 15px; /* Reduced margin */
display: flex;
}
#coder .message {
padding: 10px 14px; /* Reduced padding */
border-radius: 18px; /* Slightly smaller border radius */
max-width: 75%;
position: relative;
word-wrap: break-word;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
font-size: var(--font-size-base);
line-height: 1.4;
background-color: #f1f8e9;
transition: background-color 0.3s, box-shadow 0.3s;
}
#coder .user .message {
background: #DCF8C6;
border-bottom-right-radius: 0;
}
#coder .assistant .message {
background: #e3f2fd;
border-bottom-left-radius: 0;
}
/* Chat Input Container Styling */
#coder-text-input-container {
display: flex;
gap: 8px; /* Reduced gap */
}
#coder-text-input {
flex: 1;
padding: 8px 12px; /* Reduced padding */
border: 1px solid var(--border-color);
border-radius: 8px;
font-size: var(--font-size-base);
background-color: var(--background-color);
transition: border-color 0.3s, box-shadow 0.3s;
}
#coder-text-input:focus {
border-color: var(--primary-color);
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
outline: none;
}
#coder-submit-button {
background: var(--primary-gradient);
border: none;
color: white;
padding: 8px 16px; /* Reduced padding */
font-size: 0.95em; /* Slightly reduced font size */
border-radius: 8px;
cursor: pointer;
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
#coder-submit-button:hover:not(:disabled) {
background: var(--primary-hover-gradient);
transform: translateY(-1px); /* Less translate */
box-shadow: var(--box-shadow-hover);
}
#coder-submit-button:disabled {
background: var(--disabled-gradient);
cursor: not-allowed;
box-shadow: none;
}
/* Microphone and Stop Buttons Styling */
#coder-mic-container {
display: flex;
justify-content: center;
gap: 10px; /* Reduced gap */
margin-top: 15px; /* Reduced margin */
}
#coder-start_button,
#coder-stop_button {
background: var(--primary-gradient);
border: none;
color: white;
padding: 12px; /* Reduced padding */
border-radius: 50%;
cursor: pointer;
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
width: 50px; /* Reduced size */
height: 50px; /* Reduced size */
display: flex;
justify-content: center;
align-items: center;
position: relative;
overflow: hidden;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
#coder-stop_button {
background: var(--secondary-gradient);
}
#coder-start_button::before,
#coder-stop_button::before {
content: '';
position: absolute;
width: 200%;
height: 200%;
background: rgba(255, 255, 255, 0.3);
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0);
border-radius: 50%;
transition: transform 0.5s ease-out;
}
#coder-start_button:active::before,
#coder-stop_button:active::before {
transform: translate(-50%, -50%) scale(1);
}
#coder-start_button:disabled,
#coder-stop_button:disabled {
background: var(--disabled-gradient);
cursor: not-allowed;
box-shadow: none;
}
#coder-start_button:hover:not(:disabled),
#coder-stop_button:hover:not(:disabled) {
transform: scale(1.03); /* Slightly less scaling */
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
#coder-stop_button:hover:not(:disabled) {
background: var(--secondary-hover-gradient);
}
/* Icon Styling */
#coder .mic-icon,
#coder .stop-icon {
width: 24px; /* Reduced size */
height: 24px; /* Reduced size */
transition: transform 0.3s;
fill: #ffffff;
}
/* Animation for Mic Icon */
#coder .mic-animate {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}
/* Chat Stats */
#coder-chat-stats {
font-size: var(--font-size-small);
color: #555555;
text-align: center;
margin-top: 10px;
}
/* Hidden Class */
#coder .hidden {
display: none;
}
/* Scrollbar Styling for Logs and Chat */
#coder-chat-box::-webkit-scrollbar,
#coder-logs::-webkit-scrollbar {
width: 8px;
}
#coder-chat-box::-webkit-scrollbar-track,
#coder-logs::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
}
#coder-chat-box::-webkit-scrollbar-thumb,
#coder-logs::-webkit-scrollbar-thumb {
background: #cccccc;
border-radius: 4px;
}
#coder-chat-box::-webkit-scrollbar-thumb:hover,
#coder-logs::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
/* Initialize Button Styling */
#coder-download {
background: var(--primary-gradient);
border: none;
color: white;
padding: 8px 16px; /* Reduced padding */
font-size: 0.95em; /* Slightly reduced font size */
border-radius: 8px;
cursor: pointer;
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
#coder-download:hover:not(:disabled) {
background: var(--primary-hover-gradient);
transform: translateY(-1px); /* Less translate */
box-shadow: var(--box-shadow-hover);
}
#coder-download:disabled {
background: var(--disabled-gradient);
cursor: not-allowed;
box-shadow: none;
}
/* Configuration Info Styling */
#coder-configuration {
margin-top: 15px;
font-size: var(--font-size-small);
color: #555555;
}
/* Responsive Grid Adjustments */
@media (max-width: 1200px) {
.coder-options {
flex-direction: row; /* Ensure row direction on larger screens */
}
}
@media (max-width: 800px) {
.coder-card {
flex-direction: column;
padding: 20px;
margin: 20px auto;
}
.coder-options {
gap: var(--gap-compact);
}
.chat-window {
flex-direction: column; /* Stack chat sections vertically on small screens */
gap: var(--gap-compact);
}
/* Adjust Logs Container Height for Smaller Screens */
#coder-logs-container {
max-height: 200px;
}
#coder-logs {
max-height: 150px;
}
/* Adjust Image Section for Smaller Screens */
/* If applicable */
}
/* Additional Styles for Option Control Group */
.option-control-group {
display: flex;
flex-direction: row;
gap: 10px;
align-items: center;
}
|