/* site.css - xiaoshuo.com.tw style */

/* 基础样式 */
html, body {
    font-family: ff-tisa-web-pro-1, ff-tisa-web-pro-2, "Lucida Grande", "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", "Hiragino Sans GB W3", "Microsoft YaHei UI", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    background-color: #eee;
    -webkit-font-smoothing: antialiased;
}

/* 面板样式 */
.list-group, .panel {
    margin-bottom: 10px;
}
.panel-default {
    border-color: #ddd;
}
.panel {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
    box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}

a {
    color: #337ab7;
    text-decoration: none;
    outline: 0;
    transition: none;
}
a:hover {
    color: #23527c;
    text-decoration: none;
}

.container {
    max-width: 1100px;
    padding: 0 15px;
}

/* ========== 顶部导航栏 - 深色风格 ========== */
.header_46f {
    background-color: #4a4a4a;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    min-height: 50px;
}
.header_46f.navbar-inverse {
    background-color: #4a4a4a;
    border-color: #4a4a4a;
}
.header_46f.navbar-inverse .navbar-collapse {
    border-color: #4a4a4a;
}
.header_46f .navbar-brand {
    color: #f2f2f2;
    font-size: 22px;
    font-weight: bold;
    padding: 15px;
    width: 120px;
    height: 50px;
    overflow: hidden;
}
.header_46f .navbar-brand:hover {
    color: #fff;
}
.header_46f.navbar-inverse .navbar-nav > li > a {
    color: #f2f2f2;
    padding: 15px 18px;
}
.header_46f.navbar-inverse .navbar-nav > li > a:hover,
.header_46f.navbar-inverse .navbar-nav > li > a:focus {
    background-color: #3a3a3a;
    color: #fcfcfc;
}
.nav_46f > li > a {
    color: #f2f2f2;
    padding: 15px 18px;
}
.nav_46f > li > a:hover,
.nav_46f > li > a:focus {
    background-color: #3a3a3a;
    color: #fcfcfc;
}
.nav_46f > li.active > a {
    background-color: #3a3a3a;
}
.header_46f.navbar-inverse .navbar-toggle {
    border-color: #fff;
}
.header_46f.navbar-inverse .navbar-toggle .icon-bar {
    background-color: #fff;
}
.header_46f.navbar-inverse .navbar-toggle:hover,
.header_46f.navbar-inverse .navbar-toggle:focus {
    background-color: #3a3a3a;
}

/* 搜索框 */
.search_46f {
    margin-top: 8px;
    margin-left: 20px;
}
.search_46f .form-control {
    width: 180px;
    border-radius: 3px 0 0 3px;
}
.search_46f .btn {
    background-color: #5bc0de;
    color: #fff;
    border-radius: 0 3px 3px 0;
}
.search_46f .btn:hover {
    background-color: #46b8da;
}

/* 主体内容区 */
.body_46f {
    padding: 15px 0;
    min-height: 600px;
}

