*{margin:0;padding:0;box-sizing:border-box}:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.5;font-weight:400;color-scheme:light;color:#1e293b;background-color:#fff;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{margin:0;min-width:320px;min-height:100vh}#root{min-height:100vh}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#f1f5f9}::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#94a3b8}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#667eea,#764ba2);overflow:hidden}.login-container{position:relative;width:100%;max-width:500px;padding:20px}.login-content{position:relative;z-index:10;background:#fffffff2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:24px;padding:60px 40px;box-shadow:0 20px 60px #0000004d;text-align:center}.brand-name{font-size:48px;font-weight:800;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;margin-bottom:16px}.tagline{font-size:18px;color:#64748b;margin-bottom:40px}.features{display:flex;flex-direction:column;gap:16px;margin-bottom:40px}.feature{display:flex;align-items:center;gap:12px;padding:16px;background:#f8fafc;border-radius:12px;font-size:16px;color:#334155}.feature-icon{font-size:24px}.login-button{width:100%;padding:16px 32px;font-size:18px;font-weight:600;color:#fff;background:linear-gradient(135deg,#667eea,#764ba2);border:none;border-radius:12px;cursor:pointer;transition:transform .2s,box-shadow .2s}.login-button:hover{transform:translateY(-2px);box-shadow:0 10px 30px #667eea66}.login-button:active{transform:translateY(0)}.auth-disclaimer{margin-top:24px;font-size:14px;color:#94a3b8}.login-bg{position:absolute;inset:0;z-index:1;overflow:hidden;pointer-events:none}.gradient-orb{position:absolute;border-radius:50%;filter:blur(80px);opacity:.6;animation:float 8s ease-in-out infinite}.orb-1{width:300px;height:300px;background:linear-gradient(135deg,#667eea,#764ba2);top:-100px;left:-100px;animation-delay:0s}.orb-2{width:250px;height:250px;background:linear-gradient(135deg,#f093fb,#f5576c);bottom:-100px;right:-100px;animation-delay:2s}.orb-3{width:200px;height:200px;background:linear-gradient(135deg,#4facfe,#00f2fe);top:50%;right:-100px;animation-delay:4s}@keyframes float{0%,to{transform:translate(0) scale(1)}50%{transform:translate(30px,30px) scale(1.1)}}@media(max-width:600px){.login-content{padding:40px 24px}.brand-name{font-size:36px}.tagline{font-size:16px}}.chat-page{display:flex;flex-direction:column;height:100vh;background:#f8fafc}.chat-header{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;background:#fff;border-bottom:1px solid #e2e8f0;box-shadow:0 2px 4px #0000000d}.header-left{display:flex;align-items:center;gap:16px}.app-title{font-size:24px;font-weight:800;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;margin:0}.persona-btn{padding:8px 16px;background:#f1f5f9;border:none;border-radius:8px;font-size:14px;cursor:pointer;transition:background .2s}.persona-btn:hover{background:#e2e8f0}.header-right{display:flex;align-items:center;gap:12px}.user-info{display:flex;align-items:center;gap:10px;padding:6px 12px;background:#f8fafc;border-radius:20px}.user-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover}.user-name{font-size:14px;font-weight:500;color:#334155}.icon-btn{padding:8px 12px;background:transparent;border:none;border-radius:8px;font-size:18px;cursor:pointer;transition:background .2s}.icon-btn:hover{background:#f1f5f9}.logout-btn{padding:8px 16px;background:#ef4444;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:background .2s}.logout-btn:hover{background:#dc2626}.persona-editor{padding:20px 24px;background:#fff;border-bottom:1px solid #e2e8f0;animation:slideDown .3s ease}@keyframes slideDown{0%{max-height:0;opacity:0}to{max-height:300px;opacity:1}}.persona-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.persona-header h3{margin:0;font-size:16px;color:#334155}.persona-header button{background:none;border:none;font-size:20px;cursor:pointer;color:#64748b}.persona-editor textarea{width:100%;padding:12px;border:1px solid #e2e8f0;border-radius:8px;font-size:14px;font-family:inherit;resize:vertical;margin-bottom:12px}.save-persona-btn{padding:10px 20px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:transform .2s}.save-persona-btn:hover{transform:translateY(-1px)}.messages-container{flex:1;overflow-y:auto;padding:24px;display:flex;flex-direction:column;gap:16px}.welcome-message{text-align:center;padding:60px 20px;color:#64748b}.welcome-message h2{font-size:28px;color:#334155;margin-bottom:8px}.message{display:flex;gap:12px;animation:fadeIn .3s ease}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-avatar{flex-shrink:0}.message-avatar img{width:40px;height:40px;border-radius:50%;object-fit:cover}.ai-avatar,.error-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;background:linear-gradient(135deg,#667eea,#764ba2)}.error-avatar{background:#ef4444}.message-content{flex:1;max-width:70%}.user-message .message-content{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:12px 16px;border-radius:16px 16px 16px 4px}.assistant-message .message-content{background:#fff;color:#1e293b;padding:12px 16px;border-radius:16px 16px 16px 4px;border:1px solid #e2e8f0}.error-message .message-content{background:#fef2f2;color:#dc2626;padding:12px 16px;border-radius:16px;border:1px solid #fecaca}.message-header{font-size:12px;font-weight:600;margin-bottom:4px;opacity:.8}.message-text{font-size:15px;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}.loading-indicator{display:flex;gap:6px;padding:12px 0}.loading-indicator .dot{width:8px;height:8px;border-radius:50%;background:#667eea;animation:bounce 1.4s infinite ease-in-out}.loading-indicator .dot:nth-child(1){animation-delay:-.32s}.loading-indicator .dot:nth-child(2){animation-delay:-.16s}@keyframes bounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.message-input-container{padding:20px 24px;background:#fff;border-top:1px solid #e2e8f0;display:flex;gap:12px;align-items:flex-end}.message-input-container textarea{flex:1;padding:12px 16px;border:1px solid #e2e8f0;border-radius:12px;font-size:15px;font-family:inherit;resize:none;max-height:120px;min-height:44px}.message-input-container textarea:focus{outline:none;border-color:#667eea}.message-input-container button{padding:12px 16px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:12px;cursor:pointer;transition:transform .2s}.message-input-container button:hover:not(:disabled){transform:translateY(-2px)}.message-input-container button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:768px){.chat-header{padding:12px 16px}.app-title{font-size:20px}.user-name{display:none}.messages-container{padding:16px}.message-content{max-width:85%}.message-input-container{padding:16px}}.loading-screen{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.loading-spinner{width:50px;height:50px;border:4px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.loading-screen p{margin-top:20px;font-size:18px}.error-screen{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;padding:20px;background:#fef2f2;color:#dc2626;text-align:center}.error-screen h1{font-size:32px;margin-bottom:16px}.error-screen p{font-size:18px;margin-bottom:24px;max-width:500px}.error-screen button{padding:12px 24px;background:#dc2626;color:#fff;border:none;border-radius:8px;font-size:16px;cursor:pointer;transition:background .2s}.error-screen button:hover{background:#b91c1c}
