/* theme.css 全局明暗完整版 覆盖首页/私聊/设置全部组件 */
body,
.card,.pc-left-tab,.pc-middle,.pc-chat-box,.mobile-wrap,.mobile-chat-popup,
.set-input,.pc-search,.mobile-search,
.tab-btn,
.session-item,.mobile-session,.contact-item,
.wrap,.top-bar,.msg-area,.side-set,.tool-bar,.input-area,.emoji-panel,#msg-input,
.my-bubble,.other-bubble,
.set-card,.set-row,
/* 首页左侧会话栏组件 */
.search-wrap,.session-list,.session-item .session-right,.badge-red
{
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 全局主体 */
body {
    background: #f7f8fa;
    color: #222222;
}
body.dark {
    background: #1a1a1a !important;
    color: #eeeeee !important;
}

/* 全部容器卡片：首页左侧、聊天主框、右侧好友设置、设置页卡片 */
.card,.pc-left-tab,.pc-middle,.pc-chat-box,.mobile-wrap,.mobile-chat-popup,.wrap,.msg-area,.side-set,.set-card,.search-wrap {
    background: #ffffff;
}
body.dark .card,
body.dark .pc-left-tab,
body.dark .pc-middle,
body.dark .pc-chat-box,
body.dark .mobile-wrap,
body.dark .mobile-chat-popup,
body.dark .wrap,
body.dark .msg-area,
body.dark .side-set,
body.dark .set-card,
body.dark .search-wrap {
    background: #222222 !important;
}

/* 分割线、顶部栏、底部输入栏边框+背景 */
.border-line,.pc-middle-top,.pc-chat-header,.mobile-footer,.mobile-chat-header,.top-bar,.tool-bar,.input-area,.set-row {
    border-color: #eeeeee;
}
body.dark .border-line,
body.dark .pc-middle-top,
body.dark .pc-chat-header,
body.dark .mobile-footer,
body.dark .mobile-chat-header,
body.dark .top-bar,
body.dark .tool-bar,
body.dark .input-area,
body.dark .set-row {
    border-color: #333333 !important;
}
body.dark .top-bar,
body.dark .tool-bar,
body.dark .input-area {
    background: #262626 !important;
}

/* 搜索框、输入文本框 */
.set-input,.pc-search,.mobile-search,#msg-input {
    background: #f5f6f8;
    border: 1px solid #eeeeee;
    color: #222222;
}
body.dark .set-input,
body.dark .pc-search,
body.dark .mobile-search,
body.dark #msg-input {
    background: #333333 !important;
    border-color: #444444 !important;
    color: #eeeeee !important;
}
.set-input::placeholder,.pc-search::placeholder,.mobile-search::placeholder,#msg-input::placeholder {
    color: #aaa;
}
body.dark .set-input::placeholder,
body.dark .pc-search::placeholder,
body.dark .mobile-search::placeholder,
body.dark #msg-input::placeholder {
    color: #777 !important;
}

/* 会话列表项 */
.session-item,.mobile-session,.contact-item {
    border-bottom-color: #f5f5f5;
}
.session-item:hover,.mobile-session:hover,.contact-item:hover {
    background: #f2f3f5;
}
body.dark .session-item,
body.dark .mobile-session,
body.dark .contact-item {
    border-bottom-color: #333333 !important;
}
body.dark .session-item:hover,
body.dark .mobile-session:hover,
body.dark .contact-item:hover {
    background: #2a2a2a !important;
}

/* 会话列表文字（时间、简介） */
.session-time,.session-msg,.mobile-stime,.mobile-smsg,.set-row-desc,.text-gray {
    color: #888888;
}
body.dark .session-time,
body.dark .session-msg,
body.dark .mobile-stime,
body.dark .mobile-smsg,
body.dark .set-row-desc,
body.dark .text-gray {
    color: #aaaaaa !important;
}

/* Tab按钮 */
.tab-btn {
    background: #eeeeee;
    color: #333333;
}
body.dark .tab-btn {
    background: #333333 !important;
    color: #eeeeee !important;
}
.tab-btn.active {
    background: #0088ff;
    color: #ffffff;
}

/* 聊天气泡 */
.other-bubble {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #222;
}
body.dark .other-bubble {
    background: #333 !important;
    border-color: #444 !important;
    color: #eee !important;
}
.my-bubble {
    background: #95ec69;
    color: #222;
}
body.dark .my-bubble {
    background: #007030 !important;
    color: #fff !important;
}

/* 表情面板 */
.emoji-panel {
    background: #fff;
    border:1px solid #ddd;
}
.emoji-panel span:hover {
    background:#eee;
}
body.dark .emoji-panel {
    background: #262626 !important;
    border-color:#444 !important;
}
body.dark .emoji-panel span:hover {
    background:#444 !important;
}

/* 未读红点适配深色 */
.badge-red{
    background:#f53f3f;
    color:#fff;
}
body.dark .badge-red{
    filter:brightness(1.05;
}

/* 弹窗、提示框 */
.modal-box,.tips-box {
    background: #fff;
    border: 1px solid #eee;
}
body.dark .modal-box,
body.dark .tips-box {
    background: #222 !important;
    border-color: #333 !important;
}

/* 滚动条深色 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 3px;
}
body.dark ::-webkit-scrollbar-thumb {
    background: #444 !important;
}
::-webkit-scrollbar-track {
    background: transparent;
}

/* 复选开关适配 */
input[type=checkbox]{
    accent-color:#0088ff;
}
body.dark input[type=checkbox]{
    filter:brightness(1.1);
}