Spaces:
Running
Running
File size: 18,112 Bytes
128021b 4850a92 36d8309 4850a92 36d8309 4850a92 36d8309 4850a92 36d8309 4850a92 128021b 4f17d25 128021b 4f17d25 128021b | 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 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | :root {
--bg: #F7F6F3; --surface: #FFFFFF; --surface-2: #F9F9F8;
--border: #EAEAEA; --border-strong: rgba(0,0,0,0.12);
--text-primary: #111111; --text-secondary: #787774; --text-tertiary: #AEADA9;
--accent: #111111; --accent-text: #FFFFFF; --accent-hover: #333333;
--tag-blue-bg: #E1F3FE; --tag-blue-text: #1F6C9F;
--tag-green-bg: #EDF3EC; --tag-green-text: #346538;
--warning-bg: #FFF5E8; --warning-text: #9B5D00;
--error-bg: #FDECEC; --error-text: #A23A3A;
--success-bg: #EDF8F0; --success-text: #2D6A3D;
--shadow: 0 2px 8px rgba(0,0,0,0.04);
--radius: 10px; --radius-sm: 6px;
--transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] {
--bg: #111111; --surface: #1A1A1A; --surface-2: #222222;
--border: rgba(255,255,255,0.08); --border-strong: rgba(255,255,255,0.14);
--text-primary: #EFEFEE; --text-secondary: #888784; --text-tertiary: #555452;
--accent: #EFEFEE; --accent-text: #111111; --accent-hover: #CFCFCC;
--tag-blue-bg: rgba(31,108,159,0.18); --tag-blue-text: #7CC3F0;
--tag-green-bg: rgba(52,101,56,0.18); --tag-green-text: #8DC48F;
--warning-bg: rgba(155,93,0,0.18); --warning-text: #F1C27B;
--error-bg: rgba(162,58,58,0.18); --error-text: #F4A3A3;
--success-bg: rgba(45,106,61,0.18); --success-text: #A5D9B0;
--shadow: 0 2px 12px rgba(0,0,0,0.3);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'DM Sans', -apple-system, sans-serif;
background: var(--bg); color: var(--text-primary);
min-height: 100vh;
transition: background var(--transition), color var(--transition);
-webkit-font-smoothing: antialiased;
}
nav {
position: sticky; top: 0; z-index: 100;
display: flex; align-items: center; justify-content: space-between;
padding: 0 clamp(16px, 5vw, 48px); height: 56px;
background: var(--bg); border-bottom: 1px solid var(--border);
backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
transition: background var(--transition), border-color var(--transition);
}
.nav-logo {
font-family: 'Newsreader', Georgia, serif; font-size: 18px; font-weight: 500;
letter-spacing: -0.03em; color: var(--text-primary); text-decoration: none;
display: flex; align-items: center; gap: 6px;
}
.nav-logo span { font-style: italic; color: var(--text-secondary); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.tag {
display: inline-flex; align-items: center; gap: 5px;
font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
padding: 3px 10px; border-radius: 9999px;
background: var(--tag-blue-bg); color: var(--tag-blue-text);
}
.theme-btn {
width: 34px; height: 34px; border: 1px solid var(--border-strong);
border-radius: var(--radius-sm); background: var(--surface); color: var(--text-secondary);
cursor: pointer; display: flex; align-items: center; justify-content: center;
transition: background var(--transition), transform 150ms, box-shadow var(--transition);
flex-shrink: 0;
}
.theme-btn:hover { background: var(--surface-2); box-shadow: var(--shadow); }
.theme-btn:active { transform: scale(0.95); }
.theme-btn svg { width: 16px; height: 16px; }
main {
max-width: 960px; margin: 0 auto;
padding: clamp(36px, 8vw, 72px) clamp(16px, 5vw, 32px) 80px;
}
.hero {
margin-bottom: 32px; opacity: 0; transform: translateY(12px);
animation: fadeUp 600ms cubic-bezier(0.16, 1, 0.3, 1) 100ms forwards;
}
.hero h1 {
font-family: 'Newsreader', Georgia, serif;
font-size: clamp(32px, 6vw, 54px); font-weight: 400;
letter-spacing: -0.035em; line-height: 1.1; color: var(--text-primary); margin-bottom: 12px;
}
.hero h1 em { font-style: italic; color: var(--text-secondary); }
.hero p { font-size: 15px; color: var(--text-secondary); line-height: 1.6; max-width: 560px; }
.upload-zone {
border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
background: var(--surface); padding: 56px 32px; text-align: center; cursor: pointer;
transition: border-color var(--transition), background var(--transition), box-shadow var(--transition), transform var(--transition);
position: relative; overflow: hidden; opacity: 0; transform: translateY(12px);
animation: fadeUp 600ms cubic-bezier(0.16, 1, 0.3, 1) 200ms forwards;
}
.upload-zone:hover, .upload-zone.drag-over, .upload-zone.is-ready {
border-color: var(--text-secondary); background: var(--surface-2); box-shadow: var(--shadow);
}
.upload-zone.is-error {
border-color: var(--error-text); background: var(--error-bg);
}
.upload-zone.is-processing {
opacity: 0.8; transform: scale(0.99); pointer-events: none;
}
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-icon { width: 44px; height: 44px; margin: 0 auto 16px; color: var(--text-tertiary); }
.upload-zone h3 { font-size: 16px; font-weight: 500; color: var(--text-primary); margin-bottom: 6px; }
.upload-zone p { font-size: 13px; color: var(--text-secondary); }
.upload-zone .formats { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.format-badge {
font-family: 'Geist Mono', monospace; font-size: 11px; padding: 2px 8px;
border: 1px solid var(--border); border-radius: 4px;
background: var(--surface-2); color: var(--text-secondary);
}
.panel {
display: none; gap: 20px; opacity: 0; transform: translateY(12px);
margin-top: 24px;
animation: fadeUp 500ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.panel.visible { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
@media (max-width: 620px) { .panel.visible { grid-template-columns: 1fr; } }
.img-card {
border: 1px solid var(--border); border-radius: var(--radius);
background: var(--surface); overflow: hidden; position: relative;
}
.img-card-header {
padding: 14px 18px; border-bottom: 1px solid var(--border);
display: flex; align-items: center; justify-content: space-between;
}
.img-card-header span {
font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
text-transform: uppercase; color: var(--text-secondary);
}
.img-card-body {
padding: 16px; min-height: 260px; display: flex;
align-items: center; justify-content: center;
background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 0 0 / 16px 16px;
}
.img-card-body img { max-width: 100%; max-height: 320px; object-fit: contain; border-radius: 4px; }
.controls-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn {
display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif;
font-size: 14px; font-weight: 500; cursor: pointer; border: none;
transition: background var(--transition), transform 150ms, box-shadow var(--transition);
white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); box-shadow: var(--shadow); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-reset {
margin-left: auto; background: transparent; border: none;
font-size: 13px; color: var(--text-secondary); cursor: pointer;
padding: 8px 12px; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif;
transition: color var(--transition), background var(--transition);
}
.btn-reset:hover { color: var(--text-primary); background: var(--surface); }
.icon-btn {
display: inline-flex; align-items: center; justify-content: center;
width: 32px; height: 32px; border-radius: 10px;
border: none; background: var(--surface);
color: var(--text-secondary); cursor: pointer;
transition: background var(--transition), color var(--transition), transform 150ms;
}
.icon-btn:hover {
background: var(--surface-2);
color: var(--text-primary);
transform: translateY(-1px);
}
.icon-btn svg { width: 16px; height: 16px; }
.history-header {
display: flex; align-items: flex-start; justify-content: space-between;
gap: 12px;
}
.history-actions {
display: flex; align-items: center; gap: 6px;
margin-top: -4px;
}
.progress-wrap { display: none; flex-direction: column; gap: 8px; width: 100%; }
.progress-wrap.visible { display: flex; }
.progress-bar-track { height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--text-primary); border-radius: 2px; width: 0%; transition: width 300ms ease; }
.progress-label { font-size: 12px; color: var(--text-secondary); font-family: 'Geist Mono', monospace; }
.status-badge {
display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500;
letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 10px; border-radius: 9999px;
}
.status-badge.ready { background: var(--tag-green-bg); color: var(--tag-green-text); }
.status-badge.processing { background: var(--tag-blue-bg); color: var(--tag-blue-text); }
.status-badge.error { background: var(--error-bg); color: var(--error-text); }
.dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.dot.pulse { animation: pulse 1.2s ease infinite; }
.result-empty {
display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px;
color: var(--text-tertiary);
text-align: center;
}
.result-empty span { font-size: 13px; }
.message-banner {
display: none; margin-top: 16px; padding: 12px 14px; border-radius: 10px;
font-size: 13px; line-height: 1.5; border: 1px solid transparent;
}
.message-banner.visible { display: block; }
.message-banner.info { background: var(--surface-2); border-color: var(--border); color: var(--text-secondary); }
.message-banner.warning { background: var(--warning-bg); border-color: rgba(155,93,0,0.2); color: var(--warning-text); }
.message-banner.error { background: var(--error-bg); border-color: rgba(162,58,58,0.2); color: var(--error-text); }
.message-banner.success { background: var(--success-bg); border-color: rgba(45,106,61,0.18); color: var(--success-text); }
.foot-note {
margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border);
display: flex; align-items: flex-start; gap: 12px; opacity: 0; transform: translateY(12px);
animation: fadeUp 600ms cubic-bezier(0.16, 1, 0.3, 1) 400ms forwards;
}
.foot-note-icon {
width: 28px; height: 28px; border-radius: 6px; background: var(--surface);
border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
color: var(--text-secondary); flex-shrink: 0;
}
.foot-note p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.foot-note strong { color: var(--text-primary); font-weight: 500; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
/* ===== MOBILE UI ENHANCEMENTS ===== */
/* Priority 1 — Mobile main action buttons with larger corner radius and enhanced shadow */
@media (max-width: 768px) {
.btn-primary {
border-radius: 24px;
padding: 12px 24px;
font-size: 15px;
font-weight: 600;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
transition: background var(--transition), transform 150ms, box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover {
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
transform: translateY(-2px);
}
.btn-primary:active {
transform: scale(0.96);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.btn-primary:disabled {
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
}
/* Priority 2 — Mobile shell and layout with app-like appearance */
@media (max-width: 768px) {
main {
padding: clamp(20px, 5vw, 24px) clamp(12px, 4vw, 20px) 60px;
}
.hero {
margin-bottom: 24px;
padding: 0 8px;
}
.hero h1 {
font-size: clamp(28px, 7vw, 42px);
}
.hero p {
font-size: 14px;
line-height: 1.6;
}
}
/* Priority 3 — Rounded cards and surfaces for mobile */
@media (max-width: 768px) {
.upload-zone {
border-radius: 20px;
padding: 48px 24px;
border: 2px dashed var(--border-strong);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
}
.upload-zone:hover,
.upload-zone.drag-over {
border-radius: 24px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
transform: translateY(-2px);
}
.upload-zone.is-ready {
border-radius: 20px;
background: var(--surface);
}
.img-card {
border-radius: 16px;
border: 1.5px solid var(--border);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.img-card-header {
padding: 16px 20px;
border-bottom: 1px solid var(--border);
}
.img-card-body {
padding: 20px;
min-height: 280px;
}
.queue-panel,
.history-panel {
border-radius: 16px;
padding: 16px;
border: 1.5px solid var(--border);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.message-banner {
border-radius: 16px;
padding: 14px 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
}
/* Priority 4 — Touch-friendly details */
@media (max-width: 768px) {
.controls-row {
flex-direction: column;
align-items: stretch;
gap: 14px;
}
.btn {
min-height: 48px;
padding: 12px 20px;
}
.btn-reset {
margin-left: 0;
min-height: 44px;
font-size: 14px;
}
.icon-btn {
width: 40px;
height: 40px;
border-radius: 12px;
transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.icon-btn:active {
transform: scale(0.92);
}
.tag {
display: none;
}
.upload-icon {
width: 48px;
height: 48px;
}
.upload-zone h3 {
font-size: 16px;
font-weight: 600;
margin-bottom: 8px;
}
.upload-zone p {
font-size: 14px;
margin-bottom: 16px;
}
.format-badge {
padding: 4px 10px;
font-size: 12px;
border-radius: 6px;
}
.status-badge {
padding: 4px 12px;
border-radius: 9999px;
font-size: 11px;
}
.panel.visible {
gap: 16px;
}
.progress-wrap {
gap: 10px;
margin-top: 8px;
}
.progress-bar-track {
height: 3px;
border-radius: 3px;
}
.progress-label {
font-size: 13px;
}
}
/* Priority 5 — Polished micro-interactions */
@media (max-width: 768px) {
* {
transition: background var(--transition), color var(--transition), border-color var(--transition);
}
button {
transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.upload-zone input[type="file"]:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.item {
border-radius: 12px;
transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.item:active {
transform: scale(0.96);
}
.item .remove {
border-radius: 6px;
transition: all 150ms ease;
}
.item:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
}
/* Adjust panel layout and spacing for mobile */
@media (max-width: 768px) {
nav {
padding: 0 clamp(12px, 4vw, 24px);
}
.nav-logo {
font-size: 16px;
}
.theme-btn {
width: 38px;
height: 38px;
}
.queue-history {
gap: 12px;
}
.list {
min-height: 80px;
gap: 10px;
}
.item {
width: 76px;
height: 76px;
}
}
@media (max-width: 480px) {
.upload-zone {
padding: 40px 20px;
border-radius: 20px;
}
.controls-row {
flex-direction: column;
align-items: stretch;
gap: 12px;
}
.btn-reset {
margin-left: 0;
}
.hero h1 {
font-size: clamp(24px, 6vw, 36px);
}
main {
padding: clamp(16px, 4vw, 20px) clamp(12px, 3vw, 16px) 50px;
}
.upload-zone {
padding: 40px 16px;
}
.panel.visible {
grid-template-columns: 1fr;
gap: 14px;
}
.queue-history {
grid-template-columns: 1fr;
gap: 12px;
}
}
.queue-history {
display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px;
}
.queue-panel, .history-panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface); }
.queue-panel h4, .history-panel h4 { margin: 0 0 8px 0; font-size: 13px; color: var(--text-secondary); }
.list { display: flex; gap: 8px; flex-wrap: wrap; min-height: 72px; }
.item { width: 72px; height: 72px; border-radius: 6px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; position: relative; }
.item img { width: 100%; height: 100%; object-fit: cover; }
.item .meta { position: absolute; left: 4px; bottom: 4px; right: 4px; font-size: 10px; color: var(--text-secondary); text-align: center; }
.item .remove { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.06); border-radius: 4px; padding: 2px 4px; font-size: 11px; cursor: pointer; }
@media (max-width: 620px) { .queue-history { grid-template-columns: 1fr; } }
/* History thumbnails: show pointer and download icon on hover */
.history-panel .item { cursor: default; }
.history-panel .item:hover { cursor: pointer; }
.history-panel .item::after {
content: '';
position: absolute;
top: 6px;
right: 6px;
width: 18px;
height: 18px;
background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
background-size: contain;
background-repeat: no-repeat;
opacity: 0;
transform: translateY(-4px);
transition: opacity 160ms ease, transform 160ms ease;
pointer-events: none;
}
.history-panel .item:hover::after { opacity: 1; transform: translateY(0); } |