:root{--bg: #121a2e;--panel: rgba(255, 255, 255, .08);--panelSolid: #1a2332;--border: rgba(255, 255, 255, .14);--text: rgba(255, 255, 255, .94);--muted: rgba(255, 255, 255, .7);--muted2: rgba(255, 255, 255, .5);--brand: #8b5cf6;--brand2: #3b82f6;--danger: #ef4444;--ok: #22c55e;--radius: 16px;--shadow: 0 20px 60px rgba(0, 0, 0, .35);--shadowSoft: 0 10px 30px rgba(0, 0, 0, .2)}*{box-sizing:border-box}html,body{height:100%;overflow:hidden}body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,"Apple Color Emoji","Segoe UI Emoji";color:var(--text);background:radial-gradient(1200px 800px at 10% 10%,rgba(124,58,237,.35),transparent 55%),radial-gradient(900px 700px at 80% 20%,rgba(37,99,235,.25),transparent 55%),radial-gradient(900px 700px at 40% 90%,rgba(34,197,94,.12),transparent 55%),var(--bg)}a{color:inherit}.center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}.card{width:420px;border:1px solid var(--border);background:var(--panel);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow)}.title{margin:0 0 6px;font-size:22px;letter-spacing:-.02em}.subtitle{margin:0 0 18px;color:var(--muted);font-size:14px;line-height:1.5}.form{display:flex;flex-direction:column;gap:12px}.fieldLabel{font-size:13px;color:var(--muted);display:flex;flex-direction:column;gap:6px}.input{border-radius:12px;padding:10px 12px;border:1px solid rgba(255,255,255,.14);background:#00000040;color:var(--text);outline:none}.input:focus{border-color:#7c3aedb3;box-shadow:0 0 0 4px #7c3aed2e}.row{display:flex;gap:10px;align-items:center}.btn{border:1px solid rgba(255,255,255,.14);background:#ffffff14;color:var(--text);padding:10px 14px;border-radius:999px;cursor:pointer;transition:transform .05s ease,background .15s ease,border-color .15s ease}.btn:hover{background:#ffffff1f;border-color:#fff3}.btn:active{transform:translateY(1px)}.btnPrimary{border:none;background:linear-gradient(135deg,var(--brand),var(--brand2))}.btnPrimary:hover{filter:brightness(1.05)}.btnDanger{border:none;background:linear-gradient(135deg,#ef4444f2,#dc2626f2)}.btnGhost{border:none;background:transparent;color:var(--muted);padding:8px 10px}.btnGhost:hover{background:#ffffff14;color:var(--text)}.error{color:#fecaca;background:#ef44441f;border:1px solid rgba(239,68,68,.25);padding:10px 12px;border-radius:12px;font-size:13px}.layout{height:100vh;display:grid;grid-template-columns:360px 1fr;overflow:hidden}.sidebar{border-right:1px solid var(--border);background:#ffffff0f;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:16px;display:flex;flex-direction:column;gap:12px;min-height:0}.sidebarHeader{display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;flex-direction:column;gap:2px}.brandName{font-weight:650;letter-spacing:-.02em;font-size:1.1rem}.brandMetaRow{display:flex;align-items:center;gap:8px}.brandMeta{font-size:15px;font-weight:600;color:var(--text)}.brandProfileBtn{padding:6px;flex-shrink:0}.brandProfileIcon{font-size:1.1rem;opacity:.85}.brandStatusRow{margin-top:6px;position:relative}.sidebarScroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.list{display:flex;flex-direction:column;gap:10px;padding-right:4px;min-height:0}.chatItem{border:1px solid rgba(255,255,255,.12);background:#ffffff0f;border-radius:14px;padding:10px;cursor:pointer;display:flex;gap:10px;align-items:center}.chatItem:hover{background:#ffffff17}.chatItemActive{border-color:#7c3aedb3;background:#7c3aed24}.avatar{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#7c3aedcc,#2563eba6);display:grid;place-items:center;font-weight:700;letter-spacing:-.02em;overflow:hidden}.chatTitle{font-weight:600;font-size:14px}.chatMeta{font-size:12px;color:var(--muted2);margin-top:2px}.main{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}.topbar{flex-shrink:0;padding:14px 18px;border-bottom:1px solid var(--border);background:#ffffff0f;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);display:flex;align-items:center;justify-content:space-between;gap:12px}.topbarTitle{display:flex;flex-direction:column;gap:2px}.topbarMain{font-weight:650;letter-spacing:-.02em}.topbarSub{color:var(--muted2);font-size:12px}.thread{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:18px}.bubbleRow{display:flex;align-items:flex-end;margin:6px 0;gap:10px}.bubbleRowMe{justify-content:flex-end}.bubble{max-width:min(720px,92%);border:1px solid rgba(255,255,255,.12);background:#ffffff0f;border-radius:14px;padding:8px 12px;box-shadow:var(--shadowSoft)}.bubbleMe{border:none;background:linear-gradient(135deg,#7c3aedd9,#2563ebb3)}.bubbleHeader{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:2px}.sender{font-weight:650;font-size:12px;color:#ffffffe6}.senderButton{background:none;border:none;padding:0;font:inherit;color:inherit;cursor:pointer;text-align:left}.senderButton:hover{text-decoration:underline;color:#fff}.time{font-size:11px;color:#ffffff8c}.bubbleTimeMe{font-size:11px;color:#fff9;text-align:right;margin-top:2px}.text{font-size:14px;line-height:1.4;white-space:pre-wrap;word-break:break-word}.messageImageWrap{margin-top:4px;border-radius:12px;overflow:hidden;max-width:280px}.messageImageWrap a{display:block}.messageImage{display:block;max-width:100%;max-height:320px;object-fit:contain;border-radius:12px}.composer{flex-shrink:0;border-top:1px solid var(--border);background:#ffffff0f;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:12px 18px}.composerRow{display:flex;align-items:center;gap:8px}.composerInput{flex:1;min-width:0}.composerFileInput{position:absolute;width:0;height:0;opacity:0;pointer-events:none}.composerClip{flex-shrink:0;padding:10px 12px;font-size:1.1rem}.composerSend{flex-shrink:0}.composerWithAttachment{display:flex;flex-direction:column;gap:8px}.composerPreviews{display:flex;flex-wrap:wrap;gap:8px}.composerPreviewItem{position:relative;width:56px;height:56px;border-radius:10px;overflow:hidden;background:#ffffff14;border:1px solid var(--border)}.composerPreviewImg{width:100%;height:100%;object-fit:cover;display:block}.composerPreviewFile{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:4px}.composerPreviewFileName{font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.composerPreviewRemove{position:absolute;top:2px;right:2px;width:20px;height:20px;border:none;border-radius:50%;background:#000000b3;color:#fff;font-size:16px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}.composerPreviewRemove:hover{background:var(--danger)}.composerUploadError{margin:0}.composerHint{display:flex;align-items:center;justify-content:center;padding:16px 18px}.composerHintText{margin:0;font-size:13px;color:var(--muted);text-align:center;max-width:360px}.btnIcon{border:1px solid rgba(255,255,255,.14);background:#ffffff14;color:var(--text);cursor:pointer;border-radius:12px}.btnIcon:hover:not(:disabled){background:#ffffff1f}.chatItemAvatar{cursor:pointer}.chatItemAvatar:hover{opacity:.9}.avatarImg{width:100%;height:100%;object-fit:cover;border-radius:inherit}.messageAvatarWrap{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#7c3aed99,#2563eb80);display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;overflow:hidden}.messageAvatarWrap:hover{opacity:.9}.messageAvatarWrapMe{background:transparent;cursor:default}.messageAvatarButton{border:none;padding:0;margin:0;font:inherit;cursor:pointer}.messageAvatarButton:disabled{cursor:default}.statusLabel{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}.statusLabelText{flex-shrink:0}.statusSelect{padding:6px 10px;border-radius:10px;border:1px solid rgba(255,255,255,.14);background:#00000040;color:var(--text);font-size:13px;cursor:pointer;min-width:140px}.statusSelect:focus{outline:none;border-color:#7c3aedb3}.statusTrigger{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.14);background:#ffffff14;color:var(--text);font-size:13px;cursor:pointer;position:relative}.statusTrigger:hover{background:#ffffff1f}.statusDot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.statusDotOnline{background:#22c55e}.statusDotDnd{background:#f97316}.statusDotOffline{background:#6b7280}.statusDotAway{background:#eab308}.statusDropdown{position:absolute;top:100%;left:0;margin-top:4px;min-width:160px;border-radius:12px;border:1px solid var(--border);background:var(--panelSolid);box-shadow:var(--shadow);z-index:50;padding:6px}.statusDropdownOption{display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;border:none;border-radius:8px;background:none;color:var(--text);font-size:13px;cursor:pointer;text-align:left}.statusDropdownOption:hover{background:#ffffff1a}.chatSearchWrap{position:relative;flex:1;min-width:0}.chatSearchWrap:before{content:"";position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") center/contain no-repeat;pointer-events:none}.chatSearchInput{width:100%;padding:10px 12px 10px 36px;border-radius:12px;border:1px solid rgba(255,255,255,.14);background:#0003;color:var(--text);font-size:14px;outline:none}.chatSearchInput::placeholder{color:var(--muted2)}.chatSearchInput:focus{border-color:#7c3aed99}.friendsBlock{flex-shrink:0;padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:#ffffff0f;font-size:14px;font-weight:600;color:var(--muted);cursor:pointer;transition:background .15s}.friendsBlock:hover{background:#ffffff1a}.friendsPanel{position:absolute;left:0;right:0;top:0;bottom:0;z-index:20;background:var(--panelSolid);border-radius:12px;border:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden;box-shadow:var(--shadow)}.friendsPanelHeader{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--border)}.friendsPanelTitle{font-weight:600;font-size:15px}.friendsPanelActions{display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--border)}.friendsPanelAddBtn{flex-shrink:0;width:36px;height:36px;font-size:1.2rem;line-height:1}.friendsPanelSearchInput{flex:1;min-width:0}.friendsPanelError{margin:0 14px 8px}.friendsPanelSection{padding:10px 14px;overflow-y:auto;flex:1;min-height:0}.friendsPanelSectionTitle{font-size:12px;color:var(--muted2);margin-bottom:8px}.friendsPanelMuted{font-size:13px;color:var(--muted2)}.friendsPanelList{list-style:none;margin:0;padding:0}.friendsPanelItem{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.06)}.friendsPanelItem:last-child{border-bottom:none}.friendsPanelItemClickable{cursor:pointer}.friendsPanelItemClickable:hover{color:var(--brand)}.friendsPanelItemName{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.friendsPanelItemBtn{flex-shrink:0;font-size:12px}.messageAvatarImg{width:100%;height:100%;object-fit:cover;border-radius:50%}.messageAvatarLetter{font-weight:700;font-size:14px;color:#fffffff2}.profileAvatarRow{display:flex;align-items:center;gap:12px;margin-bottom:12px}.profileAvatarWrap{width:80px;height:80px;border-radius:50%;overflow:hidden;background:#ffffff1a;border:2px solid var(--border);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}.profileAvatarWrap:hover:not(:disabled){border-color:var(--brand)}.profileAvatarImg{width:100%;height:100%;object-fit:cover}.profileAvatarPlaceholder{font-size:2rem;color:var(--muted)}.profileAvatarWrapReadOnly{cursor:default;margin:0 auto}.profileAvatarLoading{font-size:12px;color:var(--muted2)}.userProfileModalCard{max-width:320px}.userProfileModalBody{text-align:center;padding:8px 0}.userProfileNickname{font-size:20px;font-weight:700;margin-top:12px;color:var(--text)}.userProfileStatus{display:inline-flex;align-items:center;gap:8px;margin-top:8px;font-size:14px;color:var(--muted)}.userProfileStatusDot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.userProfileStatusDot.status-online{background:var(--ok)}.userProfileStatusDot.status-dnd{background:var(--danger)}.userProfileStatusDot.status-offline,.userProfileStatusDot.status-away{background:var(--muted2)}.userProfileFriendRow{margin-top:16px;display:flex;flex-direction:column;align-items:center;gap:8px}.userProfileFriendError{margin:0;font-size:13px}.userProfileFriendMuted{font-size:13px;color:var(--muted)}.typing{margin-top:8px;font-size:12px;color:var(--muted2)}.modalOverlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;z-index:100;padding:24px}.modalCard{width:100%;max-width:400px;border:1px solid var(--border);background:var(--panel);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow)}.modalHeader{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.modalTitle{margin:0;font-size:18px;font-weight:650}.userSearch{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}.userSearchInput{width:100%}.userSearchStatus,.userSearchEmpty{font-size:12px;color:var(--muted2);padding:8px 0}.userSearchList{display:flex;flex-direction:column;gap:4px;max-height:220px;overflow:auto}.userSearchItem{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--border);background:#ffffff0d;border-radius:12px;color:var(--text);cursor:pointer;text-align:left;transition:background .15s ease}.userSearchItem:hover{background:#ffffff1a}.userSearchItemName{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.userSearchItemAction{font-size:12px;color:var(--brand);flex-shrink:0}@media (max-width: 920px){.layout{grid-template-columns:1fr}.sidebar{display:none}}
