.bottom-container,
header {
    transition: .3s ease-in-out
}

.alert-link,
.alert-suggestion a,
.category-nav a,
.filter-nav a,
footer nav a {
    text-decoration: none
}

#iframe-container,
#main-content {
    transition: .3s cubic-bezier(.4, 0, .2, 1)
}

#main-content,
.action-buttons,
.bottom-container,
.iframe-header,
.input-area {
    box-sizing: border-box
}

.video-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 15px 0;
    position: relative;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    background: #000
}

.video-wrapper video::-webkit-media-controls {
    background-color: rgba(0, 0, 0, .5)
}

.video-wrapper::before {
    content: '视频加载中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 14px;
    z-index: 1;
    background: rgba(255, 255, 255, .9);
    padding: 8px 16px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity .3s
}

.welcome-message.minimized {
    transform: translateY(-50%)
}

.chat-ai-message-content td.truncated::after,
.chat-ai-message-content th.truncated::after,
.video-wrapper.loading::before {
    opacity: 1
}

.chat-ai-message-content video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    background-color: #000;
    cursor: pointer
}

.chat-ai-message-content video::-webkit-media-controls {
    background-color: rgba(0, 0, 0, .5);
    border-radius: 0 0 8px 8px
}

.video-fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999
}

.video-fullscreen-container video {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 0
}

.video-fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    z-index: 10000
}

#main-content,
.chart-container,
.chat-container,
header {
    position: relative
}

.chat-ai-message-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
    border-radius: 8px
}

.chat-ai-message-content img.large-image {
    width: 100%;
    object-fit: contain;
    background-color: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1)
}

.chat-container {
    display: none;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent
}


.user-message {
    text-align: right
}

.ai-message-header {
    background-color: #f0f0f0;
    padding: 5px 10px;
    margin-bottom: 10px;
    border-radius: 3px;
    font-size: 12px;
    color: #666
}

.ai-message-content {
    word-wrap: break-word
}

.chat-user-message {
    background-color: #2d65f7;
    color: #fff;
    font-size: 14px;
    float: right;
    clear: both;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.6;
    hyphens: auto;
}

.chat-ai-message-header {
    background-color: #F3F6FC;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    max-width: 100%;
    transition: all 0.3s ease;
    position: relative;
}

/* 脉冲动画效果 - 仅在loading状态下 */
.chat-ai-message-header:not(.completed) {
    animation: pulse-glow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: visible;
}



.chat-ai-message-header::before {
    content: '';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
    margin: 0;
}

/* Loading动画 - 旋转的渐变圆圈 */
.chat-ai-message-header:not(.completed)::before {
    background: conic-gradient(from 0deg, #3b82f6, #8b5cf6, #a855f7, #ec4899, #3b82f6);
    border: none;
    border-radius: 50%;
    animation: 
        loading-spin-gradient 1.2s cubic-bezier(0.4, 0, 0.6, 1) infinite,
        loading-scale-pulse 2.5s ease-in-out infinite,
        rainbow-cycle 4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(59, 130, 246, 0.9),
        0 0 40px rgba(139, 92, 246, 0.6),
        inset 0 0 15px rgba(168, 85, 247, 0.7),
        inset 0 0 0 2px #F3F6FC;
}

/* 内部圆圈现在通过box-shadow实现，不再使用::after */

/* 完成状态的勾选图标 */
.chat-ai-message-header.completed::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20,6 9,17 4,12'%3E%3C/polyline%3E%3C/svg%3E");
    border: none;
    animation: none;
}

/* Loading旋转动画 */
@keyframes loading-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 渐变Loading旋转动画 */
@keyframes loading-spin-gradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 脉冲发光动画 */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.3), 0 0 20px rgba(139, 92, 246, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 0 30px rgba(139, 92, 246, 0.4);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.3), 0 0 20px rgba(139, 92, 246, 0.2);
        transform: scale(1);
    }
}

/* Loading图标缩放脉冲动画 */
@keyframes loading-scale-pulse {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(90deg);
    }
    50% {
        transform: scale(1) rotate(180deg);
    }
    75% {
        transform: scale(1.1) rotate(270deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

/* 彩虹色彩循环动画 */
@keyframes rainbow-cycle {
    0% {
        filter: hue-rotate(0deg) saturate(1.2) brightness(1.1);
    }
    25% {
        filter: hue-rotate(90deg) saturate(1.3) brightness(1.2);
    }
    50% {
        filter: hue-rotate(180deg) saturate(1.4) brightness(1.1);
    }
    75% {
        filter: hue-rotate(270deg) saturate(1.3) brightness(1.2);
    }
    100% {
        filter: hue-rotate(360deg) saturate(1.2) brightness(1.1);
    }
}



/* 已完成状态的勾选图标 */

/* 从index.html提取的内联CSS样式 */
/* 视频包装器样式 */
.video-wrapper {
    width: 100%;
    max-width: 600px; /* 设置最大宽度 */
    margin: 15px 0;
    position: relative;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

/* 视频元素样式 */
.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    background: #000;
}

/* 视频控制器样式 */
.video-wrapper video::-webkit-media-controls {
    background-color: rgba(0, 0, 0, 0.5);
}

/* 加载提示 */
.video-wrapper::before {
    content: '视频加载中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 14px;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-wrapper.loading::before {
    opacity: 1;
}

.chat-ai-message-content video {
    max-width: 100%; /* 限制视频最大宽度 */
    height: auto; /* 自动调整高度 */
    border-radius: 8px; /* 圆角 */
    margin: 10px 0; /* 上下间距 */
    background-color: #000; /* 视频背景色 */
    cursor: pointer; /* 鼠标指针样式 */
}

/* 视频控制器样式优化 */
.chat-ai-message-content video::-webkit-media-controls {
    background-color: rgba(0, 0, 0, 0.5); /* 控制器背景色 */
    border-radius: 0 0 8px 8px; /* 底部圆角 */
}

/* 全屏视频容器样式 */
.video-fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* 全屏视频样式 */
.video-fullscreen-container video {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 0;
}

/* 关闭全屏按钮 */
.video-fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10000;
}

.chat-ai-message-content img {
    max-width: 100%; /* 限制图片最大宽度不超过容器 */
    height: auto; /* 保持图片比例 */
    display: block; /* 块级显示 */
    margin: 10px 0; /* 上下间距 */
    border-radius: 8px; /* 圆角 */
}

.chat-ai-message-content img.large-image {
    width: 100%; /* 占满容器宽度 */
    object-fit: contain; /* 保持图片比例，确保完整显示 */
    background-color: #f5f5f5; /* 图片背景色 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* 添加阴影效果 */
}

@media (max-width: 768px) {
    .chat-ai-message-content img {
        max-width: 95%; /* 移动端稍微缩小最大宽度 */
        margin: 10px auto; /* 居中显示 */
    }
}

.chat-container {
    display: none;
    
    /* 默认隐藏滚动条 */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: transparent transparent; /* Firefox */
    
    /* 设置滚动条过渡效果 */
    transition: scrollbar-color 0.3s ease;
}

.user-message, .ai-message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 15px;
}

