/* 文章页面美化样式 - 匹配网站紫色渐变主题 */

/* 文章标题 */
.article-title {
    font-size: 28px;
    font-weight: 700;
    color: #2C3E50;
    line-height: 1.3;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0eef8;
}

/* 文章元信息行（日期/分类/阅读时间） */
.article-meta {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.article-meta time,
.article-meta .page-category,
.article-meta .reading-time {
    background: linear-gradient(135deg, #f0eef8, #f5f2fa);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #d5cce8;
    font-size: 13px;
}

.article-meta a {
    color: #8E44AD;
    text-decoration: none;
}

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

/* 文章正文 */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
}

.article-content p {
    margin-bottom: 16px;
    text-indent: 2em;
}

/* 首段高亮：lead-paragraph，首字放大红色 */
.lead-paragraph {
    font-size: 18px;
    line-height: 1.7;
    color: #2C3E50;
    background: linear-gradient(135deg, #f8f4fc, #f0eef8);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid #8E44AD;
}

.lead-paragraph::first-letter {
    font-size: 1.3em;
    color: #E74C3C;
    font-weight: bold;
    float: left;
    margin-right: 4px;
    line-height: 1;
}

/* 引用块 */
blockquote {
    border-left: 4px solid #8E44AD;
    background: linear-gradient(135deg, #f8f4fc, #f0eef8);
    padding: 20px 25px;
    margin: 32px 0;
    color: #555;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    position: relative;
}

blockquote::before {
    content: '"';
    font-size: 60px;
    color: rgba(142, 68, 173, 0.2);
    position: absolute;
    left: 10px;
    top: -10px;
}

/* 代码块 */
pre, code {
    background: linear-gradient(135deg, #f5f5f5, #eeeeee);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

pre {
    padding: 16px 20px;
    overflow-x: auto;
    margin: 20px 0;
}

code {
    padding: 2px 6px;
    font-size: 14px;
}

pre code {
    background: none;
    padding: 0;
    border: none;
}

/* 特色图片 */
.featured-image {
    margin: 32px 0;
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.featured-image:hover img {
    transform: scale(1.02);
}

/* 系列信息 */
.series-info {
    background: linear-gradient(135deg, #f0eef8, #f5f2fa);
    border: 1px solid #d5cce8;
    border-radius: 12px;
    padding: 20px;
    margin: 32px 0;
    position: relative;
}

.series-info::before {
    content: '📚';
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.series-info h3 {
    margin-top: 5px;
    margin-bottom: 12px;
    color: #8E44AD;
    font-size: 18px;
}

/* 文章导航（上一篇/下一篇） */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
    gap: 20px;
}

.article-nav-item {
    flex: 1;
    text-align: center;
}

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

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

.article-navigation a {
    color: #8E44AD;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.article-navigation a:hover {
    background: linear-gradient(135deg, #f0eef8, #f5f2fa);
    text-decoration: underline;
}

/* "待续"样式 */
.article-to-be-continued {
    text-align: center;
    font-size: 18px;
    color: #8E44AD;
    font-weight: 600;
    margin: 40px 0;
    padding: 20px;
    border-top: 1px dashed #d5cce8;
    border-bottom: 1px dashed #d5cce8;
    background: linear-gradient(135deg, #f8f4fc, #f0eef8);
    border-radius: 8px;
}

/* 展开全文按钮 */
.read-more-btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
}

/* 首页文章卡片四行结构 */
.post-item {
    padding: 24px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.post-item:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.post-date {
    color: #95a5a6;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
}

.post-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2C3E50;
    line-height: 1.4;
}

.post-title a {
    color: #2C3E50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #8E44AD;
}

.post-meta-line {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-meta-line .category {
    background: linear-gradient(135deg, #f0eef8, #f5f2fa);
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid #d5cce8;
    font-size: 12px;
}

.post-meta-line .reading-time {
    background: linear-gradient(135deg, #e8f4fd, #f0f8ff);
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid #b8daff;
    font-size: 12px;
    color: #0066cc;
}

.post-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 16px;
}

/* 标签样式 */
.page-tags {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.tag {
    display: inline-block;
    background: linear-gradient(135deg, #f0eef8, #f5f2fa);
    color: #8E44AD;
    padding: 4px 12px;
    margin: 4px;
    border-radius: 16px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #d5cce8;
    transition: all 0.3s ease;
}

.tag:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-1px);
}

/* 相关文章推荐 */
.related-articles {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.related-articles h3 {
    font-size: 18px;
    color: #2C3E50;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0eef8;
}

.related-articles ul {
    list-style: none;
    padding: 0;
}

.related-articles li {
    margin-bottom: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa, #f0f0f0);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-articles li:hover {
    background: linear-gradient(135deg, #f0eef8, #f5f2fa);
    transform: translateX(4px);
}

.related-articles a {
    color: #2C3E50;
    text-decoration: none;
    font-weight: 500;
}

.related-articles a:hover {
    color: #8E44AD;
}

.related-date {
    font-size: 12px;
    color: #7f8c8d;
    margin-left: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .article-title {
        font-size: 24px;
    }
    
    .article-content {
        font-size: 15px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .post-item {
        padding: 16px;
    }
    
    .post-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 20px;
    }
    
    .lead-paragraph {
        font-size: 16px;
        padding: 16px;
    }
    
    .read-more-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 系列信息卡片 */
.series-info-card {
    background: linear-gradient(135deg, #f0eef8 0%, #e8e0f5 100%);
    border: 1px solid #d5cce8;
    border-radius: 12px;
    padding: 20px;
    margin: 32px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.series-info-header {
    font-size: 18px;
    font-weight: 600;
    color: #6C3483;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d5cce8;
}
.series-field {
    display: flex;
    padding: 6px 0;
    font-size: 15px;
    line-height: 1.6;
}
.field-label {
    color: #8E44AD;
    font-weight: 500;
    min-width: 100px;
    flex-shrink: 0;
}
.field-value {
    color: #333;
}

/* 作者的话卡片 */
.author-note-card {
    background: #fff8e6;
    border: 1px solid #f0dca0;
    border-radius: 12px;
    padding: 20px;
    margin: 32px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.author-note-header {
    font-size: 16px;
    font-weight: 600;
    color: #b7950b;
    margin-bottom: 10px;
}
.author-note-body {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}

/* 待续样式 */
.article-to-be-continued {
    text-align: center;
    font-size: 18px;
    color: #8E44AD;
    font-weight: 600;
    margin: 40px 0;
    padding: 15px;
    border-top: 1px dashed #d5cce8;
}



/* 分类页面文章卡片样式 */
.category-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.category-page-container .page-title {
    font-size: 28px;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #8E44AD;
}

.category-page-container .page-description {
    color: #7f8c8d;
    font-size: 16px;
    margin-bottom: 32px;
}

.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.article-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.article-card:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

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

.article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2C3E50;
    line-height: 1.4;
}

.article-title a {
    color: #2C3E50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #8E44AD;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.article-meta time {
    color: #95a5a6;
    font-size: 14px;
    font-weight: 500;
}

.reading-time {
    background: linear-gradient(135deg, #e8f4fd, #f0f8ff);
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid #b8daff;
    font-size: 12px;
    color: #0066cc;
}

.article-tags {
    margin-bottom: 16px;
}

.article-tags .tag {
    display: inline-block;
    background: linear-gradient(135deg, #f0eef8, #f5f2fa);
    color: #8E44AD;
    padding: 4px 12px;
    margin: 2px;
    border-radius: 16px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #d5cce8;
    transition: all 0.3s ease;
}

.article-tags .tag:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-1px);
}

.article-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
    text-align: justify;
}

.article-footer {
    text-align: center;
}

.read-more-btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-page-container {
        padding: 0 16px;
    }
    
    .article-card {
        padding: 16px;
    }
    
    .article-title {
        font-size: 18px;
    }
    
    .category-page-container .page-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .read-more-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
