/* ================== 输入区布局（响应式） ================== */
.input-wrapper {
    display: flex;
    align-items: flex-end; /* 底部对齐，输入框变高时按钮不动 */
    gap: 8px;
    width: 98%;
    margin: 0 auto 10px;
    padding: 0 5px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* 左侧工具按钮组 */
.toolbar-left {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    align-self: flex-end; /* 始终底部对齐 */
    padding-bottom: 4px; /* 微调与输入框底部对齐 */
}

/* 右侧发送/语音按钮组 */
.toolbar-right {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    align-self: flex-end; /* 始终底部对齐 */
    padding-bottom: 4px; /* 微调与输入框底部对齐 */
}

/* 中间输入框容器 */
.input-box {
    flex: 1;
    min-width: 0; /* 防止 flex 子项溢出 */
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 14px;
    min-height: 40px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

/* ================== 附件预览区域 ================== */
.attachment-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    max-height: 120px;
    overflow-y: auto;
}

.attachment-preview.hidden {
    display: none;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #e8f0fe;
    border-radius: 8px;
    font-size: 13px;
    color: #1a73e8;
    max-width: 200px;
}

.attachment-item .file-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attachment-item .file-icon i {
    font-size: 14px;
    color: #1a73e8;
}

.attachment-item .file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-item .remove-btn {
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: #5f6368;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.attachment-item .remove-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #d93025;
}

.input-box:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

/* 工具栏按钮 */
.toolbar-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: #5f6368;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

/* 确保图标显示 */
.toolbar-btn i {
    color: inherit;
    font-size: 18px;
}

.toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #202124;
}

.toolbar-btn.active {
    background: rgba(26, 115, 232, 0.15);
    color: #1a73e8;
}

/* 圆形按钮（发送/语音/停止） */
.toolbar-btn.circle-btn {
    background-color: #1a73e8;
    color: white;
}

.toolbar-btn.circle-btn:hover {
    background-color: #1557b0;
}

.toolbar-btn.circle-btn i {
    font-size: 18px;
    color: white;
}

/* 录音模式容器 */
.record-wrapper {
    width: 98%;
    margin: 0 auto 10px;
    padding: 0 5px;
    box-sizing: border-box;
}

.record-wrapper .tooltip {
    width: 100%;
    padding: 12px;
    border-radius: 24px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

/* ================== 移动端响应式 ================== */
@media (max-width: 600px) {
    .input-wrapper {
        flex-wrap: wrap;
        gap: 6px;
        padding: 0 8px;
        width: 100%;
    }

    /* 移动端：输入框独占一行 */
    .input-box {
        order: 1;
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        padding: 12px 14px;
        min-height: 40px;
    }

    /* 移动端：按钮在下方一行 */
    .toolbar-left {
        order: 2;
        padding-bottom: 0;
    }

    .toolbar-right {
        order: 3;
        margin-left: auto;
        padding-bottom: 0;
    }

    .toolbar-btn {
        width: 36px;
        height: 36px;
    }

    .toolbar-btn i {
        font-size: 16px;
    }
}

/* ================== 弹出菜单 ================== */
.popup-menu {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    max-width: 280px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 2000;
    padding: 8px 0;
}

.popup-menu .menu-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #202124;
    transition: background 0.15s;
}

.popup-menu .menu-item:hover {
    background: #f1f3f4;
}

.popup-menu .menu-item i {
    width: 20px;
    text-align: center;
    color: #5f6368;
}

.popup-menu .menu-item.selected {
    background: rgba(26, 115, 232, 0.08);
    color: #1a73e8;
}

.popup-menu .menu-item.selected i {
    color: #1a73e8;
}

/* 绘图模型菜单项 */
.popup-menu .model-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.popup-menu .model-item .model-vendor {
    font-size: 11px;
    color: #80868b;
}

.popup-menu .model-item .model-name {
    font-weight: 500;
}

/* 菜单分隔线 */
.popup-menu .menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

/* 菜单开关项 */
.popup-menu .menu-toggle {
    justify-content: flex-start;
}

.popup-menu .menu-toggle .toggle-indicator {
    margin-left: auto;
    width: 36px;
    height: 20px;
    background: #dadce0;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
}

.popup-menu .menu-toggle .toggle-indicator::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.popup-menu .menu-toggle.enabled .toggle-indicator {
    background: #1a73e8;
}