.user-message {
    background-color: #2d65f7;
    text-align: right;
    color: white;
}

.ai-message-header {
    background-color: #f0f0f0;
    padding: 5px 10px;
    margin-bottom: 10px;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
}

.ai-message-content {
    word-wrap: break-word;
}

/* 新增的聊天消息样式 */
.chat-message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    display: block;
    visibility: visible;
}

.chat-user-message {
    background-color: #2d65f7;
    color: white;
    font-size: 14px;
    float: right;
    clear: both;
}

.chat-ai-message {
    background-color: #FFFFFF;
    border: 1px solid #e0e0e0;
    float: left;
    clear: both;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    display: block;
    visibility: visible;
}

.chat-ai-message-header {
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 13px;
    color: #6B7280;
    display: inline-block;
    max-width: 100%;
}

.chat-ai-message-content {
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    font-size: 14px;
    width: 100%;
    position: relative;
    overflow: visible;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    display: block;
    visibility: visible;
    color: #374151;
}

/* 删除重复的iframe-container定义，使用后面统一的定义 */

.iframe-title,
.chart-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#close-iframe,
.chart-modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

#close-iframe:hover,
.chart-modal-close:hover {
    color: #1e293b;
    background: rgba(248, 250, 252, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 删除冲突的图表模态框样式定义 - 使用后面的全屏模态框样式 */

/* 调整图表选项区域样式 */
.chart-options {
    background: linear-gradient(135deg, #f1f5f9 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* 主内容样式 */
#main-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px;  /* 默认左右边距10px */
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 底部容器基础样式 */
.bottom-container {
    position: fixed;
    bottom: 0;
    left: 50%;  /* 修改为50% */
    transform: translateX(-50%);  /* 使用transform居中 */
    width: 100%;
    max-width: 800px;
    padding: 20px 10px 10px;
    background: transparent;
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
    border: none;
}

/* 聊天容器样式 */
.chat-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    transition: all 0.3s ease-in-out;
}

/* iframe 拖动条样式优化 */
.iframe-resizer {
    position: absolute;
    left: -6px;
    top: 0;
    width: 6px;
    height: 100%;
    background-color: transparent;
    cursor: col-resize;
    transition: background-color 0.2s;
}

.iframe-resizer:hover,
.iframe-resizer.resizing {
    background-color: #2d65f7;
}

/* 确保 iframe 容器可以被拖动调 */
#iframe-container {
    min-width: 200px;  /* 最小宽度 */
    max-width: 800px;  /* 最大宽度 */
}

/* 修改表格容器样式 */
.table-container {
    width: 100%;
    overflow: hidden; /* 改为 hidden，防止出现双滚动条 */
    margin: 10px 0;
    position: relative;
    max-height: 400px; /* 限制表格最大高度 */
    border: 1px solid #e0e0e0;
    border-radius: 8px; /* 增加圆角 */
    -webkit-overflow-scrolling: touch;
}

/* 表格主体滚动容器 */
.table-scroll-container {
    max-height: 400px; /* 与容器同高 */
    overflow-y: auto;
    overflow-x: auto;
}

/* 表格基础样式 */
.chat-ai-message-content table {
    border-collapse: separate; /* 改为 separate 以支持圆角 */
    border-spacing: 0;
    width: 100%;
    font-size: 14px;
    table-layout: fixed; /* 固定表格布局 */
    position: relative; /* 用于固定表头 */
}

/* 表头样式 */
.chat-ai-message-content thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f5f5f5;
}

.chat-ai-message-content th {
    background: #f5f5f5;
    font-weight: bold;
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e0e0e0;
    position: relative;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-width: 200px; /* 限制最大列宽 */
}

/* 表头第一个单元格左上圆角 */
.chat-ai-message-content th:first-child {
    border-top-left-radius: 8px;
}

/* 表头最后一个单元格右上圆角 */
.chat-ai-message-content th:last-child {
    border-top-right-radius: 8px;
}

/* 单元格样式 */
.chat-ai-message-content td {
    padding: 8px 15px;
    position: relative;
    min-width: 100px; /* 设置最小列宽 */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-width: 200px; /* 限制最大列宽 */
}

/* 列宽调整手柄 */
.chat-ai-message-content th::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    background: transparent;
}

.chat-ai-message-content th:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

