/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

/* 头部 */
header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
}

/* 布局 */
.content-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.content {
    flex: 1;
    min-width: 0;
}

/* 侧边栏 */
.widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.widget h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list > li > a {
    display: block;
    padding: 10px 12px;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}

.category-list > li > a:hover,
.category-list > li > a.active {
    background: #e8f4fd;
    color: #1a73e8;
}

.sub-category {
    list-style: none;
    padding-left: 15px;
    margin: 5px 0;
}

.sub-category li a {
    display: block;
    padding: 6px 12px;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.sub-category li a:hover,
.sub-category li a.active {
    background: #f0f7ff;
    color: #1a73e8;
}

.sub-category {
    list-style: none;
    padding-left: 15px;
    margin: 5px 0;
}

.sub-category li a {
    display: block;
    padding: 6px 12px;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.sub-category li a:hover,
.sub-category li a.active {
    background: #f0f7ff;
    color: #1a73e8;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    color: #555;
    text-decoration: none;
    font-size: 13px;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 15px;
    transition: background 0.2s;
}

.tag-cloud a:hover,
.tag-cloud a.active {
    background: #1a73e8;
    color: #fff;
}

/* 文章列表 */
.article-list {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}

.article-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.article-item h2 a {
    color: #333;
    text-decoration: none;
}

.article-item h2 a:hover {
    color: #1a73e8;
}

.article-meta {
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
}

.article-meta span {
    margin-right: 15px;
}

.article-summary {
    color: #666;
    margin: 10px 0;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    color: #1a73e8;
    font-size: 13px;
    text-decoration: none;
}

.article-highlights {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.article-highlights ul {
    margin-top: 10px;
    padding-left: 20px;
}

.article-highlights li {
    margin-bottom: 5px;
    color: #555;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination a,
.pagination .page-info {
    padding: 8px 15px;
    background: #fff;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background: #1a73e8;
    color: #fff;
}

/* 文章详情 */
.article-detail {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
}

.article-detail h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.article-summary-box,
.article-highlights-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.article-content {
    line-height: 1.8;
    font-size: 16px;
    margin-top: 30px;
}

.article-content p {
    margin-bottom: 15px;
}

/* AI 分析结果样式 */
.llm-analysis-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
}

.llm-analysis-box h3 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.llm-analysis-box .analysis-section {
    margin-bottom: 20px;
}

.llm-analysis-box .analysis-section:last-child {
    margin-bottom: 0;
}

.llm-analysis-box h4 {
    font-size: 16px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.llm-analysis-box p {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.95;
}

.llm-analysis-box ul {
    margin-left: 20px;
}

.llm-analysis-box li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

/* Markdown 内容样式 */
.markdown-content-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border: 1px solid #e9ecef;
}

.markdown-content-box h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.markdown-preview {
    background: #282c34;
    color: #abb2bf;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.markdown-preview code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* 底部 */
footer {
    background: #fff;
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
    color: #888;
}

footer a {
    color: #1a73e8;
    text-decoration: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .search-input {
        width: 150px;
    }
}
