/* WebIM 聊天系统 - 三栏窗口模式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #07c160;
    --primary-hover: #06ad56;
    --bg-color: #1e2129;
    --white: #ffffff;
    --text-primary: #e8eaf0;
    --text-secondary: #9ba3b4;
    --text-muted: #6b7385;
    --border-color: #2e3340;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    --success: #07c160;
    --danger: #fa5151;
    --warning: #ffc300;
    /* 侧边栏深色 */
    --sidebar-bg: #1e2129;
    --sidebar-header: #1a1d25;
    --sidebar-item-hover: #262c38;
    --sidebar-item-active: #2d3444;
    /* 聊天区 */
    --chat-bg: #1a1d25;
    --chat-header-bg: #1e2129;
    /* 气泡 */
    --bubble-self: #2a5caa;
    --bubble-other: #262c38;
    --bubble-self-text: #ffffff;
    --bubble-other-text: #d4d9e8;
    /* 左侧导航 */
    --left-nav-bg: #141720;
    --left-nav-hover: #1e2330;
    --left-nav-text: #7a8299;
    --left-nav-active: #4d8ef0;
    --left-nav-active-bg: rgba(77, 142, 240, 0.12);
    /* 输入区 */
    --input-area-bg: #1e2129;
    --input-toolbar-bg: #1a1d25;
    --input-bg: #262c38;
    --input-border: #2e3340;
    /* 次要按钮 */
    --btn-secondary-bg: rgba(255,255,255,0.07);
    --btn-secondary-color: #9ba3b4;
    --btn-secondary-border: rgba(255,255,255,0.1);
    --btn-secondary-hover-bg: rgba(255,255,255,0.12);
    --btn-secondary-hover-color: #c4cad8;
}

/* ===== 浅色主题变量 ===== */
[data-theme="light"] {
    --bg-color: #f2f4f7;
    --white: #ffffff;
    --text-primary: #1c1e26;
    --text-secondary: #4a5568;
    --text-muted: #8a93a8;
    --border-color: #e4e8f0;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    /* 侧边栏 */
    --sidebar-bg: #ffffff;
    --sidebar-header: #f8f9fb;
    --sidebar-item-hover: #f2f4f7;
    --sidebar-item-active: #eaf5ef;
    /* 聊天区 */
    --chat-bg: #f8f9fa;
    --chat-header-bg: #ffffff;
    /* 气泡 */
    --bubble-self: #95ec69;
    --bubble-other: #ffffff;
    --bubble-self-text: #1c1e26;
    --bubble-other-text: #1c1e26;
    /* 左侧导航 */
    --left-nav-bg: #f0f1f4;
    --left-nav-hover: #e5e7ed;
    --left-nav-text: #6b7385;
    --left-nav-active: #07c160;
    --left-nav-active-bg: rgba(7, 193, 96, 0.12);
    /* 输入区 */
    --input-area-bg: #ffffff;
    --input-toolbar-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: #e4e8f0;
    /* 次要按钮 - 明亮主题 */
    --btn-secondary-bg: rgba(0,0,0,0.06);
    --btn-secondary-color: #4a5568;
    --btn-secondary-border: rgba(0,0,0,0.12);
    --btn-secondary-hover-bg: rgba(0,0,0,0.1);
    --btn-secondary-hover-color: #1c1e26;
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #74b9e8 0%, #9baaf0 35%, #c2a8f0 65%, #e0b4e8 100%);
}
[data-theme="light"] body::before,
[data-theme="light"] body::after {
    opacity: 1;
}

/* ===== 主题切换按钮（左侧导航栏）===== */
.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--left-nav-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    outline: none;
}
.theme-toggle-btn:hover {
    background: var(--left-nav-hover);
    color: var(--left-nav-active);
}

/* ===== 主题切换按钮（手机端侧边栏底部）===== */
.sidebar-theme-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.18s, color 0.18s;
    outline: none;
    margin-bottom: 0;
}
.sidebar-theme-btn:hover {
    background: var(--sidebar-item-hover);
    color: var(--text-primary);
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: linear-gradient(135deg, #74b9e8 0%, #9baaf0 35%, #c2a8f0 65%, #e0b4e8 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow: hidden;
}

/* 背景装饰元素 */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    right: -5%;
    width: 45%;
    height: 60%;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(200,180,255,0.2) 100%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    bottom: -5%;
    left: -5%;
    width: 40%;
    height: 55%;
    background: linear-gradient(135deg, rgba(120,200,255,0.18) 0%, rgba(255,255,255,0.08) 100%);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    pointer-events: none;
    z-index: 0;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5e9 0%, #b2dfdb 50%, #b3e5fc 100%);
    position: relative;
    overflow: hidden;
}

.login-box {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    padding: 40px;
    width: 380px;
    position: relative;
    z-index: 1;
}

.login-box h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
    background: var(--input-bg);
    color: var(--text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(77, 142, 240, 0.6);
    background: rgba(255,255,255,0.06);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    text-align: center;
    font-weight: 500;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--btn-secondary-bg, rgba(255,255,255,0.07));
    color: var(--btn-secondary-color, #9ba3b4);
    border: 1px solid var(--btn-secondary-border, rgba(255,255,255,0.1));
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover-bg, rgba(255,255,255,0.12));
    color: var(--btn-secondary-hover-color, #c4cad8);
}

.links {
    text-align: center;
    margin-top: 20px;
}

.links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.links a:hover {
    text-decoration: underline;
}

/* 主聊天界面 - 画中画浮窗模式 */
.app-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1024px;
    height: 700px;
    min-width: 700px;
    min-height: 480px;
    background: #1a1d25;
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
    transition: box-shadow 0.2s;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 禁止选中标题栏和侧边栏，但允许选中聊天消息 */
.pip-titlebar, .sidebar, .left-nav {
    user-select: none;
}

/* 全屏模式 */
.app-container.fullscreen {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    transform: none !important;
    border-radius: 0;
    box-shadow: none;
}

/* 主体区：left-nav + 内容区横向排列，撑满标题栏下方 */
.app-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* 内部布局区域（标题栏下方） */
.app-inner {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: 100%;
}

/* 拖拽标题栏 - Windows 风格 */
.pip-titlebar {
    height: 32px;
    background: #1a1d25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0 12px;
    cursor: grab;
    flex-shrink: 0;
    border-radius: 0;
    user-select: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}
.pip-titlebar:active {
    cursor: grabbing;
}
.app-container.fullscreen .pip-titlebar {
    border-radius: 0;
}
/* 隐藏 macOS 圆点 */
.pip-titlebar-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}
.pip-dot {
    display: none;
}
.pip-titlebar-title {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
    letter-spacing: 0.2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}
/* Windows 风格右侧窗口按钮 */
.pip-titlebar-actions {
    display: flex;
    gap: 0;
    align-items: stretch;
    height: 32px;
    margin-left: auto;
}
.pip-btn {
    width: 46px;
    height: 32px;
    border-radius: 0;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, color 0.1s;
    flex-shrink: 0;
}
.pip-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
/* 关闭按钮悬停变红（Windows 风格） */
.pip-btn.close-btn:hover {
    background: #c42b1c;
    color: #fff;
}
.pip-btn.close-btn:active {
    background: #a82015;
}

/* ===== 浅色主题：标题栏明亮配色 ===== */
[data-theme="light"] .app-container {
    background: #f8f9fb;
}
[data-theme="light"] .pip-titlebar {
    background: #f8f9fb;
    border-bottom: 1px solid #e4e8f0;
}
[data-theme="light"] .pip-titlebar-title {
    color: rgba(0,0,0,0.45);
}
[data-theme="light"] .pip-btn {
    color: rgba(0,0,0,0.45);
}
[data-theme="light"] .pip-btn:hover {
    background: rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.75);
}
[data-theme="light"] .pip-btn.close-btn:hover {
    background: #c42b1c;
    color: #fff;
}

/* ========== 底部 Ticker 工具栏 ========== */
.pip-footer {
    height: 26px;
    background: #12151c;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 11px;
    user-select: none;
    gap: 0;
}

/* 左侧状态 */
.pip-footer-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    width: 64px;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.08);
    height: 100%;
}
.pip-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    animation: pip-dot-pulse 2.4s ease-in-out infinite;
}
.pip-status-dot.offline { background: #ef4444; animation: none; }
.pip-status-dot.warn    { background: #f59e0b; }
@keyframes pip-dot-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.45; }
}
.pip-status-text {
    color: rgba(255,255,255,0.55);
    font-size: 11px;
}
/* 公告图标继承文字颜色 */
.pip-footer-icon {
    color: rgba(255,255,255,0.55);
    flex-shrink: 0;
}
/* 右侧连接状态文字 */
.pip-conn-text {
    color: rgba(255,255,255,0.45);
}

/* 中间公告跑马灯 */
.pip-ticker-wrap {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,0.6) 24px, #000 60px, #000 calc(100% - 60px), rgba(0,0,0,0.6) calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,0.6) 24px, #000 60px, #000 calc(100% - 60px), rgba(0,0,0,0.6) calc(100% - 24px), transparent 100%);
}
.pip-ticker-track {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    animation: pip-ticker-scroll 30s linear infinite;
    will-change: transform;
}
.pip-ticker-track:hover {
    animation-play-state: paused;
}
@keyframes pip-ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 公告条目 */
.pip-notice-item {
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    height: 26px;
    color: rgba(255,255,255,0.75);
    font-size: 11.5px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
.pip-notice-sep {
    color: rgba(255,255,255,0.25);
    font-size: 9px;
    margin: 0 6px;
}
.pip-notice-loading {
    display: inline-block;
    padding: 0 16px;
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    font-style: italic;
}

/* 右侧状态区 */
.pip-footer-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    flex-shrink: 0;
    border-left: 1px solid rgba(255,255,255,0.08);
    height: 100%;
}
.pip-footer-btn {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    cursor: pointer;
    padding: 0 6px;
    transition: color 0.15s;
    white-space: nowrap;
}
.pip-footer-btn:hover { color: rgba(255,255,255,0.9); }
.pip-footer-sep {
    color: rgba(255,255,255,0.15);
    font-size: 10px;
}

/* ===== 浅色主题：底部工具栏 ===== */
[data-theme="light"] .pip-footer {
    background: #ffffff;
    border-top: 1px solid #e8eaed;
}
[data-theme="light"] .pip-footer-status {
    border-right: 1px solid rgba(0,0,0,0.10);
}
[data-theme="light"] .pip-status-text {
    color: rgba(0,0,0,0.45);
}
[data-theme="light"] .pip-footer-icon {
    color: rgba(0,0,0,0.40);
}
[data-theme="light"] .pip-conn-text {
    color: rgba(0,0,0,0.40);
}
[data-theme="light"] .pip-notice-item {
    color: rgba(0,0,0,0.60);
}
[data-theme="light"] .pip-notice-sep {
    color: rgba(0,0,0,0.20);
}
[data-theme="light"] .pip-notice-loading {
    color: rgba(0,0,0,0.30);
}
[data-theme="light"] .pip-footer-actions {
    border-left: 1px solid rgba(0,0,0,0.10);
}
[data-theme="light"] .pip-footer-btn {
    color: rgba(0,0,0,0.45);
}
[data-theme="light"] .pip-footer-btn:hover {
    color: rgba(0,0,0,0.80);
}
[data-theme="light"] .pip-footer-sep {
    color: rgba(0,0,0,0.15);
}

/* ===== 浅色主题：搜索框 ===== */
[data-theme="light"] .search-box input {
    background-color: #f2f4f7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%238a93a8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    color: var(--text-primary);
    border: 1px solid #e4e8f0;
}
[data-theme="light"] .search-box input:focus {
    background-color: #edf0f5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%2307c160' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    border-color: #07c160;
}
[data-theme="light"] .search-box .add-btn {
    background: #f2f4f7;
    border: 1px solid #e4e8f0;
    color: var(--text-secondary);
}
[data-theme="light"] .search-box .add-btn:hover {
    background: #e8ecf2;
    color: var(--text-primary);
}

/* ===== 浅色主题：左侧导航栏边框 ===== */
[data-theme="light"] .left-nav {
    border-right: 1px solid #e4e8f0;
}
[data-theme="light"] .left-nav-avatar {
    border-color: rgba(0,0,0,0.10);
}

/* ===== 浅色主题：联系人列表 ===== */
[data-theme="light"] .contact-item {
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
/* 只在 sidebar 内的 contact-item 才显示选中样式 */
[data-theme="light"] .sidebar .contact-item.active {
    border-left: 2px solid #07c160;
    background: #eaf5ef;
}
[data-theme="light"] .contact-item.contact-pinned {
    background: rgba(7,193,96,0.05);
}
[data-theme="light"] .contact-item.contact-pinned:hover {
    background: rgba(7,193,96,0.10);
}
[data-theme="light"] .search-section-title {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    color: var(--text-muted);
}

/* ===== 浅色主题：聊天工具栏 icon-btn ===== */
[data-theme="light"] .chat-tools .icon-btn {
    color: #4a5568;
}
[data-theme="light"] .chat-tools .icon-btn svg {
    stroke: #4a5568;
}
[data-theme="light"] .chat-tools .redpacket-icon-btn svg path {
    stroke: #4a5568 !important;
}

/* ==================== 骰子消息样式 ==================== */
.dice-message {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: default;
    user-select: none;
}

.dice-message svg {
    display: block;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.15));
}

.dice-result-label {
    font-size: 16px;
    font-weight: 700;
    color: #e53935;
    text-align: center;
    letter-spacing: 3px;
}

[data-theme="light"] .dice-result-label {
    color: #e53935;
}

/* 骰子旋转动画 */
@keyframes diceSpinAnim {
    0%   { transform: rotate(0deg) scale(1); }
    25%  { transform: rotate(90deg) scale(0.92); }
    50%  { transform: rotate(180deg) scale(1); }
    75%  { transform: rotate(270deg) scale(0.92); }
    100% { transform: rotate(360deg) scale(1); }
}

/* 骰子工具栏按钮悬停高亮（蓝绿色调） */
.chat-tools .dice-icon-btn:hover {
    background: rgba(79, 192, 141, 0.15);
    color: #4fc08d;
}
[data-theme="light"] .chat-tools .dice-icon-btn:hover {
    background: rgba(79, 192, 141, 0.12);
    color: #2ca870;
}

/* ==================== 文件消息样式 ==================== */
.file-message {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
    max-width: 200px;
    cursor: pointer;
}

.file-message:hover .file-icon {
    opacity: 0.8;
}

.file-message.file-uploading {
    opacity: 0.6;
    cursor: default;
}

.file-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: opacity 0.2s;
}

.file-icon svg {
    width: 100%;
    height: 100%;
}

