/* 统计数据模块样式 */
#stats {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

#stats::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://picsum.photos/1920/1080?random=8') center/cover no-repeat;
    opacity: 0.2;
    z-index: 0;
}

#stats .container {
    position: relative;
    z-index: 1;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px 15px;
    transition: transform 0.5s ease, box-shadow 0.5s ease, opacity 0.5s ease;
    height: 100%;
    opacity: 0;
    transform: translateY(30px);
}

/* 入场动画 */
.stat-item-visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    margin-bottom: 20px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-item:hover .stat-icon {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.25);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* 数字完成动画效果 */
.stat-number-completed {
    animation: bounce 0.5s ease-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-15px);}
    60% {transform: translateY(-7px);}
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 15px;
}

.stat-line {
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.stat-line::before {
    content: "";
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    animation: line-animation 2s ease-in-out infinite;
}

@keyframes line-animation {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* 创建闪光效果 */
@keyframes shine {
    0% {
        background-position: -100px;
    }
    20% {
        background-position: 200px;
    }
    100% {
        background-position: 200px;
    }
}

.stat-number {
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    background-position: -100px;
    display: inline-block;
    background-clip: text;
    -webkit-background-clip: text;
    animation: shine 4s infinite linear;
}

/* 深色模式适配 */
.dark-mode #stats .stat-number {
    color: white;
}

/* 统计区域预载入动画 */
#stats .container h2 {
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    #stats {
        padding: 60px 0;
    }
    
    .stat-item {
        margin-bottom: 20px;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        line-height: 60px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
} 