/**
 * Categories页面样式 - 分类展示和导航
 * Version: v1.0
 * 优化: SEO + 用户体验 + 视觉效果
 */

/* ========== 页面头部 ========== */
.categories-header {
    margin-bottom: 40px;
    text-align: center;
}

.categories-header h1 {
    font-size: 36px;
    color: #1f2937;
    margin-bottom: 15px;
}

.categories-description {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
}

/* ========== 统计卡片 ========== */
.categories-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .number {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-card .label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== 分类网格 ========== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.category-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 30px;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
    transform: translateY(-6px);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.category-name {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.category-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.category-stats {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.category-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 13px;
}

.category-stat-icon {
    font-size: 16px;
}

.category-stat-value {
    font-weight: 600;
    color: #667eea;
}

/* ========== 搜索功能 ========== */
.categories-search {
    margin-bottom: 30px;
    position: relative;
}

.categories-search input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.categories-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 20px;
}

.search-results-info {
    margin-top: 15px;
    padding: 12px;
    background: #fef3c7;
    border-radius: 8px;
    color: #92400e;
    font-size: 14px;
    text-align: center;
}

/* ========== 加载状态 ========== */
.loading-skeleton {
    padding: 40px;
}

.skeleton-card {
    height: 200px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 16px;
    margin-bottom: 20px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .categories-header h1 {
        font-size: 28px;
    }

    .categories-stats {
        flex-direction: column;
        gap: 15px;
    }

    .stat-card {
        padding: 20px 30px;
    }

    .stat-card .number {
        font-size: 32px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .category-card {
        padding: 25px;
    }

    .category-icon {
        font-size: 40px;
    }

    .category-name {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .categories-header h1 {
        font-size: 24px;
    }

    .stat-card .number {
        font-size: 28px;
    }

    .category-card {
        padding: 20px;
    }

    .category-stats {
        flex-direction: column;
        gap: 10px;
    }
}