/* 按文件类型区分图标颜色 */
.file-icon.type-doc,
.file-icon.type-docx { color: #56a3ff; }
.file-icon.type-pdf { color: #fa5252; }
.file-icon.type-xls,
.file-icon.type-xlsx { color: #32cf7a; }
.file-icon.type-ppt,
.file-icon.type-pptx { color: #ff9c4a; }
.file-icon.type-zip,
.file-icon.type-rar,
.file-icon.type-7z { color: #a882ff; }
.file-icon.type-mp3,
.file-icon.type-wav,
.file-icon.type-aac { color: #ffd666; }
.file-icon.type-mp4,
.file-icon.type-avi,
.file-icon.type-mov { color: #ff6b8a; }
.file-icon.type-txt,
.file-icon.type-default { color: var(--text-secondary, #9ba3b4); }

.file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-name {
    font-size: 12px;
    color: var(--bubble-self-text, var(--text-primary, #fff));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.file-size {
    font-size: 10px;
    color: var(--text-secondary, #9ba3b4);
}

.file-download {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary, #9ba3b4);
    transition: all 0.2s;
    opacity: 0.6;
}

.file-message:hover .file-download {
    opacity: 1;
    color: var(--primary-color, #07c160);
}

.file-loading {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color, #07c160);
    border-radius: 50%;
    animation: fileLoadingSpin 0.8s linear infinite;
}

@keyframes fileLoadingSpin {
    to { transform: rotate(360deg); }
}

/* ==================== 红包气泡主题适配 ==================== */
/* 红包气泡整体使用红色渐变，亮色/暗色主题下均保持红色风格，无需分区适配 */
[data-theme="light"] .chat-tools .icon-btn:hover {
    background: rgba(0,0,0,0.06);
    color: var(--text-primary);
}
[data-theme="light"] .icon-btn:hover {
    background: rgba(0,0,0,0.06);
    color: var(--text-primary);
}

/* ===== 浅色主题：发送按钮 ===== */
[data-theme="light"] .send-btn {
    background: #07c160;
    color: #ffffff;
}
[data-theme="light"] .send-btn:hover {
    background: #06ad56;
}
[data-theme="light"] .send-btn:active {
    background: #059a4c;
}

/* ===== 浅色主题：群组标识 badge ===== */
[data-theme="light"] .group-badge {
    color: #0ea25a;
    background: rgba(7,193,96,0.10);
    border: 1px solid rgba(7,193,96,0.25);
}

/* ===== 浅色主题：气泡样式 ===== */
[data-theme="light"] .message:not(.self) .message-bubble {
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}
[data-theme="light"] .message.self .message-bubble {
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* ===== 浅色主题：回复引用 ===== */
[data-theme="light"] .message-reply {
    background: rgba(0,0,0,0.04) !important;
}

/* ===== 浅色主题：聊天消息区滚动条 ===== */
[data-theme="light"] .chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
}
[data-theme="light"] .chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}
/* 全局滚动条浅色主题 */
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.14);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.24);
}



/* ===== 浅色主题：右键菜单 ===== */
[data-theme="light"] .msg-context-menu {
    background: #ffffff !important;
    border: 1px solid #e4e8f0 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12) !important;
}

/* ===== 浅色主题：弹窗 ===== */
[data-theme="light"] .modal-content {
    background: #ffffff !important;
    box-shadow: 0 8px 40px rgba(0,0,0,0.14) !important;
}
[data-theme="light"] .modal-close:hover {
    background: rgba(0,0,0,0.07) !important;
    color: rgba(0,0,0,0.7) !important;
}
/* 发布朋友圈弹窗 - 浅色主题 */
[data-theme="light"] .moments-modal {
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
}
[data-theme="light"] .moments-modal-header {
    border-bottom-color: #edf0f5;
}
[data-theme="light"] .moments-textarea {
    background: #f5f7fa;
    border-color: #e4e8f0;
    color: #1c1e26;
}
[data-theme="light"] .moments-textarea:focus {
    border-color: #07c160;
    background: #fff;
}
[data-theme="light"] .moments-btn-cancel {
    background: #f0f2f5;
    border-color: #dde1e8;
    color: #4a5568;
}
[data-theme="light"] .moments-btn-cancel:hover {
    background: #e4e7ed;
}

/* ===== 浅色主题：输入区分割线 ===== */
[data-theme="light"] .chat-input-area {
    border-top: none;
}

/* ===== 浅色主题：聊天头部阴影 ===== */
[data-theme="light"] .chat-header {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[data-theme="light"] .sidebar-header {
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}


.left-nav {
    width: 64px;
    background: var(--left-nav-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 8px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.04);
}

.left-nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    object-fit: cover;
    margin: 6px 0 6px;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.1);
    transition: border-color 0.2s;
}
.left-nav-avatar:hover { border-color: var(--left-nav-active); }

.left-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    width: 100%;
    align-items: center;
}

.left-nav-item {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: var(--left-nav-text);
    transition: all 0.15s;
    position: relative;
}

.left-nav-item:hover {
    background: var(--left-nav-hover);
    color: var(--left-nav-active);
}

.left-nav-item.active {
    color: var(--left-nav-active);
    background: var(--left-nav-active-bg, rgba(77, 142, 240, 0.12));
}

.left-nav-item .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 15px;
    height: 15px;
    background: #e84545;
    color: #fff;
    font-size: 9px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    font-weight: 600;
}

.left-nav-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: center;
}

/* 中间联系人列表 */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    height: 44px;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* 电脑端：左侧 left-nav 已有头像，隐藏用户信息文字 */
.sidebar-header .user-info {
    display: none;
}

/* 侧边栏底部退出按钮：桌面端隐藏，手机端通过媒体查询显示 */
.sidebar-footer {
    display: none;
}

/* 积分商城按钮和头像相关：桌面端默认隐藏，手机端显示 */
.sidebar-points-btn,
.sidebar-avatar-wrap,
.sidebar-avatar {
    display: none;
}

/* sidebar用户入口：桌面端不可点击 */
.sidebar-profile-entry {
    cursor: default;
    pointer-events: none;
}



.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    line-height: 1.3;
}

.user-status {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-actions {
    display: flex;
    gap: 6px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-sizing: border-box;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #c4cad8;
}

.icon-btn:active {
    transform: scale(0.93);
}

/* 浅色主题：侧边栏头部通知/创建群组按钮 */
[data-theme="light"] .sidebar-actions .icon-btn,
[data-theme="light"] .sidebar-icon-btn {
    background: transparent !important;
    color: #4a5568 !important;
    border-radius: 6px;
}
[data-theme="light"] .sidebar-actions .icon-btn:hover,
[data-theme="light"] .sidebar-icon-btn:hover {
    background: rgba(0,0,0,0.07) !important;
    color: #1c1e26 !important;
}
[data-theme="light"] .sidebar-actions .icon-btn svg,
[data-theme="light"] .sidebar-icon-btn svg {
    stroke: #4a5568 !important;
    color: #4a5568 !important;
}

/* 暗色主题：侧边栏图标确保可见 */
.sidebar-icon-btn {
    color: #9ba3b4;
}
.sidebar-icon-btn svg {
    stroke: currentColor;
}

/* 搜索框 */
.search-box {
    padding: 0 10px;
    height: 52px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
}

.search-box input {
    flex: 1;
    padding: 6px 10px 6px 28px;
    border: none;
    border-radius: 5px;
    background: rgba(255,255,255,0.07);
    color: var(--text-primary);
    font-size: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%236b7385' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 8px center;
    min-width: 0;
}

.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus {
    outline: none;
    background-color: rgba(255,255,255,0.1);
}

.search-box .add-btn {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    border: none;
    background: rgba(255,255,255,0.07);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.15s;
    flex-shrink: 0;
}
.search-box .add-btn:hover {
    background: rgba(255,255,255,0.13);
    color: #c4cad8;
}

/* 标签切换 - 隐藏 */
.tabs { display: none; }

/* 联系人/群组列表 */
.contact-list {
    flex: 1;
    overflow-y: auto;
    background: var(--sidebar-bg);
}

/* 搜索结果分区标题 */
.search-section-title {
    padding: 6px 14px 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--sidebar-bg);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    margin-top: 4px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    cursor: pointer;
    transition: background 0.12s;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.contact-item:hover {
    background: var(--sidebar-item-hover);
}

/* 只在 sidebar 内的 contact-item 才显示选中样式 */
.sidebar .contact-item.active {
    background: var(--sidebar-item-active);
    border-left: 2px solid var(--left-nav-active);
    padding-left: 10px;
}
/* 置顶联系人 */
.contact-item.contact-pinned {
    background: rgba(7,193,96,0.06);
}
.contact-item.contact-pinned:hover {
    background: rgba(7,193,96,0.1);
}
.contact-pin-mark {
    font-size: 11px;
    margin-right: 4px;
    opacity: 0.7;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

/* 头像包裹容器（用于叠加在线绿点） */
.contact-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

/* 在线状态绿点 */
.online-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 10px;
    height: 10px;
    background: #07c160;
    border-radius: 50%;
    border: 2px solid var(--sidebar-bg);
    display: block;
}

.contact-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.contact-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-name {
    font-weight: 400;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    flex: 1;
}

.group-member-count {
    display: inline-block;
    margin-left: 3px;
    margin-right: 4px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: normal;
    white-space: nowrap;
    flex-shrink: 0;
}



.contact-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: 6px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.contact-preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-preview {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.unread-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    padding: 0 5px;
    border-radius: 8px;
    min-width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
    margin-left: 6px;
    flex-shrink: 0;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* 免打扰状态下的未读气泡 - 灰色 */
.unread-badge--muted {
    background: rgba(150,150,150,0.35);
    color: var(--text-secondary, #a0a8b8);
}

/* 免打扰图标（预览行独立位置，已废弃） */
.mute-icon {
    width: 13px;
    height: 13px;
    margin-left: 4px;
    color: var(--text-muted);
    flex-shrink: 0;
}
/* 时间行内内联静音图标 */
.mute-icon--inline {
    width: 12px;
    height: 12px;
    margin-left: 3px;
    vertical-align: middle;
    color: var(--text-muted, #8b949e);
    opacity: 0.75;
    flex-shrink: 0;
    display: inline-block;
}

/* 聊天区域 */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--chat-bg);
    height: 100%;
    overflow: hidden;
}

.chat-header {
    padding: 0 16px;
    background: var(--chat-header-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    height: 44px;
}

/* 标题区域靠左 */
.chat-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
}

/* 标题行：名字 + 群聊标识 */
.chat-title-row {
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
}

.chat-header-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    top: -1px;
}

/* 群聊标识 badge */
.group-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #7ec8e3;
    background: rgba(126,200,227,0.15);
    border: 1px solid rgba(126,200,227,0.3);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.6;
}

/* 管理员专用：登录 IP 标签 */
.ip-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #f0a84e;
    background: rgba(240,168,78,0.12);
    border: 1px solid rgba(240,168,78,0.3);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.6;
    letter-spacing: 0.3px;
    cursor: default;
    user-select: text;
}

/* 仅移动端显示的元素 */
.mobile-only {
    display: none !important;
}

/* 底部导航栏默认隐藏（仅在移动端显示） */
.mobile-bottom-nav {
    display: none !important;
}

.chat-header-info p {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.chat-header-actions {
    display: flex;
    gap: 4px;
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px;
    background: var(--chat-bg);
}

/* 拖放时的视觉反馈 */
.chat-messages.drag-over {
    background: rgba(7, 193, 96, 0.08);
    box-shadow: inset 0 0 0 2px rgba(7, 193, 96, 0.5);
}

.message {
    display: flex;
    margin-bottom: 14px;
    align-items: flex-start;
}

.message.self {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    object-fit: cover;
    margin: 0 9px;
    flex-shrink: 0;
}

.message-content {
    max-width: 62%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.message-bubble {
    padding: 8px 12px;
    border-radius: 6px;
    position: relative;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.5;
    max-width: 100%;
}

/* 图片消息气泡：无背景、无边框、无阴影 */
.message-bubble-image {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* 图片消息中的图片样式 */
.message-image {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.message-image:hover {
    transform: scale(1.02);
}

/* 图文混排中的图片 */
.mixed-image {
    max-width: min(80px, 100%) !important;
    max-height: 80px !important;
    border-radius: 6px;
    display: block;
    margin: 4px 0;
}

.message:not(.self) .message-bubble {
    background: var(--bubble-other);
    color: var(--bubble-other-text);
    border-radius: 2px 8px 8px 8px;
}

.message.self .message-bubble {
    background: var(--bubble-self);
    color: var(--bubble-self-text);
    border-radius: 8px 2px 8px 8px;
}

/* 消息高亮效果（点击回复引用跳转后）- 气泡高亮 */
.message-highlight .message-bubble {
    animation: bubbleHighlight 2s ease;
}
@keyframes bubbleHighlight {
    0% { box-shadow: 0 0 0 0 rgba(77, 142, 240, 0.5); }
    50% { box-shadow: 0 0 0 4px rgba(77, 142, 240, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(77, 142, 240, 0); }
}

.message-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    padding: 0 2px;
}

.message.self .message-content {
    align-items: flex-end;
}

.message.self .message-time {
    text-align: right;
}

/* 发送者名称 */
.message:not(.self) .sender-name {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 3px;
    padding: 0 2px;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 聊天输入区域 - 深色风格 */
.chat-input-area {
    background: var(--input-area-bg);
    border-top: none;
    flex-shrink: 0;
    position: relative;
}

/* 用户禁言遮盖层 */
#userMutedOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 80, 80, 0.08);
    backdrop-filter: blur(0.5px);
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    pointer-events: auto;
}

/* 隐藏聊天工具栏展开/折叠按钮 */
.chat-tools-toggle,
.tools-toggle-btn,
.expand-tools-btn,
.collapse-tools-btn {
    display: none !important;
}

/* 工具栏 */
.chat-tools {
    display: flex;
    gap: 2px;
    padding: 8px 12px 6px;
    background: var(--input-area-bg);
    align-items: center;
}

.chat-tools .icon-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    color: var(--text-secondary);
    border-radius: 5px;
}

.chat-tools .icon-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #c4cad8;
}

/* 工具栏分隔线 */
.toolbar-divider {
    width: 1px;
    height: 16px;
    background: rgba(255,255,255,0.1);
    margin: 0 4px;
}
[data-theme="light"] .toolbar-divider {
    background: rgba(0,0,0,0.15);
}

/* 输入区主体 */
.chat-input-wrapper {
    display: flex;
    flex-direction: column;
    padding: 0 12px 12px;
    gap: 0;
    position: relative;
}

.chat-input {
    flex: 1;
    padding: 4px 4px 8px;
    border: none;
    border-radius: 0;
    resize: none;
    position: relative;
    font-family: inherit;
    font-size: 14px;
    min-height: 80px;
    max-height: 160px;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    line-height: 1.6;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.chat-input:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    pointer-events: none;
}

/* 禁言时隐藏占位文字 */
.chat-input.muted:empty:before {
    content: none;
}

.chat-input:focus {
    border-color: transparent;
    background: transparent;
}

.chat-input img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
    margin: 2px;
    vertical-align: middle;
}

/* 编辑框中的 Twemoji 表情图片 */
.chat-input img.twemoji-input {
    max-width: 1.2em;
    max-height: 1.2em;
    border-radius: 0;
    margin: 0 1px;
    vertical-align: middle;
    display: inline-block;
}

/* 发送按钮行 */
.chat-input-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
}

.send-btn {
    padding: 7px 20px;
    background: #3a6fd8;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.send-btn:hover {
    background: #4d80e8;
}

.send-btn:active {
    background: #2d5fc4;
    transform: scale(0.97);
}

/* 空状态 */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--chat-bg);
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state-icon svg {
    width: 100px;
    height: 100px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #262c38;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* 浅色主题弹窗背景 */
[data-theme="light"] .modal-content {
    background: #ffffff !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15) !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    border-radius: 50%;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

[data-theme="light"] .modal-close:hover {
    background: rgba(0,0,0,0.06);
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 18px;
    background: rgba(40, 45, 60, 0.95);
    color: #e8eaf0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    z-index: 2000;
    animation: toastSlideIn 0.3s ease forwards;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
    max-width: calc(100vw - 40px);
}

.toast.success {
    background: rgba(7, 150, 80, 0.9);
    border-color: rgba(7, 193, 96, 0.3);
}

.toast.error {
    background: rgba(200, 50, 50, 0.9);
    border-color: rgba(250, 80, 80, 0.3);
}

.toast.info {
    background: rgba(50, 100, 180, 0.9);
    border-color: rgba(77, 142, 240, 0.3);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 滚动条 - 深色 */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 好友列表操作按钮 - 内联样式补充 */
.contact-item .btn-sm {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: #07c160;
    color: #fff;
    white-space: nowrap;
}
.contact-item .btn-sm:hover {
    background: #05964d;
}
.contact-item .btn-sm.danger {
    background: #e53935;
}
.contact-item .btn-sm.danger:hover {
    background: #c62828;
}

/* 群设置面板 */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.setting-row label { color: var(--text-secondary); font-size: 14px; }
.setting-row select, .setting-row input[type=text] {
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    min-width: 140px;
    background: var(--input-bg);
    color: var(--text-primary);
}

/* 群成员禁言标记 */
.muted-badge {
    font-size: 10px;
    background: #e53935;
    color: #fff;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
}

/* ========== 群设置弹窗美化 ========== */
.group-settings-modal {
    padding: 0;
}

/* 群头像区域 */
.group-avatar-section {
    display: flex;
    justify-content: center;
    padding: 24px 20px 16px;
    background: linear-gradient(180deg, rgba(74,158,255,0.08) 0%, transparent 100%);
}

.group-avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.group-avatar-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.group-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 11px;
    gap: 4px;
}

.group-avatar-wrapper:hover .group-avatar-overlay {
    opacity: 1;
}

/* 表单区域 */
.group-settings-form {
    padding: 0 20px;
}

.group-settings-form .setting-row {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.group-settings-form .setting-row:last-child {
    border-bottom: none;
}

.group-settings-form .setting-row input[type="text"] {
    flex: 1;
    max-width: 200px;
    padding: 8px 12px;
    border-radius: 8px;
}

.group-settings-form .setting-row select {
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 120px;
}

/* 开关样式 */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: #07c160;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-text {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 48px;
}

.toggle-switch input:checked ~ .toggle-text {
    color: #07c160;
}

/* 保存按钮 */
.group-save-btn {
    width: calc(100% - 40px);
    margin: 20px;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
}

/* 浅色主题适配 */
[data-theme="light"] .group-avatar-section {
    background: linear-gradient(180deg, rgba(74,158,255,0.06) 0%, transparent 100%);
}

[data-theme="light"] .toggle-slider {
    background: #ddd;
}

/* ========== 群设置面板（右侧滑出） ========== */
.group-settings-panel {
    width: 320px;
    max-width: 90vw;
}

.group-settings-panel-content {
    padding: 0;
    height: 100%;
    overflow-y: auto;
}

/* 面板头部 - 头像和群名 */
.group-settings-panel-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    background: linear-gradient(180deg, rgba(7,193,96,0.06) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.group-avatar-panel {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: transform 0.2s;
}

.group-avatar-panel:hover {
    transform: scale(1.03);
}

.group-avatar-img-panel {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-avatar-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
}

.group-avatar-panel:hover .group-avatar-panel-overlay {
    opacity: 1;
}

.group-name-panel-wrap {
    margin-top: 16px;
    width: 100%;
}

.group-name-panel-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--input-border);
    border-radius: 20px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 15px;
    text-align: center;
    font-weight: 500;
}

.group-name-panel-input:focus {
    outline: none;
    border-color: #07c160;
}

/* 公告区域 */
.gp-notice-icon-svg {
    margin-right: 6px;
}

#gpNoticePanelBody {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin: 0 16px 16px;
}

.gp-notice-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

.gp-notice-empty {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.gp-notice-textarea {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
}

/* 设置列表 */
.gp-settings-list {
    padding: 0 16px;
}

.gp-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.gp-settings-item:last-child {
    border-bottom: none;
}

.gp-item-label {
    font-size: 14px;
    color: var(--text-primary);
}

.gp-item-select {
    padding: 6px 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
}

/* 面板内开关 */
.gp-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.gp-toggle input {
    display: none;
}

.gp-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.3s;
}

.gp-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gp-toggle input:checked + .gp-toggle-slider {
    background: #07c160;
}

.gp-toggle input:checked + .gp-toggle-slider::before {
    transform: translateX(20px);
}

/* 底部操作按钮 */
.gp-actions-section {
    margin: 16px;
    background: var(--input-bg);
    border-radius: 12px;
    overflow: hidden;
}

.gp-action-btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.gp-action-warning {
    color: #f39c12;
    border-bottom: 1px solid var(--border-color);
}

.gp-action-danger {
    color: #e74c3c;
}

.gp-action-btn:hover {
    background: rgba(0,0,0,0.05);
}

/* 保存按钮 */
.gp-save-btn {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #07c160;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.gp-save-btn:hover {
    background: #06ad56;
}

/* 浅色主题适配 */
[data-theme="light"] .group-settings-panel-header {
    background: linear-gradient(180deg, rgba(7,193,96,0.04) 0%, transparent 100%);
}

[data-theme="light"] .gp-toggle-slider {
    background: #ddd;
}

/* ========== 群设置面板（使用 infoPanel） ========== */
.group-settings-content {
    padding: 0;
    height: auto;
    overflow-y: visible;
}

/* 头部头像区域 */
.group-settings-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 24px;
    background: linear-gradient(180deg, rgba(7,193,96,0.06) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.group-avatar-setting {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.group-avatar-setting:hover {
    transform: scale(1.03);
}

.group-avatar-img-setting {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.group-avatar-setting-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 12px;
}

.group-avatar-setting:hover .group-avatar-setting-overlay {
    opacity: 1;
}

.group-name-setting-wrap {
    margin-top: 12px;
    width: calc(100% - 40px);
    max-width: 180px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 2px 4px;
    box-sizing: border-box;
}

.group-name-label {
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 8px;
    white-space: nowrap;
    border-right: 1px solid var(--border-color);
}

.group-name-setting-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--input-border);
    border-radius: 20px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 15px;
    text-align: center;
    font-weight: 500;
}

.group-name-setting-input:focus {
    outline: none;
    border-color: #07c160;
}

.group-name-setting-input-modern {
    flex: 1;
    padding: 6px 8px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 设置区域 */
.group-settings-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.group-settings-section:last-of-type {
    border-bottom: none;
}

.group-settings-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 12px;
}

.group-settings-icon {
    margin-right: 6px;
}

.group-settings-section-title {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.group-settings-edit-btn {
    font-size: 13px;
    color: #07c160;
    cursor: pointer;
}

.group-settings-edit-btn:hover {
    opacity: 0.8;
}

/* 公告内容 */
.group-settings-notice-body {
    padding: 0 20px;
}

.group-settings-notice-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.group-settings-notice-empty {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.group-settings-notice-textarea {
    width: calc(100% - 40px);
    margin: 0 20px;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
}

/* 设置列表 */
.group-settings-list {
    padding: 0 20px;
}

.group-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.group-settings-item:last-child {
    border-bottom: none;
}

.group-settings-label {
    font-size: 14px;
    color: var(--text-primary);
}

.group-settings-select {
    padding: 6px 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
}

/* 底部操作 */
.group-settings-actions {
    margin: 16px 20px;
    background: var(--input-bg);
    border-radius: 12px;
    overflow: hidden;
}

.group-settings-action-btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.group-settings-action-warning {
    color: #f39c12;
    border-bottom: 1px solid var(--border-color);
}

.group-settings-action-danger {
    color: #e74c3c;
}

.group-settings-action-btn:hover {
    background: rgba(0,0,0,0.05);
}

/* 保存按钮 */
.group-settings-save-btn {
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #07c160;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.group-settings-save-btn:hover {
    background: #06ad56;
}

/* 浅色主题适配 */
[data-theme="light"] .group-settings-avatar-section {
    background: linear-gradient(180deg, rgba(7,193,96,0.04) 0%, transparent 100%);
}

/* ========== 个人资料弹窗圆角 ========== */
#profileModal .modal-content {
    border-radius: 16px;
}

/* ========== 头像裁剪弹窗圆角 ========== */
#avatarCropModal .modal-content {
    border-radius: 16px;
}

#avatarCropModal .avatar-crop-container {
    border-radius: 16px;
}

/* ========== 个人资料头像设置 ========== */
.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 24px;
    margin-bottom: 20px;
}

