@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;width:100%}body{font-family:Inter,system-ui,sans-serif;background:#0f0f1a;color:#e8e8f0;-webkit-font-smoothing:antialiased;overflow:hidden}.auth-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 20% 30%,#1a1040,#0f0f1a 60%),radial-gradient(ellipse at 80% 80%,#0d2040 0%,transparent 50%);padding:1rem}.auth-card{width:100%;max-width:380px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:20px;padding:2.5rem 2rem;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:0 20px 60px #00000080}.auth-logo{font-size:2.5rem;text-align:center;margin-bottom:.5rem}.auth-title{font-size:1.6rem;font-weight:700;text-align:center;background:linear-gradient(135deg,#a78bfa,#60a5fa);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;margin-bottom:.25rem}.auth-subtitle{text-align:center;color:#fff6;font-size:.85rem;margin-bottom:1.8rem}.auth-form{display:flex;flex-direction:column;gap:.9rem}.auth-input{background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:.85rem 1rem;color:#e8e8f0;font-size:.95rem;font-family:inherit;transition:border-color .2s,background .2s;outline:none}.auth-input::placeholder{color:#ffffff4d}.auth-input:focus{border-color:#a78bfa80;background:#ffffff14}.auth-error{background:#ef444426;border:1px solid rgba(239,68,68,.3);border-radius:10px;padding:.6rem .9rem;font-size:.85rem;color:#fca5a5}.auth-btn{background:linear-gradient(135deg,#7c3aed,#3b82f6);border:none;border-radius:12px;padding:.9rem;color:#fff;font-size:.95rem;font-weight:600;font-family:inherit;cursor:pointer;transition:opacity .2s,transform .1s;margin-top:.4rem}.auth-btn:hover:not(:disabled){opacity:.9;transform:translateY(-1px)}.auth-btn:active:not(:disabled){transform:scale(.98)}.auth-btn:disabled{opacity:.5;cursor:not-allowed}.auth-switch{text-align:center;margin-top:1.5rem;font-size:.85rem;color:#fff6}.auth-link{background:none;border:none;color:#a78bfa;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:500;transition:color .2s}.auth-link:hover{color:#c4b5fd}.chat-layout{display:flex;height:100vh;height:100dvh}.sidebar{width:280px;min-width:280px;background:#ffffff08;border-right:1px solid rgba(255,255,255,.07);display:flex;flex-direction:column;overflow:hidden}@media (max-width: 600px){.sidebar{display:none;position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;width:100%;background:#0f0f1a}.chat-layout.sidebar-open .sidebar{display:flex}}.mobile-menu-btn{display:none;position:absolute;top:1rem;left:1rem;z-index:50;background:#ffffff1a;border:none;border-radius:8px;width:40px;height:40px;color:#fff;font-size:1.2rem;cursor:pointer;align-items:center;justify-content:center}@media (max-width: 600px){.mobile-menu-btn:not(.hidden){display:flex}}.mobile-close-btn{display:none}@media (max-width: 600px){.mobile-close-btn{display:flex;background:none;border:none;color:#ffffff80;font-size:1.5rem;cursor:pointer}}.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:1.2rem 1rem;border-bottom:1px solid rgba(255,255,255,.07)}.sidebar-me{display:flex;align-items:center;gap:.6rem}.sidebar-username{font-weight:600;font-size:.95rem}.logout-btn{background:#ffffff0f;border:1px solid rgba(255,255,255,.08);border-radius:8px;padding:.35rem .55rem;color:#ffffff80;cursor:pointer;font-size:.9rem;transition:background .2s,color .2s}.logout-btn:hover{background:#ef444426;color:#fca5a5}.sidebar-label{padding:.8rem 1rem .4rem;font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:#ffffff4d;font-weight:600}.contact-list{list-style:none;flex:1;overflow-y:auto;padding:.25rem .5rem}.contact-empty{padding:.8rem;font-size:.85rem;color:#ffffff4d;text-align:center;margin-top:1rem}.contact-item{display:flex;align-items:center;gap:.75rem;padding:.7rem .75rem;border-radius:12px;cursor:pointer;transition:background .15s}.contact-item:hover{background:#ffffff0d}.contact-item.active{background:#7c3aed33}.contact-info{flex:1;display:flex;align-items:center;justify-content:space-between}.contact-name{font-size:.9rem;font-weight:500}.unread-badge{background:#ef4444;color:#fff;font-size:.65rem;font-weight:700;min-width:18px;height:18px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 4px}.avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#7c3aed,#3b82f6);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.9rem;flex-shrink:0}.avatar-me{background:linear-gradient(135deg,#059669,#3b82f6)}.sidebar-encrypted-badge{padding:.75rem 1rem;text-align:center;font-size:.72rem;color:#ffffff40;border-top:1px solid rgba(255,255,255,.05)}.chat-main{flex:1;display:flex;flex-direction:column;overflow:hidden;background:#0f0f1a}.chat-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#ffffff40;gap:1rem}.chat-empty-icon{font-size:3rem}.chat-empty p{font-size:.9rem}.chat-header{display:flex;align-items:center;gap:.75rem;padding:.85rem 1.2rem;border-bottom:1px solid rgba(255,255,255,.07);background:#ffffff05}.chat-header-info{display:flex;flex-direction:column}.chat-header-name{font-weight:600;font-size:.95rem}.chat-status{font-size:.72rem;margin-top:.1rem}.chat-status.online{color:#34d399}.chat-status.offline{color:#ffffff59}.messages-area{flex:1;overflow-y:auto;padding:1.2rem;display:flex;flex-direction:column;gap:.5rem;scroll-behavior:smooth}.loading{text-align:center;color:#ffffff4d;font-size:.85rem;padding:1rem}.bubble-row{display:flex}.bubble-row.mine{justify-content:flex-end}.bubble-row.theirs{justify-content:flex-start}.bubble{max-width:70%;padding:.6rem .9rem;border-radius:18px;display:flex;flex-direction:column;gap:.25rem;animation:pop .15s ease-out}@keyframes pop{0%{opacity:0;transform:scale(.92) translateY(4px)}to{opacity:1;transform:scale(1) translateY(0)}}.bubble-mine{background:linear-gradient(135deg,#7c3aed,#4f46e5);border-bottom-right-radius:4px}.bubble-theirs{background:#ffffff14;border-bottom-left-radius:4px}.bubble-pending{opacity:.6}.bubble-text{font-size:.93rem;line-height:1.45;word-break:break-word}.bubble-time{font-size:.65rem;color:#ffffff73;align-self:flex-end}.decrypt-fail{color:#ffffff4d;font-style:italic;font-size:.85rem}.input-bar{display:flex;align-items:center;gap:.6rem;padding:.8rem 1rem;border-top:1px solid rgba(255,255,255,.07);background:#ffffff05;padding-bottom:max(.8rem,env(safe-area-inset-bottom))}.message-input{flex:1;background:#ffffff12;border:1px solid rgba(255,255,255,.1);border-radius:24px;padding:.7rem 1.1rem;color:#e8e8f0;font-size:.93rem;font-family:inherit;outline:none;transition:border-color .2s}.message-input::placeholder{color:#ffffff4d}.message-input:focus{border-color:#7c3aed80}.send-btn{width:44px;height:44px;border-radius:50%;border:none;background:linear-gradient(135deg,#7c3aed,#3b82f6);color:#fff;font-size:1rem;cursor:pointer;transition:opacity .2s,transform .1s;display:flex;align-items:center;justify-content:center;flex-shrink:0}.send-btn:hover:not(:disabled){opacity:.85;transform:scale(1.05)}.send-btn:disabled{opacity:.35;cursor:not-allowed}::-webkit-scrollbar{width:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#ffffff1f;border-radius:4px}.avatar-wrapper{position:relative}.online-indicator{position:absolute;bottom:0;right:0;width:10px;height:10px;background:#34d399;border:2px solid #1a1a2e;border-radius:50%}.contact-main{display:flex;flex-direction:column}.contact-status-text{font-size:.7rem;color:#ffffff4d}.chat-header-status{font-size:.72rem;color:#34d399}.bubble-footer{display:flex;align-items:center;justify-content:flex-end;gap:.4rem;margin-top:.2rem}.status-tick{font-size:.75rem;line-height:1}.status-tick.sent{color:#fff6}.status-tick.delivered{color:#fff9}.status-tick.read{color:#60a5fa}.bubble-image{max-width:100%;border-radius:12px;margin-bottom:.4rem;display:block}.reply-preview{background:#0003;border-left:3px solid #7c3aed;padding:.4rem .6rem;border-radius:6px;margin-bottom:.5rem;font-size:.8rem;opacity:.8}.reply-text{color:#ffffffb3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.input-container{display:flex;flex-direction:column}.reply-bar{background:#ffffff0d;display:flex;align-items:center;justify-content:space-between;padding:.6rem 1.2rem;border-top:1px solid rgba(255,255,255,.07)}.reply-info{display:flex;flex-direction:column;gap:.1rem}.reply-title{font-size:.7rem;font-weight:700;color:#a78bfa;text-transform:uppercase}.reply-preview-text{font-size:.85rem;color:#fff9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}.reply-close{background:none;border:none;color:#fff6;cursor:pointer;font-size:1.1rem}.attach-btn{background:none;border:none;font-size:1.25rem;cursor:pointer;padding:0 .5rem;transition:transform .1s}.attach-btn:hover{transform:scale(1.1)}.bubble-image{cursor:zoom-in}.lightbox-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;background:#000000e0;display:flex;align-items:center;justify-content:center;animation:fadeIn .15s ease;cursor:zoom-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.lightbox-img{max-width:92vw;max-height:92vh;border-radius:10px;box-shadow:0 8px 60px #000c;object-fit:contain;cursor:default;animation:zoomIn .15s ease}@keyframes zoomIn{0%{transform:scale(.92);opacity:0}to{transform:scale(1);opacity:1}}.lightbox-close{position:fixed;top:1.2rem;right:1.4rem;background:#ffffff1f;border:none;color:#fff;font-size:1.4rem;width:40px;height:40px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s;line-height:1}.lightbox-close:hover{background:#ffffff40}
