/* 靶场统计显示样式 */

/* 英雄区域靶场统计 */
.hero-stats {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 1.3rem 1.1rem 0.5rem;
    backdrop-filter: none;
    box-shadow: none;
    transition: none;
    position: relative;
    overflow: visible;
    align-self: stretch;
    height: 280px;
    margin-top: -1rem;
}

/* 统计内容包装器 */
.stats-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 统计标题 */
.stats-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.stats-title i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

/* 总数显示 */
.stats-total {
    display: flex;
    justify-content: space-around;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0.5rem;
    flex-shrink: 0;
}

.stats-total-item {
    text-align: center;
    flex: 1;
}

.stats-total-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
    line-height: 1;
}

.stats-total-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 通关用户统计 */
.stats-solved-number {
    color: var(--success-color);
}

/* 在线环境统计 */
.stats-online-number {
    color: var(--warning-color);
    cursor: help;
}

/* 分隔线 */
.stats-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
    align-self: stretch;
}

/* 分类统计文字段落 */
.stats-breakdown-text {
    text-align: center;
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-top: 1.2rem;
    padding: 0 0.5rem;
}

.stats-breakdown-text .stats-count-highlight {
    color: var(--primary-color);
    font-weight: 700;
}

/* 旧的分类统计（保留以防需要） */
.stats-breakdown {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
    width: 100%;
    position: relative;
    z-index: 1;
    flex: 1;
    margin-top: 1rem;
}

.stats-item {
    text-align: center;
    padding: 0.6rem 0.4rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stats-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: all 0.5s ease;
}

.stats-item:hover {
    transform: translateY(-2px);
}

.stats-item:hover::before {
    left: 100%;
}

.stats-item-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stats-item-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.2;
}

/* 加载状态 */
.stats-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    flex: 1;
    min-height: 280px;
}

.stats-loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 错误状态 */
.stats-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: var(--danger-color);
    flex: 1;
    min-height: 280px;
    text-align: center;
}

.stats-error i {
    font-size: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-stats {
        padding: 1.1rem 0.9rem;
        height: 340px;
        margin-top: -0.8rem;
    }

    .stats-title {
        font-size: 1rem;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }

    .stats-title i {
        font-size: 1.2rem;
    }

    .stats-total {
        gap: 0.8rem;
        margin-bottom: 1rem;
        padding: 0.8rem 0.4rem;
    }

    .stats-total-number {
        font-size: 1.6rem;
    }

    .stats-total-label {
        font-size: 0.8rem;
    }

    .stats-breakdown {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .stats-item {
        padding: 0.5rem 0.3rem;
        min-height: 50px;
    }

    .stats-item-number {
        font-size: 1.1rem;
    }

    .stats-item-label {
        font-size: 0.7rem;
    }

    .stats-breakdown-text {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-top: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        padding: 1rem 0.8rem;
        height: 360px;
        margin-top: -0.6rem;
    }

    .stats-title {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

    .stats-total {
        gap: 0.8rem;
        margin-bottom: 1rem;
        flex-direction: column;
        padding: 0.8rem 0.5rem;
    }

    .stats-total-number {
        font-size: 1.5rem;
    }

    .stats-total-label {
        font-size: 0.8rem;
    }

    .stats-divider {
        width: 100%;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
        margin: 0.3rem 0;
    }

    .stats-breakdown {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .stats-item {
        padding: 0.5rem 0.3rem;
        min-height: 50px;
    }

    .stats-item-number {
        font-size: 1.1rem;
    }

    .stats-item-label {
        font-size: 0.7rem;
    }

    .stats-breakdown-text {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-top: 0.6rem;
    }
}

/* 点击动画效果 */
.stats-item:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}