/* 针对中文图表的专用样式 */

/* 确保图表容器有足够的高度*/
.chart-container {
    min-height: 400px;
}

.chart-container.full-width {
    min-height: 450px;
}

/* 优化图表标题显示 */
.chart-container h3 {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'SimHei', sans-serif;
    text-align: center;
    margin-bottom: 1.7rem;
    font-size: 1.25rem;
    color: #1f2937;
    line-height: 1.5;
    padding: 0 10px;
    /* 确保长标题能够换行显示 */
    white-space: normal;
    hyphens: auto;
}

/* 优化图表说明文字 */
.chart-caption {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'SimHei', sans-serif;
    text-align: center;
    font-size: 0.95rem;
    color: #6b7280;
    margin-top: 1.3rem;
    margin-bottom: 0;
    line-height: 1.7;
    padding: 0 10px;
}

/* 确保Canvas元素始终有最小高度 */
canvas {
    /* min-height: 300px; */
    max-width: 100%;
}

/* 为特定类型的图表设置更大的高度 */
#personaPainPointsChart,
#aiCapabilitiesChart {
    min-height: 350px;
}

#differentiationChart,
#painPointsChart,
#industryGrowthChart {
    min-height: 380px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .chart-container {
        min-height: 350px;
        padding: 20px 15px;
    }
    
    .chart-container h3 {
        font-size: 1.15rem;
        margin-bottom: 1.5rem;
    }
    
    .chart-caption {
        font-size: 0.9rem;
    }
    
    canvas {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        min-height: 300px;
        padding: 15px 10px;
    }
    
    .chart-container h3 {
        font-size: 1.1rem;
        margin-bottom: 1.2rem;
    }
    
    .chart-caption {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    canvas {
        min-height: 200px;
    }
    
    #personaPainPointsChart,
    #aiCapabilitiesChart {
        min-height: 280px;
    }
}