/* Wiki主页面样式 */
.wiki-main {
    padding: 40px 0;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    min-height: calc(100vh - 200px);
}

.wiki-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.wiki-title {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.wiki-subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 搜索区域 */
.wiki-search {
    background: var(--light-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    text-align: center;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 8px 0 0 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: var(--accent-color);
}

.search-btn {
    background: var(--accent-color);
    color: var(--light-color);
    border: none;
    padding: 12px 25px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--secondary-color);
}

.search-tips {
    margin-top: 15px;
    font-size: 14px;
    color: #777;
}

.search-tag {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

.search-tag:hover {
    color: var(--secondary-color);
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.category-card {
    background: var(--light-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.category-icon {
    height: 120px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
}

.category-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-title {
    font-size: 1.4rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.category-desc {
    color: #666;
    margin-bottom: 15px;
    flex: 1;
    line-height: 1.5;
}

.category-stats {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #888;
    margin-top: auto;
}

/* 热门条目 */
.popular-section {
    margin-bottom: 50px;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--secondary-color);
    position: relative;
    font-size: 1.8rem;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 10px auto;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.popular-card {
    background: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    text-decoration: none;
    color: inherit;
}

.popular-card:hover {
    transform: translateY(-5px);
}

.popular-image {
    height: 160px;
    overflow: hidden;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.popular-card:hover .popular-image img {
    transform: scale(1.05);
}

.popular-content {
    padding: 20px;
}

.popular-title {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.popular-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.popular-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #888;
}

/* 最近更新 */
.recent-section {
    margin-bottom: 50px;
}

.recent-list {
    background: var(--light-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.recent-item {
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-item:hover {
    background: #f9f9f9;
}

.recent-category {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 15px;
    min-width: 80px;
    text-align: center;
    font-weight: 500;
}

.recent-title {
    flex: 1;
    font-weight: 500;
}

.recent-date {
    color: #888;
    font-size: 14px;
    min-width: 100px;
    text-align: right;
}

/* 统计数据 */
.stats-section {
    background: var(--light-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wiki-title {
        font-size: 2rem;
    }
    
    .wiki-subtitle {
        font-size: 1rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-input {
        border-radius: 8px 8px 0 0;
    }
    
    .search-btn {
        border-radius: 0 0 8px 8px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .popular-grid {
        grid-template-columns: 1fr;
    }
    
    .recent-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .recent-category {
        margin-bottom: 10px;
    }
    
    .recent-date {
        align-self: flex-end;
        margin-top: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}