/* ==================== 1. 全局设置 (Variables & Global) ==================== */
:root {
    --bg-color: #050505;
    --primary: #00f3ff; 
    --primary-dim: rgba(0, 243, 255, 0.15);
    --secondary: #ff0055; 
    --text-main: #e0e0e0;
    --text-muted: #94a3b8;
    --card-bg: rgba(20, 20, 25, 0.6); /* 调暗背景，减少磨砂感 */
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    
    /* 移动端专用变量 */
    --mobile-header-height: 65vh;
    --mobile-padding: 15px;
    --mobile-font-size: 0.9rem;
    --mobile-gap: 15px;
    --mobile-card-padding: 20px 15px;
}

html { 
    scroll-behavior: smooth; 
}

/* 自定义滚动条 - 更细更锋利 */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #333; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* 文本选中视觉优化 */
::selection {
    background: var(--primary);
    color: #000;
    text-shadow: none;
}
::-moz-selection {
    background: var(--primary);
    color: #000;
}

* { box-sizing: border-box; margin: 0; padding: 0;}

body {
    /* JetBrains Mono 负责英文/代码（保持黑客感），Noto Serif SC 负责中文（锋利感） */
    font-family: 'JetBrains Mono', 'Noto Serif SC', serif; 
    background: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
    letter-spacing: 0.5px; /* 稍微增加一点字间距，让宋体看起来更疏离高冷 */
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* ==================== 2. 背景层 (Backgrounds) ==================== */
/* 背景图片层 */
.bg-wallpaper {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -3;
    background-color: #000; 
    background-image: url('../img/background.png');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0; 
    animation: wallpaperFadeIn 1.5s ease-out 0.2s forwards;
    filter: none; 
    mask-image: none;
    -webkit-mask-image: none;
}

/* 移动端背景图优化 */
@media (max-width: 768px) {
    .bg-wallpaper {
        background-size: contain; /* 改为contain确保图片完整显示 */
        background-position: center 20%; /* 调整垂直位置，让重要内容居中 */
        background-color: #050505; /* 确保背景色与整体一致 */
    }
    
    /* 修改移动端背景图动画 */
    @keyframes wallpaperFadeInMobile {
        0% { opacity: 0; transform: scale(1.05); }
        100% { opacity: 1; transform: scale(1); }
    }
}

@keyframes wallpaperFadeIn {
    0% { opacity: 0; transform: scale(1.02); }
    100% { opacity: 0.6; transform: scale(1); }
}

@media (max-width: 768px) {
    .bg-wallpaper { animation-name: wallpaperFadeInMobile; }
}

@keyframes wallpaperFadeInMobile {
    0% { opacity: 0; }
    100% { opacity: 0.8; }
}

/* 网格装饰 */
.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(var(--primary-dim) 1px, transparent 1px),
        linear-gradient(90deg, var(--primary-dim) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    mask-image: radial-gradient(circle at center, black 80%, transparent 100%);
    pointer-events: none;
}
#particles-js { position: fixed; inset: 0; z-index: -1; }

/* ==================== 3. 首页组件 ==================== */
header {
    height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    pointer-events: none; 
    padding: 20px;
}
header * { pointer-events: auto; }


.glitch {
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    position: relative;
    /* 减少故障动画频率，不那么眼花 */
    text-shadow: 2px 2px 0px rgba(255, 0, 85, 0.5), -2px -2px 0px rgba(0, 243, 255, 0.5);
    animation: glitch-skew 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    20% { transform: skew(-2deg); }
    40% { transform: skew(2deg); }
    60% { transform: skew(0deg); }
    80% { transform: skew(1deg); }
    100% { transform: skew(0deg); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--primary);
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    background: rgba(0,0,0,0.6);
    padding: 5px 15px;
    border: 1px solid var(--primary);
    box-shadow: 0 0 10px var(--primary-dim);
    border-radius: 4px;
}

/* 搜索与分类栏 - [修改] 改为百分比宽度 */
.filter-section {
    width: 100%; /* 改为100%宽度，与h2保持一致 */
    max-width: 1200px; /* 与post-list容器宽度一致 */
    margin: -60px auto 40px; 
    position: relative;
    z-index: 10;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

.search-box { margin-bottom: 20px; }
.search-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #333;
    color: #fff;
    font-size: 1.2rem;
    padding: 10px 5px;
    font-family: inherit;
    transition: 0.3s;
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 5px 10px -5px var(--primary-dim);
}

.category-list { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-btn {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    padding: 5px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 2px;
    text-transform: none;
}
.cat-btn:hover, .cat-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 8px var(--primary-dim);
    text-shadow: 0 0 5px var(--primary);
}

/* 文章卡片列表 */
.container { 
    width: 75%; 
    max-width: 1600px;
    margin: 0 auto; 
    padding-bottom: 100px; 
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px; /* 与其他容器宽度一致 */
    display: flex;
    align-items: center;
    color: #fff;
}
.section-title::before {
    content: '>';
    margin-right: 10px;
    color: var(--secondary);
    font-weight: bold;
}

.post-list {
    display: grid;
    /* 修改为固定宽度的卡片，确保格式一致 */
    grid-template-columns: repeat(auto-fill, minmax(370px, 2fr));
    gap: 25px;
    /* 设置容器最大宽度，居中显示 */
    max-width: 1200px;
    margin: 0 auto;
}

.post-preview {
    background: var(--card-bg);
    border: var(--glass-border);
    padding: 25px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: 0.4s;
}
.post-preview:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -10px rgba(0, 243, 255, 0.15);
}
.post-preview h3 { 
    font-size: 1.4rem; 
    margin-bottom: 10px; 
    color: #fff;
    /* 移除限制，让标题完整显示 */
}
.meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; }