.popup-menu .menu-toggle.enabled .toggle-indicator::after {
    transform: translateX(16px);
}

/* 菜单内嵌选择器 */
.popup-menu .menu-select {
    justify-content: flex-start;
    padding: 8px 16px;
}

.popup-menu .menu-select > span {
    min-width: 32px;
}

.popup-menu .menu-inline-select {
    margin-left: auto;
    padding: 4px 6px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    background: #f8f9fa;
    font-size: 12px;
    color: #202124;
    cursor: pointer;
    outline: none;
    min-width: 50px;
}

.popup-menu .menu-inline-select:hover {
    border-color: #1a73e8;
}

.popup-menu .menu-inline-select:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* ================== Prompt 模态框 ================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #202124;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: #5f6368;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* 加宽的模态框 */
.prompt-modal-wide {
    max-width: 700px;
}

/* 模型选择器 */
.prompt-model-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
}

.prompt-model-selector label {
    font-size: 13px;
    color: #5f6368;
    white-space: nowrap;
}

.prompt-model-selector select {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    min-width: 150px;
    cursor: pointer;
}

.prompt-model-selector select:focus {
    outline: none;
    border-color: #1a73e8;
}

/* 简化的prompt列表（表格样式，每行4个） */
.prompt-list-simple {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
    border-radius: 8px;
}

.prompt-cell {
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #202124;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 奇数行底色（每行4个） */
.prompt-cell:nth-child(8n+1),
.prompt-cell:nth-child(8n+2),
.prompt-cell:nth-child(8n+3),
.prompt-cell:nth-child(8n+4) {
    background: #f0f4f8;
}

/* 偶数行底色（每行4个） */
.prompt-cell:nth-child(8n+5),
.prompt-cell:nth-child(8n+6),
.prompt-cell:nth-child(8n+7),
.prompt-cell:nth-child(8n) {
    background: #e8eef3;
}

.prompt-cell:hover {
    background: #d4e4f7 !important;
}

.prompt-cell.selected {
    background: rgba(26, 115, 232, 0.25) !important;
    color: #1a73e8;
    font-weight: 500;
    box-shadow: inset 0 0 8px rgba(26, 115, 232, 0.4);
}

/* ================== Tab 切换样式 ================== */
.prompt-tabs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    padding-right: 12px;
}

.prompt-tabs-header .modal-close-btn {
    position: static;
    margin: 0;
}

.prompt-tabs {
    display: flex;
    padding: 0 12px;
}

.prompt-tab {
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #5f6368;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompt-tab:hover {
    color: #1a73e8;
    background: rgba(26, 115, 232, 0.05);
}

.prompt-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.prompt-tab i {
    font-size: 14px;
}

.prompt-tab-content {
    display: none;
}

.prompt-tab-content.active {
    display: grid;
}

/* ================== 图像 Prompt 列表样式 ================== */
.prompt-list-image {
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
    padding: 4px;
}

.prompt-list-image.active {
    display: grid;
}

.image-prompt-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8f9fa;
}

.image-prompt-cell:hover {
    background: #e8f0fe;
    transform: translateY(-2px);
}

.image-prompt-cell.selected {
    background: rgba(26, 115, 232, 0.15);
    box-shadow: 0 0 0 2px #1a73e8;
}

.image-prompt-thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    background: #e0e0e0;
}

.image-prompt-title {
    display: none;
}

/* 手机端：每行4个 */
@media (max-width: 768px) {
    .prompt-list-image {
        grid-template-columns: repeat(4, 1fr);
    }

    .image-prompt-thumb {
        width: 64px;
        height: 64px;
    }
}

/* 绘图模型选择器 */
.draw-model-selector {
    display: flex;
    align-items: center;
}

.draw-model-selector select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 160px;
    cursor: pointer;
}

.draw-model-selector select:focus {
    outline: none;
    border-color: #1a73e8;
}

.prompt-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.prompt-editor label {
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
}

.prompt-editor textarea {
    width: 100%;
    height: 200px;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.prompt-editor textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #e0e0e0;
}

.prompt-footer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.prompt-footer-row:last-child {
    justify-content: flex-end;
}

/* 替换词输入框 */
.prompt-replace-input {
    flex: 1;
}

