/* --- 互动讨论侧边栏样式 (磨玻璃/透明UI风格) --- */
#discussion-sidebar {
    position: fixed;
    right: 0;
    top: 10%;
    bottom: 10%;
    width: 320px;
    background: rgba(15, 20, 25, 0.45); /* 增强磨玻璃底色，提升透明反差 */
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-right: none;
    border-radius: 24px 0 0 24px;
    box-shadow: -15px 0 45px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
    z-index: 20000;
    display: flex;
    flex-direction: row;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateX(320px);
    color: #f0f0f0;
}
#discussion-sidebar.active { transform: translateX(0); }

.discussion-content { flex: 1; display: flex; flex-direction: column; padding: 20px; border-radius: 24px 0 0 24px; box-sizing: border-box; width: 100%;}
.discussion-header { font-weight: 500; font-size: 15px; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 10px; color: #fff; letter-spacing: 0.5px; display:flex; justify-content: space-between; align-items: center;}
#message-list { flex: 1; overflow-y: auto; overflow-x: hidden; margin-bottom: 15px; display: flex; flex-direction: column; gap: 12px; padding-right: 5px; }

/* 自定义滚动条 */
#message-list::-webkit-scrollbar { width: 5px; }
#message-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.discussion-input-area {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
#discussion-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}
#discussion-input::placeholder { color: rgba(255,255,255,0.4); }
#discussion-input:focus {
    border-color: #4facfe;
    background: rgba(0, 0, 0, 0.4);
}

/* 消息气泡与头像 */
.message-with-avatar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }

.message-with-avatar.me { flex-direction: row-reverse; }
.message-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 75%;
    word-break: break-all;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.message-with-avatar.me .message-bubble { 
    background: linear-gradient(135deg, #007AFF 0%, #0056b3 100%); 
    color: white; 
    border-top-right-radius: 4px; 
}
.message-with-avatar.others .message-bubble { 
    background: rgba(255, 255, 255, 0.12); 
    color: rgba(255,255,255,0.95); 
    border-top-left-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08); 
}

/* 文件卡片样式 (深色模式优化) */
.file-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff !important;
    text-decoration: none !important;
    margin-top: 8px;
    transition: all 0.25s;
}
.file-card:hover {
    border-color: #4facfe;
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.file-card-icon { font-size: 24px; }
.file-card-info { flex: 1; overflow: hidden; }
.file-card-name { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; margin-bottom: 2px;}
.file-card-size { font-size: 11px; opacity: 0.5; }

/* 人员列表样式 */
#discussion-user-list {
    display: none;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    margin-bottom: 15px;
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}
#discussion-user-list::-webkit-scrollbar { width: 4px; }
#discussion-user-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}
.user-item:hover { background: rgba(255,255,255,0.05); }
.user-item:last-child { border-bottom: none; }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
    transition: all 0.3s;
}

/* 说话时头像高亮 */
.user-item.speaking .user-avatar {
    box-shadow: 0 0 0 2px #67c23a, 0 4px 12px rgba(103,194,58,0.4);
}

.user-name {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mic-icon { font-size: 14px; opacity: 0.5; }
.mic-icon.on { opacity: 1; filter: drop-shadow(0 0 2px #67c23a); }
.mic-icon.off { opacity: 1; color: #f56c6c; }

.speaking-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #67c23a;
    display: none;
    box-shadow: 0 0 8px #67c23a;
}
.user-item.speaking .speaking-dot {
    display: block;
    animation: speaker-pulse 1.2s infinite;
}
@keyframes speaker-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}
.user-status-dot {
    width: 8px;
    height: 8px;
    background: #00e676;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px #00e676;
}
