*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--color-bg: #f9f9f9;--color-surface: #ffffff;--color-border: #e8e8e8;--color-text: #1a1a1a;--color-text-muted: #888;--color-user-bg: #1a1a1a;--color-user-text: #ffffff;--color-ai-bg: #ffffff;--color-ai-text: #1a1a1a;--color-accent: #4a6cf7;--font: "Inter", system-ui, sans-serif;--radius: 18px;--max-width: 680px}body{font-family:var(--font);background:var(--color-bg);color:var(--color-text);line-height:1.6;-webkit-font-smoothing:antialiased}.app{display:flex;flex-direction:column;height:100dvh;max-width:var(--max-width);margin:0 auto}.header{padding:16px 20px;border-bottom:1px solid var(--color-border);background:var(--color-surface);text-align:center}.header h1{font-size:1rem;font-weight:500;color:var(--color-text);letter-spacing:.02em}.chat-container{display:flex;flex-direction:column;flex:1;overflow:hidden}.messages{flex:1;overflow-y:auto;padding:24px 16px;display:flex;flex-direction:column;gap:12px}.message{display:flex;max-width:80%}.message.user{align-self:flex-end}.message.assistant{align-self:flex-start}.message-bubble{padding:12px 16px;border-radius:var(--radius);font-size:.95rem;line-height:1.55;word-break:break-word}.message-bubble p{margin:0 0 .5em}.message-bubble p:last-child{margin-bottom:0}.message-bubble strong{font-weight:600}.message-bubble em{font-style:italic}.message-bubble ul,.message-bubble ol{padding-left:1.4em;margin:.4em 0}.message-bubble li{margin:.15em 0}.message.user .message-bubble{background:var(--color-user-bg);color:var(--color-user-text);border-bottom-right-radius:4px}.message.assistant .message-bubble{background:var(--color-ai-bg);color:var(--color-ai-text);border:1px solid var(--color-border);border-bottom-left-radius:4px}.message.loading .message-bubble{color:var(--color-text-muted);font-style:italic}.input-bar{padding:12px 16px;border-top:1px solid var(--color-border);background:var(--color-surface);display:flex;gap:8px;align-items:flex-end}.input-bar textarea{flex:1;resize:none;border:1px solid var(--color-border);border-radius:12px;padding:10px 14px;font-family:var(--font);font-size:.95rem;line-height:1.5;max-height:120px;outline:none;background:var(--color-bg);color:var(--color-text);transition:border-color .15s}.input-bar textarea:focus{border-color:var(--color-accent)}.input-bar button{flex-shrink:0;width:40px;height:40px;border:none;border-radius:50%;background:var(--color-user-bg);color:#fff;font-size:1.1rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:opacity .15s}.input-bar button:disabled{opacity:.4;cursor:not-allowed}.header{position:relative}.header-logout{position:absolute;right:16px;top:50%;transform:translateY(-50%);background:none;border:none;font-size:1.1rem;cursor:pointer;color:var(--color-text-muted);padding:4px 8px;border-radius:8px;transition:color .15s,background .15s}.header-logout:hover{color:var(--color-text);background:var(--color-border)}.auth-page{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:24px 16px;background:var(--color-bg)}.auth-card{width:100%;max-width:380px;background:var(--color-surface);border:1px solid var(--color-border);border-radius:20px;padding:40px 32px}.auth-card--loading{text-align:center;color:var(--color-text-muted)}.auth-card h1{font-size:1.3rem;font-weight:600;margin-bottom:6px}.auth-subtitle{color:var(--color-text-muted);font-size:.9rem;margin-bottom:24px}.auth-form{display:flex;flex-direction:column;gap:6px;margin-top:24px}.auth-form label{font-size:.82rem;font-weight:500;color:var(--color-text-muted);margin-top:10px}.auth-form label:first-child{margin-top:0}.auth-form input{padding:10px 14px;border:1px solid var(--color-border);border-radius:10px;font-family:var(--font);font-size:.95rem;background:var(--color-bg);color:var(--color-text);outline:none;transition:border-color .15s}.auth-form input:focus{border-color:var(--color-accent)}.auth-form button{margin-top:18px;padding:12px;border:none;border-radius:10px;background:var(--color-user-bg);color:#fff;font-family:var(--font);font-size:.95rem;font-weight:500;cursor:pointer;transition:opacity .15s}.auth-form button:disabled{opacity:.5;cursor:not-allowed}.auth-error{font-size:.85rem;color:#d32f2f;margin-top:8px}
