/* ==========================================================================
   读书会 (NovelCMS) 全站核心样式表 - 2026 最终适配版
   顺序：1.全局 -> 2.头部 -> 3.首页 -> 4.列表 -> 5.详情 -> 6.目录 -> 7.阅读 -> 8.响应式
   ========================================================================== */

/* --- [1. 全局公用样式] --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #F5F7F9; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; color: #333; line-height: 1.6; font-size: 14px; }
a { text-decoration: none; color: #0080FF; transition: 0.3s; }
a:hover { color: #f30; }
ul, li { list-style: none; }
img { max-width: 100%; border: none; vertical-align: middle; }
.cl:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.z { float: left; }
.y { float: right; }
.wp { width: 1100px; margin: 0 auto; }

.bm { background: #fff; border: 1px solid #C2D5E3; margin-bottom: 15px; border-radius: 2px; }
.bm_h { background: #F2F2F2; height: 40px; line-height: 40px; padding: 0 15px; border-bottom: 1px solid #C2D5E3; font-weight: bold; font-size: 15px; }
.bm_c { padding: 15px; }
#pt { padding: 15px 0; font-size: 13px; color: #666; }
#pt em { font-style: normal; margin: 0 5px; color: #ccc; }

/* --- [2. 头部导航、搜索、用户面板] --- */
.header-bar { background: #fff; border-bottom: 2px solid #0080FF; padding: 12px 0; }
.nav-links .logo { font-size: 22px; color: #0080FF; font-weight: bold; margin-right: 25px; }
.nav-links a { margin-right: 15px; color: #333; font-weight: bold; font-size: 15px; white-space: nowrap; }

.search-bar { float: left; margin-left: 20px; margin-top: -2px; }
.search-input { padding: 7px 12px; border: 1px solid #ccc; border-radius: 4px 0 0 4px; width: 180px; outline: none; }
.search-btn { padding: 7px 18px; background: #0080FF; color: #fff; border: none; border-radius: 0 4px 4px 0; cursor: pointer; }

.user-panel { float: right; margin-top: 5px; font-size: 13px; }
.user-panel a { margin-left: 10px; }
.admin-link { background: #f30; color: #fff !important; padding: 2px 6px; border-radius: 3px; }

/* --- [3. 首页区块 (Index)] --- */
/* 分类网格 - 强制PC端3列 */
.index-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }

/* 书名靠左、日期靠右的逻辑 */
.cat-list li { 
    border-bottom: 1px dashed #eee; 
    padding: 8px 10px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.cat-list li a { 
    flex: 1; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    margin-right: 10px; 
    color: #333;
}
.cat-list li span { color: #999; font-size: 12px; flex-shrink: 0; }

/* 最新发布表格样式 (同分类页) */
.latest-table { width: 100%; border-collapse: collapse; background: #fff; table-layout: fixed; }
.latest-table th { background: #f9f9f9; padding: 12px 15px; text-align: left; border-bottom: 1px solid #C2D5E3; color: #666; font-size: 13px; }
.latest-table td { padding: 15px; border-bottom: 1px solid #f2f2f2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-table tr:hover td { background: #f8fbff; }

/* --- [4. 详情页 & 53dushu 下载框] --- */
.pl { display: flex; border-bottom: 1px solid #C2D5E3; }
.pls { width: 170px; background: #E5EDF2; border-right: 1px solid #C2D5E3; padding: 20px 15px; flex-shrink: 0; text-align: center; }
.plc { flex: 1; padding: 0 25px 25px; background: #fff; }
.main-cover { width: 160px; height: 215px; border: 1px solid #ddd; box-shadow: 3px 3px 10px rgba(0,0,0,0.12); border-radius: 3px; overflow: hidden; }
.boan_limit_list-item { display: flex; align-items: center; padding: 20px; border: 1px dotted #0080FF; background: #F9FCFF; margin: 25px 0; border-radius: 4px; }
.btn-common { padding: 10px 25px; border-radius: 5px; font-weight: bold; border: none; color: #fff !important; cursor: pointer; }
.btn-download { background: #0080FF; box-shadow: 0 2px 0 #005bb7; }
.btn-read { background: #5AB444; box-shadow: 0 2px 0 #3d7a2d; }

/* --- [5. 目录页 (TOC) 网格] --- */
.toc-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #eee; border-top: 1px solid #eee; }
.toc-list li { background: #fff; }
.toc-list li a { display: block; padding: 15px 20px; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- [6. 阅读页 & 翻页] --- */
.read-body { background: #f6f4ec !important; }
.read-container { max-width: 850px; margin: 30px auto; background: #fff; padding: 50px 70px; border: 1px solid #dcdcdc; }
.read-content { font-size: 21px; line-height: 2; text-align: justify; }
.read-content p { text-indent: 2em; margin-bottom: 1.5em; }
.pg { margin-top: 20px; text-align: right; }
.pg a, .pg strong { padding: 5px 12px; border: 1px solid #C2D5E3; margin-left: 5px; background: #fff; }
.pg strong { background: #0080FF; color: #fff; border-color: #0080FF; }

/* --- [7. 移动端响应式核心自适应] --- */
.pc-cat-name { display: inline; }
.mb-cat-name { display: none; }

@media (max-width: 768px) {
    .wp { width: 100%; padding: 0 10px; }
    .header-bar { min-width: auto; padding: 10px 0; }
    
    /* 导航排行防掉行 */
    .nav-links a { margin-right: 5px; font-size: 14px; white-space: nowrap; }
    .pc-cat-name { display: none !important; }
    .mb-cat-name { display: inline; }

    /* 登录在搜索框左边 */
    .header-bar .wp { display: flex; flex-wrap: wrap; align-items: center; }
    .user-panel { order: 2; float: none; margin: 0 10px 0 0; display: flex; height: 36px; font-size: 12px; align-items: center; }
    .user-panel b, .user-panel span { display: none; }
    .search-bar { order: 3; display: block !important; float: none; flex: 1; margin: 0; }
    .search-bar form { display: flex; }
    .search-input, .search-btn { height: 36px; font-size: 12px; }

    /* 首页板块转为 1 列 */
    .index-grid { grid-template-columns: 1fr; }
    
    /* 列表比例 */
    .latest-table { table-layout: fixed; }
    .latest-table .col-title { width: 45%; }
    .latest-table .col-author { width: 30%; }
    .latest-table .col-date { width: 25%; text-align: right; }
    .latest-table td { padding: 12px 5px !important; font-size: 12px; }

    /* 目录页转为 1 列 */
    .toc-list { grid-template-columns: 1fr; }
    .pls { display: none; }
    .read-container { padding: 30px 15px; margin: 10px; }
    .read-content { font-size: 19px; }
}