/* 斑马纹样式 */
.chat-ai-message-content tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 复制按钮样式 */
.copy-button {
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.copy-button:hover {
    background-color: #e5e5e5;
}

.copy-button.copied {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* 修改操作钮容器样式 */
.action-buttons {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
    overflow-x: auto;
    width: 100%;
    padding: 0 5px;
    box-sizing: border-box;
}

/* 移动端快捷入口按钮样式 */
.mobile-bi-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.mobile-bi-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.mobile-bi-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* 移动端入口列表样式 */
.mobile-entries-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
}

.mobile-entry-item {
    padding: 15px;
    margin: 10px 0;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.mobile-entry-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mobile-entry-item:hover::before {
    transform: scaleY(1);
}

.mobile-entry-item:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
    border-color: #667eea;
}

.mobile-entry-item:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.mobile-entry-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.4;
}

.mobile-entry-desc {
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
}

.mobile-entry-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.mobile-entry-item:hover .mobile-entry-icon {
    opacity: 0.6;
}

/* 隐藏 Webkit 浏览器的滚动条 */
.action-buttons::-webkit-scrollbar {
    display: none;
}

/* 优化按钮间距 */
.action-btn {
    margin-right: 8px;  /* 添加按钮间距 */
    padding: 8px 12px;  /* 调整内边距 */
}

.action-btn:last-child {
    margin-right: 0;  /* 最后一个钮不需要右边距 */
}

/* 优化按钮样式 */
.action-btn {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;  /* 防止按钮字换行 */
    font-size: 14px;
}