.prompt-replace-input input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}

.prompt-replace-input input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

/* Footer中的模型选择器 */
.prompt-footer-row .prompt-model-selector {
    flex-shrink: 0;
}

.prompt-footer-row .prompt-model-selector select {
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    max-width: 160px;
    background: white;
}

/* 优化按钮 */
.modal-optimize-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: #34a853;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.modal-optimize-btn:hover {
    background: #2d8f47;
}

.modal-optimize-btn:disabled {
    background: #9aa0a6;
    cursor: not-allowed;
}

.modal-optimize-btn i {
    font-size: 14px;
}

/* 发送按钮 */
.modal-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    margin-bottom: 6px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.modal-send-btn:hover {
    background: #1557b0;
}

.modal-send-btn i {
    font-size: 14px;
}

/* 移动端模态框适配 */
@media (max-width: 600px) {
    .modal-container {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .prompt-list-simple {
        grid-template-columns: repeat(3, 1fr);
        height: 175px;
        min-height: 175px;
        max-height: 175px;
    }

    .prompt-list-image {
        height: 175px;
        min-height: 175px;
        max-height: 175px;
    }

    /* 移动端：每行3个，调整行底色 */
    .prompt-cell:nth-child(6n+1),
    .prompt-cell:nth-child(6n+2),
    .prompt-cell:nth-child(6n+3) {
        background: #f0f4f8;
    }

    .prompt-cell:nth-child(6n+4),
    .prompt-cell:nth-child(6n+5),
    .prompt-cell:nth-child(6n) {
        background: #e8eef3;
    }

    .prompt-editor textarea {
        height: 150px;
        min-height: 120px;
    }

    .prompt-editor {
        margin-bottom: 0;
        border-bottom: none;
    }

    .modal-body {
        border-bottom: none;
        padding-bottom: 0;
    }

    .modal-footer {
        padding: 6px 10px;
        gap: 4px;
        border-top: none;
    }

    .prompt-footer-row {
        flex-wrap: wrap;
        gap: 4px;
    }

    .prompt-footer-row input,
    .prompt-footer-row select,
    .prompt-footer-row button {
        padding: 6px 8px;
        font-size: 12px;
    }

    .prompt-footer-row .prompt-model-selector select {
        max-width: 120px;
        font-size: 11px;
    }

    .modal-send-btn {
        flex: 1;
    }

    /* 移动端 Tab 样式 */
    .prompt-tabs {
        padding: 0 8px;
    }

    .prompt-tab {
        padding: 10px 12px;
        font-size: 13px;
    }

    .prompt-tab i {
        font-size: 13px;
    }

    /* 移动端图像 Prompt 列表：每行4个 */
    .prompt-list-image {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        max-height: 120px;
    }

    .image-prompt-thumb {
        width: 50px;
        height: 50px;
    }

    .image-prompt-title {
        font-size: 11px;
    }

    /* 移动端绘图模型选择器 */
    .draw-model-selector {
        width: 100%;
        margin-bottom: 8px;
    }

    .draw-model-selector select {
        width: 100%;
    }
}

.brush_button {
    display: flex;
    align-items: left;
    padding-left: 0px;
    padding: 2px;
    background-color: transparent;
    border: 0;
    background-image: url('../img/brush-icon.png');
    background-size: contain; /* 调整背景图片的大小 */
    background-repeat: no-repeat; /* 防止背景图片重复 */
    background-position: center; /* 将背景图片居中 */
    width: 22px;
    height: 24px;
    margin-left: 0px;
}

.brush_button, button {
    cursor: pointer;
}

.brush_button button img {
    width: 22px;
    height: 24px;
}


.uploadButton {
    display: flex;
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    padding: 0; /* Remove padding */
    background-color: transparent;
    border: 0;
    position: absolute;
    top: 50%; /* Position at 50% from the top */
    right: 56px;
    transform: translateY(-50%); /* Offset by half of its height */
    background-image: url('../img/camera-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 24px;
    height: 24px;
}


/* 旧版 input-container 样式（保留兼容性） */
.input-container {
    display: flex;
    flex: 1;
    align-items: flex-end;
}

/* 新布局下 input-container 继承 input-top-row 样式 */
.input-top-row.input-container {
    /* 额外样式 */
}


.input-container.pressed {
    background-color: #e9edef; /* 容器在按钮按住时的背景颜色 */
}


.input-container select {
    border: none;
    outline: none;
    width: 25px;
    font-size: 16px;
    margin-right: 5px;
}

.input-wrapper .input-container.disabled {
    opacity: 0.6;
    pointer-events: none;
    background-color: #cccccc !important;
}

.input-wrapper .input-container.disabled * {
    cursor: not-allowed !important;
}
/* assistantDropdown 已移除，样式已清理 */

.input-container input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
}


.tooltip {
    position: relative;
    display: inline-block;
    border: 0;
    background-color: #fff;
    width: 100%;
    height: 100%;
    border-radius:15px;
    cursor: pointer; /* 正常鼠标样式 */
}

.tooltip.pressed {
    background-color: #e9edef; /* 改变背景颜色 */
}

.tooltip button {
    width: 100px;
    height: 30px;
}



#voice-txt {
    width: 100%;
    height: 24px; /* 默认单行高度 */
    min-height: 24px;
    max-height: 200px;
    overflow-y: hidden;
    resize: none;
    padding: 0;
    border: none;
    outline: none;
    background-color: transparent;
    font-size: 16px;
    line-height: 24px; /* 固定行高确保单行 */
    font-family: inherit;
}

