/* 图表区域样式 */
.chart-section {
    position: relative;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.chart-container {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, #1a1a2a, #2a2a3a);
    border-radius: 10px;
    padding: 20px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.chart-container canvas {
    max-height: 100%;
    border-radius: 8px;
}

/* Chart.js 自定义样式覆盖 */
.chartjs-tooltip {
    background: rgba(30, 30, 46, 0.95) !important;
    border: 1px solid #4ecdc4 !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-family: 'Segoe UI', sans-serif !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

.chartjs-tooltip-title {
    color: #4ecdc4 !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
}

.chartjs-tooltip-body {
    color: #ffffff !important;
}

/* 图表加载状态 */
.chart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
    background: linear-gradient(135deg, #1a1a2a, #2a2a3a);
    border-radius: 10px;
    color: #4ecdc4;
    font-size: 1.2rem;
}

.chart-loading::after {
    content: '';
    width: 30px;
    height: 30px;
    margin-left: 15px;
    border: 3px solid #4ecdc4;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 图表错误状态 */
.chart-error {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 500px;
    background: linear-gradient(135deg, #2a1a1a, #3a2a2a);
    border-radius: 10px;
    color: #ff6b6b;
    text-align: center;
}

.chart-error h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.chart-error p {
    color: #a0a0a0;
    font-size: 1rem;
}

/* 响应式图表 */
@media (max-width: 768px) {
    .chart-container {
        height: 400px;
        padding: 15px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .chart-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .chart-container {
        height: 350px;
        padding: 10px;
    }
    
    .chart-controls {
        flex-direction: column;
    }
}