.profile-avatar-setting {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.profile-avatar-setting:hover {
    transform: scale(1.03);
}

.profile-avatar-img-setting {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.profile-avatar-setting-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 16px;
}

.profile-avatar-setting:hover .profile-avatar-setting-overlay {
    opacity: 1;
}

/* ========== 头像裁剪弹窗 ========== */
.avatar-crop-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    background: #1a1d29;
    border-radius: 12px;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-crop-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.1s;
    cursor: grab;
    position: absolute;
    top: 0;
    left: 0;
}

.avatar-crop-container img:active {
    cursor: grabbing;
}

.avatar-crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    overflow: hidden;
    border-radius: 12px;
}

.avatar-crop-circle {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    border: 2px solid #07c160;
    box-shadow: 0 0 0 2000px rgba(0,0,0,0.6);
}

.avatar-crop-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* 浅色主题适配 */
[data-theme="light"] .avatar-crop-container {
    background: #f0f2f5;
}

[data-theme="light"] .avatar-crop-circle {
    box-shadow: 0 0 0 2000px rgba(255,255,255,0.7);
}

/* ========== 群设置美化样式 ========== */

/* 头像覆盖层文字 */
.group-avatar-overlay-text {
    font-size: 11px;
    margin-top: 4px;
    color: #fff;
}

/* 卡片式设置区域 */
.group-settings-card {
    margin: 8px 10px;
    background: var(--input-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.group-settings-card-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.group-settings-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.group-settings-card-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.group-settings-card-action {
    font-size: 13px;
    color: #07c160;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(7,193,96,0.1);
    transition: all 0.2s;
}

.group-settings-card-action:hover {
    background: rgba(7,193,96,0.15);
}

.group-settings-card-body {
    padding: 12px 16px;
}

/* 公告样式 */
.group-settings-notice-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.7;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border-left: 3px solid #ff6b6b;
}

.group-settings-notice-empty {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px dashed var(--border-color);
}

/* 设置行 */
.group-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.group-settings-row:last-child {
    border-bottom: none;
}

.group-settings-row-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.group-settings-row-label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.group-settings-row-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* 现代下拉选择框 */
.group-settings-select-modern {
    padding: 6px 10px;
    padding-right: 28px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.2s;
    min-width: 90px;
}

.group-settings-select-modern:focus {
    outline: none;
    border-color: #07c160;
}

/* 下拉菜单选项样式 */
.group-settings-select-modern option {
    background: #2a2f3e;
    color: #fff;
    padding: 8px;
}

[data-theme="light"] .group-settings-select-modern option {
    background: #fff;
    color: #333;
}

/* 现代开关 */
.toggle-switch-modern {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
}

.toggle-switch-modern input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider-modern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 22px;
    transition: 0.3s;
}

.toggle-slider-modern:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch-modern input:checked + .toggle-slider-modern {
    background: #07c160;
}

.toggle-switch-modern input:checked + .toggle-slider-modern:before {
    transform: translateX(18px);
}

/* 小开关 */
.toggle-switch-small {
    width: 36px;
    height: 20px;
}

.toggle-switch-small .toggle-slider-modern {
    border-radius: 20px;
}

.toggle-switch-small .toggle-slider-modern:before {
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
}

.toggle-switch-small input:checked + .toggle-slider-modern:before {
    transform: translateX(16px);
}

/* 现代保存按钮 */
.group-settings-save-btn-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 20px 16px 24px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #07c160, #06ad56);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(7,193,96,0.3);
}

.group-settings-save-btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(7,193,96,0.4);
}

.group-settings-save-btn-modern:active {
    transform: translateY(0);
}

/* 浅色主题适配 */
[data-theme="light"] .group-settings-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ========== 群设置滚动卡片式布局 ========== */
.group-settings-scrollable {
    max-height: 70vh;
    overflow-y: auto;
    padding: 0;
}

/* 顶部头像区域 */
.group-settings-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    background: linear-gradient(180deg, rgba(7,193,96,0.08) 0%, transparent 100%);
}

.group-avatar-large {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: transform 0.2s;
}

.group-avatar-large:hover {
    transform: scale(1.03);
}

.group-avatar-img-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-avatar-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
}

.group-avatar-large:hover .group-avatar-edit-overlay {
    opacity: 1;
}

.group-name-input-wrap {
    margin-top: 16px;
    width: 100%;
    max-width: 200px;
}

.group-name-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--input-border);
    border-radius: 20px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 15px;
    text-align: center;
    font-weight: 500;
}

.group-name-input:focus {
    outline: none;
    border-color: #07c160;
}

/* 卡片样式 */
.group-settings-card {
    margin: 12px 16px;
    background: var(--input-bg);
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.card-action {
    font-size: 13px;
    color: #07c160;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-action:hover {
    opacity: 0.8;
}

.invite-action {
    color: #07c160;
}

.card-body {
    padding: 12px 16px;
}

.notice-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    min-height: 40px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.card-body textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 12px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
}

/* 成员列表 */
.member-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.member-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.member-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.member-role {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.member-role.owner {
    background: #fff3cd;
    color: #f39c12;
}

.member-role.admin {
    background: #e3f2fd;
    color: #3498db;
}

.member-more {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px;
    cursor: pointer;
}

.member-more:hover {
    color: var(--text-primary);
}

.member-empty {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding: 16px;
}

/* 设置列表 */
.group-settings-list {
    margin: 12px 16px;
    background: var(--input-bg);
    border-radius: 12px;
    overflow: hidden;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.settings-item:last-child {
    border-bottom: none;
}

.item-label {
    font-size: 14px;
    color: var(--text-primary);
}

.item-select {
    padding: 6px 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
}

/* 小开关 */
.toggle-switch-small {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.toggle-switch-small input {
    display: none;
}

.toggle-slider-small {
    position: relative;
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 22px;
    transition: background 0.3s;
}

.toggle-slider-small::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch-small input:checked + .toggle-slider-small {
    background: #07c160;
}

.toggle-switch-small input:checked + .toggle-slider-small::before {
    transform: translateX(18px);
}

/* 底部操作按钮 */
.group-settings-actions {
    margin: 12px 16px;
    background: var(--input-bg);
    border-radius: 12px;
    overflow: hidden;
}

.action-btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.action-btn.warning {
    color: #f39c12;
    border-bottom: 1px solid var(--border-color);
}

.action-btn.danger {
    color: #e74c3c;
}

.action-btn:hover {
    background: rgba(0,0,0,0.05);
}

/* 固定保存按钮 */
.group-save-btn-fixed {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    width: calc(100% - 32px);
    margin: 16px;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    background: #07c160;
    color: #fff;
    border: none;
    cursor: pointer;
}

.group-save-btn-fixed:hover {
    background: #06ad56;
}

/* VIP标记 */
.vip-badge {
    font-size: 10px;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #333;
    padding: 1px 5px;
    border-radius: 6px;
    margin-left: 4px;
    font-weight: 600;
}

/* 消息撤回提示 */
.msg-recalled {
    display: flex;
    justify-content: center;
    padding: 6px 0 16px;
    user-select: none;
}
.msg-recalled-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    line-height: 1.6;
    letter-spacing: 0.01em;
}
[data-theme="light"] .msg-recalled-badge {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.10);
    color: #9aa0ae;
}

/* 系统消息（加入/退出群聊） */
.msg-system {
    display: flex;
    justify-content: center;
    padding: 8px 0;
    margin: 4px 0;
    user-select: none;
}
/* 连续系统消息时减少间隔 */
.msg-system + .msg-system {
    margin-top: 2px;
}
.msg-system-badge {
    display: inline-block;
    padding: 2px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    line-height: 1.7;
    letter-spacing: 0.02em;
}
[data-theme="light"] .msg-system-badge {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.10);
    color: #9aa0ae;
}

