/**
 * 网站统计区块样式 - 超紧凑优雅版本
 * 作者: ike
 * 日期: 2025-01-27
 * 功能: 统计区块的样式定义，采用超紧凑的一行显示设计，高度约为筛选区块的一半
 */

/* 统计区块容器 */
.stats-section {
    margin: 0 0;
    padding: 2px;
}

/* 统计卡片容器 - 超紧凑设计 */
.stats-container {
    background: linear-gradient(135deg, #1a1f2e 0%, #242b3a 100%);
    border-radius: 10px;
    padding: 2px 2px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(65, 129, 229, 0.12);
    position: relative;
    overflow: hidden;
}

/* 背景装饰效果 - 更细腻 */
.stats-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(65, 129, 229, 0.5), transparent);
    opacity: 0.7;
}

/* 统计网格布局 - 强制一行显示 */
.stats-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

/* 统计项目 - 超紧凑设计 */
.stats-item {
    flex: 1;
    text-align: center;
    padding: 10px 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
    position: relative;
    min-width: 0; /* 允许flex收缩 */
}

/* 统计项目悬停效果 - 更轻微 */
.stats-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(65, 129, 229, 0.12);
    border-color: rgba(65, 129, 229, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
}

/* 统计数值 - 超紧凑显示 */
.stats-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4181e5;
    text-shadow: 0 1px 2px rgba(65, 129, 229, 0.25);
    margin-bottom: 1px;
    display: block;
    line-height: 1;
}

/* 统计标签 - 更小更精致 */
.stats-label {
    font-size: 0.6rem;
    color: #b8c2cc;
    font-weight: 500;
    letter-spacing: 0.2px;
    margin-bottom: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 统计单位 - 更小 */
.stats-unit {
    font-size: 0.55rem;
    color: #8a9199;
    font-weight: 400;
    opacity: 0.85;
}

/* 特殊项目样式 - 运行天数 */
.stats-item.running-days .stats-number {
    color: #ffc107;
    text-shadow: 0 1px 2px rgba(255, 193, 7, 0.25);
}

.stats-item.running-days {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.06) 0%, rgba(255, 152, 0, 0.03) 100%);
    border-color: rgba(255, 193, 7, 0.12);
}

.stats-item.running-days:hover {
    border-color: rgba(255, 193, 7, 0.25);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.12);
}

/* 响应式设计 - 保持一行显示，大幅缩小移动端padding */
@media (max-width: 768px) {
    .stats-container {
        padding: 2px 2px; /* 大幅缩小上下padding */
        margin: 0 0;
    }
    
    .stats-grid {
        gap: 6px;
    }
    
    .stats-item {
        padding: 6px 4px; /* 缩小内边距 */
    }
    
    .stats-number {
        font-size: 1rem;
    }
    
    .stats-label {
        font-size: 0.55rem;
    }
    
    .stats-unit {
        font-size: 0.5rem;
    }
}

@media (max-width: 480px) {
    .stats-container {
        padding: 0 0; /* 进一步缩小上下padding */
    }
    
    .stats-grid {
        gap: 4px;
    }
    
    .stats-item {
        padding: 5px 3px; /* 进一步缩小内边距 */
    }
    
    .stats-number {
        font-size: 0.9rem;
    }
    
    .stats-label {
        font-size: 0.5rem;
    }
    
    .stats-unit {
        font-size: 0.45rem;
    }
}

@media (max-width: 360px) {
    .stats-container {
        padding: 5px 8px; /* 最小化上下padding */
    }
    
    .stats-grid {
        gap: 3px;
    }
    
    .stats-item {
        padding: 4px 2px; /* 最小化内边距 */
    }
    
    .stats-number {
        font-size: 0.85rem;
    }
    
    .stats-label {
        font-size: 0.45rem;
    }
    
    .stats-unit {
        font-size: 0.4rem;
    }
}

/* 加载动画效果 - 更轻微 */
.stats-item {
    animation: fadeInUp 0.3s ease-out;
}

.stats-item:nth-child(1) { animation-delay: 0.03s; }
.stats-item:nth-child(2) { animation-delay: 0.06s; }
.stats-item:nth-child(3) { animation-delay: 0.09s; }
.stats-item:nth-child(4) { animation-delay: 0.12s; }

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

/* 数字计数动画 - 更快 */
.stats-number {
    animation: countUp 0.6s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}