.chat-list{width:350px;background:#0e1621;border-right:1px solid #1c2733;display:flex;flex-direction:column;height:100vh}.chat-list-header{padding:20px;border-bottom:1px solid #1c2733;display:flex;justify-content:space-between;align-items:center}.chat-list-header h2{font-size:20px;font-weight:600}.manage-profiles-button{background:none;border:none;font-size:20px;cursor:pointer;padding:8px;border-radius:6px;transition:background .15s}.manage-profiles-button:hover{background:#1c2733}.chat-list-items{overflow-y:auto;flex:1;min-height:0;-webkit-overflow-scrolling:touch}.chat-item{padding:12px 16px;display:flex;align-items:center;gap:12px;cursor:pointer;border-bottom:1px solid #1c2733;transition:background .15s}.chat-item:hover{background:#151e27}.chat-item.active{background:#2b5278}.chat-avatar{width:50px;height:50px;border-radius:50%;background:#2b5278;display:flex;align-items:center;justify-content:center;font-size:24px;flex-shrink:0;overflow:hidden}.chat-avatar img{width:100%;height:100%;object-fit:cover}.chat-info{flex:1;min-width:0}.chat-name{font-weight:500;font-size:15px;color:#fff}@media (max-width: 768px){.chat-list{width:100%;max-width:100%;height:auto;flex:1;min-height:0}}.adventure-area{padding:8px 12px 4px}.adventure-button{width:100%;display:flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid rgba(255,255,255,.15);border-radius:12px;cursor:pointer;background:linear-gradient(135deg,#5288c1,#9b59b6);color:#fff;font-size:15px;font-weight:600;text-align:left}.adventure-button:disabled{cursor:default;opacity:.85}.adventure-label{display:flex;flex-direction:column}.adventure-label small{font-weight:400;opacity:.85;font-size:12px;margin-top:2px}.adventure-spinner{width:16px;height:16px;flex:none;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:adventure-spin .9s linear infinite}@keyframes adventure-spin{to{transform:rotate(360deg)}}.adventure-error{display:flex;align-items:center;gap:8px;margin-top:6px;padding:6px 10px;border-radius:8px;background:#d9534f33;color:#ff8a80;font-size:13px}.adventure-error span{flex:1}.adventure-error button{background:none;border:none;color:inherit;cursor:pointer;font-size:14px}.chat-window{flex:1;display:flex;flex-direction:column;background:#0e1621;min-height:0;position:relative}.chat-window.empty{align-items:center;justify-content:center}.empty-state{color:#6c7883;font-size:16px}.chat-header{padding:16px 20px;border-bottom:1px solid #1c2733;display:flex;align-items:center;gap:12px;background:#151e27}.back-button{background:none;border:none;color:#fff;cursor:pointer;padding:8px;display:none;align-items:center;justify-content:center;border-radius:6px;transition:background .15s;margin-right:4px}.back-button:hover{background:#1c2733}.back-button svg{width:24px;height:24px}.edit-profile-button{background:none;border:none;color:#fff;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;border-radius:6px;transition:background .15s;margin-left:auto}.edit-profile-button:hover{background:#1c2733}.edit-profile-button svg{width:20px;height:20px}.chat-avatar-small{width:40px;height:40px;border-radius:50%;background:#2b5278;display:flex;align-items:center;justify-content:center;font-size:20px;overflow:hidden}.chat-avatar-small img{width:100%;height:100%;object-fit:cover}.chat-header-info{flex:1}.chat-header-name{font-weight:600;font-size:15px}.messages-container{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:12px}.message-wrapper{position:relative;display:flex;margin-bottom:8px;overflow:visible}.message-wrapper.user{justify-content:flex-end}.message-wrapper.assistant{justify-content:flex-start}.message{display:flex;position:relative;z-index:2}.message.user{justify-content:flex-end}.message.assistant{justify-content:flex-start}.message-content{max-width:60%;padding:10px 14px;border-radius:12px;position:relative}.message.user .message-content{background:#5288c1;border-bottom-right-radius:4px}.message.assistant .message-content{background:#1c2733;border-bottom-left-radius:4px}.message-text{font-size:15px;line-height:1.4;word-wrap:break-word;margin-bottom:4px;user-select:text;-webkit-user-select:text}.message-text p{margin:0 0 8px}.message-text p:last-child{margin-bottom:0}.message-text pre{background:#0000004d;padding:12px;border-radius:6px;overflow-x:auto;margin:8px 0}.message-text img{max-width:100%;height:auto;border-radius:8px;display:block;margin:4px 0}.chat-image{cursor:zoom-in}.lightbox-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000eb;z-index:2000;display:flex;align-items:center;justify-content:center;cursor:zoom-out}.lightbox-image{max-width:95vw;max-height:95vh;border-radius:6px;object-fit:contain;cursor:default;box-shadow:0 8px 40px #000c}.lightbox-close{position:fixed;top:16px;right:16px;width:44px;height:44px;border-radius:50%;background:#ffffff26;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s;z-index:2001}.lightbox-close:hover{background:#ffffff47}.lightbox-nav{position:fixed;top:50%;transform:translateY(-50%);width:48px;height:48px;border-radius:50%;background:#ffffff26;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s;z-index:2001}.lightbox-nav:hover{background:#ffffff47}.lightbox-prev{left:16px}.lightbox-next{right:16px}.lightbox-counter{position:fixed;bottom:20px;left:50%;transform:translate(-50%);color:#ffffffb3;font-size:14px;z-index:2001;pointer-events:none}.message-text code{background:#0000004d;padding:2px 6px;border-radius:3px;font-family:Courier New,monospace;font-size:14px}.message-text pre code{background:none;padding:0}.message-text ul,.message-text ol{margin:8px 0;padding-left:20px}.message-text li{margin:4px 0}.message-text blockquote{border-left:3px solid rgba(255,255,255,.3);padding-left:12px;margin:8px 0;color:#fffc}.message-text h1,.message-text h2,.message-text h3,.message-text h4,.message-text h5,.message-text h6{margin:12px 0 8px;font-weight:600}.message-text a{color:#6397cc;text-decoration:underline}.message-text strong{font-weight:600}.message-text em{font-style:italic}.message-time{font-size:11px;color:#fff9;text-align:right}.message-input-container{padding:24px 20px 16px;border-top:1px solid #1c2733;display:flex;gap:12px;background:#151e27}.message-input{flex:1;background:#0e1621;border:1px solid #1c2733;border-radius:24px;padding:12px 20px;color:#fff;font-size:15px;outline:none;font-family:inherit}.message-input::placeholder{color:#6c7883}.message-input:focus{border-color:#2b5278}.send-button{width:44px;height:44px;border-radius:50%;background:#5288c1;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s}.send-button:hover{background:#6397cc}.send-button:disabled{background:#2b5278;cursor:not-allowed}.image-prompt-button{width:44px;height:44px;border-radius:50%;background:#3a8a6d;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s}.image-prompt-button:hover{background:#46a07f}.image-loading-indicator{display:flex;align-items:center;gap:10px;color:#ffffffb3;font-size:14px;padding:4px 0}.params-toggle{display:block;background:none;border:none;color:#ffffff80;font-size:12px;cursor:pointer;padding:4px 0 0;text-decoration:underline;text-align:left}.params-toggle:hover{color:#ffffffd9}.params-json{margin:6px 0 0;padding:10px;background:#00000059;border-radius:6px;font-size:11px;line-height:1.5;white-space:pre-wrap;word-break:break-all;color:#ffffffbf;font-family:Courier New,monospace;max-height:320px;overflow-y:auto}.context-menu{background:#1c2733;border:1px solid #2a3744;border-radius:6px;box-shadow:0 4px 12px #00000080;padding:4px 0;z-index:1000;min-width:150px}.context-menu button{width:100%;padding:10px 16px;background:none;border:none;color:#fff;text-align:left;cursor:pointer;font-size:14px;transition:background .15s}.context-menu button:hover{background:#2a3744}.batch-delete-button{background:none;border:none;color:#ffffffb3;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;border-radius:6px;transition:background .15s,color .15s;flex-shrink:0}.batch-delete-button:hover{background:#1c2733;color:#fff}.batch-delete-button.has-selection{color:#e05252}.batch-delete-button.has-selection:hover{background:#e0525226}.message-wrapper.selectable{cursor:pointer}.message-wrapper.selected .message-content{background:#5288c14d!important}.selection-check{width:36px;min-width:36px;display:flex;align-items:center;justify-content:center}.scroll-to-bottom{position:absolute;bottom:90px;right:24px;width:38px;height:38px;border-radius:50%;background:#2b5278;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px #0006;transition:background .15s,transform .15s;z-index:10}.scroll-to-bottom:hover{background:#3a6a9a;transform:translateY(-1px)}.chat-header-info--clickable{cursor:pointer}.chat-header-info--clickable:hover .chat-header-name{text-decoration:underline}.gallery-back{display:flex!important}.gallery-grid{flex:1;overflow-y:auto;padding:4px;display:grid;grid-template-columns:repeat(3,1fr);gap:4px;align-content:start}.gallery-thumb{width:100%;aspect-ratio:1 / 1;object-fit:cover;cursor:zoom-in;border-radius:4px;display:block;transition:opacity .15s}.gallery-thumb:hover{opacity:.8}.gallery-empty{grid-column:1 / -1;text-align:center;color:#6c7883;padding:60px 20px;font-size:15px}@media (max-width: 768px){.chat-window{width:100%}.message-content{max-width:85%}.back-button{display:flex}}.message-wrapper.intro{justify-content:center}.message.intro{max-width:min(560px,92%);background:linear-gradient(135deg,#5288c12e,#9b59b62e);border:1px solid rgba(255,255,255,.12);border-radius:14px}.intro-card{font-style:normal;line-height:1.5}.intro-title{font-weight:700;font-size:1.05em;margin-bottom:6px}.typing-indicator{display:inline-flex;gap:4px;padding:4px 0;vertical-align:middle}.typing-indicator i{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.4;animation:typing-blink 1.2s infinite}.typing-indicator i:nth-child(2){animation-delay:.2s}.typing-indicator i:nth-child(3){animation-delay:.4s}@keyframes typing-blink{0%,80%,to{opacity:.2}40%{opacity:.9}}.message-error{color:#ff8a80}.chat-avatar-zoomable{cursor:zoom-in}.profile-manager-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:1000}.profile-manager{background:#151e27;border-radius:12px;width:90%;max-width:700px;max-height:80vh;display:flex;flex-direction:column;box-shadow:0 4px 30px #00000080}.profile-manager-header{padding:20px;border-bottom:1px solid #1c2733;display:flex;justify-content:space-between;align-items:center}.profile-manager-header h2{margin:0;font-size:20px}.close-button{background:none;border:none;color:#8b95a0;font-size:24px;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.close-button:hover{color:#fff}.profile-manager-content{flex:1;overflow-y:auto;padding:20px}.profile-item{background:#0e1621;border:1px solid #1c2733;border-radius:8px;padding:16px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:flex-start}.profile-item-info{display:flex;gap:12px;flex:1}.profile-item-avatar{font-size:32px;width:50px;height:50px;display:flex;align-items:center;justify-content:center;background:#2b5278;border-radius:50%;flex-shrink:0;overflow:hidden}.profile-item-avatar img{width:100%;height:100%;object-fit:cover}.profile-item-name{font-weight:600;font-size:16px;margin-bottom:4px}.profile-item-prompt{font-size:14px;color:#8b95a0;line-height:1.4}.profile-item-actions{display:flex;gap:8px;flex-shrink:0}.generate-avatar-button,.edit-button,.delete-button{padding:6px 12px;border:none;border-radius:6px;cursor:pointer;font-size:14px;transition:background .15s}.generate-avatar-button{background:#3a6b4a;color:#fff;display:flex;align-items:center;justify-content:center;width:34px;padding:6px}.generate-avatar-button:hover:not(:disabled){background:#4a8a60}.generate-avatar-button:disabled{background:#2a4a35;cursor:not-allowed;opacity:.7}@keyframes spin{to{transform:rotate(360deg)}}.spin{animation:spin .9s linear infinite}.edit-button{background:#2b5278;color:#fff}.edit-button:hover{background:#3a6589}.delete-button{background:#d9534f;color:#fff}.delete-button:hover{background:#c9302c}.profile-form{width:100%;display:flex;flex-direction:column;gap:12px}.avatar-upload-section{display:flex;gap:16px;align-items:center;padding:12px;background:#1c2733;border-radius:8px}.current-avatar{width:80px;height:80px;border-radius:50%;overflow:hidden;flex-shrink:0;border:3px solid #5288c1}.current-avatar img{width:100%;height:100%;object-fit:cover}.upload-controls{display:flex;flex-direction:column;gap:8px}.upload-button{background:#5288c1;color:#fff;padding:10px 16px;border-radius:6px;cursor:pointer;font-size:14px;font-weight:600;transition:background .15s;text-align:center;border:none}.upload-button:hover{background:#6397cc}.upload-button:disabled{background:#2b5278;cursor:not-allowed}.upload-controls small{color:#8b95a0;font-size:13px}.avatar-selector{display:flex;gap:12px;flex-wrap:wrap;padding:8px 0}.avatar-option{width:60px;height:60px;border-radius:50%;overflow:hidden;cursor:pointer;border:3px solid transparent;transition:all .2s}.avatar-option:hover{border-color:#5288c1;transform:scale(1.05)}.avatar-option.selected{border-color:#5288c1;box-shadow:0 0 0 2px #5288c1}.avatar-option img{width:100%;height:100%;object-fit:cover}.profile-form input,.profile-form textarea{background:#0e1621;border:1px solid #1c2733;border-radius:6px;padding:10px 12px;color:#fff;font-size:14px;font-family:inherit}.profile-form input:focus,.profile-form textarea:focus{outline:none;border-color:#5288c1}.profile-form textarea{resize:vertical;min-height:120px}.profile-form-actions{display:flex;gap:8px}.save-button,.cancel-button{padding:8px 16px;border:none;border-radius:6px;cursor:pointer;font-size:14px;transition:background .15s}.save-button{background:#5288c1;color:#fff}.save-button:hover{background:#6397cc}.cancel-button{background:#1c2733;color:#fff}.cancel-button:hover{background:#2a3744}.profile-manager-footer{padding:16px 20px;border-top:1px solid #1c2733}.add-profile-button{width:100%;padding:12px;background:#5288c1;border:none;border-radius:8px;color:#fff;font-size:15px;font-weight:600;cursor:pointer;transition:background .15s}.add-profile-button:hover{background:#6397cc}.reveal-sheet-button{width:100%;padding:12px;border-radius:8px;border:1px dashed rgba(255,255,255,.3);background:#9b59b626;color:inherit;cursor:pointer;font-size:14px}.app{display:flex;width:100vw;height:100vh;height:100dvh;overflow:hidden;position:relative}@media (max-width: 768px){.app{flex-direction:column}.app.chat-open .chat-list{display:none}.app.chat-open .chat-window{display:flex}.app:not(.chat-open) .chat-list{display:flex;width:100%}.app:not(.chat-open) .chat-window{display:none}}.api-key-setup{width:100vw;height:100vh;height:100dvh;display:flex;align-items:center;justify-content:center;background:#0e1621}.api-key-card{background:#151e27;padding:40px;border-radius:12px;max-width:450px;width:90%;box-shadow:0 4px 20px #0000004d}.api-key-card h2{margin-bottom:16px;font-size:24px}.api-key-card p{color:#8b95a0;margin-bottom:24px;line-height:1.5}.api-key-input{width:100%;padding:14px 16px;background:#0e1621;border:1px solid #1c2733;border-radius:8px;color:#fff;font-size:15px;margin-bottom:16px;font-family:monospace}.api-key-input:focus{outline:none;border-color:#5288c1}.api-key-button{width:100%;padding:14px;background:#5288c1;border:none;border-radius:8px;color:#fff;font-size:15px;font-weight:600;cursor:pointer;transition:background .15s}.api-key-button:hover{background:#6397cc}.api-key-card small{display:block;margin-top:12px;color:#6c7883;font-size:12px;text-align:center}*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:#0e1621;color:#fff;overflow:hidden;height:100vh;height:100dvh}#root{width:100%;height:100%}