/* 修改输入区域样式 */
.input-area {
    display: flex;
    background-color: #fff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}

.chart-container {
    width: 100%;
    height: 400px;
    margin: 15px auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    position: relative;
    background: #fff;
    overflow: hidden;
    pointer-events: auto !important; /* 确保可以交互 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.chart-type-selector{
    margin-bottom: 12px;
}

/* 确保图表容器的父元素可以水平滚动 */
.chat-ai-message-content {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 代码块换行处理 */
.chat-ai-message-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow-x: auto;
    max-width: 100%;
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
}

.chat-ai-message-content code {
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* 长URL处理 */
.chat-ai-message-content a {
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    hyphens: none;
}

/* 长单词和数字处理 */
.chat-ai-message-content {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* 报表数据渲染样式 */
.report-markdown-container {
    margin: 16px 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #2c5aa0;
    color: #2c5aa0;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-item {
    padding: 16px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #2c5aa0;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.report-item:last-child {
    margin-bottom: 0;
}

.report-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.report-metric {
    margin-bottom: 8px;
}

.report-metric strong {
    color: #333;
    font-size: 16px;
}

.report-metric span {
    color: #2c5aa0;
    font-weight: 600;
    font-size: 16px;
}

.report-name {
    margin-bottom: 12px;
}

.report-name strong {
    color: #333;
    font-size: 16px;
}

.report-name span {
    color: #555;
    font-size: 16px;
}

.report-link {
    margin-top: 12px;
}

.report-link strong {
    color: #ffffff;
    font-size: 16px;
}

.report-markdown-btn {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.report-markdown-btn:hover {
    background: #1e3f73;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(44, 90, 160, 0.3);
}

.report-markdown-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(44, 90, 160, 0.3);
}

/* Webkit浏览器的滚动条样式 */
.chat-container::-webkit-scrollbar {
    width: 6px; /* 滚动条宽度 */
}

.chat-container::-webkit-scrollbar-track {
    background: transparent; /* 轨道背景透明 */
}

.chat-container::-webkit-scrollbar-thumb {
    background-color: transparent; /* 初状态下滚动条透明 */
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

/* 滚动时显示滚动条 */
.chat-container:hover::-webkit-scrollbar-thumb,
.chat-container:active::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2); /* 滚动条颜色 */
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Firefox 滚动条停样式 */
.chat-container:hover,
.chat-container:active {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* 确保滚动条在滚动时显示 */
.chat-container.scrolling::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
}

.chat-container.scrolling {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* 欢迎消息样式 */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.welcome-message h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

.welcome-message p {
    margin-bottom: 15px;
}

.welcome-message .highlight {
    color: #007bff;
    font-weight: 500;
}

/* 侧边栏样式 - 现代化设计 */
.sidebar {
  position: fixed;
  top: 30px;
  right: 20px;
  width: 300px;
  max-height: calc(100vh - 60px);
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 12px;
  z-index: 900; /* 低于 iframe header(1001) 但高于主内容 */
  display: flex;
  flex-direction: column;
}

.sidebar.hidden { display: none; }
.sidebar.active { display: flex; }

.sidebar-header { margin-bottom: 8px; }
.sidebar-title { font-size: 16px; font-weight: 600; color: #374151; }

.sidebar .chat-history { flex: 1; overflow-y: auto; padding: 4px; }
.chat-history-title h3 { margin: 8px 0; font-size: 14px; color: #374151; }
.chat-history-item { cursor: pointer; }

@media (max-width: 800px) {
  .sidebar { right: 10px; width: 92vw; top: 10px; max-height: calc(100vh - 20px); }
}

/* 移除旧的侧边栏样式，使用新的现代化设计 */

/* 移动端和PC端响应式样式 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        margin: 0;
    }
    
    .chat-container {
        height: calc(100vh - 120px);
        margin-bottom: 10px;
    }
    
    .input-area {
        padding: 8px;
        margin-top: 5px;
    }
    
    .action-buttons {
        padding: 0 2px;
    }
    
    .action-btn {
        padding: 6px 10px;
        font-size: 12px;
        margin-right: 5px;
    }
    
    .chart-container {
        height: 300px;
        margin: 10px 0;
    }
    
    .table-container {
        max-height: 300px;
    }
    

    
    .welcome-message {
        padding: 20px 15px;
        font-size: 14px;
    }
    
    .welcome-message h2 {
        font-size: 20px;
    }
}

@media (min-width: 769px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
    }
    
    .chat-container {
        height: calc(100vh - 200px);
        min-height: 500px;
    }
    
    .input-area {
        padding: 12px;
    }
    
    .action-btn {
        padding: 8px 16px;
    }
    
    .chart-container {
        height: 450px;
    }
}

/* 各种按钮样式 */

.chart-convert-btn {
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: all 0.2s ease;
}

.chart-convert-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.chart-toggle-btn {
    background: #17a2b8;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: all 0.2s ease;
}

.chart-toggle-btn:hover {
    background: #138496;
    transform: translateY(-1px);
}

.visualization-toggle-btn {
    background: #6f42c1;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: all 0.2s ease;
}

.visualization-toggle-btn:hover {
    background: #5a2d91;
    transform: translateY(-1px);
}

/* 聊天消息样式 */
.chat-user-message {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    margin: 10px 0 10px auto;
    max-width: 80%;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0,123,255,0.2);
    position: relative;
}

.chat-ai-message {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 16px;
    border-radius: 18px 18px 18px 4px;
    margin: 10px auto 10px 0;
    max-width: 90%;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.chat-ai-message-content {
    line-height: 1.6;
    color: #333;
}

.chat-ai-message-content p {
    margin: 0 0 12px 0;
}

.chat-ai-message-content p:last-child {
    margin-bottom: 0;
}

/* Markdown 渲染样式 */
.chat-ai-message-content h1,
.chat-ai-message-content h2,
.chat-ai-message-content h3,
.chat-ai-message-content h4,
.chat-ai-message-content h5,
.chat-ai-message-content h6 {
    margin: 20px 0 12px 0;
    color: #333;
    font-weight: 600;
}

.chat-ai-message-content h1 {
    font-size: 24px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.chat-ai-message-content h2 {
    font-size: 20px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 6px;
}

.chat-ai-message-content h3 {
    font-size: 18px;
}

.chat-ai-message-content h4 {
    font-size: 16px;
}

.chat-ai-message-content ul,
.chat-ai-message-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.chat-ai-message-content li {
    margin: 6px 0;
    line-height: 1.5;
}

.chat-ai-message-content blockquote {
    border-left: 4px solid #007bff;
    margin: 16px 0;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
    color: #555;
    font-style: italic;
}

.chat-ai-message-content code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    color: #d63384;
}

.chat-ai-message-content pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
    position: relative;
}

.chat-ai-message-content pre code {
    background: none;
    padding: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.chat-ai-message-content a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.chat-ai-message-content a:hover {
    border-bottom-color: #007bff;
}

.chat-ai-message-content strong {
    font-weight: 600;
    color: #333;
}

.chat-ai-message-content em {
    font-style: italic;
    color: #555;
}

/* 图表模态框样式 */
.chart-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(30,30,30,0.8) 100%);
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-modal.closing {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.chart-modal.closing .chart-modal-content {
    animation: modalFadeOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.chart-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.8);
    animation: modalFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255,255,255,0.2);
}

@keyframes modalFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
        filter: blur(4px);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.95) translateY(-10px);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

@keyframes modalFadeOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.95) translateY(-5px);
        filter: blur(1px);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
        filter: blur(4px);
    }
}

@keyframes chartSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.chart-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 32px;
    height: 32px;
    font-size: 18px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2001;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.chart-modal-close:hover {
    color: #333;
}

.chart-modal .chart-container {
    width: 70vw;
    height: 50vh;
    min-width: 400px;
    min-height: 300px;
    margin: 25px 0;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
    animation: chartSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
    overflow: hidden;
}

.chart-modal .chart-container.loading {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite, pulse 2s infinite;
}

.chart-modal .chart-container.loading::after {
    content: '正在生成图表...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 16px;
    font-weight: 500;
    z-index: 10;
}

/* 响应式图表模态框 */
@media (max-width: 768px) {
    .chart-modal .chart-container {
        width: 85vw;
        height: 45vh;
        min-width: 280px;
        min-height: 200px;
        margin: 20px 0;
        padding: 15px;
    }
    
    .chart-modal-content {
        padding: 20px;
        margin: 15px;
        max-width: 95vw;
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .chart-modal-header {
        padding: 15px 20px;
        margin: -20px -20px 15px -20px;
        border-radius: 16px 16px 0 0;
    }
    
    .chart-options {
        padding: 15px;
        margin-bottom: 15px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误消息样式 */
.error-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 15px 0;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.15), inset 0 1px 0 rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}

/* 成功消息样式 */
.success-message {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 15px 0;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15), inset 0 1px 0 rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}

/* 信息消息样式 */
.info-message {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0c4a6e;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 15px 0;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1001;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
.chat-ai-message-header.completed::before {
    background-image: url("https://megameta-ai.oss-cn-shanghai.aliyuncs.com/over.png");
    animation: none;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


.chat-ai-message-content {
    word-wrap: break-word;
    white-space: nowrap;
    overflow: auto
}

#iframe-container {
    height: 100%;
    box-shadow: -2px 0 10px rgba(0, 0, 0, .1);
    display: flex;
    flex-direction: column;
    border-radius: 20px
}


#web-iframe,
.alert-content {
    flex: 1
}

#main-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px 140px;
    height: calc(100vh);
    overflow: hidden;
}

.bottom-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    padding: 20px 10px 10px;
    background: #f2f5f9;
    z-index: 1000;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-container {
    max-height: 400px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    -webkit-overflow-scrolling: touch
}

.copy-button {
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color .2s
}

.copy-button:hover {
    background-color: #e5e5e5
}

.copy-button.copied {
    background-color: #4caf50;
    color: #fff;
    border-color: #4caf50
}

.action-buttons {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
    overflow-x: auto;
    width: 100%;
    padding: 0 5px
}

.action-buttons::-webkit-scrollbar {
    display: none
}

.action-btn:last-child,
.metric:last-child {
    margin-right: 0
}

.input-area {
    display: flex;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
    width: 100%
}

.chart-container {
    width: 100%;
    height: 400px;
    margin: 15px auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    pointer-events: auto !important;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px
}

.chat-ai-message-content {
    width: 100%;
    -webkit-overflow-scrolling: touch
}

.chat-container::-webkit-scrollbar {
    width: 6px
}

.chat-container::-webkit-scrollbar-track {
    background: 0 0
}

header,
main {
    background-color: transparent;
    max-width: 800px
}

.chat-container::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 3px;
    transition: background-color .3s
}

