/* 中点字符(·)字体修正 — 微软雅黑对 U+00B7 渲染异常，回退至 Arial 的标准圆形小点 */
@font-face {
    font-family: "圆点修正";
    src: local("Arial");
    unicode-range: U+00B7;
}

/* 左侧气泡（助手）— 极浅灰底 + 左侧灰色粗边框，模拟折叠面板质感 */
.el-bubble-start .el-bubble-content-wrapper .el-bubble-content {
    background: #FAFAFA !important;
    border: 1px solid #CCCCCC !important;
    border-left: 0.3em solid #CCCCCC !important;
    border-radius: 0.5em !important;
    box-shadow: none !important;
    position: relative !important;
    overflow: hidden !important;
    color: #111111 !important;
    font-weight: bold !important;
}

/* 左侧气泡角标 — 与边框灰色统一 */
.el-bubble-start .el-bubble-content-corner.el-bubble-content-borderless::before {
    border-color: transparent #CCCCCC transparent transparent !important;
    border-width: 8px !important;
    opacity: 1 !important;
}

/* 右侧气泡（用户）— 白底 + 灰色上边框，与助手气泡形成层级区分 */
.el-bubble-end .el-bubble-content-wrapper .el-bubble-content {
    background: #FFFFFF !important;
    border: 1px solid #CCCCCC !important;
    border-top: 0.3em solid #CCCCCC !important;
    border-radius: 0.5em !important;
    box-shadow: none !important;
    position: relative !important;
    overflow: hidden !important;
    color: #111111 !important;
    font-weight: bold !important;
}

/* 右侧气泡角标 — 方向镜像，灰色统一 */
.el-bubble-end .el-bubble-content-corner.el-bubble-content-borderless::before {
    border-color: transparent transparent transparent #CCCCCC !important;
    border-width: 8px !important;
    opacity: 1 !important;
}

/* 气泡内 Markdown 渲染容器 — 微软雅黑加粗，高对比文字色 */
.el-bubble-content .markdown-body {
    background: transparent !important;
    color: #111111 !important;
    padding: 12px 16px !important;
    position: relative;
    z-index: 2;
    line-height: 1.8em;
    font-size: 1em;
    font-family: "圆点修正", "Microsoft YaHei", "Arial", sans-serif !important;
    font-weight: bold !important;
    letter-spacing: 0.03em;
}

/* 链接 — 蓝色加粗，下划线暗示可交互 */
.el-bubble-content .markdown-body a {
    color: #0055b3 !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(0, 85, 179, 0.4) !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
}

.el-bubble-content .markdown-body a:hover {
    color: #003d80 !important;
    border-bottom-color: #003d80 !important;
}

/* 行内代码 — 浅灰底，纯黑等宽字体，与正文形成视觉断层便于识别 */
.el-bubble-content .markdown-body code {
    background: #F0F0F0 !important;
    border: 1px solid #CCCCCC !important;
    border-radius: 0.3em !important;
    padding: 2px 6px !important;
    color: #000000 !important;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace !important;
    font-size: 0.85em;
    font-weight: bold !important;
}

/* 引用块 — 左侧灰色粗竖线，深灰斜体文字表示引述语境 */
.el-bubble-content .markdown-body blockquote {
    border-left: 0.3em solid #CCCCCC !important;
    background: #FAFAFA !important;
    color: #555555 !important;
    margin: 16px 0 !important;
    padding: 10px 16px !important;
    border-radius: 0 0.5em 0.5em 0 !important;
    font-style: italic !important;
    font-weight: bold !important;
}

/* 标题 — 纯黑加粗，灰色上边框划分内容层级（与目标 h1 风格一致） */
.el-bubble-content .markdown-body h1,
.el-bubble-content .markdown-body h2,
.el-bubble-content .markdown-body h3,
.el-bubble-content .markdown-body h4 {
    color: #000000 !important;
    font-family: "圆点修正", "Microsoft YaHei", "Arial", sans-serif !important;
    font-weight: bold !important;
    border-bottom: none !important;
    border-top: 0.3em solid #CCCCCC !important;
    padding-top: 0.5em !important;
    padding-bottom: 0 !important;
    margin: 20px 0 14px 0 !important;
}

/* 列表容器 — 清除默认内边距 */
.el-bubble-content .markdown-body ul,
.el-bubble-content .markdown-body ol {
    padding-left: 1.5em !important;
    margin: 14px 0 !important;
}

