/* 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "Heiti SC", sans-serif; line-height: 1.6; color: #333; background: #f8f9fa; }
a { color: #165DFF; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.py-4 { padding: 16px 0; }
.py-6 { padding: 24px 0; }

/* 头部样式 */
.header { background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.logo { display: flex; align-items: center; font-weight: bold; font-size: 1.2rem; color: #333; }
.logo-icon { width: 32px; height: 32px; background: #165DFF; border-radius: 6px; margin-right: 8px; display: flex; align-items: center; justify-content: center; color: white; }
.nav { display: flex; gap: 20px; }
.nav a { color: #666; font-size: 0.9rem; }
.nav a.active { color: #165DFF; font-weight: 500; }
.menu-toggle { display: none; font-size: 1.2rem; background: none; border: none; cursor: pointer; }

/* Header 搜索框 */
.header-inner .search-box { position: relative; margin: 0; flex: 0 1 280px; }
.header-inner .search-form { display: flex; align-items: center; background: #f5f5f5; border-radius: 20px; overflow: hidden; transition: all 0.3s; }
.header-inner .search-form:focus-within { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.header-inner .search-input { flex: 1; padding: 8px 12px 8px 16px; border: none; background: transparent; font-size: 0.9rem; outline: none; }
.header-inner .search-input::placeholder { color: #999; }
.header-inner .search-btn { padding: 8px 14px; border: none; background: transparent; cursor: pointer; font-size: 1rem; color: #666; transition: color 0.2s; }
.header-inner .search-btn:hover { color: #165DFF; }
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: white; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); margin-top: 8px; padding: 12px 0; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.25s ease; z-index: 1000; }
.search-box:focus-within .search-dropdown,
.search-dropdown:hover { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-title { padding: 0 16px 8px; font-size: 0.8rem; color: #999; border-bottom: 1px solid #f0f0f0; margin-bottom: 8px; }
.dropdown-list { display: flex; flex-direction: column; }
.dropdown-item { padding: 10px 16px; color: #333; font-size: 0.9rem; transition: background 0.2s; text-decoration: none !important; }
.dropdown-item:hover { background: #f5f7fa; color: #165DFF; }

/* 面包屑导航 */
.breadcrumb { font-size: 0.85rem; color: #999; padding: 10px 0; }
.breadcrumb a { color: #999; }
.breadcrumb span { color: #666; }

/* 文章头部 */
.article-header { margin-bottom: 24px; }
.article-tag { display: inline-block; background: #E8F3FF; color: #165DFF; padding: 3px 10px; border-radius: 12px; font-size: 0.8rem; margin-bottom: 10px; }
.article-title { font-size: 1.8rem; line-height: 1.3; margin-bottom: 16px; color: #222; }
.article-meta { display: flex; flex-wrap: wrap; gap: 15px; font-size: 0.85rem; color: #888; }
.author { display: flex; align-items: center; }
.author img { width: 24px; height: 24px; border-radius: 50%; margin-right: 6px; }

/* 文章内容区 */
.content-wrap { display: flex; gap: 24px; }
.main-content { flex: 1; max-width: 750px; }
.article-card { background: white; border-radius: 8px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 24px; }
.article-excerpt { background: #FFF8E6; border-left: 4px solid #FF9800; padding: 15px; margin-bottom: 20px; border-radius: 0 4px 4px 0; }
.article-excerpt h3 { color: #E67E22; margin-bottom: 8px; font-size: 1rem; }

/* 文章内容样式 */
.article-content h2 { font-size: 1.4rem; margin: 24px 0 16px; color: #222; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.article-content h3 { font-size: 1.2rem; margin: 20px 0 12px; color: #333; }
.article-content p { margin-bottom: 16px; }
.article-content ul { margin: 16px 0; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 16px 0; }
.highlight-box { background: #F0F7FF; border-radius: 6px; padding: 15px; margin: 16px 0; border: 1px solid #E1EDFF; }
.highlight-box h3 { color: #165DFF; margin-bottom: 8px; }

/* 侧边栏 */
.sidebar { width: 300px; flex-shrink: 0; }
.sidebar-card { background: white; border-radius: 8px; padding: 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 18px; }
.sidebar-title { font-size: 1rem; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 1px solid #eee; display: flex; align-items: center; }
.sidebar-title i { margin-right: 8px; color: #165DFF; }
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 10px; }
.toc-list a { color: #666; font-size: 0.9rem; }
.toc-list a:hover { color: #165DFF; }
/* 侧边栏搜索框 - 简洁版 */
.sidebar-search { padding: 16px !important; }
.search-header { display: flex; align-items: center; background: #f5f7fa; border-radius: 8px; padding: 2px; margin-bottom: 14px; }
.search-icon { padding: 10px 12px; color: #999; font-size: 1rem; }
.search-input-minimal { flex: 1; padding: 10px 12px 10px 0; border: none; background: transparent; font-size: 0.9rem; outline: none; }
.search-input-minimal::placeholder { color: #aaa; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-tag { padding: 6px 14px; background: #f0f4f8; border-radius: 16px; font-size: 0.8rem; color: #555; text-decoration: none !important; transition: all 0.2s; white-space: nowrap; }
.hot-tag:hover { background: #165DFF; color: white; }

/* 相关文章 */
.related-articles { margin: 30px 0; }
.related-title { font-size: 1.2rem; margin-bottom: 18px; display: flex; align-items: center; }
.related-title i { margin-right: 8px; color: #165DFF; }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.article-item { background: white; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.04); transition: transform 0.2s; }
.article-item:hover { transform: translateY(-2px); }
.article-item img { width: 100%; height: 160px; object-fit: cover; }
.article-item-content { padding: 15px; }
.article-item-category { font-size: 0.75rem; color: #165DFF; margin-bottom: 6px; display: inline-block; }
.article-item-title { font-size: 1rem; margin-bottom: 8px; line-height: 1.4; }
.article-item-meta { font-size: 0.75rem; color: #999; }

/* 页脚 */
.footer{background:linear-gradient(180deg,#1e293b 0%,#0f172a 100%);color:#94a3b8;padding:36px 0 0;font-size:0.85rem;margin-top:40px;}
.footer-inner{display:flex;flex-wrap:wrap;justify-content:space-between;gap:24px;padding-bottom:24px;}
.footer-col{flex:1;min-width:180px;}
.footer-col h3{color:#e2e8f0;font-size:1rem;margin-bottom:14px;}
.footer-col p{line-height:1.7;color:#94a3b8;}
.footer-col ul{list-style:none;}
.footer-col li{margin-bottom:8px;}
.footer-col a{color:#94a3b8;text-decoration:none;}
.footer-col a:hover{color:#fff;text-decoration:none;}
.footer-bottom{text-align:center;padding:16px 0;border-top:1px solid rgba(255,255,255,0.08);font-size:0.8rem;color:#64748b;}
.footer-bottom a{color:#94a3b8;text-decoration:none;}
.footer-bottom a:hover{color:#fff;}

/* 首页横幅 */
.hero-banner{text-align:center;padding:3rem 2rem;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;border-radius:12px;margin-bottom:2rem;}
.hero-title{font-size:2.5rem;margin-bottom:1rem;}
.hero-desc{font-size:1.2rem;opacity:0.9;max-width:600px;margin:0 auto 1.5rem;}

/* 新闻列表 */
.news-list{display:flex;flex-direction:column;gap:1rem;margin-top:1rem;}
.news-item{display:flex;gap:1rem;padding:1rem;border-radius:8px;background:#f8f9fa;text-decoration:none;color:inherit;}
.news-item:hover{text-decoration:none;}
.news-thumb{width:120px;height:80px;object-fit:cover;border-radius:6px;flex-shrink:0;}
.news-body{flex:1;}
.news-title{font-size:1rem;margin:0 0 0.5rem;color:#333;}
.news-desc{font-size:0.85rem;color:#666;margin:0;line-height:1.5;}
.news-date{font-size:0.75rem;color:#999;margin-top:0.5rem;}

/* 文章摘要 */
.article-summary{font-size:0.85rem;color:#666;margin:0.5rem 0;line-height:1.5;}
.article-summary-clamp{font-size:0.85rem;color:#666;margin:0.5rem 0;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}

/* 标签云 */
.tag-cloud{display:flex;flex-wrap:wrap;gap:8px;margin-top:1rem;}
.tag-link{background:#f0f7ff;padding:6px 14px;border-radius:16px;font-size:0.85rem;color:#1a73e8;text-decoration:none;}
.tag-link:hover{background:#1a73e8;color:#fff;text-decoration:none;}
.tag-link-sm{background:#f0f7ff;padding:5px 12px;border-radius:14px;font-size:0.8rem;color:#1a73e8;text-decoration:none;}
.tag-link-sm:hover{background:#1a73e8;color:#fff;text-decoration:none;}

/* 统计网格 */
.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-top:1rem;text-align:center;}
.stats-item{padding:1rem;background:#f8f9fa;border-radius:8px;}
.stats-value{font-size:1.5rem;font-weight:bold;color:#1a73e8;}
.stats-label{font-size:0.8rem;color:#666;}

/* 分类页头部 */
.category-title{font-size:1.8rem;margin:0 0 0.5rem;}
.category-desc{color:#666;margin:0;}

/* 分页 */
.pagination{display:flex;justify-content:center;gap:0.5rem;margin-top:2rem;}
.page-link{padding:0.5rem 1rem;background:#f0f0f0;color:#333;border-radius:6px;text-decoration:none;}
.page-link:hover{background:#e0e0e0;text-decoration:none;}
.page-link-active{padding:0.5rem 1rem;background:#1a73e8;color:#fff;border-radius:6px;text-decoration:none;}
.page-dots{padding:0.5rem;}

/* 热门文章列表 */
.hot-article-item{padding:0.75rem 0;border-bottom:1px dashed #eee;}
.hot-article-item:last-child{border-bottom:none;}
.hot-article-link{display:flex;gap:0.75rem;}
.hot-article-thumb{width:50px;height:50px;object-fit:cover;border-radius:4px;flex-shrink:0;}
.hot-article-body{flex:1;}
.hot-article-title{font-size:0.85rem;line-height:1.4;color:#333;}
.hot-article-date{font-size:0.75rem;color:#999;margin-top:4px;}

/* 通用间距 */
.mt-1{margin-top:1rem;}
.mt-2{margin-top:2rem;}
.ml-4{margin-left:1rem;}

/* 回到顶部按钮 */
.back-to-top { position: fixed; bottom: 20px; right: 20px; width: 40px; height: 40px; background: #165DFF; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.2); cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s; }
.back-to-top.visible { opacity: 1; visibility: visible; }

/* 滚动进度条 */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; background: #165DFF; z-index: 100; width: 0%; }

/* 响应式调整 */
@media (max-width: 992px) {
    .content-wrap { flex-direction: column; }
    .sidebar { width: 100%; max-width: 100%; }
    .main-content { max-width: 100%; }
    .articles-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .menu-toggle { display: block; }
    .header-inner .search-box { flex: 1; max-width: 200px; margin: 0 10px; }
    .article-title { font-size: 1.5rem; }
    .article-meta { flex-direction: column; gap: 5px; }
    .articles-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .header-inner .search-box { display: none; }
}

/* AI问答区域样式 */
.ai-answer-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    color: #fff;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}
.ai-answer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.ai-answer-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}
.ai-icon {
    font-size: 1.5rem;
}
.ai-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}
.ai-answer-content {
    font-size: 1rem;
    line-height: 1.8;
    padding: 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    border-left: 3px solid rgba(255,255,255,0.5);
}
.ai-answer-meta {
    margin-top: 12px;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* AI引用链接样式 */
.ai-references {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.12);
    border-radius: 6px;
}
.ref-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    display: inline;
    margin-right: 8px;
}
.ref-links {
    display: inline;
}
.ref-link {
    display: inline;
    color: rgba(255,255,255,0.9);
    font-size: 0.75rem;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255,255,255,0.4);
    margin-right: 12px;
    transition: all 0.2s;
}
.ref-link:hover {
    color: #fff;
    border-bottom-color: #fff;
}
.ref-icon {
    display: none;
}
.ref-title {
    display: inline;
}

/* 核心要点样式（复用AI盒子样式，可单独定制） */
.summary-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.summary-box .ai-answer-header h2 {
    font-size: 1.1rem;
}