.read-more-btn {
    display: block; width: 100%; margin-top: 15px; padding: 8px 0;
    text-align: center;
    background: rgba(0, 243, 255, 0.05);
    color: var(--primary);
    border: 1px solid transparent;
    font-size: 0.9rem;
    transition: 0.3s;
}
.post-preview:hover .read-more-btn {
    background: var(--primary); color: #000; font-weight: bold;
}

/* ==================== 4. 文章页布局 (Article Layout) ==================== */
/* 返回按钮优化：极简胶囊 */
.cmd-back-btn {
    position: fixed; 
    top: 20px; left: 20px; 
    z-index: 100;
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
    font-size: 1.2rem;
    padding: 6px 12px;
    background: rgba(0,0,0,0.7);
    border: 1px solid #444;
    border-radius: 4px;
    backdrop-filter: blur(5px);
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cmd-back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}


/* 双栏布局 Grid - [修改] 关键修改：百分比布局 */
.article-grid {
    display: grid;
    /* 
       旧代码: grid-template-columns: 1fr 280px; 
       新代码: 左侧 75%，右侧 23% (留 2% 间隙)
    */
    grid-template-columns: 75% 23%;
    gap: 2%; /* 原为 40px */
    
    width: 90%; /* 使用宽百分比，替代 max-width: 1400px */
    max-width: none; 
    margin: 0 auto;
    padding: 120px 0 100px; /* 左右 padding 由 width 控制 */
}

/* 内容容器 */
.article-wrapper {
    background: rgba(15, 15, 20, 0.6);
    padding: 40px;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
}

.article-header h1 {
    font-size: 2.5rem; color: #fff; margin-bottom: 20px; line-height: 1.2;
}

/* ==================== 5. Markdown 正文渲染样式 ==================== */

.markdown-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.1rem;
    line-height: 1.75;
    color: #d4d4d4;
}

/* --- 标题 --- */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    color: #fff;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: bold;
    line-height: 1.3;
}

.markdown-content h2 {
    font-size: 1.8rem;
    color: var(--primary); 
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    padding-bottom: 10px;
}

