/* ==========================================================================
   全局与变量定义
   ========================================================================== */
:root {
    --primary-color: #4a90e2;  /* 主题蓝色 */
    --primary-color-dark: #3a7bc8; /* 主题蓝色深色 */
    --text-color: #333333;      /* 主要文字颜色 */
    --text-color-light: #555555; /* 次要文字颜色 */
    --bg-color: #ffffff;      /* 背景色 */
    --border-color: #eaeaea;   /* 边框色 */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
}

/* ==========================================================================
   主页 (Landing Page) 样式
   ========================================================================== */
.landing-footer {
    padding: 20px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-content a, 
.footer-content p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.landing-page .main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.hero-section {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-section .logo {
    margin-bottom: 1.5rem;
}

.hero-section .logo img {
    max-width: 150px;
    height: auto;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
}

.hero-section .subtitle {
    font-size: 1.1rem;
    color: var(--text-color-light);
    margin: 0 0 2.5rem;
}

.action-buttons .btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    margin: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.separator {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

.about-author h2 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem; /* 图标和文字的间距 */
    color: var(--text-color);
    margin-bottom: 2rem;
}

.about-author .fas { /* Font Awesome 图标样式 */
    color: var(--primary-color);
}

.about-author .author-content p {
    font-size: 1.05rem;
    color: var(--text-color-light);
}

.landing-footer {
    text-align: center;
    padding: 2rem;
    color: #aaa;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}
.landing-footer p {
    margin: 0.3rem 0;
}


/* ==========================================================================
   文章页 (Article Page) 样式
   ========================================================================== */
.article-page .container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
}
.article-page .sidebar {
    width: 260px;
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    padding: 1.5rem;
    box-sizing: border-box;
}

.article-page .author-profile { text-align: center; margin-bottom: 2rem; }
.article-page .avatar { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 1rem; border: 3px solid var(--primary-color); }
.article-page .author-profile h3 { margin: 0.5rem 0; }
.article-page .author-profile p { font-size: 0.9rem; color: #777; }
.article-page .main-nav ul { list-style: none; padding: 0; margin: 0; }
.article-page .nav-category > h3 { font-size: 1rem; color: #999; text-transform: uppercase; letter-spacing: 1px; margin: 1.5rem 0 0.5rem; padding-left: 10px; }
.article-page .main-nav li a { display: block; padding: 0.6rem 1rem; color: var(--text-color); text-decoration: none; border-radius: 4px; transition: background-color 0.2s, color 0.2s; }
.article-page .main-nav li a:hover { background-color: #f5f7fa; color: var(--primary-color); }
.article-page .main-content { flex: 1; padding: 2rem 3rem; min-width: 0; }
.article-page .post { background-color: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.article-page .post-header h1 { font-size: 2.2rem; margin-bottom: 1rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 0.5rem; }
.article-page .post-meta { font-size: 0.9rem; color: #888; margin-bottom: 2rem; }
.article-page .post-body p, .article-page .post-body ul { margin-bottom: 1.2rem; }
.article-page .post-body a { color: var(--primary-color); text-decoration: none; border-bottom: 1px dotted var(--primary-color); }
.article-page .post-body a:hover { color: #2980b9; }
.article-page pre { background-color: #2d2d2d; color: #ccc; padding: 1rem; border-radius: 5px; overflow-x: auto; font-family: "Fira Code", "Consolas", monospace; }
.article-page code { font-family: "Fira Code", "Consolas", monospace; }
.article-page .toc-sidebar { width: 240px; padding: 2rem 1.5rem; height: 100vh; position: sticky; top: 0; }
.article-page .toc-widget { background-color: #fff; padding: 1.5rem; border-radius: 5px; margin-bottom: 1.5rem; }
.article-page .toc-widget h3 { margin-top: 0; border-left: 3px solid var(--primary-color); padding-left: 10px; font-size: 1.1rem; }
.article-page .toc-widget ul { list-style: none; padding: 0; }
.article-page .toc-widget ul li a { color: #555; text-decoration: none; display: block; padding: 0.3rem 0; }
/* 响应式适配 */
@media (max-width: 1200px) { .article-page .toc-sidebar { display: none; } }
@media (max-width: 768px) { .article-page .container { flex-direction: column; } .article-page .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border-color); } .article-page .main-content { padding: 1rem; } }

/* static/css/style.css (追加内容) */

/* ==========================================================================
   TOC 目录样式增强
   ========================================================================== */
.toc-widget ul {
    list-style: none;
    padding-left: 10px; /* 整体左边距 */
}

.toc-widget ul li a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 0.4rem 0;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.toc-widget ul li a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.toc-widget .toc-level-2 a {
    font-weight: 600; /* h2 标题加粗 */
    color: var(--text-color);
}

.toc-widget .toc-level-3 {
    padding-left: 15px; /* h3 标题缩进 */
    border-left: 2px solid var(--border-color); /* 添加左侧竖线 */
}

.toc-widget .toc-level-3 a {
    font-size: 0.9em;
}

/* static/css/style.css (追加内容) */

/* ==========================================================================
   文章子分类标题样式
   ========================================================================== */
.post-body .sub-category {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}