/* 公共变量 */
:root {
    --primary-color: #1a5c4a;      /* 深邃绿 */
    --accent-color: #d4a373;        /* 琥珀金 */
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-gray: #f9f9f9;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(0,0,0,0.08);
    --highlight-color: #ffff00;     /* 默认黄色高亮，文章页可覆盖 */
}

/* 全局重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: "Microsoft YaHei", sans-serif; 
    background-color: var(--bg-gray); 
    color: var(--text-dark); 
    line-height: 1.6; 
}
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* 顶部导航 */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 15px;
}
.logo { font-size: 20px; font-weight: bold; color: var(--primary-color); white-space: nowrap; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; white-space: nowrap; }
.nav-links a { margin-left: 20px; font-weight: 500; font-size: 16px; }
.nav-links a:hover { color: var(--primary-color); }

/* 主页 Banner */
.banner { max-width: 1100px; margin: 10px auto; }
.banner img { width: 100%; height: auto; border-radius: 4px; display: block; }

/* 主页优势模块 */
.advantage-section { max-width: 1100px; margin: 30px auto; padding: 0 15px; }
.section-title { 
    text-align: center; 
    margin-bottom: 25px; 
    position: relative; 
    padding-bottom: 10px; 
}
.section-title::after { 
    content: ''; 
    width: 50px; 
    height: 3px; 
    background: var(--accent-color); 
    position: absolute; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
}
.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.adv-item { text-align: center; padding: 20px; border: 1px dashed #eee; }
.adv-item h3 { color: var(--primary-color); margin-bottom: 10px; }

/* 新闻列表页主容器 + 文章列表 */
.main-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}
.article-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.article-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    transition: 0.3s;
    border-left: 4px solid transparent;
    box-shadow: var(--shadow);
}
.article-card:hover { 
    transform: translateY(-3px); 
    box-shadow: var(--shadow); 
    border-left-color: var(--primary-color); 
}
.article-card h2 { font-size: 18px; margin-bottom: 8px; color: var(--text-dark); }
.article-card p { font-size: 14px; color: var(--text-light); }
.read-more { color: var(--primary-color); font-size: 14px; font-weight: 500; }

/* 文章内容页 */
.article-section { max-width: 1100px; margin: 30px auto; padding: 0 15px; }
.article-content { background: var(--white); padding: 30px; border-radius: 8px; box-shadow: var(--shadow); }
.article-title { text-align: center; font-size: 24px; margin-bottom: 20px; color: var(--primary-color); }
.article-meta { text-align: center; color: var(--text-light); font-size: 14px; margin-bottom: 30px; }
.article-body p { margin-bottom: 20px; font-size: 16px; }
.article-body h2 { font-size: 22px; margin: 35px 0 20px; color: var(--primary-color); }
.article-body a { color: var(--primary-color); text-decoration: underline; }
.article-body a:hover { color: var(--accent-color); }
.highlight { background: var(--highlight-color); color: #000; font-weight: bold; padding: 2px 4px; border-radius: 3px; }

/* 表格 */
.article-table { width: 100%; border-collapse: collapse; margin: 30px 0; font-size: 15px; }
.article-table th, .article-table td { border: 1px solid #ddd; padding: 14px; text-align: left; }
.article-table th { background: var(--primary-color); color: white; }
.article-table tr:nth-child(even) { background: #f9f9f9; }
.article-table .yes { color: var(--primary-color); font-weight: bold; }
.article-table .no { color: #e74c3c; font-weight: bold; }
.article-table .best { background: #fffacd; font-weight: bold; }

/* 上一篇下一篇 + 热门推荐 */
.nav-pagination { display: flex; justify-content: space-between; margin-top: 40px; padding: 20px; background: var(--white); border-radius: 8px; box-shadow: var(--shadow); }
.nav-pagination a { font-size: 16px; color: var(--primary-color); }
.nav-pagination a:hover { color: var(--accent-color); }
.hot-recommend { margin-top: 40px; padding: 20px; background: var(--white); border-radius: 8px; box-shadow: var(--shadow); }
.hot-recommend h3 { font-size: 20px; margin-bottom: 15px; color: var(--primary-color); border-bottom: 2px solid var(--accent-color); padding-bottom: 10px; }
.hot-recommend ul { list-style: none; }
.hot-recommend li { margin-bottom: 10px; }
.hot-recommend a { font-size: 16px; color: var(--text-dark); }
.hot-recommend a:hover { color: var(--primary-color); }

/* 侧栏（新闻列表页） */
.sidebar { display: flex; flex-direction: column; gap: 25px; }
.sidebar-block { background: var(--white); border-radius: 8px; padding: 20px; box-shadow: var(--shadow); }
.block-title { font-size: 18px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--accent-color); color: var(--primary-color); text-align: center; }
.hot-list a { display: block; padding: 10px 0; border-bottom: 1px solid #eee; color: var(--text-dark); font-size: 15px; }
.hot-list a:hover { color: var(--primary-color); }
.hot-list a:last-child { border-bottom: none; }
.search-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.search-tags a { background: #f0f4f3; color: var(--primary-color); padding: 6px 14px; border-radius: 20px; font-size: 13px; }
.search-tags a:hover { background: var(--primary-color); color: white; }
.subscribe { text-align: center; }
.subscribe img { width: 180px; height: 180px; border: 1px solid #ddd; border-radius: 8px; margin: 15px auto; display: block; }

/* 右侧悬浮栏 */
.side-float {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.float-box {
    background: var(--white);
    padding: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    cursor: pointer;
}
.float-box img { width: 80px; height: 80px; transition: 0.5s; }
.float-box p { font-size: 12px; margin-top: 5px; font-weight: bold; color: var(--primary-color); }

/* 手机底部栏 */
.mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    height: 60px;
    z-index: 1002;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}
.mobile-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
}

/* 二维码遮罩 */
#qr-mask {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}
#qr-mask img { width: 300px; height: 300px; border: 5px solid white; }

/* 底部备案 */
footer { background: #333; color: #eee; padding: 40px 15px 80px; margin-top: 50px; }
.footer-container { max-width: 1100px; margin: 0 auto; text-align: center; }
.beian { border-top: 1px solid #444; padding-top: 20px; font-size: 14px; }

/* 响应式处理 */
@media (max-width: 992px) {
    .main-container { grid-template-columns: 1fr; }
    .article-list { grid-template-columns: 1fr; }
    .side-float { display: none; }
    .mobile-bar { display: block; }
}
@media (max-width: 768px) {
    .nav-container { padding: 0 10px; }
    .logo { font-size: 16px; }
    .nav-links a { margin-left: 12px; font-size: 14px; }
    .article-title { font-size: 20px; }
    .article-body p { font-size: 14px; }
    .nav-pagination { flex-direction: column; gap: 10px; text-align: center; }
}