/* 教程页面专用样式 */

/* 教程标题部分 */
.tutorial-header {
    background-color: #f5f7fa;
    padding: 2rem 0;
    border-bottom: 1px solid #e0e4e8;
}

.tutorial-header h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.3;
}

.breadcrumbs {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumbs a {
    color: #666;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #4a6cf7;
    text-decoration: underline;
}

.tutorial-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

.tutorial-meta i {
    margin-right: 0.3rem;
    color: #4a6cf7;
}

/* 教程内容布局 */
.tutorial-content {
    padding: 3rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
}

.main-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* 目录样式 */
.tutorial-toc {
    background-color: #f8fafc;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 6px;
    border-left: 4px solid #4a6cf7;
}

.tutorial-toc h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.tutorial-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tutorial-toc li {
    margin-bottom: 0.8rem;
}

.tutorial-toc a {
    color: #4a6cf7;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    transition: all 0.2s;
}

.tutorial-toc a:hover {
    color: #2c3e50;
    transform: translateX(5px);
}

/* 教程章节样式 */
.tutorial-section {
    padding: 2rem;
    border-bottom: 1px solid #eee;
}

.tutorial-section:last-child {
    border-bottom: none;
}

.tutorial-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 0.8rem;
}

.tutorial-section h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem;
    color: #2c3e50;
}

.tutorial-section p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    color: #333;
}

.tutorial-section ul, 
.tutorial-section ol {
    margin-bottom: 1.5rem;
    padding-left: 1.2rem;
}

.tutorial-section li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.tutorial-image {
    width: 100%;
    border-radius: 6px;
    margin: 1rem 0 1.5rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 代码和提示框样式 */
code {
    background-color: #f5f7fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.note-box {
    background-color: #f8f9fa;
    border-left: 4px solid #ffd43b;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 6px 6px 0;
}

.note-box p {
    margin: 0;
}

/* 表格样式 */
.specs-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.specs-table th {
    background-color: #f5f7fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid #e0e4e8;
}

.specs-table td {
    padding: 0.8rem 1rem;
    border: 1px solid #e0e4e8;
}

.specs-table tr:nth-child(even) {
    background-color: #f8fafc;
}

/* 继续阅读区域 */
.read-more {
    background-color: #f8fafc;
    padding: 1.5rem;
    margin: 2rem;
    border-radius: 8px;
    text-align: center;
}

.read-more p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
}

.tutorial-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* 评论区样式 */
.tutorial-comments {
    padding: 2rem;
    border-top: 1px solid #eee;
}

.tutorial-comments h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    height: 120px;
    padding: 1rem;
    border: 1px solid #e0e4e8;
    border-radius: 6px;
    margin-bottom: 1rem;
    resize: vertical;
    font-family: 'Inter', sans-serif;
}

.comments-list {
    margin-bottom: 1.5rem;
}

.comment {
    display: flex;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.comment-reply {
    margin-left: 3rem;
    border-bottom: none;
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
}

.comment-author.admin {
    color: #4a6cf7;
}

.comment-date {
    color: #666;
    font-size: 0.9rem;
}

.comment-actions {
    margin-top: 0.8rem;
}

.comment-actions a {
    color: #4a6cf7;
    font-size: 0.9rem;
    text-decoration: none;
}

.view-more {
    text-align: center;
    margin-top: 1rem;
}

/* 侧边栏样式 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar > div {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

/* 作者卡片 */
.author-card {
    text-align: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
    border: 3px solid #4a6cf7;
}

.author-card h3 {
    margin-bottom: 0.8rem;
    color: #2c3e50;
}

.author-card p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.author-social a {
    color: #4a6cf7;
    font-size: 1.2rem;
}

/* 相关教程 */
.related-tutorials h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.related-tutorials ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-tutorials li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.related-tutorials li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-tutorials a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.tutorial-title {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.tutorial-date {
    color: #666;
    font-size: 0.8rem;
}

/* 标签云 */
.tags h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: #f5f7fa;
    color: #4a6cf7;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
}

.tag:hover {
    background-color: #4a6cf7;
    color: #fff;
}

/* 下载盒子 */
.download-box {
    text-align: center;
}

.download-box h3 {
    margin-bottom: 0.8rem;
    color: #2c3e50;
}

.download-box p {
    margin-bottom: 1rem;
    color: #666;
}

.btn-download {
    margin-bottom: 1rem;
    display: block;
}

.dl-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .tutorial-meta {
        gap: 1rem;
    }
    
    .tutorial-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .tutorial-section {
        padding: 1.5rem;
    }
    
    .tutorial-toc {
        padding: 1rem;
    }
    
    .tutorial-header {
        padding: 1.5rem 0;
    }
    
    .comment-reply {
        margin-left: 1.5rem;
    }
}

@media (max-width: 576px) {
    .tutorial-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tutorial-navigation {
        flex-direction: column;
    }
} 