/* 列表项 — 加粗高对比文字，隐藏原始标记以使用自定义菱形 */
.el-bubble-content .markdown-body li {
    margin: 0.7em 0 !important;
    color: #111111 !important;
    font-weight: bold !important;
    list-style-type: none !important;
    position: relative !important;
    padding-left: 1.5em !important;
}

/* 列表红色菱形标记 — 无序与有序统一使用菱形作为醒目视觉锚点 */
.el-bubble-content .markdown-body ul li::before,
.el-bubble-content .markdown-body ol li::before {
    content: "♦" !important;
    color: #CC0000 !important;
    font-size: 1em !important;
    position: absolute !important;
    left: 0 !important;
    top: 0.1em !important;
}

/* 表格 — 灰色边框体系，表头浅灰底加粗 */
.el-bubble-content .markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    border: 1px solid #CCCCCC;
    font-family: "圆点修正", "Microsoft YaHei", "Arial", sans-serif !important;
}

.el-bubble-content .markdown-body th {
    background: #F0F0F0 !important;
    color: #000000 !important;
    padding: 10px 12px;
    border-bottom: 0.2em solid #CCCCCC;
    font-weight: bold !important;
}

.el-bubble-content .markdown-body td {
    padding: 8px 12px;
    color: #111111 !important;
    border-bottom: 1px solid #EEEEEE;
    font-weight: bold !important;
}

.el-bubble-content .markdown-body tr:hover {
    background: #FAFAFA !important;
}

/* 气泡悬停 — 去除位移动画，仅加深边框色提供克制的交互反馈 */
.el-bubble-start .el-bubble-content-wrapper:hover .el-bubble-content,
.el-bubble-end .el-bubble-content-wrapper:hover .el-bubble-content {
    transform: none !important;
    transition: border-color 0.2s ease !important;
    box-shadow: none !important;
    border-color: #999999 !important;
}

/* 分隔线 — 与标题上边框同色系 */
.el-bubble-content .markdown-body hr {
    height: 0.15em;
    background: #CCCCCC !important;
    border: none;
    margin: 20px 0;
}

/* 加粗文字 — 纯黑最高对比 */
.el-bubble-content .markdown-body strong {
    color: #000000 !important;
    font-weight: bold !important;
    background: transparent !important;
}

/* 移动端适配 — 缩小字号与间距，适应窄屏 */
@media (max-width: 768px) {
    .el-bubble-start .el-bubble-content-wrapper .el-bubble-content,
    .el-bubble-end .el-bubble-content-wrapper .el-bubble-content {
        border-radius: 0.4em !important;
        margin: 2px 0 !important;
    }

    .el-bubble-content .markdown-body {
        padding: 10px 14px !important;
        font-size: 0.95em;
        line-height: 1.5em;
    }
}

/* 段落 — 段与段之间留出明显空行间距，提升阅读节奏感 */
.el-bubble-content .markdown-body p {
    margin: 14px 0 !important;
}

/* 折叠面板 — 参照全局折叠面板组件：极浅灰底 + 左侧灰色粗边框，菱形指示器替代默认箭头 */
.el-bubble-content .markdown-body details {
    background: #FAFAFA !important;
    padding: 0.8em !important;
    margin: 1em 0 !important;
    border-left: 0.3em solid #CCCCCC !important;
    border-radius: 0.5em !important;
    box-sizing: border-box !important;
}

.el-bubble-content .markdown-body summary {
    color: #000000 !important;
    font-size: 1.2em !important;
    font-weight: bold !important;
    cursor: pointer !important;
    padding: 0.5em 0 0.5em 1.5em !important;
    list-style: none !important;
    position: relative !important;
}

/* 跨浏览器隐藏默认箭头 */
.el-bubble-content .markdown-body summary::-webkit-details-marker {
    display: none !important;
}
.el-bubble-content .markdown-body summary::marker {
    display: none !important;
}

/* 自定义红色菱形指示器，展开时旋转45度 */
.el-bubble-content .markdown-body summary::before {
    content: "♦" !important;
    color: #CC0000 !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) rotate(0deg) !important;
    transition: transform 0.2s ease-in-out !important;
}

.el-bubble-content .markdown-body details[open] > summary::before {
    transform: translateY(-50%) rotate(45deg) !important;
}

.el-bubble-content .markdown-body details[open] > summary {
    margin-bottom: 1em !important;
    border-bottom: 0.1em solid #EEEEEE !important;
}

@media (max-width: 768px) {
    .el-bubble-content .markdown-body summary {
        font-size: 1.1em !important;
    }
}