.chat-container:active::-webkit-scrollbar-thumb,
.chat-container:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, .2)
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important
}

.search-btn img,
.voice-btn img {
    height: 30px;
    vertical-align: middle
}

.chat-container.scrolling,
.chat-container:active,
.chat-container:hover {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent
}

.chat-container.scrolling::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, .2)
}

.welcome-message {
    opacity: 1;
    transform: translateY(0)
}

.welcome-hint {
    height: auto
}

.chat-container {
    height: calc(80vh - 100px);
    overflow-y: auto
}

header {
    padding: 40px 0 20px;
    text-align: center;
    margin: 0 auto;
    z-index: 10
}

header p {
    font-size: 14px;
    margin: 5px 0 0;
    color: #666;
    transition: .3s
}

header.minimized {
    padding: 10px 20px
}

header.minimized h1 {
    font-size: 16px
}

header.minimized p {
    font-size: 12px;
    margin-top: 2px
}

main {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 120px
}

.metrics {
    display: flex;
    -webkit-overflow-scrolling: touch
}

.alerts {
    background: #fff
}

#close-iframe:hover,
.follow-up-btn {
    background-color: #f5f5f5
}

.follow-up-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    align-items: flex-start;
    justify-content: flex-start
}

.follow-up-btn {
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: .3s;
    white-space: nowrap
}

.follow-up-btn:hover {
    background-color: #2d65f7;
    color: #fff;
    border-color: #2d65f7
}

/* 侧边栏重复定义已清理 */





/* 概念说明弹出框样式 */
.concept-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.concept-modal.show {
    opacity: 1;
}

.concept-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.concept-modal.show .concept-modal-content {
    transform: scale(1) translateY(0);
}

.concept-modal-header {
    padding: 24px 32px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(74, 144, 226, 0.05));
    border-radius: 24px 24px 0 0;
}

.concept-modal-header h3 {
    margin: 0;
    color: #1a202c;
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(135deg, #4a90e2, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.concept-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.concept-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

.concept-modal-body {
    padding: 24px 32px 32px;
}

.concept-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.concept-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(74, 144, 226, 0.3);
}

.concept-item:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.concept-item:last-child {
    margin-bottom: 0;
}

.concept-icon {
    font-size: 32px;
    margin-right: 16px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(74, 144, 226, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.concept-text h4 {
    margin: 0 0 8px 0;
    color: #1a202c;
    font-size: 18px;
    font-weight: 600;
}

.concept-text p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .concept-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .concept-modal-header {
        padding: 20px 24px 12px;
    }
    
    .concept-modal-header h3 {
        font-size: 20px;
    }
    
    .concept-modal-body {
        padding: 20px 24px 24px;
    }
    
    .concept-item {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .concept-icon {
        font-size: 28px;
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .concept-text h4 {
        font-size: 16px;
    }
    
    .concept-text p {
        font-size: 13px;
    }
}

footer {
    left: 0
}

.separator {
    width: 24px;
    height: 1px;
    background-color: #e5e5e5;
    margin: 4px 0
}

.icon,
.menu-trigger {
    position: fixed;
    left: 15px;
    top: 15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1002;
}

/* 侧边栏重复定义已清理 */



.alerts,
.metric {
    border-radius: 15px
}

body {
    background-color: #f2f5f9;
    color: #374151;
    margin: 0;
    padding: 0;
    font-size: 12px;
}

.chat-container.shifted,
header.shifted {
    transform: translateX(-100px);
    width: calc(100% - 20px)
}

header h1 {
    margin: 0 0 15px;
    transition: .3s;
    font-size: 20px
}

.filter-nav {
    display: flex;
    justify-content: space-between
}

.filter-nav a {
    color: #333;
    font-size: 14px
}

.filter-nav a.active {
    color: #007bff
}

.summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-bottom: 20px
}

.metric {
    flex: 0 0 auto;
    width: 10%;
    min-width: 150px;
    background-color: #f8f8f8;
    padding: 10px;
    margin: 0 5px;
    position: relative;
    display: inline-block
}

.metric h2 {
    font-size: 14px;
    color: #7d7d7d;
    margin-bottom: 5px
}

.metric .star-icon {
    position: absolute;
    top: 25px;
    right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer
}

.alerts {
    background-color: #fff4f4;
    padding: 20px
}

.alerts h2 {
    margin-bottom: 10px;
    font-size: 16px;
    padding-left: 10px
}

.alert-item {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.ai-message,
footer {
    background-color: #fff
}

.alert-text {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    font-size: 14px
}

.alert-link,
.voice-btn {
    margin-left: 10px
}

.metrics {
    -webkit-overflow-scrolling: touch
}

.alert-link {
    color: #3498db;
    font-size: 13px;
    white-space: nowrap
}

footer {
    position: fixed;
    bottom: 0;
    right: 0;
    border-top: 1px solid #ddd;
    height: 60px
}

footer nav {
    display: flex;
    justify-content: space-around
}

footer nav a {
    color: #666;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0
}

footer nav a.active {
    color: #1e88e5
}

footer nav img {
    width: 24px;
    height: 24px;
    margin-bottom: 5px
}

.ai-message {
    border-radius: 25px;
    padding: 20px;
    margin-bottom: 20px;
    margin-top: -10px
}

.metric .value,
.metric h4,
.metrics {
    margin-bottom: 5px
}

.ai-message h3 {
    margin-top: 10px;
    font-size: 16px;
    padding-left: 10px
}

.metrics {
    display: flex;
    padding-bottom: 10px
}

.metric h4 {
    font-size: 14px;
    color: #666;
    white-space: normal
}

.metric .value {
    font-size: 18px;
    font-weight: 700
}

.metric .change {
    font-size: 12px
}

.change.positive {
    color: #4caf50
}

.change.negative {
    color: #f44336
}

.metrics::-webkit-scrollbar {
    display: none
}

@media (max-width:768px) {
    .chat-ai-message-content img {
        max-width: 95%;
        margin: 10px auto
    }

    .menu-trigger {
        display: flex;
        z-index: 990
    }



    .query button,
    .query input[type=text],
    td,
    th {
        font-size: 14px
    }

    header h1 {
        font-size: 20px
    }

    td,
    th {
        padding: 8px
    }

    .metric {
        width: 25%;
        min-width: 150px
    }
}

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

.alert-card,
.metric-card,
.search-bar {
    border-radius: 10px
}

.input-area input[type=text] {
    padding: 15px 10px
}

.voice-btn img {
    width: 30px;
    right: 20px
}

.asr-toggle-btn {
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.asr-toggle-btn:hover {
    background: #e0e0e0;
    border-color: #bbb;
}

.asr-toggle-btn.active {
    background: #2d65f7;
    border-color: #2d65f7;
}

.asr-toggle-btn.active img {
    filter: brightness(0) invert(1);
}

.asr-toggle-btn img {
    width: 20px;
    height: 20px;
    position: static;
}

.asr-toggle-btn.recording {
    background: #ff4444;
    border-color: #ff4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.category-nav {
    display: flex;
    justify-content: space-around;
    max-width: 800px;
    margin: 0 auto
}

.category-nav a {
    margin: 0 15px
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px
}

.search-bar {
    display: flex
}

.alerts-page,
.analysis-page {
    background-color: rgba(196, 222, 255, .5)
}

.alerts-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
    padding: 15px;
    margin-top: -20px
}

.alert-card {
    background-color: #fff;
    padding: 15px;
    display: flex;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05)
}

.alert-icon {
    font-size: 24px;
    margin-right: 15px
}

.alert-content h2 {
    font-size: 16px;
    color: #ff4d4f;
    margin: 0 0 10px
}

.alert-problem,
.alert-suggestion {
    font-size: 14px;
    margin: 5px 0;
    color: #333
}

.alert-suggestion a {
    color: #1890ff
}

.alert-content footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 10px
}

.search-btn img {
    width: 80px
}

.category-nav {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    background-color: transparent
}

.category-nav a {
    color: #6b6b6b;
    padding: 5px 20px;
    border-radius: 8px;
    background-color: #f0f0f0;
    font-size: 14px
}

.category-nav a.active {
    background-color: #fff;
    color: #037df6;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1)
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px;
    margin-top: -30px
}

.metric-card {
    background-color: #4a90e2;
    color: #fff;
    padding: 15px;
    position: relative
}

.metric-card h3 {
    margin-top: 0
}

.metric-card p {
    font-size: .9em;
    margin-bottom: 0
}

.star-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px
}

.search-bar {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background-color: #fff;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
    max-width: 800px;
    width: 90%
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 5px 10px;
    border-radius: 10px;
    outline: 0;
    font-size: 16px
}

.search-btn {
    background: 0 0;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 10px
}

.bottom-container,
.chat-container,
.metrics {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto
}

footer,
header {
    width: 100%
}

#iframe-container {
    min-width: 200px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    margin: 0 10px 10px
}

