/* 全局重置与基础样式 */
* {box-sizing: border-box;margin: 0;padding: 0;}
body {font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;line-height: 1.6;color: #333;background-color: #f4f6f8;height: 100vh;overflow: hidden; /* 防止整个页面滚动，只让内容区滚动 */}
/* 主容器：使用 Flexbox 实现左右分栏 */
.container {display: flex;height: 100%;max-width: 1400px;margin: 0 auto;background-color: #fff;box-shadow: 0 0 20px rgba(0,0,0,0.05);}
/* 左侧侧边栏（目录） */
.sidebar {width: 260px;background-color: #ffffff;border-right: 1px solid #e1e4e8;display: flex;flex-direction: column;flex-shrink: 0; /* 防止被压缩 */}
.sidebar-header {padding: 20px;border-bottom: 1px solid #e1e4e8;background-color: #fafbfc;}
.sidebar-header h2 {font-size: 1.2rem;color: #24292e;font-weight: 600;}
.nav-menu {list-style: none;padding: 10px 0;overflow-y: auto; /* 如果目录很长，允许内部滚动 */flex: 1;}
.nav-item a {display: block;padding: 4px 20px;text-decoration: none;color: #586069;font-size: 0.95rem;transition: all 0.2s ease;border-left: 3px solid transparent;}
.nav-item a:hover {color: #0366d6;background-color: #f1f8ff;border-left-color: #0366d6;}
/* 右侧内容区 */
.main-content {flex: 1;overflow-y: auto; /* 关键：允许右侧独立滚动 */padding: 40px;scroll-behavior: smooth; /* 平滑滚动效果 */}
/* 内容区块样式 */
.content-section {margin-bottom: 60px;padding-top: 20px; /* 给锚点跳转留一点缓冲空间 */}
.content-section h1 {font-size: 2rem;color: #24292e;margin-bottom: 15px;padding-bottom: 10px;border-bottom: 1px solid #eaecef;}
.content-section h2 {font-size: 1.5rem;color: #24292e;margin-top: 30px;margin-bottom: 15px;}
.content-section p {margin-bottom: 15px;color: #586069;text-align: justify;}
.card {background: #fff;border: 1px solid #e1e4e8;border-radius: 6px;padding: 20px;margin-bottom: 20px;box-shadow: 0 1px 3px rgba(0,0,0,0.04);}
.card h3{line-height:200%}
.tag {display: inline-block;padding: 2px 8px;font-size: 12px;font-weight: 600;border-radius: 12px;background-color: #dbedff;color: #0366d6;margin-right: 5px;}
.submit{padding:3px 20px}
a.nav-link{color:#ff0000}
.red{color:#FF0000;}
.ctext{text-align:center}
.tablebox{width:95%;border:1px solid #E1E4E8;padding:5px;margin:10px auto;overflow:hidden}
.loveTest{display:none}
footer{margin-top: 50px; padding-top: 20px; border-top: 1px solid #eaecef; color: #999; font-size: 0.9rem;text-align: center;}
/* 响应式适配：小屏幕下变为上下结构 */
@media (max-width: 768px) {
.container {flex-direction: column;height: auto;overflow: visible;}
body {overflow: auto;}
.sidebar {width: 100%;height: auto;border-right: none;border-bottom: 1px solid #e1e4e8;}
.nav-menu {display: flex;flex-wrap: wrap;padding: 10px;}
.nav-item a {padding: 8px 12px;font-size: 0.9rem;border-left: none;border-bottom: 2px solid transparent;}
.nav-item a:hover {border-left-color: transparent;border-bottom-color: #0366d6;}
.main-content {padding: 20px;overflow: visible;}
img.indexpic{width:100%}
li.DeathClock{display:none}
li.loveTest{display:block}
li.OnTest{display:none}
}
