/* 7天趋势图表区域 */
.chart-section {
    background: var(--white-color);
    padding: 20px 24px 28px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 10px 0 30px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.chart-header h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
    font-weight: 600;
}

.chart-legend {
    display: flex;
    gap: 20px;
    align-items: center;
}

.chart-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-color);
}

.chart-legend .legend-box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
}

.chart-legend .legend-box.trend-line {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.chart-legend .legend-box.trend-rate {
    background: linear-gradient(135deg, var(--success-color), var(--info-color));
}

.chart-legend .legend-box.total-clients {
    background: rgba(248, 150, 30, 0.8);
}

.chart-legend .legend-box.active-clients-7d {
    background: rgba(76, 175, 80, 0.8);
}

.chart-legend .legend-box.version-chart {
    background: linear-gradient(135deg, #4361ee, #3f37c9);
}

.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

.chart-container canvas {
    max-height: 300px;
}

/* 版本分布统计卡片样式 - 复用通用图表样式 */
.version-card {
    background: var(--white-color);
    padding: 20px 24px 28px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 10px 0 30px;
}

.version-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.version-card-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--dark-color);
    font-weight: 600;
}

/* GitHub风格语言占比条 */
.version-language-bar-container {
    margin-bottom: 20px;
}

.version-language-bar {
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    background-color: #f6f8fa;
    border: 1px solid #d0d7de;
}

.language-bar-item {
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
}

.language-bar-item:hover {
    filter: brightness(1.3);
    z-index: 1;
}

/* 版本图例样式 - 简化设计 */
.version-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.version-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--dark-color);
    transition: var(--transition);
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    position: relative;
}

.version-legend-item:hover {
    background-color: rgba(67, 97, 238, 0.05);
    transform: translateY(-1px);
}

.version-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.version-legend-name {
    font-weight: 500;
    color: var(--dark-color);
}

.version-legend-stats {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    margin-bottom: 4px;
}

.version-legend-stats::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
}

.version-legend-item:hover .version-legend-stats {
    display: block;
}