/* ===== 聊天室样式（移植自 Discuz「Joe 聊天室」注入样式，配色/尺寸原样保留）===== */

#jc_bar {
    position: fixed;
    left: 10px;
    bottom: 12px;
    z-index: 1200;
    cursor: pointer;
    background: #409eff;
    color: #fff;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    user-select: none;
}
#jc_bar .jc_n {
    display: none;
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: #f56c6c;
    border-radius: 9px;
    font-size: 11px;
    padding: 0 3px;
}
#jc_win {
    position: fixed;
    left: 10px;
    bottom: 56px;
    z-index: 1200;
    width: 360px;
    max-width: 96vw;
    background: #fff;
    color: #333; /* 写死基础文字色：不写会被暗黑模式 body 的浅色文字继承，浅气泡上看不清 */
    border: 1px solid #cacaca;
    border-radius: 8px;
    overflow: hidden;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
    font-size: 14px;
}
#jc_win .jc_hd {
    background: #409eff;
    color: #fff;
    padding: 8px 12px;
    font-weight: bold;
    cursor: default;
}
#jc_win .jc_x {
    float: right;
    cursor: pointer;
    font-weight: normal;
    opacity: .85;
    padding: 0 4px;
}
#jc_list {
    height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 6px;
    background: #f5f6f8; /* 贴近参考站的浅白底：比纯白略深，让白色气泡/箭头浮得出来 */
}
#jc_list .jc_m { margin: 6px 2px; overflow: hidden; }
#jc_list .jc_a { float: left; position: relative; width: 36px; height: 36px; border-radius: 4px; overflow: hidden; background: #c0c4cc; }
#jc_list .jc_a::before { content: attr(data-c); position: absolute; left: 0; top: 0; width: 100%; color: #fff; font-size: 16px; font-weight: bold; text-align: center; line-height: 36px; }
#jc_list .jc_a img { position: relative; width: 36px; height: 36px; border-radius: 4px; display: block; }
#jc_list .jc_b { float: left; margin-left: 8px; max-width: 258px; position: relative; }
#jc_list .jc_h { margin: 0 0 3px; font-size: 12px; color: #999; }
#jc_list .jc_h a { color: #f60; text-decoration: none; margin-right: 4px; }
#jc_list .jc_h span { font-weight: normal; color: #aaa; }
#jc_list .jc_t {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    border-radius: 4px;
    padding: 6px 10px;
    display: inline-block;
    word-wrap: break-word;
    word-break: break-all;
    line-height: 1.5;
    text-align: left;
}
#jc_list .jc_t img { max-width: 50px; max-height: 50px; vertical-align: middle; }
#jc_list .jc_t .jc_emo { width: 20px; height: 20px; }
#jc_list .jc_w {
    position: absolute;
    top: 26px;
    left: -8px;
    width: 0;
    height: 0;
    border: 4px solid transparent;
    border-right-color: #fff;
}
/* 自己的消息：右侧、绿色气泡 */
#jc_list .jc_s .jc_a { float: right; }
#jc_list .jc_s .jc_b { float: right; margin: 0 8px 0 0; text-align: right; }
#jc_list .jc_s .jc_h a { color: #2ca0ca; }
#jc_list .jc_s .jc_t { background: #b2e281; }
#jc_list .jc_s .jc_w {
    left: auto;
    right: -8px;
    border-right-color: transparent;
    border-left-color: #b2e281;
}
#jc_list .jc_tip { text-align: center; color: #999; font-size: 12px; padding: 6px 0; }
#jc_list .jc_act { display: none; color: #bbb; cursor: pointer; font-size: 12px; margin-left: 6px; }
#jc_list .jc_m:hover .jc_act { display: inline; }
#jc_list .jc_re:hover { color: #e6a23c; }
#jc_list .jc_del:hover { color: #f56c6c; }
/* 引用块（服务端把 [quote] 渲染成 .quote） */
#jc_list .jc_t .quote {
    display: block;
    margin: 3px 0 2px;
    padding: 4px 8px;
    border-left: 3px solid #409eff;
    background: #f4f8fc;
    border-radius: 2px;
    font-size: 12px;
    color: #777;
    text-align: left;
}
#jc_list .jc_t .quote blockquote { margin: 0; padding: 0; }
#jc_list .jc_s .jc_t .quote {
    background: rgba(255, 255, 255, .55);
    border-left-color: #5a9e2f;
    color: #4d4d4d;
}
/* @ 高亮 / @我 描金 */
#jc_list .jc_at { color: #409eff; font-weight: bold; background: rgba(64, 158, 255, .14); border-radius: 3px; padding: 0 2px; }
#jc_list .jc_s .jc_at { color: #2b7a18; background: rgba(255, 255, 255, .5); }
#jc_list .jc_isme .jc_t { outline: 2px solid #ff9900; outline-offset: 1px; }
/* 输入区 */
#jc_in { padding: 8px; background: #f7f7f7; border-top: 1px solid #ddd; }
#jc_in .jc_hint { font-size: 12px; color: #409eff; margin: 0 0 6px; }
#jc_in textarea {
    width: 100%;
    height: 56px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px;
    font-size: 14px;
    resize: none;
    background: #fff;
    color: #333;
}
#jc_in textarea:focus { border-color: #409eff; outline: none; }
#jc_in .jc_ops { margin-top: 6px; overflow: hidden; }
#jc_in .jc_emo {
    float: left;
    margin-right: 4px;
    cursor: pointer;
    color: #666;
    font-size: 13px;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    user-select: none;
}
#jc_in .jc_send {
    float: right;
    cursor: pointer;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 18px;
    font-size: 14px;
}
#jc_in .jc_send[disabled] { background: #a0c4ea; cursor: default; }
#jc_in .jc_guest { text-align: center; color: #666; padding: 6px 0; font-size: 13px; }
#jc_in .jc_guest a { color: #409eff; }
/* 表情面板 */
#jc_sm {
    display: none;
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 144px;
    background: #fff;
    border: 1px solid #cacaca;
    border-radius: 6px;
    z-index: 1201;
    max-height: 180px;
    overflow-y: auto;
    padding: 6px;
}
#jc_sm .jc_stab {
    display: inline-block;
    padding: 3px 8px;
    margin: 0 2px 6px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    color: #555;
}
#jc_sm .jc_stab.on { background: #409eff; color: #fff; border-color: #409eff; }
#jc_sm .jc_si { display: inline-block; margin: 3px; cursor: pointer; }
#jc_sm .jc_si img { width: 22px; height: 22px; display: block; }
#jc_sm .jc_sgrp { display: none; }
#jc_sm .jc_sgrp.on { display: block; }
/* 系统消息（撤回胶囊，对照原版灰底圆角） */
#jc_list .jc_sys { text-align: center; margin: 8px 0; }
#jc_list .jc_pill { display: inline-block; background: #e8eaed; color: #8a8f96; font-size: 12px; border-radius: 10px; padding: 3px 10px; }
/* 图片消息（盖过通用表情 img 的 50px 限制） */
#jc_list .jc_t img.jc_pic { max-width: 180px; max-height: 180px; border-radius: 4px; border: 1px solid #eee; display: block; margin-top: 4px; background: #fff; }
/* 移动端 */
@media (max-width: 768px) {
    #jc_bar { bottom: 64px; }
    #jc_win { left: 2vw; right: 2vw; width: auto; bottom: 118px; max-width: none; }
    #jc_list { height: 46vh; }
}
