/* 文章页面样式 */
.article-page {
    display: flex;
    max-width: 1200px;
    margin: 200px auto 60px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* 文章头部（标题、分类等）*/
.article-header-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* 返回链接 */
.article-nav-back {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--accent-color);
    transform: translateX(-5px);
}

.back-link svg {
    transition: transform 0.3s ease;
}

.back-link:hover svg {
    transform: translateX(-3px);
}

/* 文章标题简化样式 */
.article-header h1 {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: normal;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

/* 阅读进度条 */
.reading-progress-container {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 80px;
    left: 0;
    z-index: 1000;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-color-2));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* 侧边目录 */
.article-toc {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 20px;
}

.toc-container {
    background-color: var(--secondary-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toc-container h3 {
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 8px;
    line-height: 1.4;
}

.toc-item a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: block;
    padding: 4px 0;
}

.toc-item a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.toc-item.toc-h1 a {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color);
}

.toc-item.toc-h2 {
    margin-left: 15px;
}

.toc-item.toc-h3 {
    margin-left: 30px;
    font-size: 13px;
}

.toc-item.active a {
    color: var(--accent-color);
    font-weight: bold;
}

/* 文章内容 */
.article-content {
    flex-grow: 1;
    background-color: var(--secondary-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-header {
    margin-bottom: 30px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

.article-meta a {
    color: var(--accent-color);
    text-decoration: none;
}

.article-meta a:hover {
    text-decoration: underline;
}

.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.article-intro {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 3px solid var(--accent-color);
}

/* 标题样式 */
.article-body h2 {
    font-size: 24px;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.article-body h3 {
    font-size: 20px;
    margin: 30px 0 15px;
    color: var(--text-color);
}

.article-body p {
    margin-bottom: 20px;
}

/* 列表样式 */
.article-body ul, .article-body ol {
    margin: 0 0 20px 20px;
    padding: 0;
}

.article-body li {
    margin-bottom: 10px;
}

/* 代码块样式 */
.code-block {
    background-color: var(--primary-color);
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
}

/* 注意块样式 */
.note-block {
    background-color: rgba(0, 180, 216, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

/* 引用块样式 */
.quote-block {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quote-block blockquote {
    font-style: italic;
    font-size: 18px;
    color: var(--text-color);
    margin: 0 0 10px;
    padding-left: 20px;
    border-left: 3px solid var(--accent-color-2);
}

.quote-block cite {
    display: block;
    text-align: right;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 图片容器 */
.image-container {
    margin: 30px 0;
    text-align: center;
}

.image-container img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.image-caption {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

/* 文章页脚 */
.article-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-label, .share-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.article-tag {
    padding: 4px 10px;
    background-color: var(--primary-color);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-link svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.share-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.share-link:hover svg {
    color: white;
}

/* 文章导航 */
.article-nav {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-nav a {
    display: flex;
    flex-direction: column;
    max-width: 45%;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.article-nav a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.nav-title {
    font-size: 16px;
    color: var(--text-color);
}

.article-nav-prev {
    text-align: left;
}

.article-nav-next {
    text-align: right;
}

/* 评论区域 */
.article-comments {
    margin-top: 40px;
}

.article-comments h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.comment-form {
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    height: 100px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 15px;
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 10px;
    resize: vertical;
}

.comment-submit {
    background: linear-gradient(45deg, var(--accent-color), var(--accent-color-2));
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.comment-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 900px) {
    .article-page {
        flex-direction: column;
        margin-top: 180px;
    }
    
    .article-header-wrapper {
        padding: 0 20px;
        margin-bottom: 20px;
    }
    
    .article-toc {
        position: relative;
        top: 0;
        width: 100%;
        margin-bottom: 20px;
        max-height: none;
    }
    
    .article-content {
        padding: 30px 20px;
    }
    
    .article-header h1 {
        font-size: 28px;
    }
    
    .article-body h2 {
        font-size: 22px;
    }
    
    .article-body h3 {
        font-size: 18px;
    }
    
    .article-intro {
        font-size: 16px;
    }
    
    .article-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .reading-progress-container {
        top: 70px;
    }
}

@media (max-width: 600px) {
    .article-header h1 {
        font-size: 24px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .article-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .article-nav a {
        max-width: 100%;
    }
} 