body {
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #f0f0f0;
    /* 统一背景色 */
}

/* ========== 左侧面板 ========== */
.left-panel {
    width: 300px;
    height: 100vh;
    overflow-y: auto;
    background-color: #f0f0f0;
    padding: 15px;
    box-sizing: border-box;
}

/* ========== 右侧面板 ========== */
.right-panel {
    width: 300px;
    height: 100vh;
    overflow-y: auto;
    background-color: #f0f0f0;
    /* 与左侧面板一致 */
    padding: 15px;
    box-sizing: border-box;
}

/* ========== 中间媒体容器 ========== */
#media-container {
    flex: 1;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    position: relative;
    /* 设置最小尺寸 */
    min-width: 400px;
    min-height: 300px;
}

#person-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ========== 字幕容器样式 ========== */
#subtitle-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 18px;
    max-width: 80%;
    text-align: center;
    word-wrap: break-word;
    display: none;
    /* 默认隐藏 */
    z-index: 10;
    /* 确保在数字人视频之上 */
}

/* 显示时的样式 */
#subtitle-container:not(.hidden) {
    display: block;
}

/* ========== 通用组件样式 ========== */
/* --- 下拉框 --- */
.dropdown {
    padding: 8px 16px;
    margin: 5px 0;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f8f8f8;
    font-size: 14px;
    cursor: pointer;
}

.dropdown:focus {
    outline: none;
    border-color: #4CAF50;
}

/* --- 按钮 --- */
.button {
    padding: 8px 16px;
    margin: 5px 0;
    width: 100%;
    box-sizing: border-box;
}

/* --- 文本区域 --- */
.custom-text-area {
    margin-top: 15px;
}

.custom-text-area textarea {
    width: 100%;
    height: 100px;
    padding: 8px;
    margin-bottom: 5px;
    resize: vertical;
    box-sizing: border-box;
}

/* --- 按钮组 --- */
.custom-text-buttons {
    display: flex;
    gap: 10px;
}

.custom-text-buttons button {
    flex: 1;
}

/* --- 隐藏文件输入 --- */
.hidden-file-input {
    display: none;
}

/* --- 标题 --- */
.section-title {
    margin-top: 15px;
    font-weight: bold;
    color: #333;
}

/* ========== 左侧面板特有样式 ========== */
/* 按住说话按钮 */
#holdToTalkBtn {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
    padding: 8px 16px;
    width: 100%;
    box-sizing: border-box;
}

#holdToTalkBtn:active {
    background-color: #45a049;
}

/* 文本结果显示区域 */
#speechResult {
    margin-top: 15px;
    padding: 10px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 50px;
    max-height: 150px;
    overflow-y: auto;
    word-wrap: break-word;
}

/* ========== 右侧面板特有样式 ========== */
.recording-queue {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.queue-placeholder {
    color: #999;
    text-align: center;
    margin: 0;
    padding: 20px 0;
}

.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #4CAF50;
}

.queue-item.status-pending {
    border-left-color: #4CAF50;
}

.queue-item.status-recording {
    border-left-color: #2196F3;
}

.queue-item.status-completed {
    border-left-color: #4CAF50;
}

.queue-item.status-failed {
    border-left-color: #f44336;
}

.queue-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.queue-item-status {
    font-size: 12px;
    font-weight: bold;
}

.queue-item-status.status-pending::before {
    content: "⏳";
}

.queue-item-status.status-recording::before {
    content: "⏺️";
}

.queue-item-status.status-completed::before {
    content: "✅";
}

.queue-item-status.status-failed::before {
    content: "❌";
}

.offline-buttons {
    display: flex;
    gap: 10px;
}

.offline-buttons .button {
    flex: 1;
}