*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--bg: #0a0a0f;--surface: #12121a;--surface-2: #1a1a2e;--border: #2a2a3e;--border-focus: #6366f1;--text: #e4e4ef;--text-muted: #8888a0;--primary: #6366f1;--primary-hover: #818cf8;--accent: #22d3ee;--error: #f87171;--success: #4ade80;--font-sans: "Inter", system-ui, -apple-system, sans-serif;--font-mono: "JetBrains Mono", "Fira Code", monospace}body{font-family:var(--font-sans);background:var(--bg);color:var(--text);line-height:1.6;min-height:100vh;-webkit-font-smoothing:antialiased}.app{max-width:900px;margin:0 auto;padding:2rem 1.5rem}.header{text-align:center;margin-bottom:2.5rem}.header h1{font-size:2.25rem;font-weight:700;background:linear-gradient(135deg,var(--primary),var(--accent));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;margin-bottom:.5rem}.header p{color:var(--text-muted);font-size:1.05rem}.badges{display:flex;gap:.5rem;justify-content:center;margin-top:1rem;flex-wrap:wrap}.badge{display:inline-flex;align-items:center;gap:.35rem;padding:.25rem .75rem;border-radius:999px;font-size:.75rem;font-weight:500;border:1px solid var(--border);background:var(--surface);color:var(--text-muted)}.badge--ok{border-color:#166534;color:var(--success)}.badge--warn{border-color:#854d0e;color:#fbbf24}.badge--err{border-color:#991b1b;color:var(--error)}.tabs{display:flex;gap:.25rem;margin-bottom:1.5rem;background:var(--surface);padding:.25rem;border-radius:.75rem;border:1px solid var(--border)}.tab{flex:1;padding:.6rem 1rem;border:none;background:transparent;color:var(--text-muted);font-family:var(--font-sans);font-size:.875rem;font-weight:500;border-radius:.5rem;cursor:pointer;transition:all .15s}.tab:hover{color:var(--text)}.tab--active{background:var(--primary);color:#fff}.card{background:var(--surface);border:1px solid var(--border);border-radius:1rem;padding:1.5rem;margin-bottom:1.5rem}.card h2{font-size:1.1rem;font-weight:600;margin-bottom:1rem}.config-row{display:flex;gap:.75rem;margin-bottom:1rem;flex-wrap:wrap}.config-row label{display:flex;flex-direction:column;gap:.3rem;flex:1;min-width:150px;font-size:.8rem;color:var(--text-muted);font-weight:500}.config-row input,.config-row select{padding:.5rem .75rem;background:var(--surface-2);border:1px solid var(--border);border-radius:.5rem;color:var(--text);font-family:var(--font-mono);font-size:.85rem;outline:none;transition:border-color .15s}.config-row input:focus,.config-row select:focus{border-color:var(--border-focus)}.chat-messages{min-height:240px;max-height:420px;overflow-y:auto;padding:1rem;background:var(--bg);border-radius:.75rem;border:1px solid var(--border);margin-bottom:1rem;display:flex;flex-direction:column;gap:.75rem}.chat-messages:empty:before{content:"Send a message to start chatting…";color:var(--text-muted);font-size:.9rem;margin:auto}.msg{max-width:85%;padding:.7rem 1rem;border-radius:1rem;font-size:.9rem;line-height:1.5;white-space:pre-wrap;word-break:break-word}.msg--user{align-self:flex-end;background:var(--primary);color:#fff;border-bottom-right-radius:.25rem}.msg--assistant{align-self:flex-start;background:var(--surface-2);color:var(--text);border-bottom-left-radius:.25rem}.chat-input-row{display:flex;gap:.5rem}.chat-input{flex:1;padding:.65rem 1rem;background:var(--surface-2);border:1px solid var(--border);border-radius:.75rem;color:var(--text);font-family:var(--font-sans);font-size:.9rem;outline:none;transition:border-color .15s}.chat-input:focus{border-color:var(--border-focus)}.btn{padding:.65rem 1.25rem;border:none;border-radius:.75rem;font-family:var(--font-sans);font-size:.875rem;font-weight:600;cursor:pointer;transition:all .15s}.btn--primary{background:var(--primary);color:#fff}.btn--primary:hover:not(:disabled){background:var(--primary-hover)}.btn--danger{background:transparent;border:1px solid var(--error);color:var(--error)}.btn--danger:hover:not(:disabled){background:#f871711a}.btn--ghost{background:transparent;border:1px solid var(--border);color:var(--text-muted)}.btn--ghost:hover:not(:disabled){border-color:var(--text-muted);color:var(--text)}.btn:disabled{opacity:.4;cursor:not-allowed}.completion-output{min-height:120px;max-height:300px;overflow-y:auto;padding:1rem;background:var(--bg);border-radius:.75rem;border:1px solid var(--border);margin-bottom:1rem;font-family:var(--font-mono);font-size:.85rem;white-space:pre-wrap;color:var(--text);line-height:1.6}.completion-output:empty:before{content:"Generated text will appear here…";color:var(--text-muted);font-family:var(--font-sans)}.btn-row{display:flex;gap:.5rem;flex-wrap:wrap}.model-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.75rem}.model-card{padding:.85rem 1rem;background:var(--bg);border:1px solid var(--border);border-radius:.75rem;font-size:.85rem}.model-card strong{display:block;font-weight:600;margin-bottom:.2rem;color:var(--accent)}.model-card span{color:var(--text-muted);font-size:.75rem}.code-block{background:var(--bg);border:1px solid var(--border);border-radius:.75rem;padding:1rem;font-family:var(--font-mono);font-size:.8rem;overflow-x:auto;white-space:pre;color:var(--text-muted);line-height:1.6}.error-banner{padding:.75rem 1rem;background:#f871711a;border:1px solid rgba(248,113,113,.3);border-radius:.75rem;color:var(--error);font-size:.85rem;margin-bottom:1rem}.cors-help{margin-top:.75rem;padding:1rem;background:var(--bg);border:1px solid #854d0e;border-radius:.75rem;font-size:.85rem;line-height:1.6;color:var(--text-muted)}.cors-help code{font-family:var(--font-mono);background:var(--surface-2);padding:.1rem .4rem;border-radius:.25rem;font-size:.8rem;color:var(--accent)}.cors-help .code-block{margin-top:.5rem}.footer{text-align:center;padding:2rem 0 1rem;color:var(--text-muted);font-size:.8rem}.footer a{color:var(--primary);text-decoration:none}.footer a:hover{text-decoration:underline}.spinner{display:inline-block;width:14px;height:14px;border:2px solid transparent;border-top-color:currentColor;border-radius:50%;animation:spin .6s linear infinite;vertical-align:middle;margin-right:.35rem}@keyframes spin{to{transform:rotate(360deg)}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}@media(max-width:600px){.app{padding:1rem}.header h1{font-size:1.75rem}.config-row{flex-direction:column}.msg{max-width:95%}}
