.message-item{display:flex;justify-content:flex-end;align-items:center;gap:.5rem;position:relative;margin-bottom:.5rem}.message-content-wrapper{display:flex;flex-direction:column;align-items:flex-end;max-width:85%}.message-menu-trigger{transition:opacity .2s ease;flex-shrink:0;position:relative;align-self:center}.menu-dots-btn{background:none;border:none;color:var(--text-tertiary);cursor:pointer;padding:.25rem;border-radius:3px;display:flex;align-items:center;transition:all .2s ease;opacity:0}.message-item:hover .menu-dots-btn{opacity:1}.menu-dots-btn:hover{color:var(--text-primary);background:var(--bg-tertiary)}.edit-actions{display:flex;gap:.5rem;flex-shrink:0;align-self:center}.save-edit-btn,.cancel-edit-btn{background:none;border:none;cursor:pointer;padding:.25rem;border-radius:3px;display:flex;align-items:center;transition:all .2s ease}.save-edit-btn{color:var(--accent-color)}.save-edit-btn:hover{background:#22c55e1a}.cancel-edit-btn{color:var(--text-tertiary)}.cancel-edit-btn:hover{color:#ef4444;background:#ef44441a}.message-body{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:4px;padding:.75rem 1rem;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);position:relative;min-width:100px;max-width:100%}.message-body.editing{border-color:var(--accent-color);background:var(--bg-tertiary)}.message-body.dragging{border-color:var(--accent-color);background:#22c55e1a;box-shadow:0 0 15px #22c55e33}.edit-drag-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background:#000000b3;display:flex;align-items:center;justify-content:center;gap:.5rem;color:var(--accent-color);font-weight:500;z-index:20;border-radius:4px;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);pointer-events:none}.message-content{color:var(--text-primary);line-height:1.6;font-size:1rem;white-space:pre-wrap;word-wrap:break-word;margin-bottom:.25rem}.message-timestamp{font-size:.7rem;color:var(--text-tertiary);text-align:right;-webkit-user-select:none;user-select:none;margin-top:.5rem;display:flex;align-items:center;justify-content:flex-end;gap:.25rem}.message-edited-label{color:var(--text-tertiary);cursor:pointer;margin-left:4px;font-style:italic}.message-edited-label:hover{color:var(--accent-color);text-decoration:underline}.message-edit-input{width:100%;background:transparent;border:none;padding:0;margin:0 0 .75rem;color:var(--text-primary);line-height:1.6;font-size:1rem;font-family:inherit;white-space:pre-wrap;word-wrap:break-word;resize:none;outline:none;box-sizing:border-box;overflow-y:auto;max-height:70vh}.edit-add-files-btn{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem .75rem;background:#22c55e1a;border:1px solid rgba(34,197,94,.3);border-radius:3px;color:var(--accent-color);font-size:.875rem;cursor:pointer;transition:all .2s ease;margin-bottom:.75rem}.edit-add-files-btn:hover:not(:disabled){background:#22c55e33;border-color:#22c55e80}.edit-add-files-btn:disabled{opacity:.5;cursor:not-allowed}.message-edit-input:focus{outline:none;border-color:#22c55e80;box-shadow:0 0 12px #22c55e26}.edit-attachments-section{margin-top:1rem}.edit-attachment,.edit-attachment-wrapper,.edit-attachment-file{position:relative}.remove-attachment-btn{position:absolute;top:.5rem;right:.5rem;background:#ef4444e6;border:none;color:#fff;cursor:pointer;padding:.25rem;border-radius:3px;display:flex;align-items:center;transition:all .2s ease;z-index:10}.remove-attachment-btn:hover{background:#ef4444;transform:scale(1.1)}.message-dropdown-menu{position:absolute;right:calc(100% + .5rem);top:50%;transform:translateY(-50%);background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:4px;padding:.25rem;min-width:140px;box-shadow:0 8px 24px #00000080;z-index:100;opacity:1!important}.menu-item{width:100%;display:flex;align-items:center;gap:.75rem;padding:.625rem .75rem;background:none;border:none;color:var(--text-primary);cursor:pointer;border-radius:3px;font-size:.9375rem;transition:all .15s ease;text-align:left}.menu-item:hover:not(:disabled){background:#22c55e1a;color:var(--accent-color)}.menu-item:disabled{opacity:.4;cursor:not-allowed}.menu-item-danger:hover{background:#ef44441a;color:#ef4444}.attachments-section{margin-top:1rem}.attachments-title{font-size:.875rem;color:var(--text-secondary);margin-bottom:.75rem;font-weight:500}.attachments{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}.attachment{position:relative;overflow:hidden;border-radius:3px}.attachment-image-link{display:block;width:100%;overflow:hidden;border-radius:3px;background:#0000004d;cursor:pointer;position:relative;min-height:100px}.attachment-image{width:100%;height:auto;max-height:300px;object-fit:cover;display:block;border-radius:3px;transition:opacity .3s ease}.attachment-image.loading{opacity:0}.attachment-placeholder{display:flex;align-items:center;justify-content:center;width:100%;height:150px;background:linear-gradient(135deg,#22c55e0d,#22c55e1a);border-radius:3px;cursor:pointer;border:1px dashed rgba(34,197,94,.3);transition:all .2s ease;position:relative}.thumbnail-placeholder{background:var(--bg-tertiary);overflow:hidden}.blurred-thumbnail{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;filter:blur(8px);transform:scale(1.1);opacity:.6}.attachment-placeholder:hover{background:linear-gradient(135deg,#22c55e1a,#22c55e33);border-color:#22c55e80}.thumbnail-placeholder:hover .blurred-thumbnail{opacity:.8}.placeholder-overlay{display:flex;flex-direction:column;align-items:center;gap:.5rem;color:var(--accent-color);z-index:2}.placeholder-text{font-size:.875rem;font-weight:500}.placeholder-size{font-size:.75rem;color:var(--text-secondary)}.image-loading-spinner{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:#00000080;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.attachment-file{display:flex;align-items:center;gap:.75rem;padding:1rem;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:3px;transition:all .2s ease}.attachment-icon{color:var(--accent-color);display:flex;align-items:center}.attachment-info{flex:1;min-width:0}.attachment-name{font-size:.875rem;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:.25rem}.attachment-size{font-size:.75rem;color:var(--text-secondary)}.attachment-download{color:var(--accent-color);text-decoration:none;display:flex;align-items:center;padding:.5rem;border-radius:3px;transition:all .2s ease}.attachment-download:hover{background:#22c55e1a}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000c;display:flex;align-items:center;justify-content:center;z-index:1000;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.modal-content{background:var(--bg-primary);border:1px solid var(--border-color);border-radius:4px;padding:0;max-width:500px;width:90%;box-shadow:0 8px 32px #000000b3;max-height:80vh;overflow:hidden;display:flex;flex-direction:column}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid var(--border-color)}.modal-header h3{margin:0;color:var(--text-primary);font-size:1.25rem}.modal-close{background:none;border:none;color:var(--text-secondary);cursor:pointer;padding:.25rem;border-radius:3px;display:flex;align-items:center;transition:all .2s ease}.modal-close:hover{color:var(--text-primary);background:var(--hover-bg)}.modal-body{padding:1.5rem;overflow-y:auto}.info-row{display:flex;justify-content:space-between;padding:.75rem 0;border-bottom:1px solid var(--border-color)}.info-row:last-child{border-bottom:none}.info-label{color:var(--text-secondary);font-weight:500;font-size:.9375rem}.info-value{color:var(--text-primary);font-size:.9375rem;text-align:right;word-break:break-word;max-width:60%}.history-modal-content{max-width:600px}.history-list{display:flex;flex-direction:column;gap:1rem}.history-item{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:4px;padding:1rem}.history-item.current{background:#22c55e0d;border-color:#22c55e33}.history-meta{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem;padding-bottom:.5rem;border-bottom:1px solid var(--border-color)}.history-label{font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.history-item.current .history-label{color:var(--accent-color)}.history-item:not(.current) .history-label{color:var(--text-secondary)}.history-time{font-size:.8rem;color:var(--text-tertiary)}.history-content{color:var(--text-primary);font-size:.95rem;line-height:1.5;white-space:pre-wrap;word-break:break-word}.delete-confirm-modal{position:fixed;top:0;left:0;right:0;bottom:0;background:#000c;display:flex;align-items:center;justify-content:center;z-index:1000;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.delete-confirm-content{background:var(--bg-primary);border:1px solid var(--border-color);border-radius:4px;padding:2rem;max-width:400px;width:90%;box-shadow:0 8px 32px #000000b3}.delete-confirm-content h3{margin:0 0 1rem;color:var(--text-primary);font-size:1.25rem}.delete-confirm-content p{margin:0 0 1.5rem;color:var(--text-secondary);line-height:1.5}.delete-confirm-actions{display:flex;gap:.75rem;justify-content:flex-end}.delete-confirm-actions button{padding:.625rem 1.25rem;border-radius:3px;border:none;font-size:.9375rem;font-weight:500;cursor:pointer;transition:all .2s ease}.btn-cancel{background:var(--bg-tertiary);color:var(--text-primary)}.btn-cancel:hover{background:var(--hover-bg)}.btn-delete{background:#ef4444;color:#fff}.btn-delete:hover{background:#dc2626}.image-preview-modal{background:var(--bg-primary);border:1px solid var(--border-color);border-radius:4px;max-width:90vw;max-height:90vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 8px 32px #000000e6}.image-preview-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:var(--bg-secondary);border-bottom:1px solid var(--border-color)}.image-preview-name{color:var(--text-primary);font-size:.9375rem;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:60%}.image-preview-actions{display:flex;gap:.5rem;align-items:center}.image-download-btn{background:none;border:none;color:var(--accent-color);cursor:pointer;padding:.5rem;border-radius:3px;display:flex;align-items:center;transition:all .2s ease;text-decoration:none}.image-download-btn:hover{background:#22c55e1a}.image-preview-body{flex:1;display:flex;align-items:center;justify-content:center;padding:1rem;overflow:auto;background:#000}.preview-image{max-width:100%;max-height:calc(90vh - 80px);object-fit:contain;display:block}.message-input-container{position:relative;bottom:auto;left:auto;right:auto;padding:1.2rem 2rem calc(2rem + env(safe-area-inset-bottom));border-top:1px solid var(--border-color);background-color:var(--bg-primary);z-index:10;transition:all .2s ease;width:100%}.message-input-container.dragging{background:#22c55e1a;border-color:var(--accent-color)}.drag-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background:#000c;display:flex;align-items:center;justify-content:center;z-index:20;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border-top:2px dashed var(--accent-color)}.drag-message{display:flex;flex-direction:column;align-items:center;gap:1rem;color:var(--accent-color);font-weight:500;pointer-events:none}.search-trigger-wrapper{margin:0 auto .25rem;max-width:95%}.search-input-container{display:flex;align-items:center;gap:.75rem;width:100%;max-width:400px;padding:.5rem 1rem;background:var(--bg-tertiary);border:1px solid var(--border-color);border-radius:2px;transition:all .2s ease}.search-input-container:focus-within{border-color:var(--accent-color);background:var(--hover-bg)}.search-icon{color:var(--accent-color);opacity:.7;flex-shrink:0}.search-input-box{flex:1;background:none;border:none;color:var(--text-primary);font-size:.9rem;font-family:inherit;outline:none;padding:0;min-width:0}.search-input-box::placeholder{color:var(--text-tertiary)}.search-limit-buttons{display:flex;gap:.25rem;align-items:center;padding-left:.5rem;border-left:1px solid var(--border-color)}.search-limit-btn{background:transparent;border:1px solid var(--border-color);color:var(--text-secondary);padding:.1rem .4rem;border-radius:3px;font-size:.75rem;cursor:pointer;transition:all .2s;min-width:24px}.search-limit-btn:hover{background-color:var(--hover-bg);color:var(--text-primary)}.search-limit-btn.active{background-color:#22c55e33;color:var(--accent-color);border-color:var(--accent-color);font-weight:600}.selected-files{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem;padding:1rem;background:var(--bg-tertiary);border:1px solid var(--border-color);border-radius:3px}.selected-file{display:flex;align-items:center;gap:.75rem;padding:.5rem .75rem;background:#22c55e1a;border:1px solid rgba(34,197,94,.25);border-radius:3px;font-size:.875rem;max-width:280px;position:relative;transition:all .2s ease}.selected-file.has-preview{flex-direction:column;align-items:flex-start;gap:0;padding:0;overflow:hidden;width:200px}.file-preview-image-wrapper{width:40px;height:40px;border-radius:3px;overflow:hidden;flex-shrink:0;background:#0000004d;display:flex;align-items:center;justify-content:center}.selected-file.has-preview .file-preview-image-wrapper{width:100%;height:140px;border-radius:0;background:#000}.file-preview-image{width:100%;height:100%;object-fit:cover}.selected-file.has-preview .file-preview-image{object-fit:contain}.file-icon-wrapper{width:40px;height:40px;border-radius:3px;background:#ffffff0d;display:flex;align-items:center;justify-content:center;color:#ffffffb3;flex-shrink:0}.file-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.selected-file.has-preview .file-info{padding:.75rem;width:100%;box-sizing:border-box;background:#22c55e0d;border-top:1px solid rgba(34,197,94,.15)}.file-name{color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500;line-height:1.2}.file-size{color:var(--text-secondary);font-size:.7rem;line-height:1.2}.remove-file-btn{background:none;border:none;color:var(--text-secondary);cursor:pointer;padding:.35rem;display:flex;align-items:center;border-radius:3px;transition:all .2s ease;flex-shrink:0}.selected-file.has-preview .remove-file-btn{position:absolute;top:.5rem;right:.5rem;background:#0009;color:#fff;padding:.25rem;border-radius:3px;opacity:0}.selected-file.has-preview:hover .remove-file-btn{opacity:1}.selected-file.has-preview .remove-file-btn:hover{background:#ef4444;color:#fff}.remove-file-btn:hover{color:#ef4444;background:#ef44441a}.message-input-wrapper{display:flex;align-items:flex-start;gap:.5rem;background:var(--bg-primary);border:1px solid var(--border-color);border-radius:2px;padding:.75rem;transition:all .2s ease;max-width:95%;margin:0 auto}.message-input-wrapper:focus-within{border-color:var(--accent-color);box-shadow:0 0 16px #22c55e26}.attach-btn{background:none;border:none;color:var(--accent-color);cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;border-radius:3px;transition:all .2s ease;flex-shrink:0;margin-top:2px}.attach-btn:hover:not(:disabled){background:#22c55e1a}.attach-btn:disabled{opacity:.5;cursor:not-allowed}.message-input{flex:1;background:none;border:none;color:var(--text-primary);font-size:1rem;font-family:inherit;resize:none;outline:none;min-height:40px;max-height:80vh;line-height:1.5;padding:0;overflow-y:auto}.message-input::placeholder{color:var(--text-tertiary)}.message-input:disabled{opacity:.5}.send-btn{background:var(--accent-color);border:none;color:#000;font-weight:600;cursor:pointer;padding:.5rem;border-radius:3px;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0;min-width:36px;min-height:36px;margin-top:-2px}.send-btn:hover:not(:disabled){background:var(--accent-hover);box-shadow:0 2px 8px #22c55e66;transform:translateY(-1px)}.send-btn:active:not(:disabled){transform:translateY(0)}.send-btn:disabled{opacity:.5;cursor:not-allowed;transform:none}.sending-spinner{width:20px;height:20px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite}.chat-container{flex:1;display:flex;flex-direction:column;max-width:1200px;width:100%;margin:0 auto;position:relative;z-index:1;height:100vh}.messages-wrapper{position:relative;flex:1;overflow-y:auto;padding:80px 2rem 2rem;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track);scrollbar-gutter:stable}.messages-wrapper::-webkit-scrollbar{width:4px;height:4px}.messages-wrapper::-webkit-scrollbar-track{background:var(--scrollbar-track);margin-bottom:0}.messages-wrapper::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:20px}.messages-wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover)}.messages-list{display:flex;flex-direction:column-reverse;gap:.5rem}.loading{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:1rem;color:var(--text-secondary)}.loading-spinner{width:40px;height:40px;border:3px solid rgba(34,197,94,.1);border-top-color:var(--accent-color);border-radius:50%;animation:spin 1s linear infinite}.loading-more{display:flex;justify-content:center;padding:1rem;width:100%}.loading-spinner.small{width:24px;height:24px;border-width:2px}@keyframes spin{to{transform:rotate(360deg)}}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center;gap:1rem;opacity:.7}.empty-icon{font-size:4rem;margin-bottom:1rem}.empty-state h2{font-size:2rem;font-weight:600;background:linear-gradient(135deg,var(--accent-color) 0%,var(--accent-hover) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.empty-state p{color:var(--text-secondary);font-size:1.1rem}.vortex-logo{display:flex;align-items:center;justify-content:center}.vortex-logo svg{width:40px;height:40px}.header{background-color:#fff9;padding:.75rem 1rem;position:fixed;top:0;left:0;width:100%;z-index:10;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}@media (prefers-color-scheme: dark){.header{background-color:#0f172a99}}.header-content{max-width:1200px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;height:40px}.header-left{display:flex;align-items:center;gap:.6rem}.header-right{display:flex;align-items:center;gap:1rem}.header-title{font-size:1.7rem;font-weight:700;color:var(--text-primary);margin:0;line-height:1;padding-bottom:2px}.app{width:100%;height:100vh;height:100dvh;display:flex;flex-direction:column;background:var(--bg-primary);position:relative;overflow:hidden;transition:background-color .3s ease}.auth-wrapper{display:flex;flex-direction:column;height:100vh;width:100%;position:relative;z-index:1}.auth-container{flex:1;display:flex;justify-content:center;align-items:center}.migrate-btn{background-color:#22c55e1a;background-color:var(--hover-bg);color:var(--accent-color);border:1px solid var(--accent-color);padding:.5rem 1rem;border-radius:.5rem;cursor:pointer;font-weight:500;margin-right:1rem;transition:all .2s ease}.migrate-btn:hover:not(:disabled){background-color:var(--accent-color);color:#fff;border-color:var(--accent-color)}.migrate-btn:disabled{opacity:.5;cursor:not-allowed}.app-loading{display:flex;justify-content:center;align-items:center;height:100vh;width:100%;font-size:1.2rem;color:var(--text-secondary)}:root{--bg-primary: #ffffff;--bg-secondary: #f3f4f6;--bg-tertiary: #e5e7eb;--text-primary: #111827;--text-secondary: #4b5563;--text-tertiary: #9ca3af;--accent-color: #16a34a;--accent-hover: #15803d;--border-color: #e5e7eb;--hover-bg: #f3f4f6;--scrollbar-track: #f3f4f6;--scrollbar-thumb: #d1d5db;--scrollbar-thumb-hover: #9ca3af}@media (prefers-color-scheme: dark){:root{--bg-primary: #0f172a;--bg-secondary: #1e293b;--bg-tertiary: #334155;--text-primary: #f8fafc;--text-secondary: #cbd5e1;--text-tertiary: #94a3b8;--accent-color: #22c55e;--accent-hover: #4ade80;--border-color: #334155;--hover-bg: #1e293b;--scrollbar-track: rgba(255, 255, 255, .02);--scrollbar-thumb: rgba(96, 125, 139, .3);--scrollbar-thumb-hover: rgba(96, 125, 139, .6)}}*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:var(--bg-primary);color:var(--text-primary);overflow:hidden;transition:background-color .3s ease,color .3s ease}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}#root{width:100vw;height:100vh}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--scrollbar-track)}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}
