/* 全局款式 */
    /* 全局变量 */
:root {
    --primary-color: #2c3e50;
    --accent-color: #34495e;
    --text-color: #333;
    --bg-color: #f5f6fa;
    --border-color: #eaecef;
    --header-height: 64px;
    --sidebar-width: 260px;
}

/* 基础款式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.75;
    background: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
}

/* 头部导航 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

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

.top-nav {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
}

/* 首页款式 */
.magazine-info {
    margin-top: calc(var(--header-height) + 30px);
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    gap: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.magazine-cover {
    width: 180px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.magazine-meta {
    flex: 1;
    padding-top: 10px;
}

.magazine-title {
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.magazine-price {
    font-size: 22px;
    color: #e74c3c;
    font-weight: 500;
}

/* 目录内容 */
.catalog-container {
    margin: 30px 0;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.catalog-section {
    margin-bottom: 30px;
}

.catalog-section:last-child {
    margin-bottom: 0;
}

.catalog-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    padding-bottom: 12px;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #34495e;  /* 保留分类标题的横线 */
}

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

.article-item {
    padding: 4px 0;  /* 减小上下padding */
    margin: 2px 0;   /* 最小化间距 */
    border-bottom: none;  /* 移除文章标题下方的横线 */
}

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

.article-title a {
    color: #555;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
    font-weight: normal;
    line-height: 1.4;
    padding-left: 1em;  /* 添加缩进 */
    display: block;     /* 确保缩进失效 */
}

.article-title a:hover {
    color: #e74c3c;
}

/* 文章页面款式 */
.article-container {
    margin-top: var(--header-height);
    padding: 40px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
    gap: 40px;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 20px;
}

.article-main {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.article-header {
    margin-bottom: 30px;
}

.article-title {
    font-size: 26px;
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.4;
    /* 移除了 margin-bottom: 20px */
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 12px;  /* 调整与标题的间距 */
}

.category {
    color: #e74c3c;
    font-weight: 500;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #2c3e50;
}

.article-content p {
    margin-bottom: 1.5em;
    text-indent: 2em;
}

/* 导航按钮款式 */
.issue-nav {
    display: flex;
    gap: 10px;
}

.issue-nav-button {
    padding: 8px 16px;
    background: #0088cc;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.issue-nav-button:hover {
    background: #006699;
}

/* 导航按钮一致款式 */
.nav-links a,
.issue-nav-button {
    padding: 8px 16px;
    background: #0088cc;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-block;
}

.nav-links a:hover,
.issue-nav-button:hover {
    background: #006699;
}

/* 确保导航容器款式正确 */
.nav-links,
.issue-nav {
    display: flex;
    gap: 10px;
}

/* 侧边栏目录 */
.toc {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    max-height: calc(100vh - var(--header-height) - 40px);
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    scroll-behavior: smooth;
}

.toc-section {
    margin-bottom: 20px;
}

.toc-section:last-child {
    margin-bottom: 0;
}

.toc-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    padding-bottom: 8px;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #34495e;  /* 保留分类标题的横线 */
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 4px;
    line-height: 1.4;
}

.toc a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    display: block;
    padding: 3px 12px;
    border-radius: 6px;
    border-bottom: none;  /* 移除文章标题下方的横线 */
}

.toc a:hover {
    color: #e74c3c;
    background: #f8f9fa;
}

/* 为了更好的视觉效果，可以添加一个渐变背景 */
.toc li.current {
    background: linear-gradient(90deg, #f8f9fa 0%, #fff 100%);
    border-radius: 4px;
    position: relative;
}

.toc li.current::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #e74c3c;
    border-radius: 2px;
}

.toc li.current a {
    color: #e74c3c;
    background: #fff5f5;
}

/* 前往按钮 */
.nav-button {
    display: inline-block;
    padding: 10px 24px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
    margin-top: 30px;
}

.nav-button:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

/* 滚动条款式 */
.toc::-webkit-scrollbar {
    width: 4px;
}

.toc::-webkit-scrollbar-track {
    background: transparent;
}

.toc::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

/* 移除一切文章项的边框 */
.toc ul li {
    border-bottom: none;
}

.toc ul li:last-child {
    border-bottom: none;
}

/* 文章字体大小控制器 */
.font-size-control {
    background: white;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #eaecef;
}

.font-size-control:hover {
    opacity: 1;
}

.font-size-control button {
    padding: 3px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #666;
}

.font-size-control button:hover {
    background: #f5f5f5;
    color: #333;
}

.font-size-control button.active {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

/* 文章内容字体大小类 */
.article-content.text-base {
    font-size: 17px;
    line-height: 1.8;
}

.article-content.text-lg {
    font-size: 19px;
    line-height: 1.9;
}

.article-content.text-xl {
    font-size: 21px;
    line-height: 2;
}
  
/* 呼应式设计 */
@media (max-width: 1024px) {
    .article-container {
        grid-template-columns: 1fr;
    }
    
    .toc {
        display: none;
    }
}

@media (max-width: 768px) {
    .magazine-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    
    .magazine-cover {
        width: 140px;
    }
    
    .article-main {
        padding: 25px;
    }
    
    .article-title {
        font-size: 22px;
    }
}/* 全局款式 */
    /* 全局变量 */
:root {
    --primary-color: #2c3e50;
    --accent-color: #34495e;
    --text-color: #333;
    --bg-color: #f5f6fa;
    --border-color: #eaecef;
    --header-height: 64px;
    --sidebar-width: 260px;
}

/* 基础款式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.75;
    background: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    font-size: 16px;  /* 添加基础字体大小 */
}

/* 头部导航 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

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

.top-nav {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
}

/* 首页款式 */
.magazine-info {
    margin-top: calc(var(--header-height) + 30px);
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    gap: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.magazine-cover {
    width: 180px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.magazine-meta {
    flex: 1;
    padding-top: 10px;
}

.magazine-title {
    font-size: 30px;  /* 原来是 26px */
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.magazine-price {
    font-size: 22px;
    color: #e74c3c;
    font-weight: 500;
}

/* 目录内容 */
.catalog-container {
    margin: 30px 0;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.catalog-section {
    margin-bottom: 30px;
}

.catalog-section:last-child {
    margin-bottom: 0;
}

/* 分类标题调整 */
.catalog-section-title {
    font-size: 22px;  /* 原来是 20px */
    font-weight: 600;
    color: #1a1a1a;
    padding-bottom: 12px;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #34495e;
}

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

.article-item {
    padding: 4px 0;  /* 减小上下padding */
    margin: 2px 0;   /* 最小化间距 */
    border-bottom: none;  /* 移除文章标题下方的横线 */
}

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

.article-title a {
    color: #555;
    text-decoration: none;
    font-size: 16px;  /* 原来是 15px */
    transition: color 0.2s;
    font-weight: normal;
    line-height: 1.5;
    padding-left: 1em;
    display: block;
}


.article-title a:hover {
    color: #e74c3c;
}

/* 文章页面款式 */
.article-container {
    margin-top: var(--header-height);
    padding: 40px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
    gap: 40px;
    max-width: 1200px;  /* 原来是 1140px，添加全体宽度 */
    margin-left: auto;
    margin-right: auto;
    padding: 40px 20px;
}

.article-main {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.article-header {
    margin-bottom: 30px;
}

/* 文章标题调整 */
.article-title {
    font-size: 30px;  /* 原来是 26px */
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.4;
}

.article-meta {
    display: flex;
    justify-content: space-between;  /* 两端对齐 */
    align-items: center;
    margin-top: 12px;
}

.left-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.category {
    color: #e74c3c;
    font-weight: 500;
}

/* 文章内容调整 */
.article-content {
    font-size: 17px;  /* 原来是 16px */
    line-height: 1.8;
    color: #2c3e50;
}

.article-content p {
    margin-bottom: 1.5em;
    text-indent: 2em;
}

/* 导航按钮款式 */
.issue-nav {
    display: flex;
    gap: 10px;
}

.issue-nav-button {
    padding: 8px 16px;
    background: #0088cc;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.issue-nav-button:hover {
    background: #006699;
}

/* 导航按钮一致款式 */
.nav-links a,
.issue-nav-button {
    padding: 8px 16px;
    background: #0088cc;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-block;
}

.nav-links a:hover,
.issue-nav-button:hover {
    background: #006699;
}

/* 确保导航容器款式正确 */
.nav-links,
.issue-nav {
    display: flex;
    gap: 10px;
}

/* 侧边栏目录 */
.toc {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    max-height: calc(100vh - var(--header-height) - 40px);
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
	width: 280px; 
}

.toc-section {
    margin-bottom: 20px;
}

.toc-section:last-child {
    margin-bottom: 0;
}

.toc-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    padding-bottom: 8px;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #34495e;  /* 保留分类标题的横线 */
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 4px;
    line-height: 1.4;
}

/* 目录字体调整 */
.toc a {
    color: #555;
    text-decoration: none;
    font-size: 15px;  /* 原来是 14px */
    transition: color 0.2s;
    display: block;
    padding: 3px 12px;
    border-radius: 6px;
}

.toc a:hover {
    color: #e74c3c;
    background: #f8f9fa;
}

.toc li.current a {
    color: #e74c3c;
    background: #fff5f5;
}

/* 前往按钮 */
.nav-button {
    display: inline-block;
    padding: 10px 24px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
    margin-top: 30px;
}

.nav-button:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

/* 滚动条款式 */
.toc::-webkit-scrollbar {
    width: 4px;
}

.toc::-webkit-scrollbar-track {
    background: transparent;
}

.toc::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

/* 移除一切文章项的边框 */
.toc ul li {
    border-bottom: none;
}

.toc ul li:last-child {
    border-bottom: none;
}

/* 呼应式设计 */
@media (max-width: 1024px) {
    .article-container {
        grid-template-columns: 1fr;
    }
    
    .toc {
        display: none;
    }
}

@media (max-width: 768px) {
    .magazine-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    
    .magazine-cover {
        width: 140px;
    }
    
    .article-main {
        padding: 25px;
    }
    
    .article-title {
        font-size: 22px;
    }
}