:root{--tg-bg: #0e1621;--tg-sidebar: #17212b;--tg-panel: #0e1621;--tg-header: #17212b;--tg-hover: #202b36;--tg-active: #2b5278;--tg-accent: #5288c1;--tg-bubble-own: #2b5278;--tg-bubble-other: #182533;--tg-text: #f5f5f5;--tg-muted: #7f91a4;--tg-border: #0f1419;--tg-input: #242f3d;--tg-radius: 12px;--tg-font: "Segoe UI", system-ui, -apple-system, sans-serif}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%}body{font-family:var(--tg-font);background:var(--tg-bg);color:var(--tg-text);line-height:1.45}a{color:var(--tg-accent);text-decoration:none}button{font-family:inherit;cursor:pointer}.loading,.empty-hint{color:var(--tg-muted);text-align:center;padding:1.5rem 1rem;font-size:.9rem}.error{color:#ff6b6b;background:#ff6b6b1a;padding:.6rem 1rem;border-radius:8px;font-size:.85rem}.error.banner{margin:.5rem 1rem}.btn-primary{background:var(--tg-accent);color:#fff;border:none;border-radius:8px;padding:.65rem 1.2rem;font-weight:600}.btn-primary.full{width:100%;margin-top:.75rem}.btn-primary:disabled{opacity:.5;cursor:not-allowed}.icon-btn{background:transparent;border:none;color:var(--tg-muted);font-size:1.1rem;padding:.35rem .5rem;border-radius:8px}.icon-btn:hover{background:var(--tg-hover);color:var(--tg-text)}.icon-btn.active-call{color:#3dd68c}.avatar{width:42px;height:42px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;color:#fff;flex-shrink:0}.avatar.sm{width:48px;height:48px;font-size:1.1rem}.avatar.lg{width:96px;height:96px;font-size:2rem}.avatar-img-wrap{overflow:hidden;padding:0}.avatar-img{width:100%;height:100%;object-fit:cover;display:block;border-radius:50%}.tg-user-top{display:flex;align-items:center;gap:.35rem;margin-bottom:.65rem}.tg-user-row-btn{flex:1;min-width:0;background:transparent;border:none;color:inherit;text-align:left;padding:.25rem;border-radius:10px;cursor:pointer}.tg-user-row-btn:hover{background:var(--tg-hover)}.profile-modal{max-width:420px}.profile-avatar-section{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:.5rem 1.25rem 1rem;border-bottom:1px solid var(--tg-border)}.profile-avatar-btn{position:relative;background:transparent;border:none;padding:0;cursor:pointer;border-radius:50%}.profile-avatar-view-btn{background:transparent;border:none;padding:0;cursor:zoom-in;border-radius:50%;transition:transform .15s}.profile-avatar-view-btn:hover{transform:scale(1.04)}.profile-avatar-view-btn:active{transform:scale(.98)}.profile-avatar-edit{position:absolute;right:0;bottom:0;width:28px;height:28px;border-radius:50%;background:var(--tg-accent);display:flex;align-items:center;justify-content:center;font-size:.85rem;border:2px solid var(--tg-sidebar)}.profile-remove-avatar{font-size:.78rem;padding:.35rem .65rem}.profile-display-name{font-size:1.1rem}.profile-username{color:var(--tg-muted);font-size:.85rem}.profile-presence{color:var(--tg-muted);font-size:.82rem}.profile-presence.online{color:#3dd68c}.profile-form{padding:1rem 1.25rem 1.25rem;display:flex;flex-direction:column;gap:.85rem}.profile-form label{display:flex;flex-direction:column;gap:.35rem;font-size:.85rem;color:var(--tg-muted)}.profile-form input,.profile-form textarea{padding:.65rem .85rem;border:1px solid var(--tg-border);border-radius:8px;background:var(--tg-input);color:var(--tg-text);font-family:inherit;resize:vertical}.profile-form input.readonly{opacity:.7;cursor:default}.profile-joined{font-size:.78rem;color:var(--tg-muted);margin-top:.15rem}.profile-loading{padding:2rem 1.25rem;text-align:center;color:var(--tg-muted)}.profile-view{padding:1rem 1.25rem 1.25rem;display:flex;flex-direction:column;gap:1rem}.profile-view-block{text-align:left}.profile-view-label{display:block;font-size:.78rem;color:var(--tg-muted);margin-bottom:.35rem;text-transform:uppercase;letter-spacing:.04em}.profile-view-bio{white-space:pre-wrap;word-break:break-word;line-height:1.5;font-size:.92rem}.profile-view-empty{color:var(--tg-muted);font-size:.88rem;text-align:center}.tg-chat-header-profile{flex:1;min-width:0;display:flex;align-items:center;gap:.65rem;background:transparent;border:none;color:inherit;text-align:left;padding:0;cursor:pointer;border-radius:8px}.tg-chat-header-profile:hover{opacity:.92}.tg-chat-header-profile .tg-chat-header-info{pointer-events:none}.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem;background:linear-gradient(160deg,#0e1621,#17212b 50%,#1a3a5c)}.auth-card{background:var(--tg-sidebar);padding:2rem;border-radius:16px;width:100%;max-width:400px;box-shadow:0 8px 32px #0006}.auth-card h1{color:var(--tg-accent);margin-bottom:.25rem}.subtitle{color:var(--tg-muted);margin-bottom:1.25rem;font-size:.9rem}.auth-card form{display:flex;flex-direction:column;gap:.85rem}.auth-card label{display:flex;flex-direction:column;gap:.35rem;font-size:.85rem;color:var(--tg-muted)}.auth-card input{padding:.7rem .9rem;border:1px solid var(--tg-border);border-radius:8px;background:var(--tg-input);color:var(--tg-text)}.auth-link{margin-top:1rem;text-align:center;color:var(--tg-muted);font-size:.9rem}.join-actions{display:flex;gap:.5rem;justify-content:center}.join-page{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:linear-gradient(160deg,#0e1621,#17212b 50%,#1a3a5c)}.join-preview{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.5rem 1.25rem 1rem;position:relative}.join-back{position:absolute;top:1rem;left:1rem;background:transparent;border:none;color:var(--tg-muted);font-size:.95rem;padding:.5rem;border-radius:8px}.join-back:hover{background:var(--tg-hover);color:var(--tg-text)}.join-preview-card{text-align:center;max-width:360px;width:100%}.join-preview-icon{display:inline-flex;width:88px;height:88px;align-items:center;justify-content:center;font-size:2.5rem;background:var(--tg-sidebar);border-radius:50%;margin-bottom:1rem;box-shadow:0 8px 24px #00000059}.join-preview-type{color:var(--tg-accent);font-size:.85rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.35rem}.join-preview-card h1{font-size:1.5rem;margin-bottom:.5rem;word-break:break-word}.join-preview-hint{color:var(--tg-muted);font-size:.92rem;line-height:1.45}.join-preview-error{margin-top:1rem}.join-bottom-bar{padding:1rem 1.25rem calc(1rem + env(safe-area-inset-bottom,0px));background:var(--tg-sidebar);border-top:1px solid var(--tg-border);box-shadow:0 -4px 24px #00000040}.join-bottom-btn{width:100%;padding:.85rem 1rem;font-size:1rem;border-radius:12px}.join-bottom-actions{display:flex;flex-direction:column;gap:.65rem}.join-bottom-secondary{width:100%;text-align:center;padding:.75rem;border-radius:12px;background:var(--tg-input);color:var(--tg-text);text-decoration:none;font-weight:600}.tg-message-text{margin:0;white-space:pre-wrap;word-break:break-word}.tg-invite-inline{color:var(--tg-accent);text-decoration:underline;word-break:break-all}.tg-invite-inline:hover{opacity:.85}.tg-invite-card{display:flex;align-items:center;gap:.65rem;padding:.65rem .75rem;margin:-.15rem 0 .35rem;border-radius:10px;background:#5288c126;border:1px solid rgba(82,136,193,.25);text-decoration:none;color:inherit;transition:background .15s}.tg-invite-card:hover{background:#5288c138}.tg-invite-card-icon{font-size:1.5rem;line-height:1;flex-shrink:0}.tg-invite-card-body{display:flex;flex-direction:column;gap:.15rem;flex:1;min-width:0;text-align:left}.tg-invite-card-body strong{font-size:.9rem;color:var(--tg-accent)}.tg-invite-card-body span{font-size:.78rem;color:var(--tg-muted)}.tg-invite-card-arrow{color:var(--tg-muted);font-size:1.25rem;flex-shrink:0}.tg-bubble-row.own .tg-invite-card{background:#ffffff1f;border-color:#fff3}.tg-bubble-row.own .tg-invite-card-body strong{color:#fff}.tg-bubble-row.own .tg-invite-inline{color:#b8d4f0}.tg-app{height:100vh;overflow:hidden}.tg-layout{display:grid;grid-template-columns:360px 1fr;height:100vh}.tg-sidebar{background:var(--tg-sidebar);border-right:1px solid var(--tg-border);display:flex;flex-direction:column;position:relative;min-width:0}.tg-sidebar-header{padding:.65rem .75rem .5rem;border-bottom:1px solid var(--tg-border)}.tg-user-row{display:flex;align-items:center;gap:.65rem;margin-bottom:.65rem}.tg-user-meta{flex:1;min-width:0}.tg-user-meta strong{display:block;font-size:.95rem}.tg-sub{font-size:.75rem;color:var(--tg-muted)}.tg-search-wrap{padding:0 .15rem}.tg-search{width:100%;padding:.55rem .85rem;border:none;border-radius:20px;background:var(--tg-input);color:var(--tg-text);font-size:.9rem}.tg-search:focus{outline:2px solid var(--tg-accent)}.tg-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:2px;padding:.4rem .5rem;border-bottom:1px solid var(--tg-border)}.tg-tab{background:transparent;border:none;color:var(--tg-muted);font-size:.68rem;padding:.45rem .2rem;border-radius:8px;display:flex;flex-direction:column;align-items:center;gap:.15rem}.tg-tab-icon{font-size:1rem}.tg-tab.active{background:var(--tg-hover);color:var(--tg-accent)}.tg-chat-list{flex:1;overflow-y:auto}.chat-list-item{width:100%;display:flex;align-items:center;gap:.5rem;padding:.65rem .85rem;background:transparent;color:var(--tg-text);border-bottom:1px solid rgba(255,255,255,.03)}.chat-list-avatar-btn{background:transparent;border:none;padding:0;cursor:pointer;flex-shrink:0;border-radius:50%}.chat-list-avatar-btn:hover{opacity:.85}.chat-list-main{flex:1;min-width:0;display:flex;align-items:center;background:transparent;border:none;color:inherit;text-align:left;padding:0;cursor:pointer}.chat-list-item:hover{background:var(--tg-hover)}.chat-list-item.active{background:var(--tg-active)}.chat-list-preview.online{color:#3dd68c}.avatar-presence-wrap{position:relative;display:inline-flex}.presence-dot{position:absolute;right:0;bottom:0;width:12px;height:12px;border-radius:50%;background:#3dd68c;border:2px solid var(--tg-sidebar)}.tg-chat-header-info span.presence-online{color:#3dd68c}.chat-list-body{flex:1;min-width:0}.chat-list-name{display:block;font-weight:600;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-list-preview{display:block;font-size:.8rem;color:var(--tg-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tg-fab{position:absolute;right:1rem;bottom:1rem;width:48px;height:48px;border-radius:50%;border:none;background:var(--tg-accent);color:#fff;font-size:1.6rem;line-height:1;box-shadow:0 4px 12px #00000059}.tg-chat-panel{display:flex;flex-direction:column;background:var(--tg-panel);min-width:0;height:100vh;background-image:radial-gradient(circle at 20% 20%,rgba(82,136,193,.04),transparent 40%)}.tg-chat-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--tg-muted);gap:.5rem}.tg-empty-icon{font-size:4rem;opacity:.35}.tg-chat-header{display:flex;align-items:center;gap:.75rem;padding:.65rem 1rem;background:var(--tg-header);border-bottom:1px solid var(--tg-border)}.tg-chat-header-info{flex:1;min-width:0}.tg-chat-header-info strong{display:block;font-size:.95rem}.tg-chat-header-info span{font-size:.78rem;color:var(--tg-muted)}.tg-messages{flex:1;overflow-y:auto;padding:1rem 1.25rem;display:flex;flex-direction:column;gap:.35rem}.tg-bubble-row{display:flex}.tg-bubble-row.own{justify-content:flex-end}.tg-bubble{max-width:min(75%,520px);padding:.45rem .7rem .3rem;border-radius:var(--tg-radius);background:var(--tg-bubble-other);box-shadow:0 1px 2px #00000026}.tg-bubble-row.own .tg-bubble{background:var(--tg-bubble-own);border-bottom-right-radius:4px}.tg-bubble-row.other .tg-bubble{border-bottom-left-radius:4px}.tg-bubble p{word-break:break-word;font-size:.95rem;margin-bottom:.15rem}.tg-bubble time{display:block;text-align:right;font-size:.68rem;color:#ffffff8c}.tg-msg-meta{display:flex;align-items:center;justify-content:flex-end;gap:.3rem;margin-top:.2rem}.tg-msg-meta time{font-size:.68rem;color:#ffffff8c}.tg-msg-status{font-size:.72rem;line-height:1;letter-spacing:-.12em;color:#ffffff8c}.tg-msg-status.read{color:#6ab7ff}.tg-composer{display:flex;gap:.5rem;padding:.65rem 1rem;background:var(--tg-header);border-top:1px solid var(--tg-border)}.tg-composer input{flex:1;padding:.65rem 1rem;border:none;border-radius:22px;background:var(--tg-input);color:var(--tg-text)}.tg-composer button{width:44px;height:44px;border-radius:50%;border:none;background:var(--tg-accent);color:#fff;font-size:1.1rem}.tg-composer button:disabled{opacity:.4}.tg-composer.readonly{justify-content:center;color:var(--tg-muted);font-size:.85rem}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;display:flex;align-items:center;justify-content:center;z-index:100;padding:1rem}.modal-card{background:var(--tg-sidebar);border-radius:14px;width:100%;max-width:400px;overflow:hidden;box-shadow:0 12px 40px #00000073}.avatar-lightbox{position:fixed;top:0;right:0;bottom:0;left:0;z-index:110;display:flex;align-items:center;justify-content:center;padding:1.5rem;background:#000000e0;cursor:zoom-out}.avatar-lightbox-img{max-width:min(92vw,520px);max-height:min(85vh,520px);width:auto;height:auto;object-fit:contain;border-radius:12px;box-shadow:0 16px 48px #00000080;cursor:default}.avatar-lightbox-close{position:absolute;top:1rem;right:1rem;width:40px;height:40px;border-radius:50%;background:#ffffff1f;color:#fff;font-size:1.1rem}.avatar-lightbox-close:hover{background:#fff3}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.1rem;border-bottom:1px solid var(--tg-border)}.modal-body{padding:1rem 1.1rem 1.25rem}.modal-hint{color:var(--tg-muted);font-size:.85rem;margin-bottom:.65rem}.search-results{max-height:280px;overflow-y:auto;margin-top:.5rem}.mobile-only{display:none}@media(max-width:768px){.tg-layout{grid-template-columns:1fr}.tg-layout .tg-sidebar{display:flex}.tg-layout .tg-chat-panel,.tg-layout.show-chat .tg-sidebar{display:none}.tg-layout.show-chat .tg-chat-panel{display:flex}.mobile-only{display:inline-flex}.tg-tabs{grid-template-columns:repeat(4,1fr)}.tg-tab{font-size:.62rem}}.gcall-audio-sink{position:fixed;width:0;height:0;overflow:hidden;pointer-events:none}.gcall-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#080c12eb;display:flex;align-items:center;justify-content:center;z-index:199;padding:1.5rem}.gcall-card{text-align:center;max-width:360px;width:100%}.gcall-card h2{font-size:1.35rem;margin-bottom:.25rem}.gcall-subtitle{color:var(--tg-muted);font-size:.9rem;margin-bottom:.5rem}.gcall-timer{font-size:1.75rem;font-weight:600;font-variant-numeric:tabular-nums;margin-bottom:1.25rem}.gcall-participants{display:flex;flex-wrap:wrap;justify-content:center;gap:.75rem;margin-bottom:1.5rem;max-height:200px;overflow-y:auto}.gcall-participant{display:flex;flex-direction:column;align-items:center;gap:.35rem;min-width:64px}.gcall-participant-name{font-size:.75rem;color:var(--tg-muted);max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gcall-error{margin-bottom:1rem}.gcall-actions{display:flex;justify-content:center;gap:1.5rem}.gcall-overlay.gcall-screen-mode{padding:0;flex-direction:column;justify-content:flex-end}.gcall-card.gcall-card-screen{position:relative;z-index:3;max-width:none;width:100%;padding:1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom,0px));background:linear-gradient(transparent,#080c12d9 35%)}.gcall-card.gcall-card-screen h2,.gcall-card.gcall-card-screen .gcall-subtitle,.gcall-card.gcall-card-screen .gcall-timer{text-shadow:0 1px 8px rgba(0,0,0,.6)}.gcall-banner{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.65rem 1rem;background:#3dd68c1f;border-bottom:1px solid rgba(61,214,140,.25)}.gcall-banner-text{display:flex;flex-direction:column;gap:.15rem;min-width:0}.gcall-banner-text strong{font-size:.88rem;color:#3dd68c}.gcall-banner-text span{font-size:.78rem;color:var(--tg-muted)}.gcall-banner-btn{flex-shrink:0;background:#3dd68c;color:#0e1621;border:none;border-radius:10px;padding:.5rem .9rem;font-weight:600;font-size:.85rem}.gcall-banner-btn:active{transform:scale(.97)}@media(max-width:480px){.gcall-banner{flex-direction:column;align-items:stretch;text-align:center}.gcall-banner-btn{width:100%;padding:.65rem}}.voice-call-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#080c12eb;display:flex;align-items:center;justify-content:center;z-index:200;padding:1.5rem}.voice-call-card{text-align:center;max-width:320px;width:100%}.voice-call-avatar{width:96px;height:96px;font-size:2rem;margin:0 auto 1.25rem}.voice-call-card h2{font-size:1.35rem;margin-bottom:.35rem}.voice-call-status{color:var(--tg-muted);font-size:.95rem;margin-bottom:.5rem}.voice-call-timer{font-size:2rem;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:.06em;color:var(--tg-text);margin-bottom:.75rem}.voice-call-ice{color:var(--tg-accent);font-size:.78rem;margin-bottom:1rem}.voice-call-error{margin-bottom:1rem}.voice-call-wave{display:flex;justify-content:center;gap:6px;margin-bottom:1.5rem;height:24px;align-items:flex-end}.voice-call-wave span{width:4px;height:8px;background:var(--tg-accent);border-radius:2px;animation:voice-wave .9s ease-in-out infinite}.voice-call-wave span:nth-child(2){animation-delay:.15s}.voice-call-wave span:nth-child(3){animation-delay:.3s}@keyframes voice-wave{0%,to{height:8px}50%{height:22px}}.voice-call-actions{display:flex;justify-content:center;gap:1.5rem}.voice-btn{width:56px;height:56px;border-radius:50%;border:none;font-size:1.35rem;display:inline-flex;align-items:center;justify-content:center;transition:transform .15s}.voice-btn:active{transform:scale(.94)}.voice-btn.accept{background:#3dd68c;color:#0e1621}.voice-btn.reject{background:#ff6b6b;color:#fff}.voice-btn.mute{background:var(--tg-input);color:var(--tg-text)}.voice-btn.mute.active{background:#ff6b6b}.voice-btn.camera{background:var(--tg-input);color:var(--tg-text)}.voice-btn.camera.active{background:#ff6b6b}.voice-btn.screen{background:var(--tg-input);color:var(--tg-text)}.voice-btn.screen.active{background:#ff6b6b}.voice-call-screen-label{position:absolute;top:12px;left:12px;z-index:2;padding:.35rem .65rem;border-radius:8px;background:#0000008c;color:#fff;font-size:.8rem;font-weight:500}.voice-call-remote-video.screen-share{object-fit:contain}.voice-call-overlay.video-mode{padding:0;flex-direction:column;justify-content:flex-end}.voice-call-video-stage{position:absolute;top:0;right:0;bottom:0;left:0;background:#000;overflow:hidden}.voice-call-remote-video{width:100%;height:100%;object-fit:cover;background:#0a0e14}.voice-call-video-placeholder{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(160deg,#0e1621,#17212b)}.voice-call-local-video{position:absolute;right:12px;bottom:12px;width:120px;height:160px;object-fit:cover;border-radius:12px;border:2px solid rgba(255,255,255,.25);background:#1a2634;z-index:2;box-shadow:0 4px 20px #00000073}.voice-call-local-video.camera-off{opacity:.35}.voice-call-card.video-card{position:relative;z-index:3;max-width:none;width:100%;padding:1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom,0px));background:linear-gradient(transparent,#080c12d9 35%);border-radius:0}.voice-call-card.video-card h2{font-size:1.1rem;text-shadow:0 1px 8px rgba(0,0,0,.6)}.voice-call-card.video-card .voice-call-status,.voice-call-card.video-card .voice-call-timer{text-shadow:0 1px 6px rgba(0,0,0,.5)}.voice-call-card.video-card .voice-call-timer{font-size:1.5rem;margin-bottom:.5rem}@media(min-width:640px){.voice-call-local-video{right:24px;bottom:24px;width:180px;height:240px;border-radius:14px}.voice-call-card.video-card{padding:1.5rem 2rem calc(1.5rem + env(safe-area-inset-bottom,0px))}.voice-call-card.video-card h2{font-size:1.25rem}}@media(max-width:480px){.voice-call-local-video{width:96px;height:128px;right:10px;bottom:10px;border-radius:10px}.voice-call-actions{gap:1rem}.voice-btn{width:52px;height:52px;font-size:1.2rem}}.tg-call-log{display:flex;justify-content:center;margin:.45rem 0}.tg-call-log-inner{display:inline-flex;align-items:center;gap:.4rem;padding:.35rem .75rem;border-radius:14px;background:#5288c11f;color:var(--tg-muted);font-size:.82rem;max-width:90%;flex-wrap:wrap;justify-content:center}.tg-call-log-inner.missed{background:#ff6b6b1a;color:#ff8a8a}.tg-call-log-icon{font-size:.95rem;line-height:1}.tg-call-log-inner time{font-size:.68rem;opacity:.75}.voice-call-overlay+audio,audio[autoplay]{position:fixed;width:0;height:0;opacity:0;pointer-events:none}