.input-area {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 5px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
    margin-top: 5px
}

/* ASR按钮样式 */
.asr-toggle-btn {
    border: none;
    background: transparent;
    padding: 6px;
    cursor: pointer;
    border-radius: 8px;
}
.asr-toggle-btn:hover {
    background: #f3f4f6;
}
.asr-toggle-btn.recording {
    background: #fee2e2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) inset;
}
.asr-toggle-btn.recording img {
    filter: hue-rotate(320deg) saturate(1.2);
}

.action-btn {
    background: #fff;
    margin-right: 10px;
    white-space: nowrap;
    cursor: pointer
}

#close-iframe,
.voice-btn {
    background: 0 0;
    cursor: pointer
}

#chat-input {
    flex: 1;
    border: none;
    outline: 0;
    padding: 10px;
    font-size: 14px;
    color: #374151
}

.voice-btn {
    border: none;
    padding: 8px
}

.action-btn:hover,
.user-message {
    background-color: #2a63f3;
    color: #fff
}

@media (max-width:799px) {
    #main-content.shifted,
    .bottom-container.shifted,
    .chat-container.shifted {
        transform: translateX(-80px);
        width: calc(100% - 20px)
    }

    .bottom-container.shifted {
        transform: translateX(calc(-50% - 80px));
        width: calc(100% - 160px)
    }

    .bottom-container {
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 800px;
        padding: 20px 10px 10px;
        background: #f2f5f9;
        z-index: 1000;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .main-wrapper.shifted {
        transform: translateX(-80px);
        margin-right: 160px;
        max-width: calc(100% - 160px);
    }

    .chat-container.shifted,
    header.shifted {
        transform: translateX(-80px)
    }

    .action-btn {
        padding: 6px 15px;
        font-size: 14px
    }
}

.chat-message {
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    margin-bottom: 24px;
    padding: 10px;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.5;
    white-space: normal;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    display: block;
    visibility: visible;
}

#new-chat-btn {
    background-color: #2d65f7;
    color: #fff
}

#new-chat-btn:hover {
    background-color: #86a8ff;
    color: #fff
}

.user-message {
    margin-left: auto
}

.chat-ai-message,
.input-area {
    background-color: #fff;
    border: 1px solid #e5e7eb
}

.chat-ai-message {
    float: left;
    clear: both;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    margin-right: auto
}

.chat-ai-message-content {
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    font-size: 14px;
    color: #374151;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    display: block;
    visibility: visible;
    line-height: 1.6;
}

.input-area {
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .05)
}

