/* 文章详情页专用样式 */

/* 主要内容区域布局 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

/* 文章容器 */
.article-container {
    grid-column: 1;
}

/* 文章头部 */
.article-header {
    margin-bottom: 30px;
}

.article-category {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.article-title {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #333;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.meta-left {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.meta-right {
    display: flex;
    gap: 10px;
}

.share-btn,
.bookmark-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.share-btn:hover,
.bookmark-btn:hover {
    background-color: #f5f5f5;
    border-color: #007bff;
    color: #007bff;
}

.bookmark-btn.bookmarked {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* 文章特色图片 */
.article-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* 文章内容 */
.article-content {
    line-height: 1.8;
    color: #333;
}

/* 文章内容中的图片限制 */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-content img:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.content-intro {
    background-color: #f8f9fa;
    padding: 25px;
    border-left: 4px solid #007bff;
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
}

.lead {
    font-size: 18px;
    color: #555;
    margin: 0;
    font-style: italic;
}

.article-content h2 {
    font-size: 24px;
    margin: 40px 0 20px 0;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.article-content h3 {
    font-size: 20px;
    margin: 30px 0 15px 0;
    color: #444;
}

.article-content p {
    margin-bottom: 20px;
    font-size: 16px;
}

.article-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 10px;
    font-size: 16px;
}

.article-content strong {
    color: #333;
    font-weight: 600;
}

/* 文章标签 */
.article-tags {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.article-tags .tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tags .tag:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* 作者信息 */
.author-info {
    display: flex;
    gap: 20px;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 40px 0;
    border: 1px solid #e0e0e0;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.author-details p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.author-social {
    display: flex;
    gap: 10px;
}

.social-link {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* 相关文章 */
.related-articles {
    margin: 40px 0;
}

.related-articles h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
}

.related-article {
    display: flex;
    gap: 15px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.related-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-article img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.related-content h4 {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-content h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content h4 a:hover {
    color: #007bff;
}

.related-date {
    font-size: 12px;
    color: #999;
}



/* 侧边栏 */
.sidebar {
    grid-column: 2;
}

.sidebar-widget {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
    color: #333;
}

/* 热门文章 */
.popular-articles {
    list-style: none;
}

.popular-articles li {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.popular-articles li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.popular-articles a {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.popular-articles img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.article-info h4 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
    color: #333;
}

.article-info .views {
    font-size: 12px;
    color: #999;
}



/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    text-decoration: none;
    color: #666;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* 夜晚模式样式 */
body.dark-mode .article-title {
    color: #e8eaed;
}

body.dark-mode .article-meta {
    border-top-color: #2d3238;
    border-bottom-color: #2d3238;
}

body.dark-mode .meta-left {
    color: #bdc1c6;
}

body.dark-mode .share-btn,
body.dark-mode .bookmark-btn {
    background-color: #1a1d21;
    border-color: #2d3238;
    color: #e8eaed;
}

body.dark-mode .share-btn:hover,
body.dark-mode .bookmark-btn:hover {
    background-color: #2d3238;
    border-color: #4a9eff;
    color: #4a9eff;
}

body.dark-mode .bookmark-btn.bookmarked {
    background-color: #4a9eff;
    color: white;
    border-color: #4a9eff;
}

body.dark-mode .content-intro {
    background-color: #1a1d21;
    border-left-color: #4a9eff;
}

body.dark-mode .lead {
    color: #bdc1c6;
}

body.dark-mode .article-content {
    color: #e8eaed;
}

body.dark-mode .article-content h2 {
    color: #e8eaed;
    border-bottom-color: #2d3238;
}

body.dark-mode .article-content h3 {
    color: #e8eaed;
}

body.dark-mode .article-content strong {
    color: #e8eaed;
}

body.dark-mode .article-tags {
    border-top-color: #2d3238;
}

body.dark-mode .article-tags .tag {
    background-color: #242729;
    border-color: #2d3238;
    color: #e8eaed;
}

body.dark-mode .article-tags .tag:hover {
    background-color: #4a9eff;
    color: white;
    border-color: #4a9eff;
}

body.dark-mode .author-info {
    background-color: #1a1d21;
    border-color: #2d3238;
}

body.dark-mode .author-details h3 {
    color: #e8eaed;
}

body.dark-mode .author-details p {
    color: #bdc1c6;
}

body.dark-mode .social-link {
    background-color: #4a9eff;
}

body.dark-mode .social-link:hover {
    background-color: #3a8eef;
}

body.dark-mode .related-articles h3 {
    color: #e8eaed;
    border-bottom-color: #2d3238;
}

body.dark-mode .related-article {
    background-color: #1a1d21;
    border-color: #2d3238;
}

body.dark-mode .related-content h4 a {
    color: #e8eaed;
}

body.dark-mode .related-content h4 a:hover {
    color: #4a9eff;
}



body.dark-mode .sidebar-widget {
    background-color: #1a1d21;
    border-color: #2d3238;
}

body.dark-mode .sidebar-widget h3 {
    color: #e8eaed;
    border-bottom-color: #2d3238;
}

body.dark-mode .popular-articles li {
    border-bottom-color: #2d3238;
}

body.dark-mode .article-info h4 {
    color: #e8eaed;
}

body.dark-mode .article-info .views {
    color: #9aa0a6;
}



body.dark-mode .tag {
    background-color: #242729;
    border-color: #2d3238;
    color: #e8eaed;
}

body.dark-mode .tag:hover {
    background-color: #4a9eff;
    color: white;
    border-color: #4a9eff;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr 250px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 20px 15px;
    }
    
    .sidebar {
        grid-column: 1;
        order: 2;
    }
    
    .article-container {
        order: 1;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .meta-left {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-featured-image img {
        height: 250px;
    }
    
    .content-intro {
        padding: 20px;
    }
    
    .lead {
        font-size: 16px;
    }
    
    .article-content h2 {
        font-size: 20px;
    }
    
    .article-content h3 {
        font-size: 18px;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto);
        gap: 15px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        gap: 10px;
    }
    
    .related-article {
        flex-direction: column;
        text-align: center;
    }
    
    .related-article img {
        width: 100%;
        height: 120px;
    }
    

}

@media (max-width: 480px) {
    .article-title {
        font-size: 20px;
    }
    
    .article-featured-image img {
        height: 200px;
    }
    
    .content-intro {
        padding: 15px;
    }
    
    .lead {
        font-size: 15px;
    }
    
    .article-content h2 {
        font-size: 18px;
    }
    
    .article-content h3 {
        font-size: 16px;
    }
    
    .article-content p,
    .article-content li {
        font-size: 15px;
    }
    
    .author-info {
        padding: 15px;
    }
    
    .author-avatar img {
        width: 60px;
        height: 60px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
} 