/**
 * 统计数据动画效果
 */

/* 数字更新脉冲动画 */
@keyframes stat-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: #D72324;
    }
    100% {
        transform: scale(1);
    }
}

.stat-pulse {
    animation: stat-pulse 0.6s ease-in-out;
}

/* 加载骨架屏动画 */
@keyframes loading-skeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.loading-skeleton {
    background: linear-gradient(
        90deg, 
        rgba(0,0,0,0.1) 25%, 
        rgba(0,0,0,0.15) 50%, 
        rgba(0,0,0,0.1) 75%
    );
    background-size: 200% 100%;
    animation: loading-skeleton 1.5s ease-in-out infinite;
    color: transparent !important;
    min-width: 60px;
    display: inline-block;
    border-radius: 4px;
}

/* 黑夜模式下的加载骨架屏 */
.theme-dark .loading-skeleton {
    background: linear-gradient(
        90deg, 
        rgba(255,255,255,0.1) 25%, 
        rgba(255,255,255,0.15) 50%, 
        rgba(255,255,255,0.1) 75%
    );
    background-size: 200% 100%;
}

/* 统计数据项悬停效果 */
.footer-stat-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.footer-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.theme-dark .footer-stat-item:hover {
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

/* 数字样式增强 */
.footer-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 10px 0;
    transition: color 0.3s ease;
}

.footer-stat-label {
    font-size: 0.95rem;
    margin-top: 5px;
    opacity: 0.9;
}

.footer-stat-trend {
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
}

.footer-stat-trend.up {
    color: #28a745;
}

.theme-dark .footer-stat-trend.up {
    color: #4ade80;
}

/* 图标样式 */
.footer-stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.footer-stat-item:hover .footer-stat-icon {
    transform: scale(1.1) rotate(5deg);
}

/* 刷新按钮样式（可选） */
.stats-refresh-btn {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px auto;
}

.stats-refresh-btn:hover {
    background: rgba(0,0,0,0.05);
    transform: rotate(90deg);
}

.theme-dark .stats-refresh-btn {
    border-color: rgba(255,255,255,0.2);
}

.theme-dark .stats-refresh-btn:hover {
    background: rgba(255,255,255,0.1);
}

.stats-refresh-btn.refreshing {
    animation: spin 1s linear;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 刷新时间显示 */
.stats-refresh-time {
    font-size: 0.75rem;
    color: rgba(0,0,0,0.5);
    text-align: center;
    margin-top: 10px;
}

.theme-dark .stats-refresh-time {
    color: rgba(255,255,255,0.5);
}

/* 数据更新淡入效果 */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-updated {
    animation: fade-in 0.5s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer-stat-number {
        font-size: 2rem;
    }
    
    .footer-stat-icon {
        font-size: 2rem;
    }
    
    .footer-stat-item {
        margin-bottom: 20px;
    }
}

/* 统计卡片整体样式优化 */
.footer-stats-wrap {
    padding: 40px 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.02), transparent);
}

.theme-dark .footer-stats-wrap {
    background: linear-gradient(to bottom, rgba(255,255,255,0.02), transparent);
}

/* 趋势指示器动画 */
@keyframes trend-up {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.footer-stat-trend.up {
    animation: trend-up 2s ease-in-out infinite;
}

/* 实时更新指示器 */
.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

.theme-dark .live-indicator {
    background-color: #4ade80;
}

/* 数字跳动效果 */
@keyframes number-jump {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.stat-number-jump {
    animation: number-jump 0.5s ease;
}