.markdown-content h3 {
    font-size: 1.4rem;
    color: #e0e0e0;
    border-left: 4px solid var(--secondary);
    padding-left: 12px;
}

/* --- 段落与列表 --- */
.markdown-content p {
    margin-bottom: 1.5em;
    text-align: justify;
}

.markdown-content ul, .markdown-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}
.markdown-content li { margin-bottom: 0.5em; color: #ccc; }
.markdown-content li::marker { color: var(--primary); } 

/* --- 链接 --- */
.markdown-content a {
    color: var(--primary);
    text-decoration: none;
    position: relative;
    font-weight: 500;
    transition: 0.3s;
}
.markdown-content a::after {
    content: '';
    position: absolute;
    width: 100%; height: 1px;
    bottom: -2px; left: 0;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}
.markdown-content a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}
.markdown-content a:hover {
    text-shadow: 0 0 8px var(--primary);
}

/* --- 图片 --- */
.markdown-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 40px auto;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
}
.markdown-content img:hover { transform: scale(1.01); }

/* --- 引用块 --- */
.markdown-content blockquote {
    border-left: 4px solid var(--primary);
    background: linear-gradient(90deg, rgba(0, 243, 255, 0.05) 0%, transparent 100%);
    margin: 2em 0;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    color: #a0a0a0;
}
.markdown-content blockquote p { margin: 0 !important; }

/* ==================== 代码块核心样式 (Code Blocks) ==================== */
/* ==================== 代码块样式：磨砂玻璃 & 极简 (Glass & Minimal) ==================== */
.markdown-content pre {
    /* 核心：半透明黑色背景 + 模糊滤镜 */
    background: rgba(20, 20, 25, 0.65); 
    backdrop-filter: blur(10px); /* 让背景产生磨砂玻璃效果 */
    -webkit-backdrop-filter: blur(10px); /* 兼容 Safari */
    
    /* 边框：极细的半透明白线 */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px; /* 圆润的圆角 */
    
    margin: 2em 0;
    position: relative;
    padding-top: 42px !important; /* 留出标题栏高度 */
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); /* 柔和的深色投影 */
}

/* 装饰：标题栏底部的分割线 (若隐若现) */
.markdown-content pre::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 42px;
    background: rgba(255, 255, 255, 0.02); /* 标题栏稍微亮一点点 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1;
}

/* 语言标签：左上角，灰色小字 */
.markdown-content pre::after {
    content: attr(data-lang);
    position: absolute;
    top: 0; 
    left: 18px;
    line-height: 42px; /* 垂直居中 */
    
    color: #8b949e; /* 柔和的灰色 */
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: lowercase; /* 强制小写，例如 javascript */
    z-index: 2;
    letter-spacing: 0.5px;
}

/* 复制按钮：右上角，无边框，纯文字图标 */
.copy-btn {
    position: absolute;
    top: 10px; 
    right: 15px;
    z-index: 10;
    
    background: transparent;
    border: none;
    color: #8b949e; /* 默认灰色 */
    
    /* 使用思源宋体显示“复制”二字，更有质感 */
    font-family: 'Noto Serif SC', sans-serif; 
    font-size: 0.85rem;
    transition: all 0.2s;
    
    display: flex;
    align-items: center;
    gap: 6px; /* 图标和文字的间距 */
}

/* 悬停效果：变白 */
.copy-btn:hover {
    color: #e0e0e0;
}

/* 复制成功状态 */
.copy-btn.copied {
    color: #27c93f; /* 绿色 */
}