/* ==================== 右侧信息面板 ==================== */

/* 面板遮罩（透明，仅用于点击关闭） */
.info-panel-overlay {
    display: none;
    position: absolute;
    left: 0; top: 0; right: 260px; bottom: 0;
    z-index: 29;
}
.info-panel-overlay.active { display: block; }

/* 右侧面板主体 */
.info-panel {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 260px;
    background: var(--sidebar-bg, #1a1d24);
    border-left: 1px solid var(--border-color, rgba(255,255,255,0.08));
    z-index: 30;
    transform: translateX(100%);
    transition: transform 0.26s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.info-panel.active {
    transform: translateX(0);
}

.info-panel-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

/* 头像行：横向显示头像卡片 */
.info-panel-avatar-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 10px 20px 15px;
    flex-wrap: wrap;
}
.info-avatar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.info-avatar-img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
}
.info-avatar-name {
    font-size: 11px;
    color: var(--text-muted, #888);
    text-align: center;
    max-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 添加按钮 */
.info-avatar-add .info-avatar-add-icon {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    border: 1.5px dashed var(--border-color, rgba(255,255,255,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-muted, #888);
    transition: border-color 0.2s, color 0.2s;
}
.info-avatar-add:hover .info-avatar-add-icon {
    border-color: var(--accent-color, #5b8dee);
    color: var(--accent-color, #5b8dee);
}

/* 分隔线 */
.info-panel-divider {
    height: 1px;
    background: var(--border-color, rgba(255,255,255,0.08));
    margin: 0 0 4px;
}

/* 功能列表行 */
.info-panel-list {
    flex: 1;
}
.info-panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    font-size: 14px;
    color: var(--text-primary, #e8eaf0);
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.05));
}
.info-panel-row:hover { background: rgba(255,255,255,0.04); }
.info-panel-row > svg { color: var(--text-muted, #888); flex-shrink: 0; }
.info-panel-row-toggle { cursor: default; }
.info-panel-row-toggle:hover { background: transparent; }

/* 浅色主题下 info-panel 悬浮色 */
[data-theme="light"] .info-panel-row:hover { background: rgba(0,0,0,0.04); }

/* Toggle 开关 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.25);
    border-radius: 22px;
    transition: background 0.2s;
}
/* 浅色主题下关闭态用灰色 */
[data-theme="light"] .toggle-slider {
    background: #c0c4cc;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
/* 浅色主题下圆点用白色+投影，仍可见 */
[data-theme="light"] .toggle-slider::before {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle-switch input:checked + .toggle-slider { background: #888; }
.toggle-switch.toggle-green input:checked + .toggle-slider { background: #07c160; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* 底部危险操作 */
/* ===== 群信息面板 (gp) ===== */
.gp-section {
    padding: 14px 16px 6px;
}
.gp-section + .gp-section {
    border-top: 1px solid var(--border-color);
}
.gp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.gp-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}
.gp-notice-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 8px 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    min-height: 36px;
    word-break: break-word;
    margin-bottom: 6px;
}

.gp-member-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: calc(100vh - 320px);
    overflow-y: auto;
}
.gp-member-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 4px;
    border-radius: 6px;
    cursor: default;
    transition: background 0.12s;
}
.gp-member-item:hover { background: rgba(255,255,255,0.05); }
[data-theme="light"] .gp-member-item:hover { background: rgba(0,0,0,0.06); }
.gp-member-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}
.gp-member-info { flex: 1; min-width: 0; }
.gp-member-name {
    font-size: 11px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}
.gp-role-tag {
    display: inline-block;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 500;
    flex-shrink: 0;
}
.gp-role-3 { background: rgba(255,193,7,0.18); color: #f0a500; }
.gp-role-2 { background: rgba(33,150,243,0.18); color: #42a5f5; }
.gp-muted-tag {
    display: inline-block;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(231,76,60,0.18);
    color: #e74c3c;
    flex-shrink: 0;
}
.gp-member-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.gp-action-btn {
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.gp-action-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.gp-action-mute { color: #e08a00; border-color: rgba(224,138,0,0.4); }
.gp-action-mute:hover { background: rgba(224,138,0,0.12); }
.gp-action-kick { color: #e74c3c; border-color: rgba(231,76,60,0.4); }
.gp-action-kick:hover { background: rgba(231,76,60,0.12); }

/* ---- 群公告美化 ---- */
.gp-notice-section {
    background: linear-gradient(135deg, rgba(77,142,240,0.06) 0%, rgba(126,113,226,0.04) 100%);
    border-radius: 0;
    margin: 0;
}
.gp-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.gp-notice-icon {
    font-size: 14px;
    line-height: 1;
}
.gp-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 5px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
    border: 1px solid transparent;
}
.gp-edit-btn:hover {
    color: var(--left-nav-active);
    background: rgba(77,142,240,0.1);
    border-color: rgba(77,142,240,0.2);
}
.gp-notice-body {
    padding: 0 0 12px;
}
.gp-notice-content {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.7;
    padding: 10px 16px;
    background: rgba(0,0,0,0.12);
    word-break: break-word;
    white-space: pre-wrap;
    border-left: 3px solid rgba(77,142,240,0.55);
}
.gp-notice-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px 8px;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
}
.gp-notice-empty-hint {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}
/* 编辑态 */
.gp-notice-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gp-notice-textarea {
    width: 100%;
    min-height: 90px;
    max-height: 180px;
    font-size: 13px;
    padding: 10px 12px;
    border: 1px solid rgba(77,142,240,0.3);
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    color: var(--text-primary);
    resize: vertical;
    outline: none;
    font-family: inherit;
    line-height: 1.6;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.gp-notice-textarea:focus {
    border-color: rgba(77,142,240,0.6);
    background: rgba(0,0,0,0.25);
    box-shadow: 0 0 0 3px rgba(77,142,240,0.1);
}
.gp-notice-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}
.gp-notice-editor-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.gp-cancel-btn {
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.gp-cancel-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}
.gp-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 5px 16px;
    border-radius: 6px;
    border: none;
    background: var(--left-nav-active);
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.12s, transform 0.1s;
}
.gp-save-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}
.gp-save-btn:active {
    transform: translateY(0);
}

.info-panel-danger {
    padding: 20px;
    margin-top: auto;
}

.info-panel-danger-btn {
    width: 100%;
    padding: 10px 0;
    background: transparent;
    border: none;
    color: #e08a00;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    border-radius: 6px;
    transition: background 0.15s;
}
.info-panel-danger-btn:hover { background: rgba(224,138,0,0.1); }
.info-panel-danger-btn + .info-panel-danger-btn {
    margin-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 14px;
}
[data-theme="light"] .info-panel-danger-btn + .info-panel-danger-btn {
    border-top-color: rgba(0,0,0,0.08);
}
.info-panel-danger-btn--delete {
    color: #e53935;
}
.info-panel-danger-btn--delete:hover { background: rgba(229,57,53,0.08); }

/* 打开面板时，聊天消息区右移（可选，让面板不完全遮挡） */
.chat-area.info-panel-open .chat-messages,
.chat-area.info-panel-open .chat-input-area {
    margin-right: 260px;
    transition: margin-right 0.26s cubic-bezier(.4,0,.2,1);
}

/* 侧边栏遮罩（手机端用） */
.sidebar-overlay {
    display: none;
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 150;
}
.sidebar-overlay.active {
    display: block;
}

/* 手机端：隐藏侧边栏遮罩 */
@media (max-width: 768px) {
    .sidebar-overlay {
        display: none !important;
    }
}

/* ==================== 移动端响应式 ==================== */
@media (max-width: 768px) {

    /* 窗口铺满全屏，去掉浮窗效果 */
    .app-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        transform: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        min-width: unset !important;
        min-height: unset !important;
        background: var(--chat-bg) !important;
    }

    /* 隐藏标题栏（移动端不需要拖拽栏） */
    .pip-titlebar {
        display: none !important;
    }
    /* 隐藏底部 Ticker（移动端不显示） */
    .pip-footer {
        display: none !important;
    }

    /* 内容区占满 */
    .app-inner {
        height: 100% !important;
        flex: 1;
        position: relative;
        overflow: hidden;
    }

    /* 隐藏左侧图标导航 */
    .left-nav {
        display: none !important;
    }

    /* 侧边栏：默认从左侧滑出的覆盖层 */
    .sidebar {
        width: 80vw !important;
        max-width: 300px;
        min-width: unset !important;
        border-right: none !important;
        position: fixed !important;
        left: 0;
        top: 54px;
        height: calc(100% - 54px) !important;
        height: calc(100dvh - 54px) !important;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(.4,0,.2,1), box-shadow 0.28s;
        /* 关闭状态不显示阴影，防止阴影从左侧边缘露出来 */
        box-shadow: none;
    }

    /* 三条杠点击后展开侧边栏 */
    .sidebar.mobile-panel-open {
        transform: translateX(0);
        /* 展开后才显示阴影 */
        box-shadow: 4px 0 20px rgba(0,0,0,0.4);
    }

    /* 手机端侧边栏顶部：显示用户信息，调整为两端布局 */
    .sidebar-header {
        justify-content: space-between;
    }
    .sidebar-header .user-info {
        display: flex;
    }

    /* 侧边栏底部退出账号按钮（手机端显示） */
    .sidebar-footer {
        display: flex !important;
        flex-direction: column;
        flex-shrink: 0;
        border-top: 1px solid rgba(255,255,255,0.07);
        padding: 8px 14px;
        background: var(--sidebar-bg);
        gap: 2px;
    }
    .sidebar-logout-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 10px 14px;
        background: transparent;
        border: none;
        border-radius: 8px;
        color: #f07070;
        font-size: 14px;
        cursor: pointer;
        transition: background 0.15s;
    }
    .sidebar-logout-btn:hover, .sidebar-logout-btn:active {
        background: rgba(240, 112, 112, 0.12);
    }

    /* 朋友圈入口按钮（手机端 sidebar-footer） */
    .sidebar-moments-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 10px 14px;
        background: transparent;
        border: none;
        border-radius: 8px;
        color: var(--text-secondary);
        font-size: 14px;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
    }
    .sidebar-moments-btn:hover, .sidebar-moments-btn:active {
        background: var(--sidebar-item-hover);
        color: var(--primary-color, #07c160);
    }

    /* 积分商城入口按钮（手机端 sidebar-footer） */
    .sidebar-points-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 10px 14px;
        background: transparent;
        border: none;
        border-radius: 8px;
        color: var(--text-secondary);
        font-size: 14px;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
    }
    .sidebar-points-btn:hover, .sidebar-points-btn:active {
        background: var(--sidebar-item-hover);
        color: var(--primary-color, #07c160);
    }

    /* 手机端 sidebar-header 个人资料入口 */
    .sidebar-profile-entry {
        cursor: pointer;
        border-radius: 10px;
        padding: 4px 6px 4px 4px;
        transition: background 0.15s;
        flex: 1;
        min-width: 0;
        pointer-events: auto;
    }
    .sidebar-profile-entry:hover, .sidebar-profile-entry:active {
        background: rgba(255,255,255,0.07);
    }
    [data-theme="light"] .sidebar-profile-entry:hover,
    [data-theme="light"] .sidebar-profile-entry:active {
        background: rgba(0,0,0,0.05);
    }
    .sidebar-avatar-wrap {
        position: relative;
        flex-shrink: 0;
        display: block;
    }
    .sidebar-avatar {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        object-fit: cover;
        display: block;
        border: 2px solid rgba(255,255,255,0.1);
    }
    [data-theme="light"] .sidebar-avatar {
        border-color: rgba(0,0,0,0.1);
    }
    .sidebar-avatar-edit-hint {
        position: absolute;
        bottom: -3px;
        right: -3px;
        width: 16px;
        height: 16px;
        background: var(--primary-color, #07c160);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        border: 1.5px solid var(--sidebar-bg);
    }

    /* 聊天区：默认全屏显示 */
    .chat-area {
        position: absolute !important;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 9;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    /* 侧边栏顶部 header */
    .search-box {
        display: flex !important;
        padding: 10px 14px;
    }

    /* 联系人列表正常显示 */
    .contact-item {
        padding: 12px 16px;
        justify-content: flex-start;
    }
    .contact-info { display: flex !important; }
    .contact-name { font-size: 15px; }
    .contact-preview { font-size: 13px; }
    .contact-avatar {
        width: 46px;
        height: 46px;
    }
    .contact-avatar-wrap {
        width: 46px;
        height: 46px;
    }

    /* 聊天头部 */
    .chat-header {
        height: 54px;
        padding: 0 12px;
        position: relative;
    }

    /* 移动端允许 mobile-only 元素显示 */
    .mobile-only {
        display: flex !important;
    }
    
    /* 桌面端隐藏底部导航 */
    .mobile-bottom-nav {
        display: none !important;
    }
    
    /* 移动端隐藏桌面导航 */
    .left-nav {
        display: none !important;
    }

    /* ========== 手机端底部导航栏 ========== */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--input-toolbar-bg);
        border-top: 1px solid var(--border-color);
        z-index: 1000;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    
    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        cursor: pointer;
        color: var(--text-secondary);
        transition: color 0.2s;
        position: relative;
    }
    
    .mobile-nav-item.active {
        color: var(--primary-color);
    }
    
    .mobile-nav-icon {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-nav-badge {
        position: absolute;
        top: -4px;
        right: -6px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        background: #fa5151;
        color: white;
        font-size: 10px;
        font-weight: 600;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-nav-label {
        font-size: 11px;
        font-weight: 500;
    }
    
    /* ========== 手机端页面容器 ========== */
    .mobile-page {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 60px;
        background: var(--chat-bg);
        z-index: 100;
        flex-direction: column;
        overflow: hidden;
    }
    
    .mobile-page.active {
        display: flex !important;
    }
    
    .mobile-page-header {
        height: 54px;
        background: var(--sidebar-bg);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 16px;
        position: relative;
        flex-shrink: 0;
    }
    
    .mobile-page-header h2 {
        font-size: 17px;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0;
    }
    
    .mobile-header-btn {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        border: none;
        background: transparent;
        color: var(--text-secondary);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    
    .mobile-header-btn:hover {
        background: var(--sidebar-item-hover);
        color: var(--text-primary);
    }
    
    .mobile-page-body {
        flex: 1;
        overflow-y: auto;
        padding: 12px;
        -webkit-overflow-scrolling: touch;
        height: calc(100% - 54px);
    }
    
    /* ========== 手机端用户卡片 ========== */
    .mobile-user-card {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px;
        background: var(--sidebar-bg);
        border-radius: 12px;
        margin-bottom: 16px;
        cursor: pointer;
        transition: background 0.2s;
    }
    
    .mobile-user-card:hover {
        background: var(--sidebar-item-hover);
    }
    
    .mobile-user-card svg {
        margin-left: auto;
        color: var(--text-muted);
    }
    
    .mobile-user-avatar {
        width: 60px;
        height: 60px;
        border-radius: 8px;
        object-fit: cover;
    }
    
    .mobile-user-info {
        flex: 1;
        min-width: 0;
    }
    
    .mobile-user-name {
        font-size: 17px;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 4px;
    }
    
    .mobile-user-id {
        font-size: 13px;
        color: var(--text-muted);
    }
    
    /* ========== 手机端菜单组 ========== */
    .mobile-menu-group {
        background: var(--sidebar-bg);
        border-radius: 12px;
        margin-bottom: 16px;
        overflow: hidden;
    }
    
    .mobile-menu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        cursor: pointer;
        transition: background 0.2s;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-menu-item:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-item:hover {
        background: var(--sidebar-item-hover);
    }
    
    .mobile-menu-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .mobile-menu-content {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }
    
    .mobile-menu-title {
        font-size: 15px;
        color: var(--text-primary);
        flex: 1;
    }
    
    .mobile-menu-extra {
        font-size: 13px;
        color: var(--text-muted);
    }
    
    .mobile-menu-badge {
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        background: #fa5151;
        color: white;
        font-size: 11px;
        font-weight: 600;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-content svg {
        color: var(--text-muted);
        flex-shrink: 0;
    }
    
    /* ========== 手机端联系人搜索 ========== */
    .mobile-contact-search {
        margin-bottom: 12px;
    }
    
    .mobile-contact-search input {
        width: 100%;
        padding: 12px 16px;
        border: none;
        border-radius: 10px;
        background: var(--sidebar-bg);
        color: var(--text-primary);
        font-size: 15px;
        outline: none;
    }
    
    .mobile-contact-search input::placeholder {
        color: var(--text-muted);
    }
    
    /* ========== 手机端联系人列表 ========== */
    .mobile-contact-list {
        background: var(--sidebar-bg);
        border-radius: 12px;
        overflow: hidden;
    }
    
    .mobile-contact-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        cursor: pointer;
        transition: background 0.2s;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-contact-item:last-child {
        border-bottom: none;
    }
    
    .mobile-contact-item:hover {
        background: var(--sidebar-item-hover);
    }
    
    .mobile-contact-avatar {
        width: 44px;
        height: 44px;
        border-radius: 6px;
        object-fit: cover;
        flex-shrink: 0;
    }
    
    .mobile-contact-info {
        flex: 1;
        min-width: 0;
    }
    
    .mobile-contact-name {
        font-size: 15px;
        font-weight: 500;
        color: var(--text-primary);
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mobile-contact-status {
        font-size: 12px;
        color: var(--text-muted);
    }
    
    /* 手机端未读消息气泡 */
    .mobile-contact-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        background: #ff3b30;
        color: white;
        border-radius: 10px;
        font-size: 12px;
        font-weight: 600;
        flex-shrink: 0;
    }
    
    /* 调整聊天区域底部，为底部导航留出空间 */
    .chat-area {
        height: calc(100% - 60px) !important;
        bottom: 60px !important;
    }
    
    .sidebar {
        bottom: 60px !important;
        height: calc(100% - 54px - 60px) !important;
    }
    
    /* 积分商城面板适配 */
    .points-panel {
        bottom: 60px !important;
    }
    
    /* 圈子面板适配 */
    .moments-panel {
        bottom: 60px !important;
    }
    
    /* 手机端联系人分组标题 */
    .mobile-contact-group {
        padding: 8px 16px;
        font-size: 12px;
        color: var(--text-muted);
        background: var(--chat-bg);
        font-weight: 500;
    }

    /* 三条杠菜单按钮与标题间距 */
    .mobile-menu-btn {
        margin-right: 8px;
    }

    /* 三条杠/返回按钮（通过JS动态插入） */
    .mobile-back-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        margin-right: 6px;
        border: none;
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
        border-radius: 6px;
        flex-shrink: 0;
    }
    .mobile-back-btn:hover {
        background: rgba(255,255,255,0.08);
        color: var(--text-primary);
    }

    /* 消息气泡稍大 */
    .message-content { max-width: 78%; }
    .message-bubble {
        font-size: 15px;
        padding: 9px 13px;
    }
    .message-avatar {
        width: 36px;
        height: 36px;
    }

    /* 输入区 */
    .chat-input-area {
        background: var(--input-area-bg) !important;
    }
    .chat-input-wrapper {
        padding: 0 14px 14px;
    }
    .chat-input {
        font-size: 15px;
        padding: 4px 4px 8px;
        min-height: 72px;
    }
    .send-btn {
        padding: 9px 18px;
        font-size: 14px;
    }

    /* 工具栏间距 */
    .chat-tools {
        padding: 8px 14px 6px;
        gap: 4px;
    }
    .chat-tools .icon-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }

    /* 登录框 */
    .login-box {
        width: 92%;
        padding: 28px 24px;
    }

    /* Toast 位置移到顶部居中 */
    .toast {
        top: 20px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        animation: toastFadeIn 0.25s ease forwards;
        max-width: 88vw;
        white-space: nowrap;
        text-align: center;
    }
    @keyframes toastFadeIn {
        from { opacity: 0; top: 8px; }
        to   { opacity: 1; top: 20px; }
    }

    /* 信息面板：手机端从右侧滑出，宽度75%，遮罩全屏点击关闭 */
    .info-panel {
        top: 0 !important;
        bottom: 60px !important;
        height: calc(100% - 60px) !important;
        width: 75% !important;
        max-width: 280px !important;
        z-index: 200;
        border-radius: 0;
    }
    /* 遮罩改为固定定位全屏，点击面板外区域关闭 */
    .info-panel-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0,0,0,0.4);
        z-index: 199;
    }
    /* 手机端面板打开时不推移聊天区 */
    .chat-area.info-panel-open .chat-messages,
    .chat-area.info-panel-open .chat-input-area {
        margin-right: 0 !important;
    }
    
    /* 浅色主题：底部导航栏使用稍深的背景，与输入区区分 */
    [data-theme="light"] .mobile-bottom-nav {
        background: #f8f9fa;
    }
}

/* 小屏额外优化 */
@media (max-width: 380px) {
    .contact-avatar { width: 40px; height: 40px; }
    .contact-avatar-wrap { width: 40px; height: 40px; }
    .message-content { max-width: 82%; }
    .chat-tools .icon-btn { width: 30px; height: 30px; min-width: 30px; }
    .send-btn { padding: 9px 12px; font-size: 13px; }
}

/* ==================== 发红包弹窗（底部Sheet样式） ==================== */
/* 滑入动画 */
@keyframes rp-sheet-in {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* 红包sheet弹窗：底部对齐，宽度铺满，圆角在顶部 */
#redPacketModal {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
}

.rp-modal-sheet {
    animation: rp-sheet-in 0.28s cubic-bezier(0.32, 0.72, 0, 1) both;
    /* 适配安全区（刘海屏/全面屏底部）*/
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* 在桌面端/平板恢复居中样式 */
@media (min-width: 769px) {
    #redPacketModal {
        align-items: center !important;
        justify-content: center !important;
    }
    .rp-modal-sheet {
        border-radius: 16px !important;
        max-width: 360px !important;
        max-height: 90vh !important;
        margin-bottom: 0;
    }
}


/* ==================== 用户信息卡片 ==================== */

/* 遮罩 */
.user-card-mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0,0,0,0.45);
}
.user-card-mask.active { display: block; }

/* 卡片主体 */
.user-card {
    display: none;
    position: fixed;
    z-index: 501;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 340px;
    border-radius: 24px;
    overflow: hidden;
    background: var(--sidebar-bg, #1a1d24);
    box-shadow: 
        0 25px 50px -12px rgba(0,0,0,0.5), 
        0 0 0 1px rgba(255,255,255,0.05),
        inset 0 1px 0 rgba(255,255,255,0.1);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), opacity 0.25s ease;
}
.user-card.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 关闭按钮 */
.user-card-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: rgba(255,255,255,0.8);
    transition: all 0.2s ease;
}
.user-card-close:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
    transform: rotate(90deg);
}