.action-btn,
.chat-ai-message-content tr:hover td {
    background-color: #f3f4f6
}

.action-btn {
    border: 1px solid #e5e7eb;
    color: #374151;
    border-radius: 8px;
    background-color: white;
    padding: 6px 12px;
    font-size: 13px;
    transition: .2s
}

.action-btn:hover {
    border-color: #2a63f3
}

#iframe-title,
.iframe-title {
    font-size: 16px;
    font-weight: 500;
    color: #1c1c1e;
    margin-left: 20px;
}

#web-iframe {
    flex: 1;
    border: none;
    width: 100%;
    background: #fff;
    border-radius: 0 0 20px 20px;
    box-sizing: border-box;
}

#iframe-container {
    position: fixed;
    top: 30px;
    right: -400px;
    width: 400px;
    height: calc(100vh - 60px);
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, .08);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0
}

#close-iframe,
.iframe-resizer {
    transition: background-color .2s
}

#iframe-container.show {
    right: 0;
    visibility: visible;
    opacity: 1
}

.iframe-header {
    padding: 16px 0;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    border-radius: 20px 20px 0 0;
    box-sizing: border-box;
    width: 100%;
}

.chart-container.loaded::before,
.view-toggle {
    display: none
}

#close-iframe {
    position: relative;
    z-index: 1001;
    border: none;
    font-size: 24px;
    color: #999;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 5px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

#close-iframe:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

#expand-iframe {
    position: relative;
    z-index: 1001;
    border: none;
    font-size: 16px;
    color: #666;
    padding: 6px 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 5px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

#expand-iframe:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: scale(1.05);
}

.iframe-resizer {
    position: absolute;
    left: -6px;
    top: 0;
    width: 6px;
    height: 100%;
    background-color: transparent;
    cursor: col-resize
}

.bottom-container,
.welcome-message {
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box
}

.iframe-resizer.resizing,
.iframe-resizer:hover {
    background-color: rgba(0, 0, 0, .1)
}

.view-toggle {
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-start;
    padding: 0 10px
}

.view-btn {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: .2s
}

.view-btn.active {
    background: #2d65f7;
    color: #fff;
    border-color: #2d65f7
}

.view-btn:hover:not(.active) {
    background: #f5f5f5
}

#initial-content {
    height: 100%;
    overflow: hidden;
    box-sizing: border-box
}

.metrics {
    -ms-overflow-style: none;
    scrollbar-width: none;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap
}

.alerts {
    margin-top: 10px;
    overflow: hidden
}

.chat-ai-message-content,
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch
}

.welcome-message.minimized {
    font-size: 14px;
    padding: 5px 20px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
    border-radius: 8px
}

.welcome-hint {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    transition: .3s;
    opacity: 1
}

.chat-container,
.main-wrapper,
.welcome-message {
    transition: .3s cubic-bezier(.4, 0, .2, 1)
}

.welcome-hint.hidden {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden
}

.chat-ai-message-content table {
    border-spacing: 0;
    table-layout: fixed;
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
    margin: 16px 0;
    position: relative
}

.chat-ai-message-content thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f9fafb
}

#main-content.shifted {
    max-width: calc(800px + 200px)
}

.welcome-message {
    position: fixed;
    max-width: 800px;
    font-size: 18px;
    color: #374151
}

.bottom-container.shifted,
.welcome-message.shifted {
    transform: translateX(calc(-50% - 100px))
}

.chat-container.shifted {
    margin-right: 210px
}

@media (max-width: 1200px) {
    .main-wrapper.shifted,
    .bottom-container.shifted {
        transform: translateX(-100px);
        margin-right: 200px;
    }
}

/* @media (min-width:800px) {

    #main-content.shifted,
    .chat-container.shifted {
        transform: translateX(-100px);
        width: calc(100% - 20px)
    }

    .bottom-container.shifted {
        transform: translateX(calc(-50% - 100px));
        margin-left: 30px
    }
} */

.chat-container,
.main-wrapper,
.main-wrapper.shifted {
    max-width: 800px;
    margin: 0 auto
}



.main-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-wrapper.shifted {
    transform: translateX(-200px);
    max-width: calc(800px - 200px);
    margin-right: 400px;
}

.welcome-message {
    position: sticky;
    top: 20px;
    width: 100%;
    z-index: 10;
    background: 0 0;
    padding: 10px;
    box-sizing: border-box
}

.chat-container {
    width: 100%;
    padding-bottom: 140px
}

.bottom-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    padding: 20px 10px 10px;
    background: #f2f5f9;
    z-index: 1000;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}






@media (max-width:800px) {
    .menu-trigger {
        display: flex;
        position: fixed;
        left: 15px;
        top: 15px;
        width: 40px;
        height: 40px;
        background: #fff;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1002
    }





    .chat-ai-message.has-chart {
        max-width: 95% !important;
        margin: 15px auto
    }

    .main-wrapper.shifted {
        transform: translateX(-80px);
        margin-right: 160px;
    }
    
    .bottom-container.shifted {
        transform: translateX(calc(-50% - 80px));
        max-width: calc(100% - 160px);
    }
}

@media (min-width:801px) {
    .menu-trigger {
        display: flex;
        position: fixed;
        left: 15px;
        top: 15px;
        width: 40px;
        height: 40px;
        background: #fff;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1002;
    }


}

.chart-container::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 14px;
    z-index: 1;
    background: rgba(255, 255, 255, .9);
    padding: 8px 16px;
    border-radius: 4px
}

.chat-ai-message.has-chart {
    max-width: 100% !important;
    width: 100% !important;
    margin: 15px 0
}

.chart-container:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, .1)
}

.chart-container:not(.loaded) {
    opacity: .8
}

/* 替换为新的样式 */
.chat-ai-message-content td,
.chat-ai-message-content th {
    word-wrap: break-word;
    min-width: 150px;
    max-width: 300px;
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    background-color: #fff;
    color: #374151;
    white-space: normal;
    text-align: center;  /* 添加居中对齐 */
    vertical-align: middle;  /* 垂直居中 */
}