/* 代码正文区域 */
.markdown-content pre code {
    display: block;
    overflow-x: auto;
    padding: 20px 24px 24px 24px !important; /* 增加内边距，更透气 */
    background: transparent !important; 
    color: #c9d1d9; /* 舒适的灰白色 */
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

.markdown-content p code,
.markdown-content li code,
.markdown-content table code {
    background: rgba(255, 0, 85, 0.15); 
    color: #ff79c6; 
    font-family: 'JetBrains Mono', monospace;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.9em;
    margin: 0 3px;
    border: 1px solid rgba(255, 0, 85, 0.2);
}

/* ==================== 表格样式 ==================== */
.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    overflow: hidden;
}
.markdown-content th {
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary);
    font-weight: bold;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #333;
}
.markdown-content td {
    padding: 12px 15px;
    border-bottom: 1px solid #222;
    color: #ccc;
}
.markdown-content tr:last-child td { border-bottom: none; }
.markdown-content tr:hover { background: rgba(255,255,255,0.02); }

/* ==================== Highlight.js 自定义配色 ==================== */
.hljs-keyword, .hljs-selector-tag, .hljs-operator { color: #ff79c6; font-weight: bold; }
.hljs-string, .hljs-attr { color: #a6e22e; }
.hljs-title, .hljs-section, .hljs-selector-id { color: var(--primary); font-weight: bold; }
.hljs-variable, .hljs-template-variable, .hljs-attribute { color: #f8f8f2; }
.hljs-comment, .hljs-quote { color: #6272a4; font-style: italic; }
.hljs-number, .hljs-literal, .hljs-type, .hljs-built_in { color: #bd93f9; }
.hljs-tag, .hljs-name { color: #ff79c6; }
.hljs-meta { color: #f1fa8c; } 

/* ==================== 6. 侧边栏目录 (TOC Sidebar) ==================== */
.toc-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
}

.toc-title {
    font-size: 0.9rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 8px; }
.toc-list a {
    color: #aaa;
    font-size: 0.9rem;
    display: block;
    padding-left: 10px;
    border-left: 2px solid transparent;
    transition: 0.2s;
}
.toc-list a:hover, .toc-list a.active {
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 15px;
}
.toc-list .toc-sub a {
    margin-left: 15px;
    font-size: 0.85rem;
    border-left: none;
}
/* 三级菜单缩进 */
.toc-list .toc-sub-2 a {
    margin-left: 30px; /* 比 H3 缩进更多 */
    font-size: 0.8rem;
    border-left: none;
}

/* 添加移动端目录切换按钮 */
.toc-toggle-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 101;
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
    font-size: 1.1rem;
    padding: 8px 15px;
    background: rgba(0,0,0,0.7);
    border: 1px solid #444;
    border-radius: 4px;
    backdrop-filter: blur(5px);
    cursor: pointer;
    transition: 0.3s;
}

.toc-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 增加触摸设备交互优化 */
@media (hover: none) and (pointer: coarse) {
    /* 适用于触摸设备的交互样式 */
    a, button, .cat-btn, .nav-link {
        transition: none;
    }
    
    /* 触摸反馈 */
    a:active, button:active, .cat-btn:active, .nav-link:active {
        transform: scale(0.95);
    }
    
    /* 禁用悬停效果 */
    .toc-list a:hover, .cat-btn:hover {
        color: inherit;
        border-left-color: transparent;
        padding-left: 10px;
    }
}

/* ==================== 7. 响应式适配 (Tablets) ==================== */
@media (max-width: 1000px) {
    .article-grid {
        display: block;
        padding-top: 80px;
    }
    .toc-sidebar { display: none; }
    .article-wrapper { padding: 30px; }
    
    /* 平板端保持较宽的显示区域 */
    .filter-section { width: 90%; margin-top: -40px; padding: 20px; max-width: none; }
    .container { width: 95%; max-width: none; }
    
    header { height: 70vh; }
    .glitch { font-size: 3rem; }
}
/* ==================== 8. 响应式适配 (Mobile) ==================== */

/* 小屏幕手机适配 (480px以下) */
@media (max-width: 480px) {
    /* 更小的标题和边距 */
    .glitch {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
    
    /* 减少内边距 */
    .article-wrapper {
        padding: 20px 15px 40px;
    }
    
    .container {
        padding-bottom: 80px;
    }
    
    /* 更小的文章标题 */
    .post-title {
        font-size: 1.2rem;
    }
    
    /* 更小的文章内容字体 */
    .markdown-content {
        font-size: 0.9rem;
    }
    
    /* 更小的代码块 */
    .markdown-content pre {
        padding: 12px;
        font-size: 0.8rem;
    }
    
    /* 适应极小屏幕的目录 */
    .toc-sidebar {
        width: 90%;
    }
}

/* 平板竖屏优化 */
@media (min-width: 769px) and (max-width: 1000px) and (orientation: portrait) {
    .post-list {
        grid-template-columns: 1fr;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
}

/* 平板横屏优化 */
@media (min-width: 769px) and (max-width: 1000px) and (orientation: landscape) {
    header {
        height: 80vh;
    }
    
    .post-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    /* 首页优化 */
    header { 
        height: 65vh; 
        padding: 15px;
    }
    
    .glitch { 
        font-size: 2.8rem; 
        text-shadow: 1px 1px 0px rgba(255, 0, 85, 0.5), -1px -1px 0px rgba(0, 243, 255, 0.5);
    }
    
    .subtitle { 
        font-size: 0.9rem; 
        padding: 4px 12px;
        margin-top: 15px;
    }
    
    /* 导航按钮适配 */
    .home-nav {
        margin-top: 30px;
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 8px 16px;
        /* 增加触摸区域 */
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 搜索分类栏适配 */
    .filter-section {
        width: 95%;
        padding: 15px;
        margin-top: -30px;
    }
    
    .search-input {
        font-size: 1rem;
        padding: 8px 5px;
    }
    
    .cat-btn {
        font-size: 0.85rem;
        padding: 6px 12px;
        /* 增加触摸区域 */
        min-height: 36px;
        display: flex;
        align-items: center;
    }
    
    /* 文章列表适配 */
    .post-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .post-card {
        padding: 15px;
    }
    
    .post-title {
        font-size: 1.3rem;
    }
    
    /* 文章内容适配 */
    .markdown-content {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .markdown-content p {
        margin-bottom: 15px;
    }
    
    .markdown-content h2 {
        font-size: 1.5rem;
        margin-top: 25px;
        margin-bottom: 15px;
    }
    
    .markdown-content h3 {
        font-size: 1.2rem;
        margin-top: 20px;
    }
    
    .markdown-content ul, .markdown-content ol {
        margin-bottom: 15px;
        padding-left: 25px;
    }
    
    .markdown-content li {
        margin-bottom: 8px;
    }
    
    .markdown-content blockquote {
        padding: 15px;
        margin: 15px 0;
    }
    
    .markdown-content pre {
        padding: 15px;
        margin: 15px 0;
        overflow-x: auto;
        font-size: 0.85rem;
    }
    
    /* 代码块标题适配 */
    .code-header {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    /* 表格适配 */
    .markdown-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        margin: 15px 0;
    }
    
    .markdown-content th, .markdown-content td {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* 图片适配 */
    .markdown-content img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* 链接适配 */
    .markdown-content a {
        padding: 2px 0;
    }
    
    /* 移动端目录适配 */
    .toc-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 300px;
        height: 100vh;
        z-index: 100;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(10px);
        transition: right 0.3s ease;
        padding: 60px 20px 20px;
        overflow-y: auto;
        border-left: 1px solid var(--glass-border);
    }
    
    .toc-sidebar.open {
        right: 0;
    }
    
    .toc-toggle-btn {
        display: block;
    }
    
    
    .toc-backdrop.show {
        display: block;
    }
    
    /* 移动端触摸优化 */
    a, button, input, select, textarea {
        touch-action: manipulation;
    }
    
    /* 增加点击区域 */
    .cmd-back-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* 文章页移动端适配 */
    .cmd-back-btn {
        top: 10px;
        left: 10px;
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    /* 显示目录切换按钮 */
    .toc-toggle-btn {
        display: block;
        top: 10px;
        right: 10px;
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    /* 移动端目录样式 */
    .toc-sidebar {
        display: none;
        position: fixed;
        top: 50px;
        right: 0;
        width: 90%;
        max-width: 300px;
        height: calc(100vh - 50px);
        max-height: none;
        z-index: 99;
        background: rgba(15, 15, 20, 0.95);
        border-left: 2px solid var(--primary);
        border-radius: 0;
        padding: 15px;
    }
    
    /* 目录打开状态 */
    .toc-sidebar.active {
        display: block;
    }
    
    /* 文章容器调整 */
    .article-grid {
        padding: 10px;
        padding-top: 70px;
    }
    
    .article-wrapper {
        padding: 20px 15px;
    }
    
    /* 文章标题调整 */
    .article-header h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    /* Markdown内容调整 */
    .markdown-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .markdown-content h2 {
        font-size: 1.4rem;
        margin-top: 25px;
        padding-bottom: 8px;
    }
    
    .markdown-content h3 {
        font-size: 1.2rem;
        margin-top: 20px;
        padding-left: 8px;
    }
    
    /* 段落样式调整 */
    .markdown-content p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 15px;
        text-align: left;
    }
    
    /* 列表样式调整 */
    .markdown-content ul, 
    .markdown-content ol {
        padding-left: 1.2em;
    }
    
    .markdown-content li {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }
    
    /* 代码块调整 */
    .markdown-content pre {
        margin: 15px 0;
        padding-top: 35px !important;
    }
    
    .markdown-content pre code {
        padding: 15px 18px 18px 18px !important;
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* 内联代码调整 */
    .markdown-content p code,
    .markdown-content li code,
    .markdown-content table code {
        font-size: 0.8em;
        padding: 2px 4px;
        margin: 0 2px;
    }
    
    /* 图片调整 */
    .markdown-content img {
        margin: 20px auto;
    }
    
    /* 引用块调整 */
    .markdown-content blockquote {
        margin: 15px 0;
        padding: 12px 15px;
    }
    
    /* 表格调整 */
    .markdown-content table {
        font-size: 0.85rem;
    }
    
    .markdown-content th, 
    .markdown-content td {
        padding: 10px 8px;
    }
    /* 搜索与分类栏 */
    .filter-section { 
        width: 95%; 
        margin-top: -30px; 
        padding: 15px;
    }
    
    .search-input {
        font-size: 1rem;
    }
    
    .category-list {
        gap: 8px;
    }
    
    .cat-btn {
        font-size: 0.85rem;
        padding: 4px 12px;
    }
    
    /* 文章列表 */
    .container { 
        width: 95%; 
        padding-bottom: 80px;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .post-list {
        grid-template-columns: 1fr; /* 移动端单列显示 */
        gap: 20px;
    }
    
    /* 文章卡片 */
    .post-preview {
        padding: 20px;
    }
    
    .post-preview h3 {
        font-size: 1.3rem;
    }
}

/* ==================== 8. 首页导航按钮 ==================== */
.home-nav {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: var(--primary); /* 使用主题色，增强对比度 */
    padding: 10px 20px;
    border: 1px solid var(--primary); /* 使用主题色边框 */
    background: rgba(0, 243, 255, 0.1); /* 增加背景色的可见度 */
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    font-weight: 600; /* 增加字重，使其更醒目 */
}

.nav-link:hover {
    color: #000;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-dim);
    letter-spacing: 1px;
    font-weight: bold;
}

/* ==================== 9. 关于我页面样式 (About Page) ==================== */
/* [修改] 改为百分比宽度 */
.about-container {
    padding-top: 100px;
    width: 80%; /* 原为固定 max-width: 1200px */
    max-width: 95%;
    margin: 0 auto; /* 确保居中 */
}

/* 头部档案 */
.profile-header {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
    background: rgba(10, 10, 15, 0.6);
    padding: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-avatar img {
    width: 100%;
    height: auto;
    max-width: 180px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px var(--primary-dim);
    object-fit: cover;
}

.profile-role {
    font-family: 'Consolas', monospace;
    color: var(--primary);
    margin: 10px 0 20px;
    font-size: 1.1rem;
}

.profile-meta {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: #aaa;
}

/* 简历网格布局 */
.resume-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; 
    gap: 25px;
    margin-bottom: 40px;
}

.glass-card {
    background: var(--card-bg);
    border: var(--glass-border);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-title {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 25px;
    border-bottom: 1px dashed #444;
    padding-bottom: 10px;
    font-family: 'JetBrains Mono', monospace;
}

/* 时间轴样式 */
.timeline-item {
    border-left: 2px solid var(--primary);
    padding-left: 20px;
    margin-left: 10px;
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px; top: 0;
    width: 10px; height: 10px;
    background: var(--bg-color);
    border: 2px solid var(--primary);
    border-radius: 50%;
}

.time {
    font-family: 'Consolas', monospace;
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 5px;
    min-width: 100px;
}

.detail-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}
.detail-list li {
    margin-bottom: 5px;
    color: #ccc;
    font-size: 0.95rem;
}
.detail-list li::before {
    content: '>';
    color: var(--primary);
    margin-right: 8px;
}

/* 奖项列表 */
.award-list {
    list-style: none;
}
.award-list li {
    display: flex;
    margin-bottom: 20px;
    border-left: 2px solid #333;
    padding-left: 15px;
    transition: 0.3s;
}
.award-list li:hover {
    border-left-color: var(--secondary);
    background: linear-gradient(90deg, rgba(255, 0, 85, 0.05), transparent);
}
.award-date {
    font-family: monospace;
    color: #666;
    margin-right: 15px;
    min-width: 80px;
}
.badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.badge.secondary {
    background: rgba(255, 0, 85, 0.2);
    color: var(--secondary);
    border: 1px solid rgba(255, 0, 85, 0.3);
}

/* 技能标签云 */
.skill-section { margin-bottom: 30px; }
.skill-section h3 {
    font-size: 1rem;
    color: #bbb;
    margin-bottom: 15px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.tag {
    padding: 5px 12px;
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    color: var(--primary);
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
    border-radius: 4px;
    transition: 0.3s;
}

.tag:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 10px var(--primary-dim);
    transform: translateY(-2px);
}

.tag.highlight {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(255, 0, 85, 0.05);
}
.tag.highlight:hover {
    background: var(--secondary);
    color: #fff;
}

/* 平板端响应式适配 - 关于页 */
@media (max-width: 1000px) {
    .profile-header {
        padding: 25px;
        gap: 20px;
    }
    
    .resume-grid {
        gap: 20px;
    }
    
    .glass-card {
        padding: 20px;
    }
}

/* 移动端响应式适配 - 关于页 */
@media (max-width: 768px) {
    /* 个人资料头部 */
    .profile-header {
        flex-direction: column;
        align-items: center;
        padding: 20px 15px;
        margin-bottom: 30px;
    }
    
    .profile-avatar img {
        width: 130px;
        height: 130px;
    }
    
    .profile-name {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .profile-role {
        font-size: 1rem;
    }
    
    /* 简历网格调整为单列 */
    .resume-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    /* 调整玻璃卡片样式 */
    .glass-card {
        padding: 20px 15px;
    }
    
    .card-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    /* 时间线样式调整 */
    .timeline-item {
        padding-left: 15px;
    }
    
    .time {
        font-size: 0.85rem;
        text-align: center;
    }
    
    /* 技能标签调整 */
    .tags-cloud {
        gap: 8px;
    }
    
    .tag {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
    
    /* 详情列表调整 */
    .detail-list li {
        font-size: 0.9rem;
    }
}