/* 顶部背景 */
.user-card-bg {
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}
.user-card-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 0%, transparent 30%);
}

/* 内容区 */
.user-card-body {
    padding: 0 24px 24px;
    text-align: center;
}

/* 头像包装 */
.user-card-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-top: -50px;
    margin-bottom: 16px;
}
.user-card-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 5px solid var(--sidebar-bg, #1a1d24);
    object-fit: cover;
    background: #2a2d35;
    box-shadow: 
        0 0 0 2px rgba(102, 126, 234, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(102, 126, 234, 0.2);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}
.user-card-avatar:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 0 0 2px rgba(102, 126, 234, 0.6),
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 8px 24px rgba(102, 126, 234, 0.3);
}
.user-card-avatar-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: 1;
    opacity: 0;
    box-shadow: 
        inset 0 0 20px rgba(102, 126, 234, 0.3),
        0 0 30px rgba(240, 147, 251, 0.2);
    animation: avatarRingGlow 3s ease-in-out infinite;
}

@keyframes avatarRingGlow {
    0%, 100% {
        opacity: 0.4;
        box-shadow: 
            inset 0 0 20px rgba(102, 126, 234, 0.3),
            0 0 30px rgba(240, 147, 251, 0.2);
    }
    50% {
        opacity: 0.7;
        box-shadow: 
            inset 0 0 25px rgba(102, 126, 234, 0.4),
            0 0 40px rgba(240, 147, 251, 0.3);
    }
}

/* 用户信息 */
.user-card-info {
    margin-bottom: 20px;
}
.user-card-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
.user-card-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #e8eaed);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.user-card-id-row {
    font-size: 13px;
    color: var(--text-secondary, #8b949e);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
    line-height: 1;
}

/* 分隔线 */
.user-card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    margin: 16px 0;
}

/* 签名区域 */
.user-card-section {
    margin-bottom: 16px;
}
.user-card-section-title {
    font-size: 11px;
    color: var(--text-secondary, #8b949e);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.user-card-signature {
    font-size: 14px;
    color: var(--text-primary, #e8eaed);
    line-height: 1.6;
    word-break: break-all;
    min-height: 22px;
}
.user-card-signature:empty::before {
    content: '这个人很懒，什么都没留下…';
    opacity: 0.4;
    font-style: italic;
}

/* 统计信息 */
.user-card-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    margin-bottom: 20px;
}
.user-card-stat {
    text-align: center;
}
.user-card-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #e8eaed);
    margin-bottom: 2px;
}
.user-card-stat-label {
    font-size: 11px;
    color: var(--text-secondary, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.user-card-stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255,255,255,0.1);
}

/* 操作按钮 */
.user-card-actions {
    display: flex;
    gap: 12px;
}
.user-card-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.user-card-btn svg {
    transition: transform 0.2s ease;
}
.user-card-btn:hover svg {
    transform: scale(1.1);
}
.user-card-btn--msg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.user-card-btn--msg:hover { 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}
.user-card-btn--add {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary, #e8eaed);
    border: 1px solid rgba(255,255,255,0.1);
}
.user-card-btn--add:hover { 
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

/* ===== 明亮主题：用户信息卡片适配 ===== */
[data-theme="light"] .user-card {
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.05);
}
[data-theme="light"] .user-card-close {
    background: rgba(0,0,0,0.05);
    color: rgba(0,0,0,0.5);
}
[data-theme="light"] .user-card-close:hover {
    background: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.8);
}
[data-theme="light"] .user-card-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}
[data-theme="light"] .user-card-avatar {
    border-color: #ffffff;
    background: #f0f2f5;
    box-shadow: 
        0 0 0 2px rgba(102, 126, 234, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 4px 16px rgba(102, 126, 234, 0.15);
}
[data-theme="light"] .user-card-avatar:hover {
    box-shadow: 
        0 0 0 2px rgba(102, 126, 234, 0.5),
        0 12px 40px rgba(0, 0, 0, 0.2),
        0 8px 24px rgba(102, 126, 234, 0.25);
}
[data-theme="light"] .user-card-avatar-ring {
    opacity: 0;
    animation: avatarRingGlowLight 3s ease-in-out infinite;
}

@keyframes avatarRingGlowLight {
    0%, 100% {
        opacity: 0.5;
        box-shadow: 
            inset 0 0 20px rgba(102, 126, 234, 0.2),
            0 0 30px rgba(240, 147, 251, 0.15);
    }
    50% {
        opacity: 0.8;
        box-shadow: 
            inset 0 0 25px rgba(102, 126, 234, 0.3),
            0 0 40px rgba(240, 147, 251, 0.25);
    }
}
[data-theme="light"] .user-card-name {
    color: #1c1e26;
}
[data-theme="light"] .user-card-id {
    color: #606878;
}
[data-theme="light"] .user-card-divider {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent);
}
[data-theme="light"] .user-card-section-title {
    color: #8b949e;
}
[data-theme="light"] .user-card-signature {
    color: #1c1e26;
}
[data-theme="light"] .user-card-signature:empty::before {
    color: #8b949e;
}
[data-theme="light"] .user-card-stats {
    background: rgba(0,0,0,0.03);
}
[data-theme="light"] .user-card-stat-value {
    color: #1c1e26;
}
[data-theme="light"] .user-card-stat-label {
    color: #8b949e;
}
[data-theme="light"] .user-card-stat-divider {
    background: rgba(0,0,0,0.08);
}
[data-theme="light"] .user-card-btn--add {
    background: #f0f2f5;
    color: #1c1e26;
    border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .user-card-btn--add:hover {
    background: #e4e8f0;
}

/* 防止页面溢出 */

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}


/* ==================== 后台管理样式 ==================== */
.admin-container {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

.admin-sidebar {
    width: 200px;
    background: #2c3e50;
    color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
}

.admin-sidebar h2 {
    padding: 0 20px 20px;
    margin: 0 0 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 20px;
}

.admin-menu-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-menu-item:hover {
    background: rgba(255,255,255,0.1);
}

.admin-menu-item.active {
    background: var(--primary-color);
}

.admin-main {
    flex: 1;
    padding: 20px;
    overflow-x: auto;
}

.admin-header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.admin-header h1 {
    font-size: 20px;
    color: #333;
}

.toolbar {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.data-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
}

.status-badge.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.disabled {
    background: #ffebee;
    color: #c62828;
}

.status-badge.vip {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #333;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button:hover {
    background: #f5f5f5;
}

.pagination button.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.btn-success {
    background: #07c160;
    color: #fff;
}

.btn-danger {
    background: #e53935;
    color: #fff;
}

.actions {
    display: flex;
    gap: 8px;
}

/* 后台工具栏按钮 */
.toolbar .btn {
    padding: 8px 20px;
    font-size: 14px;
}

/* 手机端表情选择器适配 */
@media (max-width: 768px) {
    #emojiPicker {
        width: 300px !important;
        max-height: 320px !important;
    }
    #emojiContent {
        max-height: 270px !important;
        padding: 6px !important;
        overflow-x: hidden !important;
    }
    #emojiContent .emoji-item {
        font-size: 18px !important;
        padding: 2px !important;
    }
}