.chat-ai-message-content p {
    margin: 4px;
    line-height: 1.6;
}

.chat-ai-message-content li {
    margin: 4px 0;
    line-height: 1.6;
}

.chat-ai-message-content {
    position: relative;
    word-break: break-word;
    overflow-wrap: break-word
}

.table-container {
    width: 100%;
    margin: 10px 0;
    position: relative;
    background: 0 0 !important;
    border: none;
    scrollbar-width: thin;
    max-width: 100%
}

.table-container::-webkit-scrollbar {
    height: 6px
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px
}

.table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #555
}

.chat-ai-message-content th {
    background-color: #e9e9e9;
    font-weight: 500;
    text-align: center;  /* 添加居中对齐 */
}

.chat-ai-message-content td::after,
.chat-ai-message-content th::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 20px;
    background: linear-gradient(to right, transparent, #fff);
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s
}

/* 表格操作按钮容器 */
.table-actions {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

/* 图表类型按钮 */
.chart-type-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin: 0 8px 8px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.chart-type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.chart-type-btn:hover::before {
    left: 100%;
}

.chart-type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.chart-type-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 6px 16px rgba(240, 147, 251, 0.4);
    transform: translateY(-1px);
}

.chart-type-btn.active:hover {
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.5);
}

/* 生成图表按钮 */
.generate-chart-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.generate-chart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.generate-chart-btn:hover::before {
    left: 100%;
}

.generate-chart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.4);
}

/* 图表生成按钮 */
.chart-generate-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chart-generate-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

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


/* 图表类型选项 */
.chart-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.chart-type-option:hover {
    background-color: #f3f4f6;
}

.chart-type-option i {
    font-size: 18px;
    color: #2d65f7;
}


/* 轴选择器样式 */
.axis-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.axis-group {
    flex: 1;
    min-width: 150px;
}

/* 统一标签样式 */
.chart-type-selector label,
.axis-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.axis-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

.axis-group select:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.axis-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.axis-selector h4 {
    margin: 0 0 12px 0;
    color: #374151;
    font-size: 14px;
}

/* 坐标轴选择列表 */
.axis-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

/* 坐标轴选择项 */
.axis-option {
    padding: 6px 12px;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.axis-option:hover {
    background-color: #e5e7eb;
}

.axis-option.selected {
    background-color: #2d65f7;
    color: white;
    border-color: #2d65f7;
}

/* 确认按钮 */
.confirm-chart-btn {
    width: 100%;
    padding: 8px;
    background-color: #2d65f7;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.confirm-chart-btn:hover {
    background-color: #1c4ed8;
}

/* 图表容器样式优化 */
.generated-chart {
    width: 100%;
    height: 400px;
    margin: 15px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    overflow: hidden;
}

/* 禁用状态 */
.chart-generate-btn:disabled,
.confirm-chart-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

/* URL按钮样式 */
.url-button {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px 8px 4px 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.iframe-button {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.iframe-button:hover {
    background-color: #1e3f73;
    transform: translateY(-1px);
}

.iframe-button.mobile {
    background: #ff6b35;
}

.iframe-button.mobile:hover {
    background-color: #e55a2b;
    transform: translateY(-1px);
}

.external-button {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* 示例按钮容器样式 */
.example-buttons-container {
    margin: 12px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2c5aa0;
}

.example-label {
    font-weight: 600;
    color: #2c5aa0;
    margin-right: 8px;
    font-size: 14px;
}

.example-buttons {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 示例按钮样式 */
.example-button {
    display: inline-block;
    padding: 6px 12px;
    margin: 0;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.example-button:hover {
    background: #1e3f73;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.3);
}

.example-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(44, 90, 160, 0.3);
}

.external-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* 报表列表markdown样式 */
.report-markdown-container {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.report-markdown-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e1;
}

.report-header {
    color: #1e293b;
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.report-header::before {
    content: "📊";
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.report-item {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.report-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
}

.report-metric {
    color: #3b82f6;
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-metric::before {
    content: "📈";
    font-size: 14px;
}

.report-name {
    color: #1e293b;
    font-weight: 500;
    font-size: 15px;
    margin: 8px 0 12px 0;
    line-height: 1.4;
}

.metric-value {
    color: #2c5aa0;
    font-weight: 600;
    font-size: 16px;
}

.name-value {
    color: #555;
    font-size: 16px;
}

.report-markdown {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.report-markdown:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.report-markdown h4 {
    color: #1e293b;
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-markdown h4::before {
    content: "📊";
    font-size: 20px;
}

.report-markdown p {
    margin: 8px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.report-markdown strong {
    color: #1e293b;
    font-weight: 600;
}

.report-link,
.report-markdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin: 8px 8px 8px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
    cursor: pointer;
    font-family: inherit;
}

.report-link strong {
    color: white;
}

.report-link:hover,
.report-markdown-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    text-decoration: none;
}

.report-markdown-btn::after {
    content: "→";
    font-size: 16px;
    transition: transform 0.3s ease;
}
 
.report-markdown-btn:hover::after {
    transform: translateX(3px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .report-markdown-container {
        padding: 16px;
        margin: 15px 0;
    }
    
    .report-header {
        font-size: 18px;
    }
    
    .report-item {
        padding: 12px;
    }
    
    .report-link,
    .report-markdown-btn {
        padding: 10px 16px;
        font-size: 13px;
        margin: 6px 6px 6px 0;
    }
}
@font-face{font-family:element-icons;src:url(https://unpkg.com/element-ui/lib/theme-chalk/fonts/element-icons.woff) format("woff"),url(https://unpkg.com/element-ui/lib/theme-chalk/fonts/element-icons.ttf) format("truetype");font-weight:400;font-style:normal}
