/* 教程系统样式表 - 完整版 */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa; 
    line-height: 1.6;
    color: #2c3e50;
    min-height: 100vh;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
}

/* 教程首页样式 */
h1 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
}

.tutorial-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 20px; 
    margin-top: 20px;
}

.tutorial-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e1e8ed;
}

.tutorial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.tutorial-card h3 { 
    margin-bottom: 12px; 
    font-size: 18px;
    font-weight: 600;
}

.tutorial-card h3 a { 
    color: #2c3e50; 
    text-decoration: none; 
    transition: color 0.3s;
}

.tutorial-card h3 a:hover { 
    color: #3498db; 
}

.tutorial-card p { 
    color: #7f8c8d; 
    margin-bottom: 15px; 
    font-size: 14px;
    line-height: 1.5;
}

.btn { 
    display: inline-block; 
    padding: 8px 16px; 
    background: #3498db; 
    color: white; 
    text-decoration: none; 
    border-radius: 6px; 
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover { 
    background: #2980b9; 
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* 教程详情页布局 */
.tutorial-container { 
    display: flex; 
    gap: 30px; 
    margin-top: 20px;
}

/* 左侧导航样式 */
.sidebar { 
    width: 380px; 
    flex-shrink: 0; 
}

.sidebar-box { 
    background: white;
}

.sidebar-title { 
    margin: 0 0 15px 0; 
    padding-bottom: 12px; 
    border-bottom: 2px solid #f8f9fa; 
    color: #2c3e50; 
    font-size: 16px;
    font-weight: 600;
}

/* 章列表样式 */
.chapter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-item {
    margin-bottom: 8px;
}

.chapter-link {
    display: block;
    padding: 12px 15px;
    background: #e9ecef;
    border-radius: 0px;
    color: #495057;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.chapter-link:hover {
    background: #e9ecef;
    border-left-color: #3498db;
    transform: translateX(3px);
}

.chapter-link.active {
    background: #3498db;
    color: white;
    border-left-color: #2980b9;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* 文章列表样式 */
.chapter-articles {
    padding-left: 0px;
    margin-top: 5px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0px;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    margin-bottom: 5px;
}

.article-link:hover {
    background: #f8f9fa;
    border-color: #3498db;
    transform: translateX(2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.article-link.active {
    background: #e3f2fd;
    border-color: #3498db;
    color: #1976d2;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.article-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    line-height: 1;
    background: #6c757d;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
    font-weight: 600;
}

.article-link.active .article-num {
    background: #1976d2;
}

/* 主内容区域样式 */

.ttt { 
    max-width: 1380px; 
    margin: 0 auto; 
    padding: 20px; 
}

.main-content { 
    flex: 1; 
    background: white; 
    border-radius: 0px; 
    padding: 20px; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
    border: 1px solid #e1e8ed;
    min-height: 500px;
}

/* 面包屑导航 */
.breadcrumb { 
    margin-bottom: 25px; 
    color: #7f8c8d; 
    font-size: 14px; 
    padding-bottom: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.breadcrumb a { 
    color: #3498db; 
    text-decoration: none; 
    transition: color 0.3s;
}

.breadcrumb a:hover { 
    color: #2980b9; 
    text-decoration: underline; 
}

/* 文章头部 */
.article-header { 
    margin-bottom: 30px; 
    padding-bottom: 20px; 
    border-bottom: 2px solid #f8f9fa; 
}

.article-header h1 { 
    margin: 0 0 15px 0; 
    color: #2c3e50; 
    font-size: 32px; 
    line-height: 1.3;
    font-weight: 700;
}

.article-meta { 
    color: #7f8c8d; 
    font-size: 14px; 
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.article-meta span { 
    display: flex;
    align-items: center;
}

.article-meta span::before {
    content: "•";
    margin-right: 8px;
    color: #bdc3c7;
}

.article-meta span:first-child::before {
    content: "";
    margin-right: 0;
}

/* 文章内容样式 */
.article-content { 
    line-height: 1.8; 
    color: #2c3e50; 
    font-size: 16px;
}

.article-content h2 { 
    margin: 30px 0 15px 0; 
    color: #2c3e50; 
    font-size: 24px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
}

.article-content h3 { 
    margin: 25px 0 12px 0; 
    color: #2c3e50; 
    font-size: 20px;
    font-weight: 600;
}

.article-content p { 
    margin: 16px 0; 
    color: #2c3e50;
}

.article-content code { 
    background: #f8f9fa; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-family: 'Courier New', Monaco, monospace;
    font-size: 14px;
    color: #e74c3c;
}

.article-content pre { 
    background: #2c3e50; 
    padding: 20px; 
    border-radius: 8px; 
    overflow-x: auto; 
    margin: 20px 0;
    border-left: 4px solid #3498db;
}

.article-content pre code { 
    background: none; 
    padding: 0; 
    color: #ecf0f1;
}

.article-content blockquote { 
    border-left: 4px solid #3498db; 
    padding-left: 20px; 
    margin: 20px 0; 
    color: #7f8c8d; 
    font-style: italic;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
}

.article-content table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.article-content table th,
.article-content table td { 
    border: 1px solid #ddd; 
    padding: 12px 15px; 
    text-align: left; 
}

.article-content table th { 
    background: #f8f9fa; 
    font-weight: 600;
    color: #2c3e50;
}

.article-content img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 文章导航 */
.article-nav { 
    margin-top: 40px; 
    padding-top: 20px; 
    border-top: 2px solid #f8f9fa; 
    display: flex; 
    justify-content: space-between; 
    gap: 15px;
}

.nav-btn { 
    display: inline-flex; 
    align-items: center; 
    padding: 12px 20px; 
    background: #3498db; 
    color: white; 
    text-decoration: none; 
    border-radius: 8px; 
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.nav-btn:hover { 
    background: #2980b9; 
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .tutorial-container { 
        flex-direction: column; 
        gap: 20px;
    }
    
    .sidebar { 
        width: 100%; 
    }
    
    .tutorial-grid { 
        grid-template-columns: 1fr; 
    }
    
    .article-nav { 
        flex-direction: column; 
        gap: 10px;
    }
    
    .nav-btn { 
        text-align: center; 
        justify-content: center;
    }
    
    .main-content { 
        padding: 20px; 
    }
    
    .article-header h1 { 
        font-size: 24px; 
    }
    
    .article-meta { 
        flex-direction: column; 
        gap: 8px;
    }
    
    .chapter-articles {
        padding-left: 15px;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-muted { color: #7f8c8d; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.empty-state p {
    margin-bottom: 10px;
}