/* 整个图表的容器 */
.chart {
    width: 80%;
    padding: 10px;
    margin: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 每个柱子的样式 */
.bar-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.bar {
    background-color: teal;
    height: 40px;
    margin-right: 10px;
    color: #fff;
    position: relative;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bar:hover {
    background-color: darkcyan;
}

/* 显示数值 */
.bar span {
    position: absolute;
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #333;
}

/* 显示柱子名称 */
.bar-name {
    flex: 0 0 auto; /* 保持名称宽度自适应 */
    width: 100px; /* 固定一个宽度，足够展示名称 */
    text-align: right;
    margin-right: 15px; /* 增加与柱子的距离 */
    font-size: 14px;
    color: #333;
}