/*GZ3CSBooks Style for 2022*/
/*-----------------------------------------------------------------------------------*/
@charset "utf-8";
html,body{background: #eee;font-family: 宋体, 新宋体;
	overflow:hidden;width:100%;margin:0 auto;}
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 确保html和body占满整个屏幕高度 */
html, body {
    height: 100%;
    overflow: hidden; /* 防止页面整体滚动 */
}

/* 顶部固定区域 */
.appheader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5rem;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    z-index: 100; /* 确保在其他内容上方 */
}

/* 图书名称样式 */
.bookname {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;line-height:3rem;
    margin-bottom: 0.5rem;
    color: #FFFFFF;
		background-color:#6a4b23;
}

/* 导航栏样式 */
.nav {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem; 
}

/* 按钮样式 */
.button {
    padding: 0.3rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    color:#FFFFFF;background-color:#805020;
    cursor: pointer;
    font-size: 0.9rem;
}

:hover.button {
    background-color: #205080;
}

/* 搜索框样式 */
#keys {
    padding: 0.3rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* 主内容区域 - 关键修复：确保容器有明确的高度限制 */
.mainframe {
    position: fixed;
    top: 5rem;
    bottom: 2rem;
    left: 0;
    right: 0;
    display: flex;
    overflow: hidden; /* 防止容器自身出现滚动条 */
}
/* 侧边栏样式 */
.sidebar {
    width: 22%;max-width: 22%;min-width: 22%;
    background-color: #f9f9f9;
    border-right: 1px solid #ddd;
    overflow-y: auto; /* 内容超出时可滚动 */
    padding: 1rem;
}

/* 文章内容区域样式 - 修复滚动条问题 */
article{float:left;overflow-y:auto}/*只要纵向滚动条*/
.article {
    width:78%;
    padding: 1rem;border:2px solid #aaa;
    /* 关键修复：设置明确的高度，相对于父容器 */
    height: 100%;float:left;
    /* 确保内容溢出时显示垂直滚动条 */
    /* 可选：强制显示滚动条轨道（增强用户感知） */
    overflow: hidden;overflow-y: scroll;
    /* 修复可能的计算偏差 */
    box-sizing: border-box;
}
/* 底部固定区域 */
.footbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2rem;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #666;
    z-index: 100; /* 确保在其他内容上方 */
}

/* 帮助和信息区域样式 */
#help, #info {
    display: none; /* 默认隐藏，通过JS控制显示 */
    position: fixed;
    top: 5rem;
    bottom: 2rem;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    overflow-y: auto;
    z-index: 200;
}

#help p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

details{margin:4px 0px;padding:0px;line-height: 1.2em;}
details summary{cursor:pointer;margin:0 4px}
details summary:hover{color:#805020;background-color:#F0C0A0}
details p{text-indent:1em;line-height:1.2em;border-bottom:1px dotted #888}
.cnt1{margin-left:1em}/*一级目录*/
details.cnt2{margin-left:1em}/*二级目录*/
p.cnt2{margin-left:1em;background-color:#aaa}/*二级条目*/
details.cnt3{margin-left:1em}/*三级目录*/
p.cnt3{margin-left:1em}/*三级目录*/
::before.cnt3{content:"　　";}/*三级目录前加一个点*/

#navpath{display:none;overflow:hidden;text-overflow:ellipsis;margin-left:24px}
/*导航信息：宽度小于800px时*/
@media screen and (max-width:800px){
	#navpath{display:none;color:#000}
}
/*导航信息：宽度大于800px时*/
@media screen and (min-width:800px){
	#navpath a{display:none;color:#c00000; background-color:#CCCC00}
}

#keys{width:10em;height:1.3em;font-size:1.2em}/*输入框*/

#info,#help{display:none;clear:both}
#tips{padding:12px}
#author{display:block;width:99%;margin:0 auto;padding-right:1em;
	color: #fff;background-color:#abc;
	text-align:right;vertical-align:middle;
	font-size:1.2em;font-weight: bold;
	user-select: none;
	}/*文字不可选*/
#mark{color: #e00;	background-color: #ff0;}
hr{border:1px;}

/*-----------------------------------------------------------------------------------*/