/* 后台响应式 */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
    }
    .admin-sidebar h2 {
        width: 100%;
        padding: 0 10px 10px;
        margin-bottom: 10px;
    }
    .admin-menu-item {
        padding: 10px 15px;
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }
    .admin-main {
        padding: 10px;
    }
    .toolbar {
        flex-wrap: wrap;
    }
    .data-table {
        font-size: 12px;
    }
    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}

/* ==================== 邀请好友弹窗 ==================== */
.invite-modal-body {
    padding: 0 0 4px;
}
.invite-hint {
    font-size: 12px;
    color: var(--text-muted);
    padding: 10px 16px 6px;
    line-height: 1.5;
}
.invite-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 0;
}
.invite-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
    user-select: none;
}
.invite-item:hover {
    background: var(--sidebar-item-hover);
}
.invite-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.invite-checkmark {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    margin-left: auto;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.invite-item input:checked ~ .invite-checkmark {
    background: var(--left-nav-active, #4d8ef0);
    border-color: var(--left-nav-active, #4d8ef0);
}
.invite-item input:checked ~ .invite-checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}
.invite-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.invite-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.invite-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 14px;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}
.invite-count {
    font-size: 12px;
    color: var(--text-muted);
}
.invite-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ==================== 通知弹窗（好友申请+群邀请） ==================== */
.notify-modal-body {
    padding: 0 0 4px;
    max-height: 440px;
    overflow-y: auto;
}
.notify-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 16px 6px;
}
.notify-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
}
.notify-item:last-child {
    border-bottom: none;
}
.notify-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.notify-info {
    flex: 1;
    min-width: 0;
}
.notify-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notify-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.notify-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.notify-accept-btn {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: var(--left-nav-active, #4d8ef0);
    color: #fff;
    transition: opacity 0.15s;
    font-weight: 500;
}
.notify-accept-btn:hover { opacity: 0.85; }
.notify-refuse-btn {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}
.notify-refuse-btn:hover {
    background: rgba(231,76,60,0.08);
    color: #e74c3c;
    border-color: rgba(231,76,60,0.3);
}
.notify-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 44px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* 群动态通知时间标签 */
.notify-time-label {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 8px;
}
/* 未读群动态条目：淡蓝背景高亮 */
.notify-item-unread {
    background: rgba(77, 142, 240, 0.06);
}
/* "新"角标 */
.notify-new-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #f5523a;
    border-radius: 4px;
    padding: 0 4px;
    margin-left: 5px;
    line-height: 16px;
    vertical-align: middle;
    letter-spacing: 0;
}

/* ===== 群聊认证徽章（标题栏）===== */
.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    flex-shrink: 0;
    cursor: default;
    vertical-align: middle;
}
.verified-badge svg { flex-shrink: 0; }

/* ===== 会话列表：认证图标 ===== */
.contact-verified-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 3px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ===== 群成员：官方认证标签 ===== */
.gp-official-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f5a623, #e08600);
    border-radius: 3px;
    padding: 0 5px;
    margin-left: 4px;
    line-height: 16px;
    vertical-align: middle;
    letter-spacing: 0;
}

/* ===== 设置/撤销管理员按钮 ===== */
.gp-action-btn.gp-action-admin {
    color: #1a73e8;
    border-color: rgba(26, 115, 232, 0.3);
    background: rgba(26, 115, 232, 0.06);
}
.gp-action-btn.gp-action-admin:hover {
    background: rgba(26, 115, 232, 0.14);
    border-color: rgba(26, 115, 232, 0.5);
}

/* 邀请按钮强调色 */
.gp-invite-btn {
    color: var(--left-nav-active, #4d8ef0) !important;
    border-color: rgba(77,142,240,0.25) !important;
    background: rgba(77,142,240,0.06) !important;
}
.gp-invite-btn:hover {
    background: rgba(77,142,240,0.15) !important;
    border-color: rgba(77,142,240,0.4) !important;
}

/* ===== 群成员角色标识靠右 ===== */
.gp-role-right-wrap {
    flex-shrink: 0;
    margin-left: auto;
}
.gp-role-right {
    display: inline-block;
}
/* 可操作成员鼠标样式提示 */
.gp-member-operable {
    cursor: context-menu;
}

/* ===== 群成员右键菜单 ===== */
.member-ctx-menu {
    position: fixed;
    z-index: 9999;
    min-width: 130px;
    padding: 4px 0;
    background: var(--bg-secondary, #2a2a3e);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    animation: ctxFadeIn 0.1s ease;
    user-select: none;
}
@keyframes ctxFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
.ctx-item {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-primary, #e0e0e0);
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
}
.ctx-item:hover {
    background: rgba(255,255,255,0.08);
}
.ctx-item-warn {
    color: #e08a00;
}
.ctx-item-warn:hover {
    background: rgba(224,138,0,0.12);
}
.ctx-item-danger {
    color: #e74c3c;
}
.ctx-item-danger:hover {
    background: rgba(231,76,60,0.12);
}
.ctx-item-info {
    color: var(--text-primary, #e0e0e0);
}
.ctx-item-info:hover {
    background: rgba(255,255,255,0.08);
}
.ctx-item-primary {
    color: #5b9cf6;
}
.ctx-item-primary:hover {
    background: rgba(91,156,246,0.12);
}
.ctx-item-safe {
    color: #4caf50;
}
.ctx-item-safe:hover {
    background: rgba(76,175,80,0.12);
}
.ctx-divider {
    height: 1px;
    background: var(--border-color, rgba(255,255,255,0.1));
    margin: 4px 0;
}

/* ===== 明亮主题：群成员右键菜单 ===== */
[data-theme="light"] .member-ctx-menu {
    background: #ffffff;
    border: 1px solid #e0e3ea;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
[data-theme="light"] .ctx-item {
    color: #1a1a2e;
}
[data-theme="light"] .ctx-item:hover {
    background: rgba(0,0,0,0.05);
}
[data-theme="light"] .ctx-item-info {
    color: #333c4d;
}
[data-theme="light"] .ctx-item-info:hover {
    background: rgba(0,0,0,0.05);
}
[data-theme="light"] .ctx-item-primary {
    color: #1a6cf5;
}
[data-theme="light"] .ctx-item-primary:hover {
    background: rgba(26,108,245,0.08);
}
[data-theme="light"] .ctx-item-warn {
    color: #c97800;
}
[data-theme="light"] .ctx-item-warn:hover {
    background: rgba(201,120,0,0.08);
}
[data-theme="light"] .ctx-item-danger {
    color: #d32f2f;
}
[data-theme="light"] .ctx-item-danger:hover {
    background: rgba(211,47,47,0.08);
}
[data-theme="light"] .ctx-item-safe {
    color: #2e7d32;
}
[data-theme="light"] .ctx-item-safe:hover {
    background: rgba(46,125,50,0.08);
}
[data-theme="light"] .ctx-divider {
    background: rgba(0,0,0,0.08);
}

/* ===================================================
   通用自定义弹窗 (ui-dialog)
   =================================================== */
.ui-dialog-mask {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.ui-dialog-box {
    background: var(--bg-secondary, #1e2035);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 28px 28px 22px;
    min-width: 300px;
    max-width: 380px;
    width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    opacity: 0;
    transform: scale(0.88) translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34,1.56,0.64,1);
}
.ui-dialog-box.ui-dialog-in {
    opacity: 1;
    transform: scale(1) translateY(0);
}
.ui-dialog-box.ui-dialog-out {
    opacity: 0;
    transform: scale(0.92) translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.ui-dialog-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    background: rgba(255,255,255,0.06);
}
.ui-dialog-icon svg { width: 26px; height: 26px; }

/* ========================================
   积分商城面板
   ======================================== */

/* 面板容器：覆盖聊天区域（sidebar 右侧全部空间） */
.points-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    left: 0; /* app-inner 不含 left-nav，从0开始覆盖 sidebar+聊天区 */
    background: var(--bg-color, #1e2129);
    z-index: 150;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* 定位在 chat-area 同级，实际上需要在 app-inner 内覆盖 sidebar 右侧 */
.app-inner {
    position: relative;
}

/* 头部 */
.points-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: var(--sidebar-bg, #1e2129);
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
    flex-shrink: 0;
}

/* 手机端积分商城返回按钮（桌面端通过 .mobile-only display:none 隐藏） */
.points-back-btn,
.moments-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 4px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.points-back-btn:hover, .points-back-btn:active,
.moments-back-btn:hover, .moments-back-btn:active {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}
[data-theme="light"] .points-back-btn:hover,
[data-theme="light"] .points-back-btn:active,
[data-theme="light"] .moments-back-btn:hover,
[data-theme="light"] .moments-back-btn:active {
    background: rgba(0,0,0,0.06);
}

/* 圈子返回按钮 - 定位在封面左上角 */
.moments-back-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.15);
}
.moments-back-btn:hover {
    background: rgba(0,0,0,0.7);
}
.moments-back-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}
.points-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #e8eaed);
}
.points-balance-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(245,158,11,0.35);
}

/* 内容滚动区 */
.points-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.points-body::-webkit-scrollbar { width: 4px; }
.points-body::-webkit-scrollbar-track { background: transparent; }
.points-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* 通用卡片 */
.points-card {
    background: var(--sidebar-bg, #252930);
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.06));
}
.points-card-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #e8eaed);
    margin-bottom: 14px;
}

