/* 全新极简配色方案 */
:root {
    --primary: #2E7D32; /* 绿色主题，更易阅读 */
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary: #37474F;
    --accent: #FF5722; /* 橙色强调色 */
    --accent-light: #FF8A65;
    --light: #FAFAFA;
    --dark: #263238;
    --text: #37474F;
    --text-light: #78909C;
    --border: #CFD8DC;
    --card-bg: #FFFFFF;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.08);
    --radius: 6px;
    --radius-lg: 12px;
}

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* 蜘蛛友好字体和行高 */
body {
    font-family: 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.7; /* 更好的可读性 */
    color: var(--text);
    background-color: var(--light);
    font-size: 16px; /* 标准字体大小，蜘蛛友好 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 链接样式 */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent-light);
}

/* 容器 */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 实用类 */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 18px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }
.py-4 { padding: 20px 0; }
.py-5 { padding: 30px 0; }

/* 顶部进度条 - 新样式 */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    z-index: 1001;
    width: 0%;
}

/* 头部 - 全新极简设计 */
.header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-dark);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.nav {
    display: flex;
    gap: 25px;
}

.nav a {
    color: var(--secondary);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav a.active {
    color: var(--primary);
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark);
}

/* 移动导航 */
.mobile-nav {
    background-color: var(--card-bg);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.mobile-nav .nav {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    gap: 0;
}

.mobile-nav .nav a {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
}

/* 面包屑 - 新设计 */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 15px 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb span {
    color: var(--text);
    font-weight: 500;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--border);
}

/* 主布局 - 全新结构：内容在左侧，侧边栏在右侧 */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-bottom: 50px;
}

@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* 主内容区 */
.main-content {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* 文章头部 */
.article-header {
    padding: 30px;
    border-bottom: 1px solid var(--border);
}

.article-tag {
    display: inline-block;
    background-color: rgba(46, 125, 50, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.article-title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: 700;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.author {
    display: flex;
    align-items: center;
}

.author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

/* 文章内容 */
.article-body {
    padding: 30px;
}

.article-excerpt {
    background-color: rgba(255, 87, 34, 0.05);
    border-left: 4px solid var(--accent);
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.article-excerpt h3 {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* 文章内容样式 */
.article-content h2 {
    font-size: 1.6rem;
    margin: 28px 0 18px;
    color: var(--dark);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.article-content h3 {
    font-size: 1.3rem;
    margin: 24px 0 15px;
    color: var(--secondary);
}

.article-content p {
    margin-bottom: 18px;
    line-height: 1.8;
}

.article-content ul, .article-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 20px 0;
    display: block;
}

.image-container {
    margin: 25px 0;
    text-align: center;
}

.image-container img {
    box-shadow: var(--shadow);
}

.highlight-box {
    background-color: rgba(46, 125, 50, 0.05);
    border-radius: var(--radius);
    padding: 20px;
    margin: 25px 0;
    border-left: 4px solid var(--primary);
}

.highlight-box h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* 标签 */
.tags-container {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.tags-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: rgba(46, 125, 50, 0.08);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 侧边栏 - 右侧 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.sidebar-title {
    font-size: 1.1rem;
    margin-bottom: 18px;
    color: var(--dark);
    display: flex;
    align-items: center;
    font-weight: 600;
}

.sidebar-title i {
    margin-right: 10px;
    color: var(--primary);
}

/* 搜索框 */
.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background-color: white;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* 目录 */
.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    margin-bottom: 12px;
    padding-left: 0;
}

.toc-list a {
    color: var(--text);
    font-size: 0.95rem;
    display: block;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.toc-list a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* 相关文章 */
.related-articles {
    margin: 40px 0;
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--dark);
    font-weight: 700;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-item {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    height: 100%;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.article-item-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.article-item-content {
    padding: 20px;
}

.article-item-category {
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.article-item-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--dark);
    font-weight: 600;
}

.article-item-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 页脚 - 全新极简设计 */
.footer {
    background-color: var(--dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 50px 0 25px;
    margin-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-col h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.75);
}

.footer-col a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 25px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 48px;
    height: 48px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    border: none;
    font-size: 1.2rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .article-title {
        font-size: 1.6rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 8px;
    }

    .header-inner {
        height: 60px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-header, .article-body {
        padding: 20px;
    }
}

/* SEO优化特定样式 */
.structured-data {
    display: none;
}

/* 蜘蛛友好的隐藏内容（不显示但可抓取） */
.seo-content {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}