/* 现代化CSS图表 - 高质量HTML5风格 */

/* ========== 1. 环形进度图（纯CSS） ========== */
.circular-progress {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--progress-color) 0deg,
        var(--progress-color) calc(var(--progress) * 3.6deg),
        #e5e7eb calc(var(--progress) * 3.6deg),
        #e5e7eb 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.circular-progress::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: white;
}

.circular-progress-value {
    position: relative;
    z-index: 1;
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--progress-color), var(--progress-color-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========== 2. 折线图（纯CSS） ========== */
.css-line-chart {
    position: relative;
    width: 100%;
    height: 250px;
    background: linear-gradient(to bottom, 
        rgba(102,126,234,0.05) 0%, 
        rgba(102,126,234,0.02) 100%
    );
    border-radius: 16px;
    padding: 24px;
    overflow: hidden;
}

.chart-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
}

.grid-line {
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.05) 10%,
        rgba(0,0,0,0.05) 90%,
        rgba(0,0,0,0) 100%
    );
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 100%;
    gap: 4px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--bar-color), var(--bar-color-light));
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 12px rgba(102,126,234,0.2);
}

.chart-bar:hover {
    transform: scaleY(1.05);
    filter: brightness(1.1);
    box-shadow: 0 -8px 24px rgba(102,126,234,0.3);
}

.chart-bar-value {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--bar-color), var(--bar-color-light));
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.3s;
}

.chart-bar:hover .chart-bar-value {
    opacity: 1;
}

/* ========== 3. 仪表盘（纯CSS） ========== */
.gauge-container {
    position: relative;
    width: 220px;
    height: 140px;
    margin: 0 auto;
}

.gauge-background {
    width: 220px;
    height: 110px;
    border-radius: 110px 110px 0 0;
    background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 100%);
    position: relative;
    overflow: hidden;
}

.gauge-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 110px 110px 0 0;
    background: linear-gradient(135deg, var(--gauge-color), var(--gauge-color-end));
    transform-origin: center bottom;
    transform: rotate(calc(-90deg + var(--gauge-percent) * 1.8deg));
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 -4px 20px rgba(0,0,0,0.1);
}

.gauge-center {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 80px;
    background: white;
    border-radius: 80px 80px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-value {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gauge-color), var(--gauge-color-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: -20px;
}

/* ========== 4. 进度条（现代化） ========== */
.modern-progress {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.modern-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--progress-color), var(--progress-color-end));
    border-radius: 12px;
    position: relative;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px var(--progress-color);
}

.modern-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.3) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========== 5. 数据卡片（3D效果） ========== */
.data-card-3d {
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.95) 0%,
        rgba(255,255,255,0.98) 100%
    );
    border-radius: 20px;
    padding: 28px;
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.08),
        0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(102,126,234,0.1) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.data-card-3d:hover::before {
    left: 100%;
}

.data-card-3d:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(102,126,234,0.15),
        0 8px 16px rgba(0,0,0,0.08);
}

/* ========== 6. 趋势线（SVG风格CSS） ========== */
.trend-line-container {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(to bottom,
        rgba(102,126,234,0.03) 0%,
        rgba(102,126,234,0.01) 100%
    );
    border-radius: 16px;
    padding: 20px;
}

.trend-points {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    gap: 2px;
}

.trend-point {
    flex: 1;
    background: linear-gradient(to top, var(--point-color), var(--point-color-light));
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 0 12px var(--point-color);
}

.trend-point::after {
    content: attr(data-value);
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: var(--point-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.trend-point:hover::after {
    opacity: 1;
}

/* ========== 7. 统计卡片动画 ========== */
.stat-card-animated {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 8. 数字滚动动画 ========== */
.number-roll {
    display: inline-block;
    animation: numberRoll 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes numberRoll {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

