:root { 
    --primary: #fe2c55; 
    --primary-hover: #e0264d;
    --bg: #f8f9fa; 
    --card-bg: #ffffff; 
    --text: #202124; 
    --text-light: #5f6368;
    --border: #dadce0;
    --mic-active: #ff4757;
}

/* 页面主体：强制全屏且禁止外部滚动 */
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    display: flex; flex-direction: column; 
    height: 100vh; margin: 0; 
    background: var(--bg); color: var(--text); 
    overflow: hidden; 
}

/* 顶部 Header */
#header { 
    height: 64px; background: #fff; 
    display: flex; align-items: center; padding: 0 24px; gap: 20px; 
    border-bottom: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.status-group { display: flex; align-items: center; background: #f1f3f4; padding: 6px 12px; border-radius: 20px; gap: 8px; }
.status-label { color: var(--primary); font-weight: 800; font-size: 12px; }

/* 主区域布局 */
#main { 
    display: flex; flex: 1; 
    overflow: hidden; 
    padding: 12px; gap: 12px; 
    min-height: 0; 
}

/* 面板通用样式 */
#left, #right, #activity-panel { 
    background: var(--card-bg); border-radius: 12px;
    border: 1px solid var(--border); display: flex; flex-direction: column;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    overflow: hidden; 
}

#left { width: 360px; }
#activity-panel { width: 280px; }
#right { flex: 1; min-width: 0; }

.section-title { padding: 16px; margin: 0; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: bold; flex-shrink: 0; }

/* 独立滚动区域实现 */
#comments, #user-list, #result-box { 
    flex: 1; 
    overflow-y: auto; 
    padding: 12px; 
    scrollbar-width: thin; 
}

/* Webkit 滚动条美化 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }

/* 弹幕卡片 */
.comment { 
    padding: 12px; margin-bottom: 8px; background: #fff; 
    border: 1px solid var(--border); border-radius: 8px; 
    font-size: 14px; cursor: pointer; transition: 0.2s;
    line-height: 1.5;
}
.comment:hover { border-color: var(--primary); background: #fffafa; transform: translateX(4px); }

/* 右侧 Tab 和 语音按钮区域 */
.tabs { 
    display: flex; justify-content: space-between; align-items: center;
    background: #f1f3f4; padding: 8px 16px 0; gap: 4px; flex-shrink: 0; 
}

.tab-group { display: flex; gap: 4px; }

/* 🎤 核心：大图标语音对讲按钮 */
.mic-btn {
    background: var(--mic-active);
    color: white; border: none;
    padding: 10px 24px; border-radius: 50px;
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
    transition: 0.2s;
    touch-action: none; /* 防止移动端长按弹出系统菜单 */
    user-select: none;
    margin-bottom: 8px;
}

.mic-btn:active { transform: scale(0.92); filter: brightness(1.1); }
.mic-icon { font-size: 22px; }
.mic-text { font-weight: bold; font-size: 14px; }

/* 🔴 录音状态波纹提示 */
.recording-indicator {
    display: flex; align-items: center; gap: 10px; padding: 12px;
    background: rgba(255, 71, 87, 0.08); border-radius: 8px;
    margin-bottom: 16px; color: var(--mic-active); font-weight: bold;
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.dot {
    width: 10px; height: 10px; background: var(--mic-active);
    border-radius: 50%; animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}

/* 内容显示区 */
.tab-btn { padding: 12px 20px; cursor: pointer; border: none; background: transparent; font-weight: 600; color: var(--text-light); }
.tab-btn.active { background: #fff; color: var(--primary); border-radius: 8px 8px 0 0; }

.content-area { padding: 20px; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.control-panel { background: #f8f9fa; padding: 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--border); flex-shrink: 0; }
.control-row { display: flex; gap: 8px; flex-wrap: wrap; }

#result-box { 
    white-space: pre-wrap; line-height: 1.8; font-size: 15px; color: #3c4043;
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
}

/* 表单组件样式 */
input, select { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); outline: none; }
button { padding: 8px 16px; border-radius: 8px; border: none; background: var(--primary); color: #fff; cursor: pointer; font-weight: 600; transition: 0.2s; }
button:hover { background: var(--primary-hover); }

/* 活跃用户卡片 */
.user-card { padding: 10px; margin-bottom: 8px; background: #f8f9fa; border: 1px solid var(--border); border-radius: 8px; }
.user-info-row { display: flex; justify-content: space-between; align-items: center; }
.user-name { font-weight: 600; font-size: 13px; }
.user-time { color: var(--text-light); font-size: 11px; }

.loading { color: var(--primary); text-align: center; padding: 20px; font-weight: bold; }