:root{--bg-primary:#0a0a0f;--bg-secondary:#13131f;--bg-tertiary:#1a1a2e;--bg-elevated:#1f1f35;--accent-primary:#7c3aed;--accent-hover:#8b5cf6;--accent-light:#a78bfa;--accent-glow:#7c3aed26;--gradient-main:linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #1f1f35 100%);--gradient-accent:linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);--gradient-subtle:linear-gradient(180deg, #7c3aed1a 0%, transparent 100%);--border-color:#7c3aed1a;--border-hover:#7c3aed4d;--text-primary:#e9e9f0;--text-secondary:#a8a8b8;--text-muted:#6b6b7b;--shadow-sm:0 2px 8px #0000004d;--shadow-md:0 4px 16px #0006;--shadow-lg:0 8px 32px #00000080;--shadow-glow:0 0 20px var(--accent-glow)}*{box-sizing:border-box;margin:0;padding:0}body{background:var(--bg-primary);color:var(--text-primary);height:100vh;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;overflow:hidden}.auth-screen{background:var(--gradient-main);z-index:10000;justify-content:center;align-items:center;height:100vh;display:flex;position:fixed;inset:0;overflow:hidden}.auth-screen:before{content:"";background:radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);border-radius:50%;width:600px;height:600px;animation:20s ease-in-out infinite float;position:absolute;top:-200px;left:-200px}.auth-screen:after{content:"";background:radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);border-radius:50%;width:400px;height:400px;animation:15s ease-in-out infinite reverse float;position:absolute;bottom:-100px;right:-100px}@keyframes float{0%,to{transform:translate(0)scale(1)}50%{transform:translate(50px,50px)scale(1.1)}}.auth-container{background:var(--bg-tertiary);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:var(--shadow-lg), var(--shadow-glow);border:1px solid var(--border-color);z-index:1;border-radius:24px;width:100%;max-width:440px;padding:48px;position:relative}.auth-header{text-align:center;margin-bottom:36px}.auth-header h1{background:var(--gradient-accent);-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text;margin-bottom:12px;font-size:32px;font-weight:700}.auth-header p{color:var(--text-secondary);font-size:15px;font-weight:400}.auth-tabs{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;gap:8px;margin-bottom:28px;padding:6px;display:flex}.auth-tab{color:var(--text-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:1;padding:12px;font-size:14px;font-weight:500;transition:all .3s}.auth-tab.active{background:var(--gradient-accent);color:#fff;box-shadow:var(--shadow-glow)}.auth-tab:hover:not(.active){background:var(--bg-elevated);color:var(--text-primary)}.form-group{margin-bottom:20px}.form-label{color:var(--text-secondary);margin-bottom:10px;font-size:14px;font-weight:500;display:block}.form-input{background:var(--bg-secondary);border:1px solid var(--border-color);width:100%;color:var(--text-primary);border-radius:12px;padding:14px 18px;font-size:15px;transition:all .3s}.form-input:focus{border-color:var(--accent-primary);background:var(--bg-elevated);box-shadow:0 0 0 3px var(--accent-glow);outline:none}.form-button{background:var(--gradient-accent);color:#fff;cursor:pointer;width:100%;box-shadow:var(--shadow-glow);border:none;border-radius:12px;padding:14px;font-size:16px;font-weight:600;transition:all .3s}.form-button:hover{box-shadow:0 0 30px var(--accent-glow);transform:translateY(-2px)}.form-button:active{transform:translateY(0)}.form-button:disabled{opacity:.5;cursor:not-allowed;transform:none}.error-message{color:#fecaca;background:linear-gradient(135deg,#991b1b 0%,#7f1d1d 100%);border:1px solid #fecaca33;border-radius:12px;margin-bottom:20px;padding:14px 18px;font-size:14px;display:none}.error-message.show{animation:.3s slideDown;display:block}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.app-container{background:var(--bg-primary);grid-template-columns:320px 1fr 0;height:100vh;transition:grid-template-columns .3s;display:grid}.app-container.profile-open{grid-template-columns:320px 1fr 340px}.app-container.show{display:grid}.sidebar-left{background:var(--bg-secondary);border-right:1px solid var(--border-color);border-radius:15px;flex-direction:column;width:calc(100% - 20px);height:calc(100vh - 20px);margin:10px;display:flex;position:relative}.sidebar-header{border-bottom:1px solid var(--border-color);background:var(--gradient-subtle);border-radius:15px 15px 0 0;justify-content:space-between;align-items:center;padding:20px;display:flex}.user-profile{align-items:center;gap:14px;display:flex}.avatar{background:var(--gradient-accent);color:#fff;width:48px;height:48px;box-shadow:var(--shadow-glow);border-radius:50%;justify-content:center;align-items:center;font-size:20px;font-weight:600;display:flex;position:relative}.avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.status-indicator{border:3px solid var(--bg-secondary);border-radius:50%;width:14px;height:14px;position:absolute;bottom:0;right:0}.status-indicator.online{background:#10b981;box-shadow:0 0 10px #10b98180}.status-indicator.offline{background:#6b7280}.user-info h3{color:var(--text-primary);font-size:16px;font-weight:600}.user-info span{color:var(--text-muted);font-size:13px}.icon-button{width:38px;height:38px;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:10px;justify-content:center;align-items:center;transition:all .3s;display:flex}.icon-button:hover{background:var(--bg-elevated);color:var(--accent-light)}.search-container{padding:16px 20px;position:relative}.search-input{background:var(--bg-elevated);border:1px solid var(--border-color);width:100%;color:var(--text-primary);border-radius:12px;padding:12px 18px 12px 44px;font-size:14px;transition:all .3s}.search-input:focus{border-color:var(--accent-primary);box-shadow:0 0 0 3px var(--accent-glow);outline:none}.search-icon{color:var(--text-muted);position:absolute;top:50%;left:34px;transform:translateY(-50%)}.nav-tabs{gap:6px;margin-bottom:16px;padding:0 16px;display:flex}.nav-tab{color:var(--text-secondary);cursor:pointer;background:0 0;border:none;border-radius:10px;flex:1;padding:11px;font-size:14px;font-weight:500;transition:all .3s}.nav-tab.active{background:var(--gradient-accent);color:#fff;box-shadow:var(--shadow-glow)}.nav-tab:hover:not(.active){background:var(--bg-elevated);color:var(--text-primary)}.chat-list{flex:1;padding:8px;overflow-y:auto}.chat-item{cursor:pointer;border:1px solid #0000;border-radius:12px;align-items:center;gap:14px;padding:14px;transition:all .3s;display:flex}.chat-item:hover{background:var(--bg-elevated);border-color:var(--border-hover)}.chat-item.active{background:var(--gradient-accent);box-shadow:var(--shadow-glow)}.chat-item.active .chat-item-name,.chat-item.active .chat-item-message{color:#fff!important}.chat-item-content{flex:1;min-width:0}.chat-item-header{justify-content:space-between;align-items:center;margin-bottom:5px;display:flex}.chat-item-name{color:var(--text-primary);white-space:nowrap;text-overflow:ellipsis;font-size:15px;font-weight:600;overflow:hidden}.chat-item-time{color:var(--text-muted);font-size:12px}.chat-item.active .chat-item-time{color:#fffc}.chat-item-message{color:var(--text-secondary);white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}.unread-badge{background:var(--accent-primary);color:#fff;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;min-width:24px;height:24px;padding:0 8px;font-size:12px;font-weight:600;display:flex;box-shadow:0 2px 8px #7c3aed66}.chat-item.active .unread-badge{color:var(--accent-primary);background:#fff}.fab{background:var(--gradient-accent);color:#fff;cursor:pointer;width:60px;height:60px;box-shadow:var(--shadow-md), var(--shadow-glow);z-index:100;border:none;border-radius:50%;justify-content:center;align-items:center;transition:all .3s;display:flex;position:fixed;bottom:24px;right:24px}.fab:hover{box-shadow:0 0 40px var(--accent-glow);transform:scale(1.1)}.fab:active{transform:scale(.95)}@media (width>=769px){.fab{z-index:10;position:absolute}}.chat-main{background:var(--bg-primary);flex-direction:column;height:100vh;max-height:100vh;display:flex}.chat-header{border-bottom:1px solid var(--border-color);background:var(--gradient-subtle);border-radius:15px;flex-shrink:0;justify-content:space-between;align-items:center;width:98%;margin:10px auto auto;padding:10px 28px;display:flex}.chat-header-info{cursor:pointer;align-items:center;gap:14px;display:flex}.chat-title{color:var(--text-primary);font-size:17px;font-weight:600}.chat-subtitle{color:var(--text-secondary);font-size:13px}.chat-header-actions{gap:6px;display:flex}.pinned-messages-bar{background:var(--bg-elevated);border-bottom:1px solid var(--border-color);cursor:pointer;flex-shrink:0;align-items:center;gap:12px;padding:12px 20px;transition:background .2s;display:flex}.pinned-messages-bar:hover{background:var(--bg-secondary)}.pinned-icon{color:var(--accent-primary);flex-shrink:0;align-items:center;display:flex}.pinned-content{flex:1;min-width:0}.pinned-count{color:var(--accent-primary);margin-bottom:2px;font-size:12px;font-weight:600}.pinned-text{color:var(--text-primary);white-space:nowrap;text-overflow:ellipsis;font-size:14px;overflow:hidden}.pinned-close{color:var(--text-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;padding:4px;transition:all .2s;display:flex}.pinned-close:hover{background:var(--bg-primary);color:var(--text-primary)}.messages-container{flex:1;min-height:0;padding:28px;overflow-y:auto}.message{gap:14px;margin-bottom:18px;display:flex}.message.own{flex-direction:row-reverse}.message-avatar{background:var(--gradient-accent);color:#fff;width:40px;height:40px;box-shadow:var(--shadow-glow);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;font-size:15px;font-weight:600;display:flex}.message-content{max-width:65%}.message.own .message-content{align-items:flex-end}.message-author{color:var(--accent-light);margin-bottom:6px;font-size:13px;font-weight:600}.message.own .message-author{text-align:right}.message-bubble{background:var(--bg-secondary);color:var(--text-primary);word-wrap:break-word;border:1px solid var(--border-color);border-radius:16px;padding:14px 18px;font-size:15px;line-height:1.5}.message.own .message-bubble{background:var(--gradient-accent);color:#fff;box-shadow:var(--shadow-glow);border:none}.message-time{color:var(--text-muted);margin-top:6px;font-size:11px}.message.own .message-time{text-align:right;color:#fff9}.message-input-wrapper{align-items:center;gap:15px;padding:0 14px 10px;display:flex}.message-input-container{border-top:1px solid var(--border-color);background:var(--bg-secondary);border-radius:15px;flex:1;align-items:flex-end;gap:14px;width:98%;margin:auto;padding:5px 14px;display:flex}.attachment-button{width:44px;height:44px;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;transition:all .3s;display:flex}.attachment-button:hover:not(:disabled){background:var(--bg-elevated);color:var(--accent-light)}.attachment-button:disabled{opacity:.4;cursor:not-allowed}.input-wrapper{border-radius:24px;flex:1;align-items:center;gap:14px;padding:14px 0;transition:all .3s;display:flex;position:relative}.message-input{color:var(--text-primary);resize:none;background:0 0;border:none;outline:none;flex:1;max-height:120px;padding-right:44px;font-family:inherit;font-size:15px}.message-input::placeholder{color:var(--text-muted)}.emoji-trigger-button{width:36px;height:36px;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;font-size:20px;transition:all .3s;display:flex;position:absolute;top:50%;right:0;transform:translateY(-50%)}.emoji-trigger-button svg{width:24px;height:24px;transform:rotate(180deg)}.emoji-trigger-button:hover:not(:disabled){background:var(--bg-elevated);color:var(--accent-light)}.send-button{background:var(--gradient-accent);color:#fff;cursor:pointer;width:44px;height:44px;box-shadow:var(--shadow-glow);border:none;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;transition:all .3s;display:flex}.send-button:hover{box-shadow:0 0 25px var(--accent-glow);transform:translateY(-2px)}.send-button:disabled{opacity:.4;cursor:not-allowed;transform:none}.chat-list::-webkit-scrollbar{width:4px}.messages-container::-webkit-scrollbar{width:4px}.chat-list::-webkit-scrollbar-track{background:0 0}.messages-container::-webkit-scrollbar-track{background:0 0}.chat-list::-webkit-scrollbar-thumb{background:#ffffff1a;border-radius:10px}.messages-container::-webkit-scrollbar-thumb{background:#ffffff1a;border-radius:10px}.chat-list::-webkit-scrollbar-thumb:hover{background:#fff3}.messages-container::-webkit-scrollbar-thumb:hover{background:#fff3}.welcome-screen{text-align:center;flex-direction:column;justify-content:center;align-items:center;height:100%;padding:40px;display:flex}.welcome-icon{background:var(--gradient-accent);width:120px;height:120px;box-shadow:var(--shadow-glow);color:#fff;border-radius:30px;justify-content:center;align-items:center;margin-bottom:28px;display:flex}.welcome-screen h2{color:var(--text-primary);margin-bottom:12px;font-size:28px;font-weight:700}.welcome-screen p{color:var(--text-secondary);max-width:400px;font-size:16px}.sidebar-right{background:linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);border-left:1px solid var(--border-color);border-radius:15px;flex-direction:column;width:calc(100% - 20px);height:calc(100vh - 20px);margin:10px;padding:0;transition:all .3s;display:flex;overflow:hidden auto}.profile-panel{flex-direction:column;height:100%;display:flex}.profile-header{text-align:center;background:var(--gradient-subtle);padding:40px 24px;position:relative;overflow:hidden}.profile-close-button{cursor:pointer;width:36px;height:36px;color:var(--text-secondary);z-index:10;background:#ffffff1a;border:none;border-radius:50%;justify-content:center;align-items:center;transition:all .2s;display:flex;position:absolute;top:16px;right:16px}.profile-close-button:hover{color:var(--text-primary);background:#ffffff26}.profile-header:before{display:none}.avatar-xl{background:var(--gradient-accent);color:#fff;width:120px;height:120px;box-shadow:0 8px 32px var(--accent-glow), var(--shadow-lg);border:4px solid var(--bg-secondary);z-index:1;border-radius:50%;justify-content:center;align-items:center;margin:0 auto 20px;font-size:48px;font-weight:700;display:flex;position:relative}.avatar-xl img{object-fit:cover;border-radius:50%;width:100%;height:100%}.profile-name{color:var(--text-primary);z-index:1;margin-bottom:8px;font-size:24px;font-weight:700;position:relative}.profile-status{color:var(--text-secondary);z-index:1;justify-content:center;align-items:center;gap:8px;font-size:15px;display:flex;position:relative}.profile-status.online{color:#10b981}.profile-status.online:before{content:"";background:#10b981;border-radius:50%;width:10px;height:10px;animation:2s ease-in-out infinite pulse;box-shadow:0 0 12px #10b981}@keyframes pulse{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.5)}}.profile-actions{background:var(--bg-elevated);border-bottom:1px solid var(--border-color);grid-template-columns:1fr 1fr;gap:12px;padding:24px;display:grid}.profile-action{background:var(--bg-secondary);border:1px solid var(--border-color);color:var(--text-primary);cursor:pointer;border-radius:16px;flex-direction:column;justify-content:center;align-items:center;gap:10px;padding:18px 14px;font-size:13px;font-weight:500;transition:all .3s;display:flex}.profile-action:hover{background:var(--gradient-accent);color:#fff;box-shadow:0 4px 20px var(--accent-glow);border-color:#0000;transform:translateY(-4px)}.profile-action svg{flex-shrink:0;width:24px;height:24px}.profile-section{padding:24px}.section-title{color:var(--accent-light);text-transform:uppercase;letter-spacing:1px;margin-bottom:16px;font-size:12px;font-weight:700}.settings-grid{flex-direction:column;gap:12px;display:flex}.setting-card{background:var(--bg-secondary);border:1px solid var(--border-color);cursor:pointer;border-radius:16px;align-items:center;gap:14px;padding:18px;transition:all .3s;display:flex}.setting-card:hover{background:var(--bg-elevated);border-color:var(--border-hover);transform:translateY(-2px);box-shadow:0 4px 12px #0003}.setting-icon{background:var(--gradient-accent);width:42px;height:42px;box-shadow:0 0 16px var(--accent-glow);border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;display:flex}.setting-icon svg{color:#fff}.setting-content{flex:1;min-width:0}.setting-name{color:var(--text-primary);margin-bottom:4px;font-size:15px;font-weight:600}.setting-desc{color:var(--text-muted);font-size:12px}.setting-arrow{color:var(--text-muted);flex-shrink:0;transition:all .3s}.setting-card:hover .setting-arrow{color:var(--accent-light);transform:translate(4px)}.toggle-switch{background:var(--bg-primary);cursor:pointer;border:2px solid var(--border-color);border-radius:13px;flex-shrink:0;width:48px;height:26px;transition:background .3s;position:relative}.toggle-switch.active{background:var(--gradient-accent);box-shadow:0 0 12px var(--accent-glow);border-color:#0000}.toggle-slider{background:#fff;border-radius:50%;width:20px;height:20px;transition:transform .3s;position:absolute;top:1px;left:1px;box-shadow:0 2px 4px #0003}.toggle-switch.active .toggle-slider{transform:translate(22px)}.settings-list{flex-direction:column;gap:10px;display:flex}.setting-item{background:var(--bg-secondary);border:1px solid var(--border-color);cursor:pointer;border-radius:14px;justify-content:space-between;align-items:center;padding:16px 18px;transition:all .3s;display:flex}.setting-item:hover{background:var(--gradient-accent);color:#fff;box-shadow:0 4px 16px var(--accent-glow);border-color:#0000;transform:translate(4px)}.setting-item svg{flex-shrink:0;margin-right:12px;transition:transform .3s}.setting-item:hover svg{transform:scale(1.1)}.setting-item span{color:var(--text-primary);flex:1;font-size:15px;font-weight:500}.setting-item:hover span{color:#fff}.setting-item-info{flex-direction:column;gap:4px;display:flex}.setting-item-label{color:var(--text-primary);font-size:15px;font-weight:500}.setting-item-description{color:var(--text-muted);font-size:12px}.toggle-switch{background:var(--bg-primary);cursor:pointer;border-radius:12px;width:44px;height:24px;transition:background .3s;position:relative}.toggle-switch.active{background:var(--gradient-accent)}.toggle-switch:after{content:"";background:#fff;border-radius:50%;width:18px;height:18px;transition:transform .3s;position:absolute;top:3px;left:3px}.toggle-switch.active:after{transform:translate(20px)}.media-grid{grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px;display:grid}.media-item{aspect-ratio:1;background:var(--bg-elevated);cursor:pointer;border:1px solid var(--border-color);border-radius:10px;transition:all .3s;overflow:hidden}.media-item:hover{box-shadow:var(--shadow-glow);transform:scale(1.05)}.media-item img{object-fit:cover;width:100%;height:100%}.mobile-close-info{background:var(--bg-elevated);width:40px;height:40px;color:var(--text-primary);cursor:pointer;border:none;border-radius:10px;justify-content:center;align-items:center;margin-bottom:20px;transition:all .3s;display:none}.mobile-close-info:hover{background:var(--accent-primary);color:#fff}.modal{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:1000;background:#000000b3;justify-content:center;align-items:center;width:100%;height:100%;padding:20px;display:none;position:fixed;top:0;left:0}.modal.show{display:flex}.modal-content{background:var(--bg-tertiary);border:1px solid var(--border-color);width:100%;max-width:500px;max-height:90vh;box-shadow:var(--shadow-lg), var(--shadow-glow);border-radius:20px;padding:32px;animation:.3s modalSlideIn;overflow-y:auto}@keyframes modalSlideIn{0%{opacity:0;transform:translateY(20px)scale(.95)}to{opacity:1;transform:translateY(0)scale(1)}}.modal-content-small{max-width:400px}.modal-header{justify-content:space-between;align-items:center;margin-bottom:24px;display:flex}.modal-header h2,.modal-title{color:var(--text-primary);font-size:24px;font-weight:600}.modal-close-icon{color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:8px;padding:8px;transition:all .3s}.modal-close-icon:hover{background:var(--bg-elevated);color:var(--text-primary)}.create-type-button{background:var(--bg-elevated);border:1px solid var(--border-color);width:100%;color:var(--text-primary);cursor:pointer;border-radius:14px;align-items:center;gap:14px;margin-bottom:12px;padding:18px;font-size:16px;font-weight:500;transition:all .3s;display:flex}.create-type-button:hover{background:var(--gradient-accent);color:#fff;box-shadow:var(--shadow-glow);border-color:#0000;transform:translate(4px)}.create-type-button svg{flex-shrink:0}.modal-button{cursor:pointer;border:none;border-radius:12px;padding:14px 24px;font-size:15px;font-weight:600;transition:all .3s}.modal-button.cancel{background:var(--bg-elevated);color:var(--text-primary);border:1px solid var(--border-color)}.modal-button.cancel:hover{background:var(--bg-secondary)}.modal-button.delete{color:#fff;background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%)}.modal-button.delete:hover{transform:translateY(-2px);box-shadow:0 0 20px #ef44444d}.logout-button{color:#fff;cursor:pointer;background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%);border:none;border-radius:12px;justify-content:center;align-items:center;gap:10px;width:100%;margin-top:28px;padding:14px;font-size:16px;font-weight:600;transition:all .3s;display:flex}.logout-button:hover{transform:translateY(-2px);box-shadow:0 0 20px #ef44444d}.save-button{background:var(--gradient-accent);color:#fff;cursor:pointer;width:100%;box-shadow:var(--shadow-glow);border:none;border-radius:12px;padding:14px;font-size:16px;font-weight:600;transition:all .3s}.save-button:hover{box-shadow:0 0 30px var(--accent-glow);transform:translateY(-2px)}.settings-list{flex-direction:column;gap:12px;margin-bottom:20px;display:flex}.setting-row{background:var(--bg-elevated);border:1px solid var(--border-color);border-radius:12px;justify-content:space-between;align-items:center;padding:16px;transition:all .3s;display:flex}.setting-row:hover{background:var(--bg-secondary);border-color:var(--border-hover)}.setting-info{flex:1;min-width:0}.setting-label{color:var(--text-muted);margin-bottom:4px;font-size:13px}.setting-value{color:var(--text-primary);font-size:15px;font-weight:500}.setting-edit-btn{width:36px;height:36px;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;transition:all .3s;display:flex}.setting-edit-btn:hover{background:var(--accent-primary);color:#fff}.editable{cursor:pointer;position:relative}.editable:hover:after{content:"✎";background:var(--accent-primary);color:#fff;width:32px;height:32px;box-shadow:var(--shadow-glow);border-radius:50%;justify-content:center;align-items:center;font-size:16px;display:flex;position:absolute;bottom:0;right:0}.search-results{max-height:400px;margin-top:20px;overflow-y:auto}.user-result-item{background:var(--bg-elevated);border:1px solid var(--border-color);cursor:pointer;border-radius:12px;align-items:center;gap:14px;margin-bottom:10px;padding:14px;transition:all .3s;display:flex}.user-result-item:hover{background:var(--gradient-accent);color:#fff;box-shadow:var(--shadow-glow);border-color:#0000}.user-result-item .avatar{flex-shrink:0}.user-result-info{flex:1;min-width:0}.user-result-name{color:var(--text-primary);margin-bottom:4px;font-size:15px;font-weight:600}.user-result-login{color:var(--text-secondary);font-size:13px}.user-result-item:hover .user-result-name,.user-result-item:hover .user-result-login{color:#fff}.context-menu{background:var(--bg-tertiary);border:1px solid var(--border-color);box-shadow:var(--shadow-lg);z-index:2000;border-radius:12px;min-width:200px;padding:8px;display:none;position:fixed}.context-menu.show{display:block}.context-menu-item{cursor:pointer;color:var(--text-primary);border-radius:8px;align-items:center;gap:12px;padding:12px 14px;font-size:14px;transition:all .3s;display:flex}.context-menu-item:hover{background:var(--bg-elevated)}.context-menu-item[data-action=delete]{color:#ef4444}.context-menu-item[data-action=delete]:hover{color:#fff;background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%)}.crop-editor{z-index:3000;background:#000000f2;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;display:none;position:fixed;top:0;left:0}.crop-editor.show{display:flex}.crop-container{max-width:90%;max-height:70vh;margin-bottom:24px}.crop-canvas{border-radius:12px;max-width:100%;max-height:70vh}.crop-controls{gap:16px;display:flex}.crop-button{cursor:pointer;border:none;border-radius:12px;padding:14px 28px;font-size:16px;font-weight:600;transition:all .3s}.crop-button.cancel{background:var(--bg-elevated);color:var(--text-primary)}.crop-button.cancel:hover{background:var(--bg-secondary)}.crop-button:not(.cancel){background:var(--gradient-accent);color:#fff;box-shadow:var(--shadow-glow)}.crop-button:not(.cancel):hover{box-shadow:0 0 30px var(--accent-glow);transform:translateY(-2px)}.voice-button{background:var(--gradient-accent);color:#fff;cursor:pointer;width:44px;height:44px;box-shadow:var(--shadow-glow);border:none;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;transition:all .3s;display:flex}.voice-button:hover{box-shadow:0 0 25px var(--accent-glow);transform:translateY(-2px)}.voice-button:disabled{opacity:.4;cursor:not-allowed;transform:none}.auth-form,.auth-form.active{display:block}.mobile-back-button{display:none}.notifications-options{flex-direction:column;gap:10px;display:flex}.notification-option{background:var(--bg-elevated);border:1px solid var(--border-color);color:var(--text-primary);cursor:pointer;text-align:left;border-radius:14px;align-items:center;gap:14px;padding:16px 18px;font-size:15px;font-weight:500;transition:all .3s;display:flex}.notification-option:hover{background:var(--gradient-accent);color:#fff;box-shadow:0 4px 16px var(--accent-glow);border-color:#0000;transform:translate(4px)}.notification-option svg{flex-shrink:0;transition:transform .3s}.notification-option:hover svg{transform:scale(1.1)}.chat-muted-icon{width:18px;height:18px;color:var(--text-muted);flex-shrink:0;margin-left:auto}.chat-item.active .chat-muted-icon{color:#fffc}.media-tabs{border-bottom:1px solid var(--border-color);gap:8px;margin-bottom:24px;padding-bottom:12px;display:flex}.media-tab{color:var(--text-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:8px;padding:10px 16px;font-size:14px;font-weight:500;transition:all .3s;display:flex}.media-tab:hover{color:var(--text-primary);background:#7c3aed1a}.media-tab.active{background:var(--gradient-accent);color:#fff;box-shadow:0 2px 12px var(--accent-glow)}.media-tab svg{flex-shrink:0}.media-content{min-height:400px;max-height:500px;position:relative;overflow-y:auto}.media-section{display:none}.media-section.active{display:block}.media-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;display:grid}.media-item{aspect-ratio:1;cursor:pointer;background:var(--bg-tertiary);border-radius:12px;transition:all .3s;position:relative;overflow:hidden}.media-item:hover{transform:scale(1.05);box-shadow:0 8px 24px #7c3aed4d}.media-item img,.media-item video{object-fit:cover;width:100%;height:100%}.media-item-play{pointer-events:none;background:#000000b3;border-radius:50%;justify-content:center;align-items:center;width:48px;height:48px;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.media-item-play svg{color:#fff;width:24px;height:24px;margin-left:4px}.media-list{flex-direction:column;gap:8px;display:flex}.media-list-item{background:var(--bg-tertiary);border:1px solid var(--border-color);cursor:pointer;border-radius:12px;align-items:center;gap:12px;padding:12px 16px;transition:all .3s;display:flex}.media-list-item:hover{background:var(--bg-elevated);border-color:var(--border-hover);transform:translate(4px)}.media-list-icon{background:var(--gradient-accent);border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;display:flex}.media-list-icon svg{color:#fff;width:20px;height:20px}.media-list-content{flex:1;min-width:0}.media-list-title{color:var(--text-primary);text-overflow:ellipsis;white-space:nowrap;margin-bottom:4px;font-size:14px;font-weight:500;overflow:hidden}.media-list-meta{color:var(--text-muted);font-size:12px}.media-list-link{text-overflow:ellipsis;white-space:nowrap;max-width:400px;overflow:hidden}.media-empty{min-height:300px;color:var(--text-muted);flex-direction:column;justify-content:center;align-items:center;display:flex}.media-empty svg{margin-bottom:16px}.media-empty p{font-size:14px}.media-grid:not(:empty)+.media-empty,.media-list:not(:empty)+.media-empty{display:none}.media-grid .empty-state{text-align:center;grid-column:1/-1;padding:40px 20px}#photo-modal.modal{z-index:10000!important}.photo-modal-content{background:#1a1a2e;flex-direction:column;align-items:center;gap:20px;max-width:70vw;max-height:80vh;padding:20px;display:flex;position:relative}.photo-modal-content .modal-close{cursor:pointer;color:#fff;z-index:10;background:#00000080;border:none;border-radius:50%;justify-content:center;align-items:center;width:36px;height:36px;transition:all .2s;display:flex;position:absolute;top:16px;right:16px}.photo-modal-content .modal-close:hover{background:#000000b3;transform:rotate(90deg)}.photo-modal-content img{object-fit:contain;border-radius:8px;max-width:100%;max-height:calc(90vh - 100px)}.photo-modal-actions{justify-content:center;gap:12px;width:100%;padding:20px;display:flex}.photo-action-btn{color:#fff;cursor:pointer;background:linear-gradient(135deg,#7c3aed 0%,#a78bfa 100%);border:none;border-radius:8px;align-items:center;gap:8px;padding:12px 24px;font-size:14px;font-weight:500;transition:all .2s;display:flex}.photo-action-btn:hover{transform:translateY(-2px);box-shadow:0 4px 12px #7c3aed66}.photo-action-btn:active{transform:translateY(0)}.document-item{background:#1a1a2e99;border-radius:8px;align-items:center;gap:12px;padding:12px;transition:all .2s;display:flex}.document-item:hover{background:#1a1a2ecc}.document-name{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.document-actions{gap:8px;margin-left:auto;display:flex}.document-actions .icon-button{color:#a78bfa;cursor:pointer;background:#7c3aed33;border:1px solid #7c3aed4d;border-radius:6px;justify-content:center;align-items:center;padding:8px;transition:all .2s;display:flex}.document-actions .icon-button:hover{background:#7c3aed4d;border-color:#7c3aed80;transform:translateY(-2px)}.document-actions .icon-button:active{transform:translateY(0)}.modal#photo-modal,.modal.show#photo-modal{z-index:99999!important}.photo-modal-content{padding:20px;max-width:50vw!important;max-height:70vh!important}.photo-modal-content img{max-height:calc(70vh - 120px)!important}.modal.show,.modal.show#photo-modal,#photo-modal.modal.show,#photo-modal.show,.photo-modal-content{z-index:999999!important}.video-preview-item{cursor:pointer;position:relative}.video-preview-item video{pointer-events:none}.video-preview-overlay{opacity:0;pointer-events:none;background:#0000004d;justify-content:center;align-items:center;transition:opacity .2s;display:flex;position:absolute;inset:0}.video-preview-item:hover .video-preview-overlay{opacity:1}.modal.show#video-modal,#video-modal.modal.show,#video-modal.show{z-index:999999!important}.video-modal-content{background:#1a1a2e;flex-direction:column;align-items:center;gap:16px;padding:20px;display:flex;position:relative;overflow:visible;width:auto!important;max-width:90vw!important;max-height:90vh!important}.video-modal-content .modal-close{cursor:pointer;color:#fff;z-index:10;background:#00000080;border:none;border-radius:50%;justify-content:center;align-items:center;width:36px;height:36px;transition:all .2s;display:flex;position:absolute;top:16px;right:16px}.video-modal-content .modal-close:hover{background:#000000b3;transform:rotate(90deg)}.video-player-wrapper{justify-content:center;align-items:center;width:100%;max-height:calc(90vh - 140px);display:flex;overflow:visible}.video-player-wrapper video{border-radius:8px;width:auto;max-width:85vw;height:auto;max-height:calc(90vh - 140px)}.lock-icon{color:#a78bfa;margin-left:8px;animation:2s ease-in-out infinite lockPulse}@keyframes lockPulse{0%,to{opacity:1}50%{opacity:.6}}.swipe-indicator{background:#0003;border-radius:8px;justify-content:center;align-items:center;height:32px;margin:12px 0;display:flex;position:relative;overflow:hidden}.swipe-progress{background:linear-gradient(90deg,#7c3aed 0%,#a78bfa 100%);border-radius:8px;transition:width .1s ease-out;position:absolute;top:0;bottom:0;left:0}.swipe-hint{z-index:1;color:#e0e0e0;text-shadow:0 1px 2px #00000080;font-size:13px;font-weight:500;position:relative}.video-recording-overlay{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:9999;background:#000000f2;justify-content:center;align-items:center;animation:.2s ease-in-out fadeIn;display:flex;position:fixed;inset:0}.video-recording-card{background:linear-gradient(145deg,#1a1a2e 0%,#16213e 100%);border:1px solid #7c3aed4d;border-radius:20px;width:90%;max-width:500px;padding:24px;animation:.3s ease-out slideUp;box-shadow:0 20px 60px #0006,0 0 40px #7c3aed33}.video-preview-container{aspect-ratio:1;background:#000;border-radius:16px;width:100%;margin-bottom:16px;position:relative;overflow:hidden}.video-preview{object-fit:cover;width:100%;height:100%}.video-recording-header{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#0009;border-radius:12px;justify-content:space-between;align-items:center;padding:12px 16px;display:flex;position:absolute;top:16px;left:16px;right:16px}.record-button{transition:all .2s;position:relative}.record-button.recording{animation:1.5s ease-in-out infinite recordingPulse;background:#ef444433!important;border-color:#ef4444!important}.record-button.video-mode{background:#7c3aed33!important;border-color:#7c3aed!important}@keyframes recordingPulse{0%,to{box-shadow:0 0 #ef444466}50%{box-shadow:0 0 0 8px #ef444400}}.telegram-voice-popup{z-index:9999;animation:.2s ease-out popupSlideIn;position:fixed;bottom:80px;right:20px}.voice-popup-content{background:linear-gradient(145deg,#1e1e2e,#2a2a3e);border:2px solid #7c3aed80;border-radius:20px;flex-direction:column;align-items:center;gap:12px;min-width:140px;padding:16px;display:flex;box-shadow:0 8px 32px #0009}.recording-circle{background:linear-gradient(135deg,#ef4444,#dc2626);border-radius:50%;justify-content:center;align-items:center;width:64px;height:64px;transition:all .3s;display:flex;position:relative}.recording-circle.locked{background:linear-gradient(135deg,#7c3aed,#6d28d9)}.pulse-ring{border:2px solid #ef444480;border-radius:50%;width:100%;height:100%;animation:2s cubic-bezier(.4,0,.6,1) infinite pulse;position:absolute}.pulse-ring-2{animation-delay:1s}.mic-icon{z-index:1;position:relative}.lock-badge{background:#7c3aed;border-radius:50%;padding:2px;position:absolute;top:-4px;right:-4px}.voice-timer{color:#fff;font-family:Courier New,monospace;font-size:18px;font-weight:600}.swipe-hint-compact{opacity:.8;flex-direction:column;align-items:center;gap:4px;display:flex}.swipe-arrow{font-size:24px;animation:1s infinite bounce}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-8px)}}.voice-hint-text{color:#ffffffb3;text-align:center;font-size:12px}.voice-popup-actions{gap:12px;display:flex}.popup-btn{cursor:pointer;border:none;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;transition:all .2s;display:flex}.popup-btn-cancel{color:#ef4444;background:#ef444433}.popup-btn-cancel:hover{background:#ef44444d;transform:scale(1.1)}.popup-btn-send{color:#22c55e;background:#22c55e33}.popup-btn-send:hover{background:#22c55e4d;transform:scale(1.1)}@keyframes popupSlideIn{0%{opacity:0;transform:translateY(20px)scale(.9)}to{opacity:1;transform:translateY(0)scale(1)}}html{overscroll-behavior:none;-webkit-overflow-scrolling:touch}.mobile-close-info{display:none}@media (width<=768px),(width>=0){.force-mobile .app-container,body.force-mobile .app-container{position:relative;overflow:hidden;grid-template-columns:none!important;display:flex!important}.force-mobile .sidebar-left,.force-mobile .chat-main,.force-mobile .sidebar-right{z-index:1;transition:transform .3s cubic-bezier(.4,0,.2,1);top:0;left:0;width:100%!important;height:100vh!important;position:absolute!important}.force-mobile .sidebar-left{z-index:3;border-right:none;transform:translate(0)}.force-mobile .sidebar-left.mobile-hidden{z-index:1;transform:translate(-100%)}.force-mobile .chat-main{z-index:2;transform:translate(100%);flex-direction:column!important;display:flex!important}.force-mobile .chat-main.mobile-open{z-index:4;transform:translate(0)}.force-mobile .sidebar-right{z-index:2;border-left:none;transform:translate(100%)}.force-mobile .sidebar-right.mobile-open{z-index:5;transform:translate(0)}.force-mobile .mobile-back-button{color:#e0e0e0;cursor:pointer;background:0 0;border:none;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;margin-right:8px;transition:all .2s;display:flex!important}.force-mobile .mobile-back-button:active{background:#2a2a3e;transform:scale(.95)}.force-mobile .mobile-back-button svg{width:24px;height:24px}.force-mobile .mobile-close-info{color:#e0e0e0;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;margin-left:auto;transition:all .2s;display:flex!important}.force-mobile .mobile-close-info:active{background:#2a2a3e;transform:scale(.95)}.force-mobile .mobile-close-info svg{width:24px;height:24px}}@media (width<=768px){.app-container{inset:0;overflow:hidden;grid-template-columns:none!important;height:100dvh!important;display:flex!important;position:fixed!important}.sidebar-left,.chat-main,.sidebar-right{z-index:1;transition:transform .3s cubic-bezier(.4,0,.2,1);top:0;left:0;overflow:hidden;width:100%!important;height:100%!important;max-height:100dvh!important;position:absolute!important}.sidebar-left{z-index:3;border-right:none;transform:translate(0)}.sidebar-left.mobile-hidden{z-index:1;transform:translate(-100%)}.chat-main{z-index:2;transform:translate(100%);flex-direction:column!important;display:flex!important}.chat-main.mobile-open{z-index:4;transform:translate(0)}.sidebar-right{z-index:2;border-left:none;transform:translate(100%)}.sidebar-right.mobile-open{z-index:5;transform:translate(0)}.mobile-back-button{color:#e0e0e0;cursor:pointer;background:0 0;border:none;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;margin-right:8px;transition:all .2s;display:flex!important}.mobile-back-button:active{background:#2a2a3e;transform:scale(.95)}.mobile-back-button svg{width:24px;height:24px}.profile-header:before{z-index:0!important}.mobile-close-info{color:#fff;cursor:pointer;border:none;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;transition:all .2s;z-index:100!important;background:#ffffff1a!important;display:flex!important;position:absolute!important;top:10px!important;left:10px!important}.mobile-close-info:active{transform:scale(.95);background:#fff3!important}.mobile-close-info svg{width:20px;height:20px}.sidebar-header,.chat-header{min-height:60px;padding:12px 16px!important}.chat-header-info{text-align:left!important;justify-content:flex-start!important}.chat-title,.chat-subtitle{text-align:left!important}.force-mobile .messages-container{padding:12px 12px 80px!important}.force-mobile .message-input-container{background:var(--bg-secondary)!important;z-index:100!important;gap:8px!important;padding:12px!important;position:fixed!important;bottom:0!important;left:0!important;right:0!important}.avatar{width:40px!important;height:40px!important;font-size:16px!important}.message-avatar{width:32px!important;height:32px!important;font-size:13px!important}.avatar-xl{width:72px!important;height:72px!important;font-size:28px!important}.chat-item{padding:12px!important}.chat-item-name{font-size:15px!important}.chat-item-message{font-size:14px!important}.message-content{max-width:75%!important}.message-bubble{padding:10px 14px!important;font-size:15px!important}.input-wrapper{padding:10px 14px!important}.message-input{font-size:15px!important;line-height:1.4!important}.send-button,.voice-button,.attachment-button{width:42px!important;height:42px!important}.icon-button{width:40px!important;height:40px!important}.fab{z-index:10!important;width:56px!important;height:56px!important;bottom:20px!important;right:16px!important}.search-container{padding:12px 16px!important}.search-input{padding:10px 16px 10px 38px!important;font-size:15px!important}.nav-tabs{margin-bottom:12px!important;padding:0 12px!important}.nav-tab{padding:10px!important;font-size:15px!important}.modal-content{border-radius:0!important;width:100%!important;max-width:100%!important;height:100vh!important;max-height:100vh!important;margin:0!important;padding:16px!important}.modal-header{margin-bottom:16px!important}.modal-title{font-size:20px!important}.form-group{margin-bottom:14px!important}.form-input{padding:12px 14px!important;font-size:15px!important}.form-button{padding:14px!important;font-size:16px!important}.sidebar-right{padding:16px!important}.force-mobile .profile-header{position:relative;margin-bottom:20px!important}.force-mobile .profile-header:before{z-index:0!important}.force-mobile .mobile-close-info{color:#fff;cursor:pointer;background:#ffffff1a;border:none;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;transition:background .2s;position:absolute;top:10px;left:10px;z-index:100!important;display:flex!important}.force-mobile .mobile-close-info:hover{background:#fff3}.force-mobile .mobile-close-info svg{width:20px;height:20px}.profile-name{font-size:20px!important}.profile-status{font-size:15px!important}.profile-action,.setting-item{padding:14px!important;font-size:15px!important}#call-ui{border-radius:0!important;width:100%!important;max-width:100%!important;height:100vh!important;top:0!important;left:0!important;transform:none!important}#incoming-call-modal .modal-content{padding:24px!important}.media-preview,.document-preview{max-width:100%!important}.media-preview img,.media-preview video{max-width:100%!important;max-height:50vh!important}.context-menu{width:90%!important;max-width:320px!important}.member-item{padding:12px!important}.pinned-message{padding:10px!important;font-size:14px!important}.emoji-picker{width:100%!important;max-width:100%!important;bottom:60px!important;left:0!important;right:0!important}.chat-item,.profile-action,.setting-item,.member-item{min-height:48px}button,.icon-button,.nav-tab{min-width:44px;min-height:44px}.chat-item:hover,.icon-button:hover,.profile-action:hover,.setting-item:hover{background:inherit}.chat-item:active{background:#2a2a3e!important}.icon-button:active{transform:scale(.95);background:#2a2a3e!important}.chat-list,.messages-container,.sidebar-right{-webkit-overflow-scrolling:touch}.chat-list::-webkit-scrollbar{display:none}.messages-container::-webkit-scrollbar{display:none}.sidebar-right::-webkit-scrollbar{display:none}@supports (padding:max(0px)){.sidebar-header,.chat-header{padding-top:max(12px, env(safe-area-inset-top))!important}.message-input-container{padding-bottom:max(12px, env(safe-area-inset-bottom))!important}.fab{bottom:max(20px, calc(env(safe-area-inset-bottom) + 10px))!important}}@media (orientation:landscape) and (height<=500px){.messages-container{padding:8px!important}.message{margin-bottom:8px!important}.message-bubble{padding:8px 12px!important}}}@media (width>=769px) and (width<=1024px){.app-container{grid-template-columns:280px 1fr!important}.sidebar-right{display:none!important}.sidebar-right.mobile-open{z-index:1000;width:320px;position:fixed;top:0;bottom:0;right:0;box-shadow:-4px 0 12px #0000004d;display:flex!important}}@media (width>=1025px){.mobile-back-button,.mobile-info-button,.mobile-close-info{display:none!important}}
