/* 标准知识库专用样式 - knowledge.css */

/* 知识库横幅 */
.knowledge-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 60px 0;
    margin-bottom: 30px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.knowledge-banner::before {
    content: '📚';
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 150px;
    opacity: 0.1;
}

.knowledge-banner h1 {
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

.knowledge-banner p {
    font-size: 18px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* 知识分类导航 */
.knowledge-categories {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.category-tabs {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.category-tab {
    padding: 12px 25px;
    background-color: #f8f8f8;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    color: #666;
}

.category-tab:hover {
    background-color: #667eea;
    color: #fff;
    transform: translateY(-2px);
}

.category-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: bold;
}

/* 知识库网格 */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.knowledge-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.knowledge-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.knowledge-card-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    position: relative;
    overflow: hidden;
}

.knowledge-card-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transform: skewY(-5deg) translateY(100%);
    transition: all 0.5s;
}

.knowledge-card:hover .knowledge-card-image::before {
    transform: skewY(-5deg) translateY(-100%);
}

.knowledge-card-content {
    padding: 25px;
}

.knowledge-card-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.knowledge-card-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.knowledge-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.knowledge-card-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f0f0f0;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
}

/* 文章详情 */
.article-detail {
    background-color: #fff;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 30px;
    display: none;
}

.article-detail.active {
    display: block;
    animation: fadeIn 0.5s;
}

.article-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 25px;
    margin-bottom: 30px;
}

.article-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.article-meta {
    display: flex;
    gap: 30px;
    color: #999;
    font-size: 14px;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-content {
    line-height: 2;
    color: #666;
    font-size: 16px;
}

.article-content h2 {
    font-size: 24px;
    color: #333;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.article-content h3 {
    font-size: 20px;
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 40px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin: 25px 0;
    color: #666;
    background-color: #f8f8f8;
    padding: 15px 20px;
    border-radius: 4px;
}

.article-content code {
    background-color: #f5f5f5;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e53937;
}

.article-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-action-btns {
    display: flex;
    gap: 15px;
}

.article-back-btn {
    padding: 10px 25px;
    background-color: #999;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
}

.article-back-btn:hover {
    background-color: #777;
}

/* 热门文章 */
.hot-articles {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.hot-articles-list {
    list-style: none;
}

.hot-article-item {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s;
}

.hot-article-item:hover {
    background-color: #fafafa;
    padding-left: 15px;
}

.hot-article-item:last-child {
    border-bottom: none;
}

.hot-article-rank {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background-color: #f0f0f0;
    color: #999;
    border-radius: 50%;
    margin-right: 15px;
    font-size: 12px;
    font-weight: bold;
}

.hot-article-item:nth-child(1) .hot-article-rank {
    background-color: #ff6b6b;
    color: #fff;
}

.hot-article-item:nth-child(2) .hot-article-rank {
    background-color: #ffa726;
    color: #fff;
}

.hot-article-item:nth-child(3) .hot-article-rank {
    background-color: #ffca28;
    color: #fff;
}

.hot-article-title {
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
}

.hot-article-views {
    font-size: 13px;
    color: #999;
}

/* 搜索框 */
.knowledge-search {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.knowledge-search-box {
    position: relative;
}

.knowledge-search-box input {
    width: 100%;
    padding: 15px 120px 15px 20px;
    border: 2px solid #667eea;
    border-radius: 50px;
    font-size: 15px;
    transition: all 0.3s;
}

.knowledge-search-box input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.knowledge-search-box button {
    position: absolute;
    right: 5px;
    top: 5px;
    padding: 10px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
}

.knowledge-search-box button:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f91 100%);
}

/* 学习路径 */
.learning-path {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.path-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-top: 30px;
}

.path-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    z-index: 0;
}

.path-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.path-step-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.path-step-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.path-step-desc {
    font-size: 13px;
    color: #666;
}

/* 统计数据 */
.knowledge-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.knowledge-stat-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.knowledge-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.knowledge-stat-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.knowledge-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 8px;
}

.knowledge-stat-label {
    font-size: 14px;
    color: #666;
}

/* 文章列表样式 */
.article-list {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
}

.article-list-item {
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s;
}

.article-list-item:hover {
    background-color: #fafafa;
    padding-left: 20px;
}

.article-list-item:last-child {
    border-bottom: none;
}

.article-list-title {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin-bottom: 12px;
}

.article-list-title:hover {
    color: #667eea;
}

.article-list-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
}

.article-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.article-list-tags {
    display: flex;
    gap: 10px;
}

.article-tag {
    padding: 4px 12px;
    background-color: #f0f0f0;
    border-radius: 12px;
    color: #666;
}

/* 响应式 */
@media (max-width: 768px) {
    .knowledge-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-tabs {
        gap: 10px;
    }

    .category-tab {
        padding: 10px 18px;
        font-size: 14px;
    }

    .path-steps {
        flex-direction: column;
        gap: 30px;
    }

    .path-steps::before {
        display: none;
    }

    .knowledge-banner h1 {
        font-size: 28px;
    }

    .article-title {
        font-size: 24px;
    }

    .article-content {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .knowledge-stats {
        grid-template-columns: 1fr;
    }

    .article-actions {
        flex-direction: column;
        gap: 15px;
    }

    .article-action-btns {
        width: 100%;
        justify-content: center;
    }
}