*{box-sizing:border-box;margin:0;padding:0}
html{height:100%;}
body{height:100%;font-family:'Heebo',sans-serif;-webkit-font-smoothing:antialiased;background:#eae9e4;display:flex;flex-direction:row-reverse;}

#bannedScreen { display:flex; flex-direction:column; align-items:center; justify-content:center; position:fixed; inset:0; background:#111; color:white; z-index:9999; text-align:center; padding:20px; }

/* LOGIN */
#loginScreen{position:fixed;inset:0;background:#eae9e4;display:flex;align-items:center;justify-content:center;z-index:1000;}
.login-card{background:#fff;border-radius:18px;padding:38px 32px;text-align:center;box-shadow:0 4px 32px rgba(0,0,0,.12);max-width:320px;width:90%;}
.login-logo-img{width:90px;height:90px;border-radius:16px;margin:0 auto 14px;display:block;object-fit:contain;}
.login-title{font-size:20px;font-weight:900;color:#111;margin-bottom:4px;}
.login-sub{font-size:13px;color:#888;margin-bottom:24px;}

/* LEFT SIDEBAR FOR CHANNELS */
#leftSidebar {
  width: 240px; min-width: 240px;
  background: #fff;
  border-right: 1px solid rgba(0,0,0,.08);
  flex-shrink: 0;
  position: sticky; top: 56px; height: calc(100vh - 56px);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}
.channels-hdr {
  padding: 15px; font-size: 14px; font-weight: 800; color: #111;
  border-bottom: 1px solid #f0f0f0; background: #fafafa;
}
#channelsList { flex: 1; overflow-y: auto; padding: 10px 0; }
.channel-item {
  padding: 10px 15px; cursor: pointer; display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: #4b5563;
  border-bottom: 1px solid #f9fafb; transition: background 0.2s, color 0.2s;
}
.channel-item:hover { background: #f3f4f6; }
.channel-item.active { background: #eff6ff; color: #1a56db; border-right: 4px solid #1a56db; }
.channel-item i { width: 16px; text-align: center; color: #9ca3af; }
.channel-item.active i { color: #1a56db; }

#mobileMenuBtn { display: none; background: none; border: none; font-size: 18px; color: #111; cursor: pointer; padding: 5px; }

@media(max-width: 900px) {
  #leftSidebar { position: fixed; left: 0; transform: translateX(-100%); box-shadow: 4px 0 24px rgba(0,0,0,.12); }
  #leftSidebar.open { transform: translateX(0); }
  #mobileMenuBtn { display: block; }
}

body.dark #leftSidebar { background: #1a1a2e; border-color: #2a2a40; }
body.dark .channels-hdr { background: #1e1e30; color: #fff; border-color: #2a2a40; }
body.dark .channel-item { color: #d1d5db; border-color: #2a2a40; }
body.dark .channel-item:hover { background: #2a2a45; }
body.dark .channel-item.active { background: #2a2a45; color: #a5b4fc; border-right-color: #a5b4fc; }

/* APP */
#app{flex:1;min-width:0;height:100%;display:none;flex-direction:column;}

/* AD / CHAT SIDEBAR */
#rightSidebar{
  width:320px;min-width:320px;
  background:#fff;
  border-left:1px solid rgba(0,0,0,.08);
  flex-shrink:0;
  position:sticky;top:56px;height:calc(100vh - 56px);
  flex-direction:column;
  overflow:hidden;
  display:none;
}
#rightSidebar.show{display:flex;}
@media(max-width:900px){#rightSidebar{display:none!important;}}

#adminChatPanel{ flex:1;min-height:0; display:none; flex-direction:column; overflow:hidden;}
#adminChatPanel.show{display:flex;}
#adSidebarBlock{flex-shrink:0;}
#adSidebarBlock a{display:block;width:100%;}
#adSidebarBlock img{width:100%;height:auto;display:block;}
#adminChatPanel.minimized #chatMessages,
#adminChatPanel.minimized #chatInputRow,
#adminChatPanel.minimized #chatTypingBar{display:none!important;}
#adminChatPanel.minimized{flex:none;}

.chat-panel-hdr{ padding:10px 14px;background:#fff; border-bottom:1px solid #e5e7eb; display:flex;align-items:center;gap:8px;flex-shrink:0;}
.chat-panel-title{font-size:13px;font-weight:800;color:#111;flex:1;}
.chat-panel-presence{font-size:11px;color:#16a34a;font-weight:600;display:flex;align-items:center;gap:4px;}
.chat-pres-dot{width:6px;height:6px;border-radius:50%;background:#22c55e;animation:dp 1.6s ease-in-out infinite;}
@keyframes dp{0%,100%{opacity:1}50%{opacity:.3}}
.chat-minimize-btn{background:none;border:none;cursor:pointer;color:#9ca3af;font-size:13px;padding:3px 7px;border-radius:6px;transition:background .1s,color .1s;}
.chat-minimize-btn:hover{background:#f3f4f6;color:#374151;}

#chatMessages{ flex:1;overflow-y:auto;padding:10px 12px; display:flex;flex-direction:column;gap:2px; background:url('https://i.postimg.cc/ZqSsf0BM/Whats-App-Wallpaper-39-(1).jpg') repeat center/auto; scrollbar-width:thin;scrollbar-color:#d1d5db transparent;}
#chatMessages::-webkit-scrollbar{width:3px;}
#chatMessages::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:99px;}
.chat-empty-msg{text-align:center;padding:24px 16px;color:#777;font-size:12px;font-weight:600;background:rgba(255,255,255,.75);border-radius:12px;margin:auto;}

.chat-grp{display:flex;align-items:flex-end;gap:7px;margin-bottom:1px;}
.chat-grp.me{flex-direction:row-reverse;}
.chat-grp.gap{margin-top:8px;}
.chat-av{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;color:#fff;flex-shrink:0;align-self:flex-start;margin-top:2px;overflow:hidden;}
.chat-av img{width:100%;height:100%;object-fit:cover;border-radius:50%;}
.chat-bubs{display:flex;flex-direction:column;gap:2px;max-width:210px;}
.chat-bubs.me{align-items:flex-end;}
.chat-bubs.other{align-items:flex-start;}
.chat-sender{font-size:11px;font-weight:700;margin-bottom:2px;padding:0 3px;}
.chat-bub{ padding:6px 10px;font-size:13px;line-height:1.5;word-break:break-word; border-radius:14px;box-shadow:0 1px 2px rgba(0,0,0,.1);cursor:default; animation:bubIn .18s ease;}
@keyframes bubIn{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}
.chat-bub.me{background:rgba(212,252,196,.93);color:#1a3a1a;border-radius:14px 14px 4px 14px;}
.chat-bub.other{background:rgba(255,255,255,.93);color:#1f2937;border-radius:14px 14px 14px 4px;}
.chat-bub a{color:#1a56db;text-decoration:underline;word-break:break-all;}
.chat-bub strong{font-weight:800;}
.chat-bub em{font-style:italic;}
.chat-time{font-size:9px;opacity:.45;margin-right:5px;white-space:nowrap;vertical-align:bottom;}
.chat-date-sep{display:flex;align-items:center;gap:8px;margin:8px 0 4px;font-size:10px;font-weight:700;color:#777;}
.chat-date-sep::before,.chat-date-sep::after{content:'';flex:1;height:1px;background:rgba(0,0,0,.1);}
.chat-date-sep span{background:rgba(255,255,255,.8);padding:1px 8px;border-radius:99px;}

#chatTypingBar{padding:5px 14px;font-size:11px;color:#666;font-style:italic;background:rgba(255,255,255,.9);border-top:1px solid #e5e7eb;flex-shrink:0;display:none;}
#chatCtxMenu{position:fixed;background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.15);z-index:600;display:none;overflow:hidden;min-width:130px;animation:pickerPop .12s ease-out;}
#chatCtxMenu.show{display:block;}
.ctx-item{display:flex;align-items:center;gap:8px;padding:9px 14px;font-size:12px;font-weight:700;cursor:pointer;color:#374151;transition:background .1s;font-family:'Heebo',sans-serif;border-bottom:1px solid #f9fafb;}
.ctx-item:last-child{border-bottom:none;}
.ctx-item:hover{background:#f3f4f6;}
.ctx-item.danger{color:#dc2626;}
.ctx-item.danger:hover{background:#fef2f2;}
.ctx-item i{font-size:10px;width:14px;}

#chatInputRow{padding:8px 10px;border-top:1px solid #e5e7eb;display:flex;gap:7px;align-items:flex-end;flex-shrink:0;background:#fff;position:relative;}
#mentionDropdown{position:absolute;bottom:calc(100% + 4px);right:10px;left:10px;background:#fff;border:1.5px solid #e5e7eb;border-radius:12px;box-shadow:0 -4px 16px rgba(0,0,0,.12);z-index:300;overflow:hidden;display:none;direction:rtl;}
#mentionDropdown.show{display:block;}
.mention-item{display:flex;align-items:center;gap:8px;padding:8px 12px;cursor:pointer;font-size:12px;font-weight:600;color:#374151;font-family:'Heebo',sans-serif;transition:background .1s;border-bottom:1px solid #f3f4f6;}
.mention-item:last-child{border-bottom:none;}
.mention-item:hover,.mention-item.active{background:#eff6ff;color:#1a56db;}
.mention-av{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;color:#fff;flex-shrink:0;overflow:hidden;}
.mention-av img{width:100%;height:100%;object-fit:cover;}
.chat-inp{flex:1;border:1.5px solid #e5e7eb;border-radius:18px;padding:7px 12px;font-size:13px;font-family:'Heebo',sans-serif;resize:none;outline:none;max-height:70px;line-height:1.4;direction:rtl;background:#f9fafb;transition:border-color .15s,background .15s;}
.chat-inp:focus{border-color:#93c5fd;background:#fff;}
.chat-send-btn{width:34px;height:34px;background:#1a56db;color:#fff;border:none;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .15s,transform .1s;}
.chat-send-btn:hover{background:#1d4ed8;transform:scale(1.05);}

/* HEADER */
header{ background:#fff;border-bottom:1px solid rgba(0,0,0,.08); height:56px;padding:0 14px; display:flex;align-items:center;gap:12px; flex-shrink:0;position:fixed;top:0;left:0;right:0;z-index:100; overflow:visible;}
#app{padding-top:56px;}
.hdr-avatar{width:38px;height:38px;border-radius:10px;object-fit:contain;flex-shrink:0;}
.hdr-info{flex:1;min-width:0;}
.hdr-name{font-size:15px;font-weight:800;color:#111;line-height:1.2;}
.hdr-status{font-size:12px;color:#9ca3af;font-weight:700;display:flex;align-items:center;gap:6px;}
.hdr-dot{width:6px;height:6px;border-radius:50%;background:#9ca3af;animation:slowPulse 4s ease-in-out infinite;}
@keyframes slowPulse{0%,100%{opacity:1}50%{opacity:0.2}}
.hdr-user{display:flex;align-items:center;gap:4px;}
.hdr-user img{width:30px;height:30px;border-radius:50%;object-fit:cover;border:2px solid #eee;}

#adminBadge{ display:none;align-items:center;gap:4px; background:#f0f4ff;border:1px solid #c7d7fa; border-radius:8px;padding:2px 7px; font-size:11px;font-weight:700;color:#1a56db;white-space:nowrap;}
#adminBadge.show{display:inline-flex;}
#adminBadge i{font-size:10px;opacity:.7;}

/* FEED */
#feedWrap{flex:1;overflow-y:auto;padding:10px 0 24px;scrollbar-width:none;}
#feedWrap::-webkit-scrollbar{display:none;}
#feedInner{max-width:780px;margin:0 60px 0 auto;padding:0 10px 0 48px;display:flex;flex-direction:column;gap:18px;}
@media(max-width:600px){ #feedInner{margin:0;padding:0 8px;} .bubble{min-width:0;} }

.msg-row{ display:flex;direction:rtl; align-items:flex-start;gap:8px; padding:2px 0; animation:mi .3s cubic-bezier(.16,1,.3,1) both;}
@keyframes mi{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.msg-av{width:36px;height:36px;border-radius:0;object-fit:contain;flex-shrink:0;align-self:flex-start;margin-top:17px;background:transparent;}
.msg-col{display:flex;flex-direction:column;gap:3px;min-width:0;align-items:flex-start;position:relative;}
.msg-meta{direction:rtl;display:flex;align-items:baseline;gap:6px;padding-right:4px;}
.msg-meta-name{font-size:12px;font-weight:700;color:#666;}
.msg-meta-time{font-size:11px;font-weight:500;color:#aaa;}
.msg-meta-sender{font-size:11px;font-weight:700;color:#1a56db;background:#eff6ff;border:1px solid #bfdbfe;border-radius:5px;padding:0 5px;}
.bubble{ background:#fff;direction:rtl; border-radius:18px 4px 18px 18px; padding:10px 14px 8px; display:inline-block;max-width:100%; box-shadow:0 1px 2px rgba(0,0,0,.10);}
.bubble.is-red{background:#fff9f9;border-right:3px solid #e02020;}
.bubble-text{font-size:19px;line-height:1.65;color:#4b5563;font-weight:400;white-space:pre-wrap;word-break:break-word;font-family:'Assistant','Heebo','Noto Color Emoji','Apple Color Emoji','Segoe UI Emoji',sans-serif;}
.bubble-text strong{font-weight:700;color:#1a1a1a;}
.bubble-text em{font-style:italic;}
.bubble-text a{color:#1a56db;text-decoration:underline;}
.bubble-headline{font-size:19px;font-weight:700;color:#1f2937;line-height:1.5;margin-bottom:4px;font-family:'Assistant','Heebo','Noto Color Emoji','Apple Color Emoji','Segoe UI Emoji',sans-serif;}
.bubble-img{margin-top:9px;border-radius:12px;overflow:hidden;display:block;}
.bubble-img img{width:100%;display:block;max-height:310px;height:auto;object-fit:contain;object-position:top;}
.bubble-vid{margin-top:9px;}
.bubble-vid video{width:100%;border-radius:12px;background:#000;}
.bubble-vid video.portrait{width:auto;max-width:100%;max-height:480px;display:block;margin:0 auto;}
.bubble-vid iframe{max-width:100%;border-radius:12px;}

.bubble-html{margin-top:9px; border-radius:12px; overflow:hidden; width:100%; max-width:100%; background:#fff; position:relative;}
.bubble-html iframe{width:100%; border:none; display:block; min-height:200px; resize:vertical; overflow:auto;}

.vid-btn{display:inline-flex;align-items:center;gap:6px;background:#1a56db;color:#fff;padding:7px 15px;border-radius:99px;font-size:13px;font-weight:700;text-decoration:none;}
.bubble-btns{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px;}
.bubble-divider{border:none;border-top:1.5px solid #e5e7eb;margin:10px 0;width:100%;}
.lnk-btn{display:inline-flex;align-items:center;gap:5px;background:#f3f4f6;border-radius:99px;padding:6px 13px;font-size:13px;font-weight:600;color:#374151;text-decoration:none;border:none;}
.bubble-foot{display:flex;align-items:center;gap:5px;margin-top:2px;flex-wrap:wrap;padding-right:10px;}

/* תגיות */
.post-tags-row { display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.post-tag { display:inline-flex; align-items:center; background:#f3f4f6; color:#4b5563; padding:2px 8px; border-radius:6px; font-size:11px; font-weight:700; cursor:pointer; transition:background 0.2s; border:1px solid transparent; }
.post-tag:hover { background:#e5e7eb; border-color:#d1d5db; color:#111; }

/* REACTIONS */
.rxn-row{display:contents;}
.rxn-chip{ display:inline-flex;align-items:center;justify-content:center;gap:3px; background:#f3f4f6;border:1px solid #e5e7eb; border-radius:8px;padding:3px 7px;height:26px; cursor:pointer;transition:background .12s,border-color .12s,transform .1s; user-select:none;line-height:1;}
.rxn-chip:hover{background:#e5e7eb;border-color:#9ca3af;}
.rxn-chip.mine{background:#eff6ff;border-color:#3b82f6;box-shadow:0 0 0 1.5px #bfdbfe;}
.rxn-emoji{font-size:15px;line-height:1;font-family:'Noto Color Emoji','Apple Color Emoji','Segoe UI Emoji',sans-serif;}
.rxn-count{font-size:11px;font-weight:700;color:#6b7280;font-family:'Heebo',sans-serif;}
.rxn-chip.mine .rxn-count{color:#1a56db;}
.rxn-add-btn{ background:none;border:none;cursor:pointer;padding:1px;border-radius:6px;line-height:0; display:inline-flex;align-items:center;color:#ccc; transition:color .12s,background .12s,transform .12s;height:22px;width:22px;justify-content:center;}
.rxn-add-btn:hover{color:#666;background:#f0f0f0;transform:scale(1.12);}
.rxn-add-btn svg{width:14px;height:14px;display:block;}
.rxn-add-btn.maxed{opacity:0.3;cursor:default;pointer-events:none;}
.cmt-btn{display:inline-flex;align-items:center;gap:4px;background:none;border:none;font-size:12px;color:#aaa;cursor:pointer;font-family:'Heebo',sans-serif;font-weight:600;padding:0;transition:color .12s;}
.cmt-btn:hover{color:#1a56db;}
.cmt-btn.has-cmt{color:#1a56db;}
.link-btn{display:inline-flex;align-items:center;gap:3px;background:none;border:none;font-size:11px;color:#aaa;cursor:pointer;font-family:'Heebo',sans-serif;font-weight:700;padding:0;transition:color .12s;text-decoration:none;letter-spacing:.01em;}
.link-btn:hover{color:#1a56db;text-decoration:underline;}
.link-btn.copied{color:#16a34a;}

/* Bubble wrapper for top actions */
.bubble-wrap-outer{position:relative;display:inline-block;max-width:100%;margin-top:16px;}
.bubble-top-actions{ position:absolute;top:-24px;left:2px; display:flex;align-items:center;gap:3px; opacity:1;pointer-events:all; z-index:10; direction:ltr;}
.bubble-top-actions .link-btn,
.bubble-top-actions .cmt-btn{ background:rgba(255,255,255,.93); border:1px solid #e5e7eb; border-radius:6px; padding:0 7px; height:22px; box-shadow:0 1px 4px rgba(0,0,0,.10); font-size:11px; color:#888; display:inline-flex;align-items:center;gap:3px; font-family:'Heebo',sans-serif;font-weight:600; cursor:pointer;text-decoration:none;}
.bubble-top-actions .link-btn:hover,
.bubble-top-actions .cmt-btn:hover{color:#1a56db;border-color:#93c5fd;background:#fff;}
.bubble-top-actions .cmt-btn.has-cmt{color:#1a56db;border-color:#bfdbfe;}

/* Admin action buttons */
.msg-action-btn{ background:rgba(255,255,255,.93);border:1px solid #e5e7eb;border-radius:6px; padding:0 7px;height:22px;box-shadow:0 1px 4px rgba(0,0,0,.10); display:inline-flex;align-items:center;gap:3px; font-size:11px;cursor:pointer;font-family:'Heebo',sans-serif; font-weight:600;color:#888;transition:color .12s,border-color .12s;}
.msg-action-btn:hover{color:#dc2626;border-color:#fca5a5;}
.msg-action-btn.quote:hover{color:#1a56db;border-color:#93c5fd;}
.msg-action-btn.edit:hover{color:#059669;border-color:#6ee7b7;}
.msg-action-btn.del:hover{color:#e02020;border-color:#fca5a5;}
.msg-meta-edited{font-size:10px;color:#9ca3af;font-style:italic;font-weight:500;}

/* Quote block */
.quote-block{ display:flex;align-items:flex-start;gap:6px; background: linear-gradient(135deg,#f0f6ff,#f8faff);border-radius:8px; padding:7px 10px;margin-bottom:8px; cursor:pointer;transition:background .12s; border-right:3px solid #1a56db;}
.quote-block:hover{background:#e8f0fe;}
.quote-block i{margin-top:1px;flex-shrink:0;color:#1a56db;}
.quote-block-text{ font-size:13px;color:#6b7280;font-style:italic; line-height:1.5;flex:1;}

/* EMOJI PICKER */
#emojiPicker{ position:fixed;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:8px; box-shadow:0 4px 16px rgba(0,0,0,.12);z-index:600;display:none; grid-template-columns:repeat(6,28px);gap:3px; width:fit-content; animation:pickerPop .14s ease-out;}
@keyframes pickerPop{from{opacity:0;transform:scale(.95) translateY(4px)}to{opacity:1;transform:scale(1) translateY(0)}}
#emojiPicker.show{display:grid;}
.emp-note{font-size:10px;color:#aaa;font-weight:600;}
.ep-btn{background:none;border:none;font-size:17px;cursor:pointer;padding:1px;border-radius:6px;line-height:1;flex-shrink:0;font-family:'Noto Color Emoji','Apple Color Emoji','Segoe UI Emoji',sans-serif;transition:background .1s;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;}
.ep-btn:hover{background:#f0f0f0;}

/* COMMENTS PANEL */
#cpOverlay{display:none;}
#commentsPanel{position:fixed;top:56px;left:0;right:auto;width:310px;max-width:100vw;height:calc(100% - 56px);background:#fff;box-shadow:4px 0 24px rgba(0,0,0,.12);z-index:300;display:flex;flex-direction:column;transform:translateX(-100%);transition:transform .3s cubic-bezier(.16,1,.3,1);}
#commentsPanel.open{transform:translateX(0);}
.cp-hdr{padding:14px 16px;border-bottom:1px solid #f0f0f0;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;}
.cp-title{font-size:15px;font-weight:800;color:#111;}
.cp-close{background:none;border:none;font-size:17px;cursor:pointer;color:#aaa;padding:4px;border-radius:8px;}
.cp-close:hover{background:#f3f4f6;}
.cp-body{flex:1;overflow-y:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px;}
.cp-spinner{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;gap:10px;color:#bbb;font-size:12px;font-weight:600;padding:30px 0;}
.cp-spinner-ring{width:28px;height:28px;border-radius:50%;border:2.5px solid #e5e7eb;border-top-color:#1a56db;animation:spin .7s linear infinite;}
@keyframes spin{to{transform:rotate(360deg)}}
.ci{display:flex;gap:8px;animation:cian .22s ease;}
@keyframes cian{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.ci-av{width:30px;height:30px;border-radius:50%;object-fit:cover;flex-shrink:0;align-self:flex-start;}
.ci-av-i{width:30px;height:30px;border-radius:50%;background:#1a56db;color:#fff;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0;align-self:flex-start;}
.ci-bubble{background:#f3f4f6;border-radius:4px 12px 12px 12px;padding:8px 12px;flex:1;position:relative;direction:rtl;}
.ci-text{font-size:13px;line-height:1.6;color:#374151;word-break:break-word;}
.ci-time{font-size:10px;color:#aaa;margin-top:3px;}
.ci-del{position:absolute;top:6px;left:8px;background:none;border:none;font-size:11px;color:#ccc;cursor:pointer;opacity:0;transition:opacity .12s;}
.ci-bubble:hover .ci-del{opacity:1;}
.no-cmt{text-align:center;color:#aaa;font-size:13px;padding:30px 0;}
.cp-inp-row{padding:10px 12px;border-top:1px solid #f0f0f0;display:flex;gap:8px;align-items:flex-end;flex-shrink:0;}
.cp-inp{flex:1;border:1.5px solid #e5e7eb;border-radius:12px;padding:8px 12px;font-size:14px;font-family:'Heebo',sans-serif;resize:none;outline:none;max-height:80px;line-height:1.5;direction:rtl;}
.cp-inp:focus{border-color:#93c5fd;}
.cp-send{background:#1a56db;color:#fff;border:none;border-radius:10px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;}
.cp-disabled-msg { text-align:center; color:#dc2626; font-size:12px; font-weight:700; padding:10px; background:#fef2f2; border-top:1px solid #fecaca; }

/* HEADER ICON BUTTONS */
.hdr-icon-btn,#searchBtn,#darkBtn,#notifBtn,#adBtn,#adminMsgsBtn,#siteSettingsBtn,#manageAdminsBtn,#writePermBtn,#updateModeHdrBtn,#leaderboardBtn{background:none;border:none;cursor:pointer;width:32px;height:32px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:#888;transition:background .15s,color .15s;flex-shrink:0;text-decoration:none;position:relative;}
.hdr-icon-btn:hover,#searchBtn:hover,#darkBtn:hover,#notifBtn:hover,#adBtn:hover,#adminMsgsBtn:hover,#siteSettingsBtn:hover,#manageAdminsBtn:hover,#writePermBtn:hover,#updateModeHdrBtn:hover,#leaderboardBtn:hover{background:#f3f4f6;color:#333;}
#darkBtn.active{background:#1e1e30;color:#a5b4fc;}
#darkBtn.active:hover{background:#2a2a45;color:#c4b5fd;}
#notifBtn.active{background:#fef3c7;color:#d97706;}
#notifBtn.active:hover{background:#fde68a;color:#b45309;}
#notifBtn.active::after,#darkBtn.active::after{ content:'';position:absolute;top:5px;right:5px; width:6px;height:6px;border-radius:50%; border:1.5px solid #fff;}
#notifBtn.active::after{background:#d97706;}
#darkBtn.active::after{background:#a5b4fc;}
#writePermBtn.has-granted{background:#eff6ff;color:#1a56db;}
#updateModeHdrBtn{display:none;}
#updateModeHdrBtn.is-on{background:#dcfce7;color:#16a34a;}
#updateModeHdrBtn.is-on:hover{background:#bbf7d0;color:#15803d;}
#updateModeHdrBtn.is-on::after{ content:'';position:absolute;top:5px;right:5px; width:6px;height:6px;border-radius:50%; background:#16a34a;border:1.5px solid #fff;}
#updateModeHdrBtn.has-active{background:#dcfce7;color:#16a34a;}
#updateModeHdrBtn.has-active:hover{background:#bbf7d0;color:#15803d;}
#updateModeHdrBtn.has-active::after{ content:'';position:absolute;top:5px;right:5px; width:6px;height:6px;border-radius:50%; background:#16a34a;border:1.5px solid #fff;}
#updateModeHdrBtn.no-active{background:#fff7ed;color:#ea580c;}
#updateModeHdrBtn.no-active:hover{background:#ffedd5;color:#c2410c;}
#updateModeHdrBtn.no-active::after{ content:'';position:absolute;top:5px;right:5px; width:6px;height:6px;border-radius:50%; background:#ea580c;border:1.5px solid #fff;}

/* תפריט מנהל חדש בפרופיל */
#userMenu { position: absolute; top: 54px; left: 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; box-shadow: 0 12px 36px rgba(0,0,0,.15); z-index: 900; min-width: 220px; overflow: hidden; font-family: 'Heebo', sans-serif; animation: pickerPop 0.2s ease-out; }
body.dark #userMenu { background: #1a1a2e; border-color: #333; }

#updateModePopover{ position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%); background:#fff;border:1.5px solid #e5e7eb;border-radius:14px; box-shadow:0 8px 24px rgba(0,0,0,.13);z-index:300; min-width:220px;overflow:hidden; animation:pickerPop .14s ease-out;direction:rtl;display:none;}
#updateModePopover.open{display:block;}
.ump-hdr{padding:10px 14px 6px;font-size:11px;font-weight:800;color:#9ca3af;border-bottom:1px solid #f3f4f6;}
.ump-body{padding:8px 12px;display:flex;flex-direction:column;gap:6px;max-height:220px;overflow-y:auto;}
.ump-row{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;color:#374151;}
.ump-dot{width:7px;height:7px;border-radius:50%;background:#22c55e;flex-shrink:0;}
.ump-empty{font-size:12px;color:#aaa;text-align:center;padding:10px 0;}

#updateTimeDialog{ position:fixed;inset:0;z-index:900; background:rgba(0,0,0,.4); display:none;align-items:center;justify-content:center; animation:lbIn .15s ease;}
#updateTimeDialog.open{display:flex;}
.utd-box{ background:#fff;border-radius:18px;padding:24px 24px 20px; width:280px;box-shadow:0 16px 48px rgba(0,0,0,.2); direction:rtl;display:flex;flex-direction:column;gap:14px;}
.utd-title{font-size:15px;font-weight:800;color:#111;}
.utd-sub{font-size:12px;color:#888;margin-top:-8px;}
.utd-time-inp{ width:100%;border:1.5px solid #e5e7eb;border-radius:10px; padding:10px 12px;font-size:22px;font-weight:700; font-family:'Heebo',sans-serif;outline:none;text-align:center; direction:ltr;transition:border-color .15s;color:#111;}
.utd-time-inp:focus{border-color:#1a56db;}
.utd-btns{display:flex;gap:8px;}
.utd-ok{flex:1;background:#16a34a;color:#fff;border:none;border-radius:10px;padding:10px;font-size:14px;font-weight:800;cursor:pointer;font-family:'Heebo',sans-serif;}
.utd-ok:hover{background:#15803d;}
.utd-cancel{background:#f3f4f6;color:#6b7280;border:none;border-radius:10px;padding:10px 14px;font-size:14px;font-weight:700;cursor:pointer;font-family:'Heebo',sans-serif;}
.utd-cancel:hover{background:#e5e7eb;}

#updateModeNotice{ display:none;align-items:center;gap:6px; font-size:11px;font-weight:700;color:#92400e; background:#fef3c7;border:1px solid #fde68a; border-radius:8px;padding:4px 9px;white-space:nowrap; cursor:pointer;transition:background .12s;flex-shrink:0;}
#updateModeNotice:hover{background:#fde68a;}
#updateModeNotice.show{display:inline-flex;}
#adminMsgsBtn .unread-badge{position:absolute;top:3px;right:3px;width:8px;height:8px;border-radius:50%;background:#e02020;border:2px solid #fff;display:none;}
#adminMsgsBtn .unread-badge.show{display:block;}

/* SEARCH */
#searchBar{position:absolute;top:50%;left:100%;margin-left:6px;transform:translateY(-50%);background:#fff;border:1.5px solid #e5e7eb;border-radius:10px;box-shadow:0 2px 12px rgba(0,0,0,.12);display:none;align-items:center;gap:6px;padding:5px 10px 5px 8px;z-index:200;width:300px;white-space:nowrap;animation:searchPop .15s ease-out;}
@keyframes searchPop{from{opacity:0;transform:translateY(-50%) scaleX(.85) translateX(-10px)}to{opacity:1;transform:translateY(-50%) scaleX(1) translateX(0)}}
#searchBar.open{display:flex;}
body.dark #searchBar{background:#1a1a2e;border-color:#3a3a50;}
#searchInput{flex:1;border:none;border-radius:99px;padding:4px 8px;font-size:14px;font-family:'Heebo',sans-serif;outline:none;direction:rtl;background:transparent;}
body.dark #searchInput{color:#e5e7eb;}
#searchInput::placeholder{color:#bbb;}
#searchClear{background:none;border:none;cursor:pointer;color:#bbb;font-size:14px;padding:2px;display:none;line-height:1;flex-shrink:0;}
#searchClear.show{display:block;}
#searchResults{display:none;flex:1;overflow-y:auto;padding:10px 0 24px;}
#searchResultsInner{max-width:780px;margin:0 60px 0 auto;padding:0 10px 0 20px;display:flex;flex-direction:column;gap:6px;}
@media(max-width:600px){#searchResultsInner{margin:0;padding:0 8px;}}
#searchEmpty{text-align:center;padding:40px 20px;color:#aaa;font-size:14px;display:none;}

/* ADMIN COMPOSE BAR */
#composeEditBanner{ display:none;background:#fef3c7;border-bottom:1px solid #fde68a; padding:5px 14px;font-size:11px;font-weight:700;color:#92400e; direction:rtl;align-items:center;gap:6px;}
#composeEditBanner.show{display:flex;}
#adminComposeBar{ display:none;position:fixed;bottom:0;right:0;left:320px;z-index:200; background:#fff;border-top:2px solid #e5e7eb;box-shadow:0 -4px 20px rgba(0,0,0,.10); direction:rtl;flex-direction:column;}
@media(max-width:900px){#adminComposeBar{right:0;left:0;}}
#adminComposeBar.show{display:flex;}
#adminComposeBar.blocked #composeEditor{background:#f3f4f6;color:#9ca3af;cursor:not-allowed;pointer-events:none;border-color:#e5e7eb;}
#adminComposeBar.blocked .compose-send-btn{background:#d1d5db;cursor:not-allowed;box-shadow:none;pointer-events:none;}
#adminComposeBar.blocked .compose-toolbar button:not(#profileToggle){opacity:.35;pointer-events:none;}
#adminComposeBar.blocked .ctb-dropdown-wrap{opacity:.35;pointer-events:none;}

#blockNotice{display:none;padding:8px 14px;font-size:13px;font-weight:800;color:#b91c1c;background:#fef2f2;border-bottom:1px solid #fecaca;text-align:center;flex-shrink:0;}
#blockNotice.show{display:block;}
#updateModeBar{display:none;padding:6px 14px;font-size:11px;font-weight:700;color:#374151;background:#f0fdf4;border-bottom:1px solid #bbf7d0;align-items:center;gap:8px;flex-shrink:0;direction:rtl;flex-wrap:wrap;}
#updateModeBar.show{display:flex;}
.update-mode-btn{display:flex;align-items:center;gap:5px;border:none;border-radius:8px;padding:4px 10px;font-size:11px;font-weight:800;cursor:pointer;font-family:'Heebo',sans-serif;transition:all .15s;flex-shrink:0;}
.update-mode-btn.on{background:#16a34a;color:#fff;}
.update-mode-btn.off{background:#fef2f2;color:#dc2626;border:1px solid #fecaca;}
#updateModeWho{font-size:11px;color:#16a34a;font-weight:700;margin-right:auto;}

.wperm-chip{position:relative;cursor:pointer;border-radius:50%;transition:transform .15s,box-shadow .15s;flex-shrink:0;}
.wperm-chip:hover{transform:scale(1.12);}
.wperm-chip.granted{box-shadow:0 0 0 2.5px #1a56db;}
.wperm-chip.granted::after{ content:'✓';position:absolute;bottom:-2px;right:-2px; width:12px;height:12px;border-radius:50%; background:#1a56db;color:#fff;font-size:7px;font-weight:900; display:flex;align-items:center;justify-content:center; border:1.5px solid #fff;line-height:12px;text-align:center;}

.compose-toolbar{display:flex;align-items:center;gap:4px;padding:6px 12px 4px;border-bottom:1px solid #f0f0f0;flex-wrap:wrap;}
.ctb-btn{background:none;border:1.5px solid #e5e7eb;border-radius:8px;padding:4px 9px;font-size:11px;font-weight:700;color:#374151;cursor:pointer;font-family:'Heebo',sans-serif;display:flex;align-items:center;gap:4px;transition:background .12s,border-color .12s;}
.ctb-btn:hover{background:#f3f4f6;border-color:#d1d5db;}
.ctb-btn.red-active{background:#fef2f2;border-color:#fecaca;color:#dc2626;}
.ctb-btn.has-val{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a;}

#profileToggle{display:flex;align-items:center;gap:5px;background:#eff6ff;border:1.5px solid #bfdbfe;border-radius:8px;padding:4px 9px;font-size:11px;font-weight:800;color:#1a56db;cursor:pointer;font-family:'Heebo',sans-serif;transition:all .15s;}
#profileToggle.red{background:#fef2f2;border-color:#fecaca;color:#dc2626;}

.compose-main{display:flex;align-items:flex-end;gap:8px;padding:8px 12px;}
#composeEditor{ flex:1;border:1.5px solid #e5e7eb;border-radius:14px; padding:10px 14px;font-size:15px;font-family:'Heebo',sans-serif; outline:none;resize:none;max-height:120px;overflow-y:auto; line-height:1.6;direction:rtl;background:#fafafa; transition:border-color .15s,box-shadow .15s;}
#composeEditor:focus{border-color:#1a56db;background:#fff;box-shadow:0 0 0 3px rgba(26,86,219,.08);}
#composeEditor:empty:before{content:attr(placeholder);color:#b0b8c4;}
.compose-send-btn{ width:42px;height:42px;border-radius:50%;border:none; background:linear-gradient(135deg,#1a56db,#1d4ed8); color:#fff;cursor:pointer; display:flex;align-items:center;justify-content:center; flex-shrink:0;box-shadow:0 3px 10px rgba(26,86,219,.35); transition:all .2s;}
.compose-send-btn:hover{transform:scale(1.06);box-shadow:0 4px 14px rgba(26,86,219,.45);}
.compose-send-btn.red{background:linear-gradient(135deg,#dc2626,#b91c1c);box-shadow:0 3px 10px rgba(220,38,38,.35);}

#attachPreview{display:none;padding:6px 12px;gap:8px;align-items:center;border-bottom:1px solid #f0f0f0;flex-wrap:wrap;}
#attachPreview.show{display:flex;}
.attach-chip{display:flex;align-items:center;gap:5px;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:8px;padding:4px 8px;font-size:11px;font-weight:600;color:#374151;}
.attach-chip button{background:none;border:none;cursor:pointer;color:#9ca3af;font-size:11px;padding:0;line-height:1;}
.attach-chip button:hover{color:#dc2626;}

.ctb-dropdown{position:absolute;bottom:100%;right:0;background:#fff;border:1.5px solid #e5e7eb;border-radius:14px;padding:14px;min-width:280px;box-shadow:0 -8px 24px rgba(0,0,0,.12);z-index:210;display:none;animation:pickerPop .14s ease-out;direction:rtl;}
.ctb-dropdown.open{display:block;}
.ctb-dropdown-wrap{position:relative;}
.ctb-inp{width:100%;border:1.5px solid #e5e7eb;border-radius:10px;padding:7px 11px;font-size:13px;outline:none;direction:ltr;font-family:'Heebo',sans-serif;margin-bottom:8px;transition:border-color .15s;}
.ctb-inp:focus{border-color:#1a56db;}
.ctb-inp-label{font-size:11px;font-weight:700;color:#6b7280;margin-bottom:4px;display:block;}
.ctb-add-btn{width:100%;background:#1a56db;color:#fff;border:none;border-radius:10px;padding:8px;font-size:13px;font-weight:700;cursor:pointer;font-family:'Heebo',sans-serif;}

#loadMoreSpinner{display:none;align-items:center;justify-content:center;padding:16px;gap:8px;color:#aaa;font-size:13px;font-family:'Heebo',sans-serif;}
.unread-sep{display:flex;align-items:center;gap:10px;font-size:11px;font-weight:800;color:#e02020;padding:6px 0;margin:4px 0;direction:rtl;position:relative;}
.unread-sep::before,.unread-sep::after{content:'';flex:1;height:1.5px;background:#fecaca;}
.unread-sep span{background:#fff5f5;border:1px solid #fecaca;border-radius:99px;padding:2px 10px;white-space:nowrap;flex-shrink:0;}
body.dark .unread-sep::before,body.dark .unread-sep::after{background:#4a1212;}
body.dark .unread-sep span{background:#2a1010;border-color:#7f1d1d;}
#loadMoreSpinner.show{display:flex;}
.lm-ring{width:22px;height:22px;border-radius:50%;border:2.5px solid #e5e7eb;border-top-color:#1a56db;animation:spin .7s linear infinite;flex-shrink:0;}

#scrollDownBtn{position:fixed;bottom:20px;left:calc(320px + 12px);width:44px;height:44px;background:#fff;border:1.5px solid #e5e7eb;border-radius:50%;display:none;align-items:center;justify-content:center;box-shadow:0 4px 18px rgba(0,0,0,.15);cursor:pointer;z-index:201;transition:bottom .2s ease;}
#scrollDownBtn.show{display:flex;}
#scrollDownBtn:hover{background:#f3f4f6;border-color:#d1d5db;}
#scrollDownBtn .scroll-arrow{color:#374151;font-size:16px;line-height:1;}
@media(max-width:900px){#scrollDownBtn{left:50%;transform:translateX(-50%);}}
body.has-compose #scrollDownBtn{bottom:calc(var(--compose-h,120px) + 16px);}
.unread-dot{width:8px;height:8px;border-radius:50%;background:#e02020;flex-shrink:0;display:none;box-shadow:0 0 0 2px #fff;}
#scrollDownBtn.has-new .unread-dot{display:block;}

#prog{position:fixed;top:0;inset-inline:0;height:2px;background:#1a56db;transform:scaleX(0);transform-origin:right;z-index:999;display:none;}
#prog.on{display:block;animation:pr 1.1s ease-in-out infinite;}
@keyframes pr{0%{transform:scaleX(0);transform-origin:right}50%{transform:scaleX(.55);transform-origin:right}100%{transform:scaleX(0);transform-origin:left}}

#empty{display:none;text-align:center;padding:60px 20px;color:#aaa;}
#empty i{font-size:36px;opacity:.2;margin-bottom:10px;display:block;}

/* LIGHTBOX */
#lightbox{position:fixed;inset:0;z-index:900;background:rgba(0,0,0,.88);display:none;align-items:center;justify-content:center;cursor:zoom-out;animation:lbIn .18s ease;}
@keyframes lbIn{from{opacity:0}to{opacity:1}}
#lightbox.show{display:flex;}
#lightbox img{max-width:94vw;max-height:90vh;border-radius:10px;object-fit:contain;box-shadow:0 8px 40px rgba(0,0,0,.5);cursor:default;}
#lbClose{position:fixed;top:14px;right:16px;background:rgba(255,255,255,.15);border:none;color:#fff;font-size:20px;cursor:pointer;width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background .12s;z-index:901;}
#lbClose:hover{background:rgba(255,255,255,.28);}

#adminMsgsModal{position:fixed;inset:0;z-index:800;background:rgba(0,0,0,.5);display:none;align-items:center;justify-content:center;padding:16px;}
#adminMsgsModal.open{display:flex;}
.admin-msgs-box{background:#fff;border-radius:20px;padding:0;max-width:480px;width:100%;max-height:85vh;display:flex;flex-direction:column;box-shadow:0 24px 60px rgba(0,0,0,.25);overflow:hidden;}
.admin-msgs-hdr{padding:16px 20px;border-bottom:1px solid #f0f0f0;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;}
.admin-msgs-title{font-size:15px;font-weight:800;color:#111;}
.admin-msgs-close{background:none;border:none;font-size:16px;cursor:pointer;color:#aaa;padding:4px;border-radius:8px;}
.admin-msgs-close:hover{background:#f3f4f6;}
.admin-msgs-body{flex:1;overflow-y:auto;padding:14px 16px;display:flex;flex-direction:column;gap:10px;}
.admin-msg-item{border-radius:12px;padding:12px 14px;border:1px solid #e5e7eb;background:#fafafa;}
.admin-msg-item.unread{background:#eff6ff;border-color:#bfdbfe;}
.admin-msg-sender-row{display:flex;align-items:center;gap:8px;margin-bottom:6px;}
.admin-msg-av{width:28px;height:28px;border-radius:50%;overflow:hidden;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;color:#fff;}
.admin-msg-av img{width:100%;height:100%;object-fit:cover;}
.admin-msg-name{font-size:12px;font-weight:800;color:#374151;}
.admin-msg-time{font-size:10px;color:#aaa;margin-right:auto;}
.admin-msg-text{font-size:13px;line-height:1.6;color:#374151;white-space:pre-wrap;}
.admin-msgs-send{padding:12px 16px;border-top:1px solid #f0f0f0;display:none;gap:8px;align-items:flex-end;flex-shrink:0;}
.admin-send-inp{flex:1;border:1.5px solid #e5e7eb;border-radius:12px;padding:8px 12px;font-size:13px;font-family:'Heebo',sans-serif;resize:none;outline:none;max-height:80px;line-height:1.5;direction:rtl;}
.admin-send-inp:focus{border-color:#93c5fd;}
.admin-send-btn{background:#1a56db;color:#fff;border:none;border-radius:10px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;}

#adOverlay{position:fixed;inset:0;z-index:800;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;}
#adCloseBtn:disabled{opacity:0.5;cursor:not-allowed;}

#siteSettingsModal{position:fixed;inset:0;z-index:800;background:rgba(0,0,0,.5);display:none;align-items:center;justify-content:center;padding:16px;}
#siteSettingsModal.open{display:flex;}
.ss-box{background:#fff;border-radius:20px;padding:20px;max-width:500px;width:100%;max-height:85vh;display:flex;flex-direction:column;box-shadow:0 24px 60px rgba(0,0,0,.25);overflow-y:auto;}
.ss-title{font-size:16px;font-weight:800;color:#111;margin-bottom:15px;display:flex;justify-content:space-between;align-items:center;}
.ss-section{border:1px solid #e5e7eb;border-radius:12px;padding:12px;margin-bottom:12px;}
.ss-section-title{font-size:13px;font-weight:700;color:#1a56db;margin-bottom:8px;}
.ss-input{width:100%;padding:8px;border:1px solid #e5e7eb;border-radius:8px;font-family:'Heebo';font-size:13px;}
.ss-btn{background:#1a56db;color:#fff;border:none;border-radius:8px;padding:8px 12px;font-size:12px;font-weight:700;cursor:pointer;font-family:'Heebo';margin-top:8px;}

/* LEADERBOARD (סטטיסטיקות) */
.lb-tab { background:#fff; border:1px solid #d1d5db; padding:6px 14px; border-radius:99px; font-family:'Heebo'; font-weight:700; color:#4b5563; cursor:pointer; transition:all 0.2s; }
.lb-tab:hover { background:#f3f4f6; }
.lb-tab.active { background:#1a56db; color:#fff; border-color:#1a56db; }

.lb-podium { display:flex; align-items:flex-end; justify-content:center; gap:15px; margin-top:30px; height:200px; }
.podium-item { display:flex; flex-direction:column; align-items:center; width:30%; }
.podium-bar { width:100%; border-radius:12px 12px 0 0; color:white; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding-top:10px; font-weight:900; font-size:24px; transition:height 1s ease; box-shadow:0 10px 20px rgba(0,0,0,0.1); }
.podium-1 .podium-bar { background:linear-gradient(to top, #ca8a04, #fde047); height:160px; }
.podium-2 .podium-bar { background:linear-gradient(to top, #64748b, #cbd5e1); height:120px; }
.podium-3 .podium-bar { background:linear-gradient(to top, #9a3412, #fdba74); height:90px; }
.podium-av { width:50px; height:50px; border-radius:50%; border:3px solid #fff; box-shadow:0 4px 10px rgba(0,0,0,0.1); margin-bottom:-25px; z-index:2; background:#fff; object-fit:cover; }
.podium-name { margin-top:35px; font-weight:800; color:#111; font-size:14px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:100%; }

.lb-bars { display:flex; flex-direction:column; gap:12px; }
.lb-bar-row { display:flex; align-items:center; gap:10px; }
.lb-bar-name { width:100px; font-size:12px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:left; }
.lb-bar-track { flex:1; background:#e5e7eb; height:20px; border-radius:10px; overflow:hidden; display:flex; }
.lb-bar-fill { background:linear-gradient(90deg, #3b82f6, #1a56db); height:100%; display:flex; align-items:center; padding:0 8px; color:white; font-size:10px; font-weight:800; transition:width 1s ease; white-space:nowrap; }

.lb-list { display:flex; flex-direction:column; gap:8px; }
.lb-list-item { display:flex; align-items:center; gap:12px; background:#fff; border:1px solid #e5e7eb; border-radius:16px; padding:10px 16px; transition:transform 0.2s, box-shadow 0.2s; }
.lb-list-item:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(0,0,0,0.08); }
.lb-rank { font-size:18px; font-weight:900; color:#9ca3af; width:24px; text-align:center; }
.lb-rank.gold { color:#ca8a04; }
.lb-rank.silver { color:#64748b; }
.lb-rank.bronze { color:#9a3412; }
.lb-info { flex:1; }
.lb-stats { display:flex; gap:15px; font-size:12px; font-weight:700; color:#4b5563; }
.lb-stat-badge { background:#eff6ff; color:#1a56db; padding:4px 10px; border-radius:8px; display:flex; align-items:center; gap:5px; }

/* DARK MODE EXTRA FIXES */
body.dark .lb-list-item { background:#1e1e30; border-color:#333; }
body.dark .lb-info { color:#fff; }
body.dark .lb-stat-badge { background:#1a1a2e; }
body.dark .ss-box, body.dark .utd-box { background:#1e1e30; color:#e5e7eb; }
body.dark .ss-title, body.dark .utd-title { color:#fff; }
body.dark .ss-section { border-color:#333; }
body.dark .ss-input, body.dark .utd-time-inp { background:#0f0f15; color:#fff; border-color:#333; }

/* MODALS VISIBILITY AND ANIMATIONS */
#reportModalOverlay { display:flex !important; }
#reportModalOverlay[style*="display:none"] { display:none !important; }
#reportsModal { display:flex !important; }
#reportsModal[style*="display:none"] { display:none !important; }
@keyframes toastIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

/* ===== DARK MODE FULL SCREEN FIX ===== */
body.dark {
  background: #0f0f15 !important;
  color: #e5e7eb;
}
body.dark header {
  background: #1a1a2e !important;
  border-color: #2a2a40 !important;
}
body.dark .hdr-name { color: #f3f4f6 !important; }
body.dark #app { background: #0f0f15; }
body.dark #feedWrap { background: #0f0f15; }
body.dark .bubble { background: #1e1e30 !important; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
body.dark .bubble-text { color: #d1d5db !important; }
body.dark .bubble-headline { color: #f3f4f6 !important; }
body.dark .rxn-chip { background: #2a2a40; border-color: #3a3a55; }
body.dark .rxn-count { color: #9ca3af; }
body.dark .bubble-top-actions .link-btn,
body.dark .bubble-top-actions .cmt-btn { background: #1e1e30; border-color: #3a3a55; color: #9ca3af; }
body.dark .msg-action-btn { background: #1e1e30; border-color: #3a3a55; color: #9ca3af; }
body.dark #adminComposeBar { background: #1a1a2e !important; border-color: #2a2a40 !important; }
body.dark #composeEditor { background: #0f0f15 !important; border-color: #3a3a55 !important; color: #e5e7eb !important; }
body.dark .compose-toolbar { border-color: #2a2a40; }
body.dark .ctb-btn { background: #1a1a2e; border-color: #3a3a55; color: #d1d5db; }
body.dark #tagFilterBar { background: #1a1a2e !important; border-color: #2a2a40 !important; }
body.dark .msg-meta-name { color: #9ca3af; }
body.dark .msg-meta-time { color: #6b7280; }
body.dark #scrollDownBtn { background: #1e1e30; border-color: #3a3a55; }
body.dark #scrollDownBtn .scroll-arrow { color: #d1d5db; }
body.dark .unread-sep { color: #f87171; }
body.dark .cp-hdr { background: #1a1a2e; border-color: #2a2a40; }
body.dark .cp-title { color: #f3f4f6; }
body.dark #commentsPanel { background: #1a1a2e; }
body.dark .ci-bubble { background: #2a2a40; }
body.dark .ci-text { color: #d1d5db; }
body.dark .cp-inp { background: #0f0f15; border-color: #3a3a55; color: #e5e7eb; }
body.dark .cp-inp-row { background: #1a1a2e; border-color: #2a2a40; }
body.dark #emojiPicker { background: #1e1e30; border-color: #3a3a55; }
body.dark .ep-btn:hover { background: #2a2a40; }
body.dark .hdr-icon-btn, body.dark #searchBtn, body.dark #darkBtn,
body.dark #notifBtn, body.dark #adBtn, body.dark #adminMsgsBtn,
body.dark #siteSettingsBtn, body.dark #manageAdminsBtn,
body.dark #writePermBtn, body.dark #updateModeHdrBtn, body.dark #leaderboardBtn {
  color: #9ca3af;
}
body.dark .hdr-icon-btn:hover, body.dark #searchBtn:hover, body.dark #notifBtn:hover,
body.dark #adBtn:hover, body.dark #adminMsgsBtn:hover { background: #2a2a40 !important; color: #f3f4f6 !important; }
body.dark .quote-block { background: #1e1e30; border-color: #3b82f6; }
body.dark .quote-block-text { color: #9ca3af; }
body.dark .lnk-btn { background: #2a2a40; color: #d1d5db; }
body.dark .chat-panel-hdr { background: #1a1a2e !important; border-color: #2a2a40 !important; }
body.dark .chat-panel-title { color: #f3f4f6 !important; }
body.dark #chatInputRow { background: #1a1a2e !important; border-color: #2a2a40 !important; }
body.dark .chat-inp { background: #0f0f15 !important; border-color: #3a3a55 !important; color: #e5e7eb !important; }
body.dark #mentionDropdown { background: #1e1e30; border-color: #3a3a55; }
body.dark .mention-item { color: #d1d5db; border-color: #2a2a40; }
body.dark .mention-item:hover { background: #2a2a45; color: #a5b4fc; }
body.dark .ctb-dropdown { background: #1e1e30; border-color: #3a3a55; }
body.dark .ctb-inp-label { color: #9ca3af; }
body.dark .ctb-inp { background: #0f0f15; border-color: #3a3a55; color: #e5e7eb; }
body.dark .post-tag { background: #2a2a40; color: #d1d5db; border-color: #3a3a55; }
body.dark .post-tag:hover { background: #3a3a55; color: #f3f4f6; }
body.dark #searchResultsInner .bubble { background: #1e1e30 !important; }

/* ================================================================
   CREATORS GLASS PANEL — replace the "CREATORS SECTION IN SIDEBAR"
   block in style.css (search for "===== CREATORS SECTION")
   ================================================================ */

/* The header inside the sidebar becomes a trigger */
.creators-hdr {
  padding: 12px 15px 10px;
  font-size: 10px;
  font-weight: 800;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-top: 1px solid #f0f0f0;
  margin-top: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s, background 0.2s;
  user-select: none;
}
.creators-hdr:hover { color: #374151; background: rgba(0,0,0,0.02); }
.creators-hdr .ch-arrow {
  font-size: 9px;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
  opacity: 0.5;
}
.creators-hdr.open .ch-arrow { transform: rotate(90deg); opacity: 1; }
.creators-hdr .ch-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #a5b4fc;
  box-shadow: 0 0 6px #818cf8;
  display: none;
}
.creators-hdr.open .ch-dot { display: block; }

body.dark .creators-hdr { border-color: #2a2a40; color: #4b5563; }
body.dark .creators-hdr:hover { color: #9ca3af; background: rgba(255,255,255,0.03); }

/* Hide the old list inside the sidebar */
#creatorsList { display: none; }

/* ===== SEARCH FIX ===== */
#searchResults { background: #eae9e4; }
body.dark #searchResults { background: #0f0f15; }

/* מניעת הימתחות הערוצים כדי שהכפתור יעלה למעלה */
#channelsList {
    flex: 0 0 auto !important; 
    margin-bottom: 10px !important;
}

/* כפתור יוצרים - מותאם לעברית ולצבעי האתר */
.creators-hdr {
    direction: rtl !important;
    padding: 12px 16px !important;
    margin: 10px 14px 15px !important;
    background: #f8fafc !important; 
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    color: #334155 !important;
    font-weight: bold !important;
    font-size: 14px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.creators-hdr:hover {
    background: #eff6ff !important; 
    color: #1a56db !important; 
    border-color: #bfdbfe !important;
}

.ch-dot {
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    background: #3b82f6 !important; 
    border-radius: 50% !important;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.5) !important;
    animation: pulse-dot 2s infinite !important;
    margin-right: 8px !important;
}

@keyframes pulse-dot {
    0% { opacity: 0.5; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.5; transform: scale(0.8); }
}

.ch-arrow {
    font-size: 12px !important;
    opacity: 0.6 !important;
    transition: transform 0.2s !important;
}

.creators-hdr:hover .ch-arrow {
    transform: translateX(-4px) !important;
    opacity: 1 !important;
}

/* ── Floating Glass Panel - סידור מיקום מושלם לימין ── */
#creatorsPanel {
    position: fixed !important;
    right: 280px !important; /* מרחק מהתפריט הימני */
    left: auto !important; /* ביטול הדחיפה שמאלה */
    top: 20vh !important;
    width: 256px;
    z-index: 99999 !important;
    transform: translateX(15px) scale(0.96) !important;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), opacity 0.22s ease;
    transform-origin: right top; /* האנימציה תפתח מימין */
}
#creatorsPanel.open {
    transform: translateX(0) scale(1) !important;
    opacity: 1;
    pointer-events: all;
}

.cp-glass {
    background: rgba(8, 8, 18, 0.86);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: 0 40px 90px rgba(0,0,0,0.55), 0 0 0 0.5px rgba(255,255,255,0.05) inset, 0 1px 0 rgba(255,255,255,0.1) inset;
    overflow: hidden;
}

/* Subtle top glow line */
.cp-glass::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(165,180,252,0.6), transparent);
}

.cp-glass-hdr {
    padding: 14px 16px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cp-glass-title {
    font-size: 10px;
    font-weight: 800;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    display: flex;
    align-items: center;
    gap: 7px;
}
.cp-glass-title::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a5b4fc, #818cf8);
    box-shadow: 0 0 6px rgba(165,180,252,0.8);
    display: block;
    flex-shrink: 0;
}
.cp-glass-close {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    font-family: 'Heebo', sans-serif;
    line-height: 1;
}
.cp-glass-close:hover {
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.75);
}

.cp-glass-list {
    max-height: 300px; 
    overflow-y: auto;
    padding: 8px 10px 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.cp-glass-list::-webkit-scrollbar { width: 3px; }
.cp-glass-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 99px;
}

/* ── Creator Item ── */
.cg-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 10px;
    border-radius: 13px;
    cursor: pointer;
    position: relative;
    margin-bottom: 2px;
    transition: background 0.18s;
    direction: rtl;
}
.cg-item:hover { background: rgba(255,255,255,0.06); }
.cg-item.active { background: rgba(165,180,252,0.1); }

/* Left accent bar when active */
.cg-item.active::after {
    content: '';
    position: absolute;
    right: 0; top: 20%; bottom: 20%;
    width: 2.5px;
    background: linear-gradient(to bottom, #a5b4fc, #818cf8);
    border-radius: 99px;
}

/* ── Avatar ── */
.cg-av-wrap {
    position: relative;
    flex-shrink: 0;
    width: 38px; height: 38px;
}
.cg-av-ring {
    position: absolute;
    inset: -2.5px;
    border-radius: 50%;
    background: conic-gradient( rgba(165,180,252,0) 0deg, rgba(129,140,248,0.8) 120deg, rgba(99,102,241,0.5) 240deg, rgba(165,180,252,0) 360deg );
    opacity: 0;
    transition: opacity 0.25s;
    animation: none;
}
.cg-item:hover .cg-av-ring { opacity: 0.6; }
.cg-item.active .cg-av-ring {
    opacity: 1;
    animation: ringRotate 3s linear infinite;
}
@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.cg-av-inner {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: #0f0f1a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}
.cg-av-inner img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ── Text Info ── */
.cg-info { flex: 1; min-width: 0; }
.cg-name {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    transition: color 0.15s;
    font-family: 'Heebo', sans-serif;
}
.cg-item:hover .cg-name { color: rgba(255,255,255,0.95); }
.cg-item.active .cg-name { color: #c7d2fe; }

.cg-role {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.28);
    font-family: 'Heebo', sans-serif;
    transition: color 0.15s;
}
.cg-item.active .cg-role { color: rgba(165,180,252,0.55); }

/* Scroll hint gradient at bottom */
.cp-glass-list-wrap { position: relative; }
.cp-glass-list-fade {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 36px;
    background: linear-gradient(to top, rgba(8,8,18,0.85), transparent);
    pointer-events: none;
    border-radius: 0 0 20px 20px;
    transition: opacity 0.2s;
}

/* התאמה למובייל - ממורכז יפה באמצע המסך */
@media(max-width: 900px) {
    #creatorsPanel {
        right: 50% !important;
        left: auto !important;
        transform: translateX(50%) scale(0.96) !important;
        top: 20vh !important;
        width: calc(100vw - 24px) !important;
        max-width: 280px !important;
    }
    #creatorsPanel.open {
        transform: translateX(50%) scale(1) !important;
    }
}
/* עיצוב כפתור הסטטיסטיקות */
.stats-hdr {
    direction: rtl !important;
    padding: 12px 16px !important;
    margin: 0 14px 15px !important;
    background: #f8fafc !important; 
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    color: #334155 !important;
    font-weight: bold !important;
    font-size: 14px !important;
    display: none; /* ברירת מחדל - מוסתר! */
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.stats-hdr:hover {
    background: #eff6ff !important; 
    color: #1a56db !important; 
    border-color: #bfdbfe !important;
}
/* 1. שחרור מלא של ההגבלות מהודעות בפיד (כדי שלא ימעכו את התוכן) */
#feedWrap .msg-text, 
#feedWrap .msg-content, 
#feedWrap .feed-msg-body {
    max-height: none !important;
    overflow: visible !important;
}

/* ====== רקע "בין ערביים" נעים לעין ובוגר ====== */
.bg-container {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -10; overflow: hidden;
    /* צבע אמצע: אפור-כחלחל עמוק ומרגיע, לא קונטרסטי מידי */
    background: #1e2433; 
    pointer-events: none;
}

.blob {
    position: absolute; border-radius: 50%;
    filter: blur(120px); /* טשטוש עצום שמונע קווים גסים */
    opacity: 0.35; /* שקיפות גבוהה - הצבעים רק "רומזים" שהם שם */
    animation: float 30s infinite ease-in-out alternate;
    will-change: transform;
}

.blob-1 { top: 0%; left: -10%; width: 60vw; height: 60vw; background: #3b82f6; animation-delay: 0s; }
.blob-2 { bottom: -10%; right: -10%; width: 70vw; height: 70vw; background: #8b5cf6; animation-delay: -5s; }
.blob-3 { top: 30%; left: 30%; width: 50vw; height: 50vw; background: #0ea5e9; animation-delay: -10s; }

/* הילת העכבר הרכה */
.mouse-blob {
    position: absolute; top: 0; left: 0; width: 35vw; height: 35vw;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%);
    border-radius: 50%; pointer-events: none; z-index: 1; filter: blur(20px);
    transform: translate(-50%, -50%); mix-blend-mode: screen;
}

/* הקנבס של הנצנצים (חייב לכסות הכל ולא להפריע ללחיצות) */
#sparklesCanvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 2;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(3%, -3%) scale(1.02) rotate(1deg); }
    100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}