/* 语音框区域 */

.record-btn-control {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    margin-bottom: 10px;
  }



.button-disabled {
    background-color: #cccccc !important; /* 灰色背景 */
    /* 你可以添加更多样式，如改变文字颜色等 */
    color: #666666 !important; /* 深灰色文字 */
}

/* 按钮样式已在 .toolbar-btn.circle-btn 中定义 */
#record-btn-control,
#text-btn-control,
#stop-btn {
    /* 继承 .toolbar-btn.circle-btn 样式，不再使用 absolute 定位 */
}

/* 确保textarea随内容自动增高 */
textarea {
    min-height: 30px; /* 最小高度 */
    height: auto;
    overflow: hidden;
    border: 0;
    outline: none;
}

/* 当textarea内容改变时，自动调整高度 */
textarea:empty:before {
    content: attr(placeholder);
    white-space: pre-wrap;
}

textarea:focus:before {
    content: none;
}


#record_container {
    display: none; /* 初始隐藏 */
    height: 43px;
    /* 确保 record_container 的其他样式与 input-container 相符合 */
}

.voice-container {
    /* 假设 input-wrapper 的 top 是已知的，这里我们让 voice-container 浮动在 20px 之上 */
    /* 你可能需要根据实际的布局调整这个值 */
    width: 80%; /* 或根据具体需求调整宽度 */
    z-index: 2000; /* 确保它能浮在所有内容之上 */
    /* 添加其他样式以美化或清晰展示 */
    display: none; /* 默认隐藏 */
    flex-direction: column; /* 使子元素垂直排列 */
    justify-content: center; /* 在主轴（垂直）方向进行居中对齐 */

    position: fixed; /* 使用fixed定位，使元素相对于视口固定位置 */
    margin-left: 10%;
    margin-top: 20px;
    margin-bottom: 20px;
    background-color: #f6f6f6; /* 背景颜色设为白色 */
    height: 180px; /* 高度设为100px */
    border-radius: 10px; /* 圆角大小设为10px */
}

#voice-container_outer {
    position: absolute;
    /* 假设 input-wrapper 的 top 是已知的，这里我们让 voice-container 浮动在 20px 之上 */
    /* 你可能需要根据实际的布局调整这个值 */
    width: 98%; /* 或根据具体需求调整宽度 */
    z-index: 2000; /* 确保它能浮在所有内容之上 */
    /* 添加其他样式以美化或清晰展示 */
    display: none; /* 默认隐藏 */
    flex-direction: column; /* 使子元素垂直排列 */
    justify-content: center; /* 在主轴（垂直）方向进行居中对齐 */

    position: fixed; /* 使用fixed定位，使元素相对于视口固定位置 */
    bottom: 68px; /* 与视口顶部的距离设为50% */
    margin-left: 1%;
    background-color: rgba(100, 100, 100, 0.5); /* 白色背景，50%的透明度 */
    height: 220px; /* 高度设为100px */
    border-radius: 10px; /* 圆角大小设为10px */
}