/* 连续签到徽章 */
.streak-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 签到日历 - 7天格子 */
.check-in-calendar {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
}
.calendar-day {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.calendar-day-label {
    font-size: 10px;
    color: var(--text-secondary, #8b949e);
    text-align: center;
}
.calendar-day-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color, rgba(255,255,255,0.1));
    background: var(--bg-color, #1e2129);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #8b949e);
    transition: all 0.2s;
}
.calendar-day.checked .calendar-day-circle {
    background: linear-gradient(135deg, #07c160, #06ad56);
    border-color: #07c160;
    color: #fff;
}
.calendar-day.today .calendar-day-circle {
    border-color: #f59e0b;
    color: #f59e0b;
}
.calendar-day.today.checked .calendar-day-circle {
    background: linear-gradient(135deg, #07c160, #06ad56);
    border-color: #07c160;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(7,193,96,0.25);
}
.calendar-day-pts {
    font-size: 10px;
    color: var(--text-secondary, #8b949e);
}
.calendar-day.checked .calendar-day-pts { color: #07c160; }

/* 签到操作行 */
.check-in-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.check-in-reward-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--text-secondary, #8b949e);
}
.reward-pts {
    font-size: 18px;
    font-weight: 700;
    color: #f59e0b;
}
.btn-check-in {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #07c160, #06ad56);
    color: #fff;
    border: none;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    white-space: nowrap;
}
.btn-check-in:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-check-in:disabled {
    background: var(--border-color, rgba(255,255,255,0.1));
    color: var(--text-secondary, #8b949e);
    cursor: not-allowed;
    transform: none;
}

/* 签到规则 */
.check-in-rules {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.06));
    font-size: 11px;
    color: var(--text-secondary, #8b949e);
}
.rule-item {
    background: var(--bg-color, rgba(255,255,255,0.05));
    padding: 2px 7px;
    border-radius: 8px;
}
.rule-item b { color: #07c160; }
.rule-max { background: rgba(99,102,241,0.12); }
.rule-max b { color: #8b5cf6; }
.rule-extra {
    margin-left: auto;
    color: #f59e0b;
    font-weight: 600;
}

/* 靓号兑换 */
.nice-id-desc {
    font-size: 12px;
    color: var(--text-secondary, #8b949e);
    margin: -8px 0 12px;
    line-height: 1.5;
}

/* 稀有度筛选 */
.rarity-filter {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.rarity-btn {
    padding: 4px 12px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    border-radius: 16px;
    background: transparent;
    color: var(--text-secondary, #8b949e);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.rarity-btn:hover { background: rgba(255,255,255,0.06); }
.rarity-btn.active { background: var(--primary-color, #07c160); border-color: var(--primary-color, #07c160); color: #fff; }
.rarity-btn.rarity-2 { color: #3b82f6; border-color: #3b82f633; }
.rarity-btn.rarity-2.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.rarity-btn.rarity-3 { color: #8b5cf6; border-color: #8b5cf633; }
.rarity-btn.rarity-3.active { background: #8b5cf6; border-color: #8b5cf6; color: #fff; }
.rarity-btn.rarity-4 { color: #f59e0b; border-color: #f59e0b33; }
.rarity-btn.rarity-4.active { background: linear-gradient(135deg,#f59e0b,#ef4444); border-color: #f59e0b; color: #fff; }

/* 靓号格子 */
.nice-id-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.nice-id-item {
    background: var(--bg-color, #1e2129);
    border: 1.5px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 10px;
    padding: 12px 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.nice-id-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.nice-id-item.rarity-2 { border-color: #3b82f640; background: rgba(59,130,246,0.05); }
.nice-id-item.rarity-3 { border-color: #8b5cf640; background: rgba(139,92,246,0.05); }
.nice-id-item.rarity-4 {
    border-color: #f59e0b60;
    background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(239,68,68,0.05));
}
.nice-id-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary, #e8eaed);
    letter-spacing: 1px;
}
.rarity-2 .nice-id-text { color: #60a5fa; }
.rarity-3 .nice-id-text { color: #a78bfa; }
.rarity-4 .nice-id-text {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nice-id-rarity {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 600;
}
.nice-id-item.rarity-1 .nice-id-rarity { background: rgba(255,255,255,0.08); color: var(--text-secondary, #8b949e); }
.nice-id-item.rarity-2 .nice-id-rarity { background: rgba(59,130,246,0.15); color: #60a5fa; }
.nice-id-item.rarity-3 .nice-id-rarity { background: rgba(139,92,246,0.15); color: #a78bfa; }
.nice-id-item.rarity-4 .nice-id-rarity { background: rgba(245,158,11,0.15); color: #f59e0b; }
.nice-id-price {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 700;
    color: #f59e0b;
}
.nice-id-btn {
    width: 100%;
    padding: 6px 0;
    background: var(--primary-color, #07c160);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.nice-id-btn:hover { opacity: 0.85; }
.nice-id-btn:disabled { background: rgba(255,255,255,0.08); color: var(--text-secondary, #8b949e); cursor: not-allowed; }
.nice-id-loading, .nice-id-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px;
    color: var(--text-secondary, #8b949e);
    font-size: 13px;
}

/* 积分流水 */
.points-logs {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 220px;
    overflow-y: auto;
}
.points-logs::-webkit-scrollbar { width: 3px; }
.points-log-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 12px;
    transition: background 0.1s;
}
.points-log-item:hover { background: rgba(255,255,255,0.04); }
.points-log-desc { color: var(--text-primary, #e8eaed); flex: 1; }
.points-log-time { color: var(--text-secondary, #8b949e); font-size: 11px; margin: 0 8px; }
.points-log-change { font-weight: 700; white-space: nowrap; }
.points-log-change.positive { color: #07c160; }
.points-log-change.negative { color: #ef4444; }
.points-logs-empty {
    text-align: center;
    padding: 16px;
    color: var(--text-secondary, #8b949e);
    font-size: 13px;
}

/* 明亮主题适配 */
[data-theme="light"] .points-panel { background: #f2f4f7; }
[data-theme="light"] .points-header { background: #ffffff; border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .points-card { background: #ffffff; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .calendar-day-circle { background: #f2f4f7; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .nice-id-item { background: #f8f9fb; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .nice-id-item.rarity-2 { background: rgba(59,130,246,0.04); }
[data-theme="light"] .nice-id-item.rarity-3 { background: rgba(139,92,246,0.04); }
[data-theme="light"] .check-in-rules { border-top-color: rgba(0,0,0,0.06); }
[data-theme="light"] .rule-item { background: rgba(0,0,0,0.04); }
[data-theme="light"] .rarity-btn { border-color: rgba(0,0,0,0.1); color: #606878; background: transparent; }
[data-theme="light"] .rarity-btn:hover { background: rgba(0,0,0,0.04); }
/* 明亮主题激活态：保留各稀有度彩色 */
[data-theme="light"] .rarity-btn.active { background: var(--primary-color, #07c160); border-color: var(--primary-color, #07c160); color: #fff; }
[data-theme="light"] .rarity-btn.rarity-2.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }
[data-theme="light"] .rarity-btn.rarity-3.active { background: #8b5cf6; border-color: #8b5cf6; color: #fff; }
[data-theme="light"] .rarity-btn.rarity-4.active { background: linear-gradient(135deg,#f59e0b,#ef4444); border-color: #f59e0b; color: #fff; }
[data-theme="light"] .btn-check-in:disabled { background: rgba(0,0,0,0.08); }
[data-theme="light"] .nice-id-btn:disabled { background: rgba(0,0,0,0.08); color: var(--text-secondary); }

/* ===== CDK 兑换码卡片 ===== */
.cdk-input-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.cdk-input {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    background: var(--bg-secondary, rgba(255,255,255,0.05));
    color: var(--text-primary, #e6edf3);
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0.5px;
    outline: none;
    transition: border-color 0.15s;
}
.cdk-input:focus {
    border-color: var(--primary-color, #07c160);
}
.btn-cdk-redeem {
    height: 38px;
    padding: 0 16px;
    border-radius: 8px;
    border: none;
    background: var(--primary-color, #07c160);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: opacity 0.15s, transform 0.1s;
    flex-shrink: 0;
}
.btn-cdk-redeem:hover  { opacity: 0.9; }
.btn-cdk-redeem:active { transform: scale(0.97); }
.btn-cdk-redeem:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.cdk-status {
    margin-top: 8px;
    font-size: 13px;
    min-height: 18px;
    transition: color 0.2s;
}
.cdk-status.success { color: #07c160; }
.cdk-status.error   { color: #ff4d4f; }
.cdk-status.loading { color: var(--text-secondary); }

/* 明亮主题 CDK */
[data-theme="light"] .cdk-input {
    background: #f7f8fa;
    border-color: rgba(0,0,0,0.1);
    color: #1a1a2e;
}
[data-theme="light"] .cdk-input:focus { border-color: var(--primary-color, #07c160); }


/* ===== 消息发送状态图标 ===== */
.message-bubble-wrap {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}




.msg-send-status {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 2px;
}

.msg-send-loading {
    color: var(--text-secondary);
    opacity: 0.7;
}

.msg-send-failed {
    color: #ff4d4f;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}

.msg-send-failed:hover {
    transform: scale(1.2);
    opacity: 0.85;
}

/* ===== 骨架屏 shimmer 动画 ===== */
@keyframes shimmer {
    0%   { opacity: 1; }
    50%  { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}



/* 移动端适配 */
@media (max-width: 768px) {
    .points-panel {
        left: 0;
    }
    .points-body { padding: 14px 14px; }
    .check-in-calendar { gap: 4px; }
    .calendar-day-circle { width: 28px; height: 28px; font-size: 10px; }
    .nice-id-grid { grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); gap: 8px; }
}
/* ========================================
   朋友圈面板
   ======================================== */

/* 面板容器 */
.moments-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    left: 0;
    background: var(--bg-color, #1e2129);
    z-index: 150;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 头部 */
.moments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: var(--sidebar-bg, #1e2129);
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
    flex-shrink: 0;
}

.moments-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-primary, #e8eaed);
    cursor: pointer;
}

.moments-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary, #e8eaed);
}

.moments-publish-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--primary-color, #07c160);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
    flex-shrink: 0;
}
.moments-publish-btn:hover { opacity: 0.9; }

/* 电脑端发布按钮悬浮样式 */
@media (min-width: 769px) {
    .moments-publish-btn {
        position: fixed;
        right: 30px;
        bottom: 60px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 0;
        box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
        z-index: 100;
    }
    .moments-publish-btn span {
        display: none;
    }
    .moments-publish-btn svg {
        width: 24px;
        height: 24px;
    }
    /* 电脑端隐藏手机端悬浮按钮 */
    .moments-fab-mobile {
        display: none;
    }
}

/* 筛选选项栏 */
.moments-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 20px;
    background: var(--sidebar-bg, #252830);
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
    flex-shrink: 0;
    position: relative;
}

.moments-filter-left {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.moments-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-secondary, #8b949e);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.moments-filter-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary, #e8eaed);
}

.moments-filter-btn.active {
    background: var(--primary-color, #07c160);
    color: #fff;
    border-color: var(--primary-color, #07c160);
}

/* ===== 浅色主题：筛选按钮 ===== */
[data-theme="light"] .moments-filter-btn {
    background: rgba(0,0,0,0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(0,0,0,0.08);
}
[data-theme="light"] .moments-filter-btn:hover {
    background: rgba(0,0,0,0.08);
    color: var(--text-primary);
}
[data-theme="light"] .moments-filter-btn.active {
    background: var(--primary-color, #07c160);
    color: #fff;
    border-color: var(--primary-color, #07c160);
}

.moments-filter-btn svg {
    opacity: 0.8;
}

/* 内容区 */
.moments-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 左侧好友列表 */
.moments-friends-list {
    width: 260px;
    background: var(--sidebar-bg, #252830);
    border-right: 1px solid var(--border-color, rgba(255,255,255,0.06));
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.moments-friends-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #e8eaed);
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
}

.moments-friends-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.moments-friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.moments-friend-item:hover { background: rgba(255,255,255,0.05); }
.moments-friend-item.active { background: rgba(7,193,96,0.15); }

.moments-friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.moments-friend-info {
    flex: 1;
    min-width: 0;
}

.moments-friend-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #e8eaed);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.moments-friend-status {
    font-size: 12px;
    color: var(--text-secondary, #8b949e);
}

/* 右侧朋友圈动态 */
.moments-feed {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.moments-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
    flex-shrink: 0;
}

.moments-feed-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #e8eaed);
}

.moments-feed-filter select {
    padding: 6px 12px;
    background: var(--input-bg, rgba(255,255,255,0.06));
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 6px;
    color: var(--text-primary, #e8eaed);
    font-size: 13px;
    cursor: pointer;
}

.moments-feed-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 朋友圈动态卡片 */
.moment-card {
    background: var(--sidebar-bg, #252830);
    border-radius: 14px;
    padding: 16px 18px 12px;
    margin-bottom: 14px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.06));
    transition: box-shadow 0.2s;
    width: 100%;
    max-width: 600px;
}
.moment-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.moment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.moment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.moment-user-info {
    flex: 1;
}

.moment-username {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #e8eaed);
    display: flex;
    align-items: center;
    gap: 6px;
}
/* 朋友圈名字行内的认证标签不需要额外 margin-left，由 gap 控制 */
.moment-username .verify-badge-tag {
    margin-left: 0;
}
}

.moment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 400;
    height: 20px;
    min-width: 28px;
    line-height: 1;
    box-sizing: border-box;
    vertical-align: middle;
}

.moment-badge.admin {
    color: #1a73e8;
    background: rgba(26, 115, 232, 0.15);
    border: 1px solid rgba(26, 115, 232, 0.4);
}

.moment-badge.verified {
    color: #4dabf7;
    background: rgba(77, 171, 247, 0.15);
    border: 1px solid rgba(77, 171, 247, 0.4);
}

.moment-time {
    font-size: 12px;
    color: var(--text-secondary, #8b949e);
    margin-top: 2px;
}

.moment-content {
    font-size: 14px;
    color: var(--text-primary, #e8eaed);
    line-height: 1.6;
    margin-bottom: 12px;
    word-break: break-word;
    user-select: text;
    cursor: text;
}

/* 朋友圈图片 - 最多4张，自适应布局 */
.moment-images {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 240px;
}
/* 单图 */
.moment-images.mi-1 { grid-template-columns: 1fr; max-width: 160px; }
.moment-images.mi-1 .moment-image { max-height: 120px; aspect-ratio: unset; }
/* 2图 */
.moment-images.mi-2 { grid-template-columns: 1fr 1fr; max-width: 200px; }
/* 3图 */
.moment-images.mi-3 { grid-template-columns: 1fr 1fr; max-width: 200px; }
.moment-images.mi-3 .moment-image:first-child { grid-column: 1 / -1; max-height: 100px; aspect-ratio: unset; }
/* 4图 */
.moment-images.mi-4 { grid-template-columns: 1fr 1fr; max-width: 240px; }

.moment-image {
    aspect-ratio: 1;
    border-radius: 0;
    object-fit: cover;
    cursor: pointer;
    width: 100%;
    display: block;
    transition: transform 0.2s;
}
.moment-image:hover { transform: scale(1.02); filter: brightness(0.92); }

.moment-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.06));
}

.moment-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--text-secondary, #8b949e);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.15s;
}
.moment-action-btn:hover { color: var(--primary-color, #07c160); }
.moment-action-btn.active { color: var(--primary-color, #07c160); }

.moment-action-btn.moment-delete-btn:hover {
    color: #ff6b6b;
}

/* 发布朋友圈弹窗 */
.moments-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mmOverlayIn 0.2s ease;
}
@keyframes mmOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.moments-modal {
    background: var(--sidebar-bg, #252830);
    border-radius: 20px;
    width: 92%;
    max-width: 520px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.07);
    animation: mmCardIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes mmCardIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.moments-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
    background: linear-gradient(135deg, rgba(7,193,96,0.08) 0%, rgba(118,75,162,0.08) 100%);
}

.moments-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #e8eaed);
}

.moments-modal-close {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.06);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary, #8b949e);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.moments-modal-close:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text-primary, #e8eaed);
}

.moments-modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* 用户信息行 */
.mm-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.mm-user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(7,193,96,0.3);
}
.mm-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #e8eaed);
}

.moments-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--text-primary, #e8eaed);
    font-size: 15px;
    line-height: 1.6;
    resize: none;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
}
.moments-textarea:focus {
    border-color: rgba(7,193,96,0.45);
    background: rgba(7,193,96,0.03);
}
.moments-textarea::placeholder {
    color: var(--text-secondary, #8b949e);
    font-size: 14px;
}

/* ===== 图片预览网格 ===== */
.moments-image-upload {
    margin-top: 10px;
}
.mm-img-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-bottom: 8px;
    max-height: 80px;
}
.mm-img-cell {
    position: relative;
    aspect-ratio: 1;
    height: 72px;
    max-height: 72px;
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    touch-action: none;
    user-select: none;
}
.mm-img-cell:active { cursor: grabbing; }
.mm-img-cell.mm-drag-over {
    border-color: var(--primary-color, #07c160);
    box-shadow: 0 0 0 2px rgba(7,193,96,0.3);
}
.mm-img-cell.mm-dragging {
    opacity: 0.55;
    transform: scale(0.95);
}
.mm-img-cell img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.mm-img-remove {
    position: absolute;
    top: 3px; right: 3px;
    width: 16px; height: 16px;
    background: rgba(0,0,0,0.65);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 2;
}
.mm-img-cell:hover .mm-img-remove { opacity: 1; }
.mm-img-order {
    position: absolute;
    bottom: 3px; left: 3px;
    width: 16px; height: 16px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.mm-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 0;
    border: 1.5px dashed rgba(255,255,255,0.18);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary, #8b949e);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.mm-add-btn:hover {
    border-color: rgba(7,193,96,0.5);
    color: var(--primary-color, #07c160);
    background: rgba(7,193,96,0.05);
}
.mm-img-count-tip {
    font-size: 11px;
    color: var(--text-secondary, #8b949e);
    text-align: right;
    margin-top: 4px;
}

/* 可见性选择 */
.moment-visibility-select {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.06));
}

.moment-visibility-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary, #8b949e);
    white-space: nowrap;
}

.moment-visibility-dropdown {
    padding: 6px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 8px;
    color: var(--text-primary, #e8eaed);
    font-size: 13px;
    cursor: pointer;
    flex: 1;
    outline: none;
}

.moment-visibility-dropdown option {
    background: var(--sidebar-bg, #252830);
    color: var(--text-primary, #e8eaed);
}

.moments-upload-btn {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border-color, rgba(255,255,255,0.2));
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary, #8b949e);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moments-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 22px;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.06));
    background: rgba(255,255,255,0.02);
}
.mm-footer-left {
    font-size: 12px;
    color: var(--text-secondary, #8b949e);
}
.mm-footer-right {
    display: flex;
    gap: 10px;
}

.moments-btn-cancel {
    padding: 8px 20px;
    background: var(--btn-secondary-bg, rgba(0,0,0,0.06));
    border: 1px solid var(--border-color, rgba(0,0,0,0.12));
    border-radius: 10px;
    color: var(--text-secondary, #8b949e);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.moments-btn-cancel:hover { background: var(--btn-secondary-hover, rgba(0,0,0,0.1)); }

.moments-btn-submit {
    padding: 8px 22px;
    background: linear-gradient(135deg, #07c160, #05a84e);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(7,193,96,0.3);
}
.moments-btn-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.moments-btn-submit:active { transform: translateY(0); }
.moments-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ========== 朋友圈封面区域 ========== */
.moments-cover {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
    overflow: hidden;
}

.moments-cover-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    transition: background-image 0.3s;
}

.moments-cover-upload {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}
.moments-cover-upload svg {
    width: 14px;
    height: 14px;
}

.moments-cover:hover .moments-cover-upload {
    opacity: 1;
}

.moments-cover-upload:hover {
    background: rgba(0,0,0,0.6);
}

.moments-cover-info {
    position: absolute;
    bottom: 20px;
    left: 0; right: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0 40px;
    gap: 16px;
}

.moments-cover-text {
    text-align: right;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.moments-cover-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.moments-cover-bio {
    font-size: 13px;
    opacity: 0.9;
}

.moments-cover-avatar {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ========== 分类标签 ========== */
.moments-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--sidebar-bg, #252830);
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
    flex-shrink: 0;
    overflow-x: auto;
}

.moments-tabs::-webkit-scrollbar { display: none; }

.moments-tab {
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--border-color, rgba(255,255,255,0.15));
    border-radius: 16px;
    color: var(--text-secondary, #8b949e);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.moments-tab:hover {
    border-color: var(--primary-color, #07c160);
    color: var(--primary-color, #07c160);
}

.moments-tab.active {
    background: var(--primary-color, #07c160);
    border-color: var(--primary-color, #07c160);
    color: #fff;
}

/* ========== 左侧边栏（电脑端隐藏） ========== */
.moments-sidebar {
    display: none;
}

.moments-filter-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.moments-filter-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.moments-filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.moments-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    color: var(--text-primary, #e8eaed);
    font-size: 13px;
}

.moments-filter-option:hover {
    background: rgba(255,255,255,0.05);
}

.moments-filter-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color, #07c160);
}

/* 明亮主题适配 */
[data-theme="light"] .moments-panel { background: #f2f4f7; }
[data-theme="light"] .moments-header { background: #ffffff; border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .moments-friends-list { background: #ffffff; border-right-color: rgba(0,0,0,0.08); }
[data-theme="light"] .moments-friend-item:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .moments-feed-header { border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .moment-card { background: #ffffff; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .moments-modal { background: #ffffff; }
[data-theme="light"] .moments-textarea { background: #f2f4f7; border-color: rgba(0,0,0,0.1); color: #1a1a1a; }
[data-theme="light"] .moments-upload-btn { border-color: rgba(0,0,0,0.2); }
[data-theme="light"] .moments-tabs { background: #ffffff; border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .moments-tab { border-color: rgba(0,0,0,0.15); color: #666; }
[data-theme="light"] .moments-tab:hover { border-color: #07c160; color: #07c160; }
[data-theme="light"] .moments-sidebar { background: #ffffff; border-right-color: rgba(0,0,0,0.08); }
[data-theme="light"] .moments-filter-option:hover { background: rgba(0,0,0,0.04); }



/* ========== 移动端朋友圈完整适配 ========== */
@media (max-width: 768px) {

    /* --- 面板基础 --- */
    .moments-panel { left: 0; }
    .moments-back-btn { display: flex; }

    /* --- 隐藏桌面侧边栏，Feed 占满宽度 --- */
    .moments-sidebar { display: none !important; }
    .moments-feed { width: 100%; }

    /* ===== 封面区域优化 ===== */
    .moments-cover {
        height: 180px;
    }

    /* 更换封面按钮：移动端常驻显示（无 hover 依赖） */
    .moments-cover-upload {
        opacity: 1;
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 12px;
        gap: 4px;
        border-radius: 6px;
    }
    .moments-cover-upload svg {
        width: 14px;
        height: 14px;
    }

    /* 封面底部信息区 */
    .moments-cover-info {
        padding: 0 16px;
        bottom: 14px;
        gap: 10px;
    }

    /* 头像 */
    .moments-cover-avatar {
        width: 60px;
        height: 60px;
        border-width: 2px;
    }

    /* 昵称 & 签名 */
    .moments-cover-name {
        font-size: 16px;
        margin-bottom: 2px;
    }
    .moments-cover-bio {
        font-size: 12px;
    }

    /* ===== 筛选栏横向滚动 ===== */
    .moments-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 12px 14px;
        gap: 8px;
        justify-content: flex-start;
    }
    .moments-filter-bar::-webkit-scrollbar {
        display: none;
    }
    .moments-filter-bar .moments-publish-btn {
        display: none; /* 手机端隐藏筛选栏中的发布按钮 */
    }

    /* 手机端悬浮发布按钮 */
    .moments-fab-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: 20px;
        bottom: 80px;
        width: 56px;
        height: 56px;
        background: var(--primary-color, #07c160);
        color: #fff;
        border: none;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
        z-index: 100;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
    }
    .moments-fab-mobile:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(7, 193, 96, 0.5);
    }
    .moments-fab-mobile:active {
        transform: scale(0.95);
    }
    .moments-filter-left {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }
    .moments-filter-btn {
        flex-shrink: 0;
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 6px;
        white-space: nowrap;
    }
    /* 手机端筛选按钮隐藏图标 */
    .moments-filter-btn svg {
        display: none;
    }

    /* ===== Feed 卡片紧凑布局 ===== */
    .moments-feed {
        padding: 0;
    }
    .moments-feed-content {
        padding: 10px 12px 100px; /* 底部留出 FAB 空间 */
    }
    .moment-card {
        padding: 14px 14px 10px;
        margin-bottom: 10px;
        border-radius: 12px;
    }

    /* 头像尺寸微调 */
    .moment-avatar {
        width: 38px;
        height: 38px;
    }
    .moment-username {
        font-size: 14px;
    }
    .moment-content {
        font-size: 14px;
        margin-bottom: 10px;
    }

    /* ===== 图片宫格（与电脑端保持一致） ===== */
    .moment-images {
        max-width: 240px;
    }
    .moment-images.mi-1 {
        max-width: 160px;
    }
    .moment-images.mi-1 .moment-image {
        max-height: 120px;
        aspect-ratio: unset;
    }
    .moment-images.mi-2 {
        max-width: 200px;
    }
    .moment-images.mi-3 {
        max-width: 200px;
    }
    .moment-images.mi-3 .moment-image:first-child {
        max-height: 100px;
        aspect-ratio: unset;
    }
    .moment-images.mi-4 {
        max-width: 240px;
    }

    /* ===== 操作按钮触摸友好 ===== */
    .moment-action-btn {
        padding: 6px 0;
        font-size: 13px;
        gap: 5px;
    }

    /* ===== 悬浮发布按钮（FAB）===== */
    .moments-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: 20px;
        bottom: 28px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: var(--primary-color, #07c160);
        color: #fff;
        border: none;
        cursor: pointer;
        z-index: 200;
        box-shadow: 0 4px 18px rgba(7, 193, 96, 0.45);
        transition: transform 0.18s, box-shadow 0.18s, background 0.15s;
        -webkit-tap-highlight-color: transparent;
    }
    .moments-fab:active {
        transform: scale(0.91);
        box-shadow: 0 2px 10px rgba(7, 193, 96, 0.35);
    }
    .moments-fab svg {
        pointer-events: none;
    }
}

/* ===== 朋友圈评论弹窗样式 ===== */
.comments-modal {
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.comments-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    max-height: 55vh;
    background: var(--sidebar-bg);
}

.comments-loading,
.comments-empty {
    padding: 60px 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.comments-empty::before {
    content: '💬';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.comment-item {
    display: flex;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    transition: background 0.2s;
}

.comment-item:hover {
    background: rgba(255,255,255,0.03);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.comment-content {
    flex: 1;
    min-width: 0;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 10px 14px;
    position: relative;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.comment-username {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.comment-time {
    font-size: 11px;
    color: var(--text-muted);
}

.comment-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    word-break: break-all;
}

.comment-reply-to {
    color: var(--primary-color);
    font-weight: 500;
    background: rgba(7, 193, 96, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.comment-actions {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
}

.comment-reply-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 12px;
    transition: all 0.2s;
}

.comment-reply-btn:hover {
    color: var(--primary-color);
    background: rgba(7, 193, 96, 0.1);
    border-color: var(--primary-color);
}

.comment-delete-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 12px;
    transition: all 0.2s;
    margin-left: 8px;
}

.comment-delete-btn:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
}

.comments-input-area {
    border-top: 1px solid var(--border-color);
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(30,33,41,0.8) 0%, var(--sidebar-bg) 100%);
    backdrop-filter: blur(10px);
}

.reply-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 10px;
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(7, 193, 96, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
}

.reply-hint button {
    background: rgba(250, 81, 81, 0.1);
    border: none;
    color: var(--danger);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.reply-hint button:hover {
    background: rgba(250, 81, 81, 0.2);
}

.comments-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.comments-input {
    flex: 1;
    height: 44px;
    padding: 0 20px;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.comments-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.15), inset 0 2px 4px rgba(0,0,0,0.1);
}

.comments-input::placeholder {
    color: var(--text-muted);
}

.comments-send-btn {
    height: 44px;
    padding: 0 24px;
    border: none;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}

.comments-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(7, 193, 96, 0.4);
}

.comments-send-btn:active {
    transform: translateY(0);
}

/* 浅色主题适配 */
[data-theme="light"] .comments-input-area { 
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, #ffffff 100%);
}
[data-theme="light"] .comments-input { 
    background: #f2f4f7; 
    border-color: rgba(0,0,0,0.1); 
    color: #1a1a1a; 
}
[data-theme="light"] .comment-item { 
    border-bottom-color: rgba(0,0,0,0.06); 
}
[data-theme="light"] .comment-item:hover {
    background: rgba(0,0,0,0.02);
}
[data-theme="light"] .comment-content {
    background: #f2f4f7;
}
[data-theme="light"] .comment-avatar {
    border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .reply-hint {
    background: rgba(7, 193, 96, 0.05);
}

/* 图标颜色变体 */
.ui-dialog-icon.icon-danger { background: rgba(231,76,60,0.15); color: #e74c3c; }
.ui-dialog-icon.icon-warn   { background: rgba(224,138,0,0.15);  color: #e08a00; }
.ui-dialog-icon.icon-info   { background: rgba(77,142,240,0.15); color: #4d8ef0; }
.ui-dialog-icon.icon-success{ background: rgba(76,175,80,0.15);  color: #4caf50; }
.ui-dialog-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    line-height: 1.3;
}
.ui-dialog-body {
    font-size: 13.5px;
    color: var(--text-secondary, #999);
    line-height: 1.6;
    max-width: 100%;
    word-break: break-all;
}
/* prompt 输入框 */
.ui-dialog-input-wrap {
    width: 100%;
    margin-top: 4px;
}
.ui-dialog-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--text-primary, #e0e0e0);
    outline: none;
    transition: border-color 0.15s;
}
.ui-dialog-input:focus {
    border-color: var(--accent, #4d8ef0);
}
/* 禁言选项网格 */
.ui-dialog-mute-wrap {
    width: 100%;
    margin-top: 4px;
}
.ui-mute-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.ui-mute-opt {
    padding: 9px 0;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary, #aaa);
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.12s;
    user-select: none;
}
.ui-mute-opt:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary, #e0e0e0);
}
.ui-mute-opt-active {
    background: rgba(224,138,0,0.15) !important;
    border-color: rgba(224,138,0,0.5) !important;
    color: #e08a00 !important;
    font-weight: 600;
}
/* footer 按钮区 */
.ui-dialog-footer {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-top: 6px;
    justify-content: center;
}
.ui-btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    outline: none;
}
.ui-btn-cancel {
    background: rgba(255,255,255,0.07);
    color: var(--text-secondary, #999);
    border: 1px solid rgba(255,255,255,0.1);
}
.ui-btn-cancel:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text-primary, #e0e0e0);
}
.ui-btn-confirm {
    background: linear-gradient(135deg, #4d8ef0, #7271e2);
    color: #fff;
    box-shadow: 0 4px 12px rgba(77,142,240,0.3);
}
.ui-btn-confirm:hover {
    opacity: 0.9;
    box-shadow: 0 6px 16px rgba(77,142,240,0.4);
}
.ui-btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    box-shadow: 0 4px 12px rgba(231,76,60,0.3);
}
.ui-btn-danger:hover {
    opacity: 0.9;
    box-shadow: 0 6px 16px rgba(231,76,60,0.4);
}
.ui-btn-warn {
    background: linear-gradient(135deg, #e08a00, #c97a00);
    color: #fff;
    box-shadow: 0 4px 12px rgba(224,138,0,0.3);
}
.ui-btn-warn:hover {
    opacity: 0.9;
}

/* ===================================================
   明亮主题：通用弹窗 (ui-dialog)
   =================================================== */

/* 遮罩层背景稍浅 */
[data-theme="light"] .ui-dialog-mask {
    background: rgba(0,0,0,0.35);
}

/* 弹窗主体 */
[data-theme="light"] .ui-dialog-box {
    background: #ffffff;
    border: 1px solid #e0e3ea;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* 图标圆圈（无色时） */
[data-theme="light"] .ui-dialog-icon {
    background: rgba(0,0,0,0.05);
    color: #606878;
}

/* 图标颜色变体 */
[data-theme="light"] .ui-dialog-icon.icon-danger  { background: rgba(211,47,47,0.1);  color: #d32f2f; }
[data-theme="light"] .ui-dialog-icon.icon-warn    { background: rgba(201,120,0,0.1);  color: #c97800; }
[data-theme="light"] .ui-dialog-icon.icon-info    { background: rgba(26,108,245,0.1); color: #1a6cf5; }
[data-theme="light"] .ui-dialog-icon.icon-success { background: rgba(46,125,50,0.1);  color: #2e7d32; }

/* 标题 */
[data-theme="light"] .ui-dialog-title {
    color: #1a1a2e;
}

/* 正文 */
[data-theme="light"] .ui-dialog-body {
    color: #606878;
}

/* prompt 输入框 */
[data-theme="light"] .ui-dialog-input {
    background: #f4f6fa;
    border: 1px solid #d0d5e0;
    color: #1a1a2e;
}
[data-theme="light"] .ui-dialog-input:focus {
    border-color: #1a6cf5;
    background: #ffffff;
}
[data-theme="light"] .ui-dialog-input::placeholder {
    color: #9aa0ae;
}

/* 禁言选项 */
[data-theme="light"] .ui-mute-opt {
    background: #f4f6fa;
    border: 1px solid #e0e3ea;
    color: #606878;
}
[data-theme="light"] .ui-mute-opt:hover {
    background: rgba(26,108,245,0.07);
    color: #1a1a2e;
    border-color: rgba(26,108,245,0.25);
}
[data-theme="light"] .ui-mute-opt-active {
    background: rgba(201,120,0,0.1) !important;
    border-color: rgba(201,120,0,0.4) !important;
    color: #c97800 !important;
}

/* 取消按钮 */
[data-theme="light"] .ui-btn-cancel {
    background: #f4f6fa;
    color: #606878;
    border: 1px solid #d0d5e0;
}
[data-theme="light"] .ui-btn-cancel:hover {
    background: #e8ecf4;
    color: #1a1a2e;
    border-color: #b8bece;
}

/* 确认按钮（蓝色渐变保持，增强阴影） */
[data-theme="light"] .ui-btn-confirm {
    box-shadow: 0 4px 14px rgba(26,108,245,0.35);
}
[data-theme="light"] .ui-btn-confirm:hover {
    box-shadow: 0 6px 18px rgba(26,108,245,0.45);
}

/* 危险按钮 */
[data-theme="light"] .ui-btn-danger {
    box-shadow: 0 4px 14px rgba(211,47,47,0.3);
}
[data-theme="light"] .ui-btn-danger:hover {
    box-shadow: 0 6px 18px rgba(211,47,47,0.4);
}

/* 警告按钮 */
[data-theme="light"] .ui-btn-warn {
    box-shadow: 0 4px 14px rgba(201,120,0,0.3);
}
[data-theme="light"] .ui-btn-warn:hover {
    box-shadow: 0 6px 18px rgba(201,120,0,0.4);
}

/* ========== 靓号徽章 ========== */
.nice-id-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border-radius: 50%;
    padding: 0;
    width: 22px;
    height: 22px;
    line-height: 1;
    margin-left: 6px;
    vertical-align: middle;
    flex-shrink: 0;
    transform: translateY(-3px);
}

/* 靓号用户的ID显示为红色 */
.nice-id-text {
    color: #ff4d4f;
    font-weight: 600;
}