/* ========== 面板标题样式 ========== */
.section_46f {
    margin-bottom: 15px;
}
.title_46f {
    background-color: #f5f5f5;
    border-bottom: 2px solid #4a4a4a;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}
.title_46f .fa {
    color: #4a4a4a;
    margin-right: 5px;
}
.title_46f .pull-right {
    font-size: 12px;
    font-weight: normal;
    color: #337ab7;
}
.content_46f {
    padding: 15px;
}

/* ========== 推荐封面网格 - 4列 ========== */
.book-coverlist {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    margin-top: 10px;
}
.book-coverlist > .col-md-3 {
    display: flex;
}
.book-coverlist .thumbnail {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.cover_46f {
    display: block;
    width: 100%;
    height: 182px;
    object-fit: cover;
    border-radius: 3px;
    margin-bottom: 10px;
}
a.thumbnail {
    text-decoration: none;
    margin-bottom: 0;
}
.book-coverlist .caption {
    padding: 0;
}
.book-coverlist .caption strong {
    display: block;
    font-size: 14px;
    margin: 0 0 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}
.book-coverlist .caption strong a {
    color: #333;
}
.book-coverlist .caption small,
.book-coverlist .caption .text-muted {
    color: #999;
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
}
.book-coverlist .caption .text-warning {
    color: #f0ad4e;
    font-size: 12px;
}
.book-coverlist .caption h4 {
    font-size: 14px;
    margin: 0 0 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.book-coverlist .caption h4 a {
    color: #337ab7;
}
.book-coverlist .caption p {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    max-height: 54px;
    overflow: hidden;
}

/* ========== 排行榜Tab + 列表 ========== */
.nav-tabs {
    border-bottom: none;
    width: 100%;
}
.nav-tabs > li {
    display: table-cell;
    width: 1%;
    float: none;
}
.nav-tabs > li > a {
    text-align: center;
}
.nav-tabs > li > a:hover {
    border-color: #eee #eee #eee #eee;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    background-color: #fcfcfc;
    color: #444;
    border: 1px solid #ccc;
    border-radius: 3px;
}
.nav-tabs > li.active:after {
    position: absolute;
    bottom: -11px;
    left: 45%;
    border: 6px solid #999;
    border-color: #fcfcfc transparent transparent transparent;
    display: block;
    content: " ";
    z-index: 6;
}
.nav-tabs > li.active:before {
    position: absolute;
    bottom: -12px;
    left: 45%;
    border: 6px solid #999;
    border-color: #ccc transparent transparent transparent;
    display: block;
    content: " ";
    z-index: 5;
}

/* 排行榜列表项带编号 */
.list-group.list-top {
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
}
.list-group.list-top li {
    border-bottom: 1px solid #e2d9d9;
    list-style: none;
}
.list-group.list-top li:last-child {
    border-bottom: none;
}
.list-group.list-top .list-group-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #337ab7;
    background-color: #fff;
    border: none;
    border-radius: 0;
}
.list-group.list-top .list-group-item:hover {
    background-color: #f5f5f5;
    color: #23527c;
}
.list-group.list-top .list-group-item .pull-right {
    color: #777;
}
.text-hidden {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* 排名编号样式 */
i.topNum {
    display: inline-block;
    margin-right: 5px;
    background: #c3c3c3;
    color: #fff;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 2px;
    font-size: 12px;
    font-weight: normal;
    font-style: normal;
    flex-shrink: 0;
}
.list-top li:nth-child(1) i.topNum,
.list-top li:nth-child(2) i.topNum,
.list-top li:nth-child(3) i.topNum {
    background: #ffce00;
}

/* 书名和作者宽度分配 */
.list_46f .list-group.list-top .book-sort {
    display: none;
}
.list-group.list-top .book-sort {
    flex-shrink: 0;
    width: 2em;
    color: #999;
    font-size: 12px;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}
.list-group.list-top .book-name {
    flex: 1;
    min-width: 0;
    margin-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.list-group.list-top .book-author {
    flex-shrink: 0;
    width: 5em;
    max-width: 6em;
    color: #777;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== 更新表格样式 - panel-success绿色 ========== */
.panel-success > .panel-heading {
    background-color: #dff0d8;
    border-color: #d6e9c6;
    color: #3c763d;
}
.panel-success {
    border-color: #d6e9c6;
}

.panel-body .table {
    margin-bottom: 0;
    table-layout: fixed;
}
.panel-body .table tr {
    border-bottom: 1px solid #e2d9d9;
}
.panel-body .table tr:last-child {
    border-bottom: none;
}
.panel-body .table td {
    padding: 10px 8px;
    border-top: none;
    vertical-align: middle;
}
.panel-body .table td a {
    color: #337ab7;
}
.panel-body .table td a:hover {
    color: #23527c;
}

/* 更新表格文字截断 */
.panel-body .table .td-sort {
    width: 30px !important;
    max-width: 30px !important;
    padding: 10px 2px !important;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    font-size: 12px;
}
.panel-body .table .td-book {
    width: 30%;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.panel-body .table .td-book a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.panel-body .table .td-chapter {
    width: 30%;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.panel-body .table .td-chapter a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.panel-body .table .td-author {
    width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.panel-body .table .td-date {
    width: 50px;
}

/* 新书推荐表格样式 */
.table-xinshu {
    margin-bottom: 0;
    table-layout: fixed;
}
.table-xinshu tr {
    border-bottom: 1px solid #e2d9d9;
}
.table-xinshu tr:last-child {
    border-bottom: none;
}
.table-xinshu td {
    padding: 10px 8px;
    border-top: none;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.table-xinshu td:first-child {
    width: 48px;
}
.table-xinshu td:last-child {
    width: 80px;
}
.table-xinshu td a {
    color: #337ab7;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.table-xinshu td a:hover {
    color: #23527c;
}

/* 3列列表样式 */
.list-inline-3col {
    display: flex;
    flex-wrap: wrap;
}
.list-inline-3col li {
    width: 33.33%;
    box-sizing: border-box;
}
@media (max-width: 767px) {
    .list-inline-3col li {
        width: 50%;
    }
}

/* ========== 小说详情页 ========== */
.bookTitle {
    font-size: 24px;
    color: #333;
    margin: 0 0 15px;
    border-bottom: none;
    font-weight: normal;
}
.bookTitle em {
    font-style: normal;
    margin-right: 15px;
}
.booktag {
    margin-bottom: 5px;
}
.booktag a, .booktag span {
    font: 12px/22px PingFangSC-Regular, '-apple-system', Simsun;
    display: inline-block;
    overflow: hidden;
    height: 22px;
    margin-right: 10px;
    margin-bottom: 5px;
    padding: 0 10px;
    text-align: center;
    vertical-align: middle;
    border-width: 1px;
    border-style: solid;
    border-radius: 15px;
}
.booktag .red {
    color: #bf2c24;
    border-color: #ffb0b4;
    transition: border .3s;
}
.booktag .red:hover {
    border-color: #ed4259;
}
.booktag .blue {
    color: #3f5a93;
    border-color: #89d4ff;
}
#bookIntro {
    color: #666;
    line-height: 1.8;
    text-align: justify;
    font-size: 14px;
    overflow: hidden;
    position: relative;
    padding-right: 20px;
}
.bookmore {
    margin: 15px 0;
}
.bookmore .btn {
    margin-right: 10px;
}

/* 章节列表 */
.panel-body dl {
    margin-bottom: 0;
}
.panel-body dd {
    padding: 10px 15px;
    margin: 0;
    border-bottom: 1px dotted #e5e5e5;
    height: 38px;
    overflow: hidden;
    line-height: 38px;
}
.panel-body dd:hover {
    background-color: #f5f5f5;
}
.panel-body dd a {
    color: #337ab7;
    font-size: 14px;
}
.panel-body dd a:hover {
    color: #23527c;
}
.panel-body dd a:visited {
    color: #999;
}

/* ========== 阅读页 ========== */
h1.readTitle, .readTitle {
    font-size: 24px;
    color: #333 !important;
    text-align: center;
    margin: 20px 0;
    font-weight: normal;
    border-bottom: none;
}
.page-header {
    margin: 0 0 15px;
    padding-bottom: 0;
    border-bottom: none;
}
.page-header .booktag {
    margin-top: 15px;
}
.page-header .booktag a {
    display: inline-block;
    padding: 0 12px;
    margin: 0 5px;
    border-width: 1px;
    border-style: solid;
    border-radius: 15px;
    font-size: 12px;
}
.page-header .booktag a.blue {
    color: #3f5a93;
    border-color: #89d4ff;
}
.page-header .booktag a.red {
    color: #bf2c24;
    border-color: #ffb0b4;
}
#rtext {
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 20px;
    line-height: 180%;
    text-align: justify;
    padding: 0 15px;
    color: #333;
}
#rtext p {
    text-indent: 2em;
    margin-bottom: 1.5em;
}

/* 阅读设置 */
.readSet {
    display: inline-block;
    vertical-align: middle;
}
.readSet .ra {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: 0 2px;
    cursor: pointer;
    border: 2px solid #ccc;
    vertical-align: middle;
}
.readSet .ra:hover {
    border-color: #4a4a4a;
}
.readSet .rf {
    display: inline-block;
    margin-left: 15px;
    vertical-align: middle;
}
.readSet .rt {
    display: inline-block;
    padding: 2px 6px;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}
.readSet .rt:hover {
    color: #4a4a4a;
}

/* 章节导航 */
.readPager {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin: 10px 0;
}
.readPager a {
    display: inline-block;
    padding: 8px 20px;
    margin: 0 5px;
    background-color: #4a4a4a;
    color: #fff;
    border-radius: 3px;
}
.readPager a:hover {
    background-color: #333;
    color: #fff;
}

/* 面包屑导航 */
.breadcrumb {
    background-color: #fcfcfc;
    padding: 8px 15px;
    margin-bottom: 10px;
}
.breadcrumb > li + li:before {
    content: ">";
    color: #999;
}

/* ========== 最新标签 ========== */
.tag-list {
    line-height: 2.2;
}
.tag-list a {
    display: inline-block;
    margin: 0 8px;
    color: #333;
    font-size: 13px;
}
.tag-list a:hover {
    color: #337ab7;
    text-decoration: underline;
}

/* ========== 友情链接 ========== */
.panel-friendlink a {
    margin-right: 10px;
    display: inline-block;
}

/* ========== 页脚 ========== */
.footer_46f {
    background-color: #f5f5f5;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #ddd;
    color: #999;
    font-size: 12px;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 20%;
    right: 10%;
    width: 46px;
    height: 44px;
    background: rgba(50, 50, 50, 0.5);
    color: #f4f4f4;
    text-align: center;
    line-height: 36px;
    border-radius: 3px;
    cursor: pointer;
    display: none;
    z-index: 999;
    font-size: 32px;
}
.back-to-top:hover {
    background: #c5c5c5;
    color: #fff;
}

/* ========== 工具类 ========== */
.fs-12 { font-size: 12px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.fs-22 { font-size: 22px; }

.red { color: #d9534f; }
.blue { color: #337ab7; }
.gray { color: #999; }
.text-muted { color: #777; }
.text-warning { color: #f0ad4e; }
.text-purple { color: purple; }
.text-red { color: red; }
.text-gray { color: gray; }
.text-black { color: #333; }

.mg0 { margin: 0; }
.mt10 { margin-top: 10px; }
.mt15 { margin-top: 15px; }
.mt20 { margin-top: 20px; }
.mb10 { margin-bottom: 10px; }
.mb15 { margin-bottom: 15px; }
.mb20 { margin-bottom: 20px; }
.ml10 { margin-left: 10px; }
.pl0 { padding-left: 0; }
.pr0 { padding-right: 0; }

.clear { clear: both; display: block; }
.flex { display: flex; }

/* 分类筛选 */
.sort-filter { background: #f9f9f9; padding: 15px; margin-bottom: 15px; border-radius: 3px; }
.sort-filter p { margin: 8px 0; }
.sort-filter span { display: inline-block; width: 60px; color: #666; }
.sort-filter a { display: inline-block; padding: 3px 10px; margin: 2px; color: #666; border-radius: 3px; }
.sort-filter a:hover, .sort-filter a.on { background: #4a4a4a; color: #fff; }

/* ========== 响应式 ========== */
@media (max-width: 991px) {
    .search_46f {
        margin: 10px 0;
    }
    .search_46f .form-control {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .header_46f.navbar-inverse {
        margin: 0;
        border: none;
        border-bottom: 1px solid #333;
    }
    .body_46f {
        padding: 10px 0;
    }
    .container {
        padding: 0 10px;
    }
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    .book-coverlist {
        padding: 0 5px;
    }
    .cover_46f {
        height: 120px;
    }
    .bookTitle {
        font-size: 18px;
    }
    #rtext {
        font-size: 18px;
        word-break: break-all;
        padding: 0 10px;
    }
    .readTitle {
        font-size: 18px;
        padding-top: 10px;
        margin-top: 0;
    }
    .readPager {
        margin: 0;
        padding: 5px 0;
    }
    .readPager a {
        padding: 6px 12px;
        font-size: 12px;
    }
    .breadcrumb {
        margin-bottom: 5px;
    }
    hr {
        margin: 10px 0;
    }
    .page-header {
        margin-bottom: 0;
        border-bottom: 0;
        padding-bottom: 0;
    }
    .panel {
        margin-bottom: 10px;
    }
    .list-group {
        margin-bottom: 10px;
    }
}

/* 空内容区块自动隐藏 */
.panel:has(> .panel-body:empty) { display: none; }
.panel-body .row:empty { display: none; }
.panel-body .list_46f:empty { display: none; }
.tag-list:empty { display: none; }
.first_txt:empty { display: none; }
.first_txt p:empty { display: none; }
.body-content img { max-width: 100%; }
.pagination { margin: 0; }