#voice_result {
    align-items: center; /* 在交叉轴（水平）方向进行居中对齐 */
    width: 96%; /* 使文本框宽度稍小于容器宽度，给予一些内边距 */
    height: 70px; /* 文本框的高度 */
    margin-top: 15px; /* 与其他元素的间距 */
    margin-left: 2%; /* 与其他元素的间距 */
    padding: 5px; /* 文本框内的空白 */
    border: 1px solid #ccc; /* 文本框的边框 */
    border-radius: 5px; /* 文本框的圆角 */
    resize: none; /* 禁止调整文本框大小 */
    box-sizing: border-box; /* 使宽度和高度包含内边距和边框 */
}



#voice_status {
    color: gray;
    font-size: 13.5px;
    margin-top: 15px;
    margin-left: 10px;
    display: inline-block; /* 使得这个div不占据全宽 */
}

/* 当要显示 voice-container 时, JavaScript 会添加此类 */
.show-voice-container {
    display: block;
}




#volume-container{
    display: block;
    margin-left: 20px;
    margin-top: 10px;
    border: 0px solid #000; /* 给canvas添加一个轮廓以便更容易看到边缘 */
    width: 200px;
}


#volumeWaveform {
    display: block;
    width: 100%;
}

#voice_status_display {
    width: 98%;
    display: flex; /* 设置flexbox布局 */
    align-items: center; /* 子元素垂直居中 */
    justify-content: flex-start; /* 子元素靠左对齐 */
}

/* 可选样式 */
canvas {
    border: 0px solid #000; /* 给canvas元素加边框以便于识别 */
}

.circle-button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #445bdd;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    border: none;
}

.circle-button:hover {
    background-color: #5fb0d9;
}

.circle-button i {
    font-size: 20px;
    color: white;
}


/* ================== 待发送消息提示条 ================== */
.pending-message-banner {
    display: none;
    flex-direction: column;
    gap: 8px;
    width: 98%;
    max-width: calc(100% - 16px);
    margin: 0 auto 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #e8f0fe 0%, #f0f4ff 100%);
    border: 1px solid rgba(26, 115, 232, 0.3);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.pending-message-banner.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: pendingBannerSlideIn 0.3s ease-out;
}

@keyframes pendingBannerSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 头部：图标 + 标题 + 清空按钮 */
.pending-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pending-message-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #1a73e8;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pendingIconPulse 2s ease-in-out infinite;
}

@keyframes pendingIconPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(26, 115, 232, 0);
    }
}

.pending-message-icon i {
    font-size: 12px;
    color: white;
}

.pending-message-title {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #1a73e8;
}

.pending-message-clear-all {
    padding: 4px 10px;
    border: none;
    background: rgba(217, 48, 37, 0.1);
    border-radius: 6px;
    cursor: pointer;
    color: #d93025;
    font-size: 12px;
    transition: all 0.2s;
}

.pending-message-clear-all:hover {
    background: rgba(217, 48, 37, 0.2);
}

/* 消息列表 */
.pending-message-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 单条消息项 */
.pending-message-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(26, 115, 232, 0.15);
}

.pending-message-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #1a73e8;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.pending-message-item .pending-message-preview {
    flex: 1;
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-message-item .pending-message-preview i {
    color: #1a73e8;
    margin-right: 4px;
}

.pending-message-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: #999;
    font-size: 11px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.pending-message-remove:hover {
    background: rgba(217, 48, 37, 0.15);
    color: #d93025;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .pending-message-banner {
        width: 100%;
        padding: 8px 12px;
        gap: 6px;
        margin-bottom: 6px;
    }

    .pending-message-header {
        gap: 8px;
    }

    .pending-message-icon {
        width: 24px;
        height: 24px;
    }

    .pending-message-icon i {
        font-size: 10px;
    }

    .pending-message-title {
        font-size: 12px;
    }

    .pending-message-clear-all {
        padding: 3px 8px;
        font-size: 11px;
    }

    .pending-message-list {
        gap: 4px;
    }

    .pending-message-item {
        padding: 6px 8px;
        gap: 6px;
    }

    .pending-message-index {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .pending-message-item .pending-message-preview {
        font-size: 12px;
    }

    .pending-message-remove {
        width: 20px;
        height: 20px;
    }
}







