| body { | |
| max-width: 800px; | |
| margin: 0 auto; | |
| padding: 20px; | |
| font-family: system-ui, -apple-system, sans-serif; | |
| background: #f5f5f5; | |
| } | |
| h1 { | |
| text-align: center; | |
| color: #2d3748; | |
| margin-bottom: 2rem; | |
| } | |
| #container { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| padding: 2rem; | |
| border: 2px dashed #cbd5e0; | |
| border-radius: 1rem; | |
| background: white; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); | |
| transition: border-color 0.3s ease; | |
| } | |
| #thumb { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| padding: 2rem; | |
| } | |
| #container:hover { | |
| border-color: #4a5568; | |
| } | |
| #container svg { | |
| margin-bottom: 1rem; | |
| opacity: 0.7; | |
| } | |
| #container div { | |
| margin-top: 1.5rem; | |
| width: 100%; | |
| max-width: 400px; | |
| } | |
| input[type="text"] { | |
| width: 100%; | |
| padding: 0.75rem 1rem; | |
| border: 1px solid #e2e8f0; | |
| border-radius: 0.5rem; | |
| font-size: 1rem; | |
| transition: border-color 0.3s ease; | |
| background: #f8fafc; | |
| } | |
| input[type="text"]:focus { | |
| outline: none; | |
| border-color: #4a5568; | |
| box-shadow: 0 0 0 3px rgba(74, 85, 104, 0.1); | |
| } | |
| #example { | |
| display: inline-block; | |
| margin-top: 0.5rem; | |
| color: #4299e1; | |
| cursor: pointer; | |
| font-size: 0.875rem; | |
| transition: color 0.3s ease; | |
| } | |
| #example:hover { | |
| color: #2b6cb0; | |
| text-decoration: underline; | |
| } | |
| #status { | |
| display: block; | |
| margin: 1.5rem auto; | |
| padding: 0.75rem; | |
| text-align: center; | |
| border-radius: 0.5rem; | |
| font-weight: 500; | |
| background: linear-gradient(90deg, #4c1d95 0%, #6d28d9 100%); | |
| color: white; | |
| animation: pulse 2s infinite; | |
| } | |
| @keyframes pulse { | |
| 0% { | |
| opacity: 0.8; | |
| } | |
| 50% { | |
| opacity: 1; | |
| } | |
| 100% { | |
| opacity: 0.8; | |
| } | |
| } | |
| #status.ready { | |
| background: linear-gradient(90deg, #065f46 0%, #059669 100%); | |
| animation: none; | |
| } | |
| #upload { | |
| display: none; | |
| } | |
| @media (max-width: 640px) { | |
| body { | |
| padding: 1rem; | |
| } | |
| #container { | |
| padding: 1.5rem; | |
| } | |
| } | |
| #llm-output { | |
| font-family: "IBM Plex Mono", monospace; | |
| background: #282c34; | |
| color: #abb2bf; | |
| border-radius: 8px; | |
| padding: 1.5rem; | |
| margin: 1.5rem auto; | |
| min-height: 100px; | |
| max-height: 400px; | |
| overflow-y: auto; | |
| line-height: 1.6; | |
| white-space: pre-wrap; | |
| word-break: break-word; | |
| } | |
| #llm-output:empty::after { | |
| content: "Waiting for response..."; | |
| color: #5c6370; | |
| font-style: italic; | |
| } | |
| #container.disabled { | |
| opacity: 0.6; | |
| cursor: not-allowed; | |
| } | |
| #container.disabled #thumb svg { | |
| opacity: 0.4; | |
| } | |
| #dtype-select { | |
| width: 100%; | |
| margin: 10px 0 0; | |
| padding: 8px 12px; | |
| font-size: 14px; | |
| border: 1px solid #ddd; | |
| border-radius: 6px; | |
| background-color: #fff; | |
| cursor: pointer; | |
| margin-bottom: 10px; | |
| outline: none; | |
| transition: border-color 0.2s, box-shadow 0.2s; | |
| } | |
| #dtype-select:hover { | |
| border-color: #bbb; | |
| } | |
| #dtype-select:focus { | |
| border-color: #2196F3; | |
| box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1); | |
| } | |
| #dtype-select:disabled { | |
| background-color: #f5f5f5; | |
| cursor: not-allowed; | |
| opacity: 0.7; | |
| } | |
| #load-model { | |
| width: 100%; | |
| padding: 12px 20px; | |
| font-size: 14px; | |
| font-weight: 600; | |
| background-color: #2196F3; | |
| color: white; | |
| border: none; | |
| border-radius: 6px; | |
| cursor: pointer; | |
| transition: all 0.2s ease; | |
| box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2); | |
| text-transform: uppercase; | |
| letter-spacing: 0.5px; | |
| margin: 0 0 15px; | |
| position: relative; | |
| } | |
| #load-model:hover:not(:disabled) { | |
| background-color: #1976D2; | |
| box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3); | |
| transform: translateY(-1px); | |
| } | |
| #load-model:active:not(:disabled) { | |
| transform: translateY(1px); | |
| box-shadow: 0 1px 2px rgba(33, 150, 243, 0.2); | |
| } | |
| #load-model.loading { | |
| color: transparent; | |
| cursor: wait; | |
| background-color: #90CAF9; | |
| } | |
| #load-model.loading::after { | |
| content: ""; | |
| position: absolute; | |
| width: 16px; | |
| height: 16px; | |
| top: 50%; | |
| left: 50%; | |
| margin-left: -8px; | |
| margin-top: -8px; | |
| border: 2px solid rgba(255, 255, 255, 0.3); | |
| border-radius: 50%; | |
| border-top-color: white; | |
| animation: spin 1s linear infinite; | |
| } | |
| #load-model.ready { | |
| background-color: #4CAF50; | |
| cursor: default; | |
| } | |
| @keyframes spin { | |
| to { transform: rotate(360deg); } | |
| } | |