/* 飞书风格现代化笔趣阁样式 - 升级版 */

/* CSS变量定义 - 飞书风格配色 */
:root {
    --primary-color: #1f2329;
    --secondary-color: #36383c;
    --accent-color: #3370ff;
    --accent-hover: #1456ff;
    --success-color: #00d4aa;
    --warning-color: #ff8800;
    --danger-color: #f54a45;
    --text-primary: #1f2329;
    --text-secondary: #646a73;
    --text-tertiary: #8f959e;
    --bg-white: #ffffff;
    --bg-gray-light: #f7f8fa;
    --bg-gray: #eff1f4;
    --border-light: #e5e6eb;
    --border-normal: #d0d1d6;
    --shadow-light: 0 1px 10px 0 rgba(31, 35, 41, 0.08);
    --shadow-medium: 0 2px 20px 0 rgba(31, 35, 41, 0.12);
    --shadow-heavy: 0 8px 40px 0 rgba(31, 35, 41, 0.16);
    --radius-small: 4px;
    --radius-medium: 8px;
    --radius-large: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* 浅色主题变量 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --border-color: #e5e5e5;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* 暗色主题 */
[data-theme="dark"] {
    --bg-primary: #32373B;
    --bg-secondary: #2a2e32;
    --bg-card: #3a3f44;
    --text-primary: #cccccc;
    --text-secondary: #999999;
    --border-color: #4a4f54;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* 护眼主题 */
[data-theme="eye"] {
    --bg-primary: #dcecd2;
    --bg-secondary: #c7edcc;
    --bg-card: #e6f3e6;
    --text-primary: #2d5016;
    --text-secondary: #4d7029;
    --border-color: #a3d9a8;
    --shadow-color: rgba(45, 80, 22, 0.1);
}

/* 应用主题变量到所有元素 */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 滚动条样式 - 飞书风格 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gray-light);
    border-radius: var(--radius-small);
}

::-webkit-scrollbar-thumb {
    background: var(--border-normal);
    border-radius: var(--radius-small);
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* 基础重置和通用样式 */
*, ::after, ::before {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    box-sizing: border-box;
}

html, body, dd, div, dl, dt, h1, h2, h3, h4, h5, h6, li, p, ul {
    margin: 0;
    padding: 0;
}

li { list-style: none; }
img { border: none; margin: 0; padding: 0; }
a { 
    color: var(--text-primary) !important; 
    text-decoration: none; 
    transition: var(--transition);
}
a:hover { color: var(--accent-color) !important; }
em, i { font-style: normal; }

.left { float: left; }
.right { float: right; }
.cf { clear: both; overflow: hidden; }
.space { height: 10px; clear: both; overflow: hidden; }
c { clear: both; display: none; }

/* 头部样式 - 飞书风格升级 */
.header {
    font-size: 18px;
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    height: 56px;
    line-height: 56px;
    text-align: center;
    position: relative;
    z-index: 999;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px var(--shadow-color);
    border-bottom: 1px solid var(--border-color);
}

.header .bookname {
    flex: 1;
    font-weight: 600;
    font-size: 18px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    color: var(--text-primary) !important;
}

.header .operate {
    padding: 0 16px;
    height: 36px;
    margin: 0 12px;
    line-height: 36px;
    font-size: 14px;
    background: var(--accent-color);
    border-radius: var(--radius-medium);
    transition: var(--transition);
}

.header .operate:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.header .operate a {
    color: white;
    font-weight: 500;
}

/* 导航样式升级 */
.nav {
    height: 48px;
    line-height: 48px;
    overflow: hidden;
    background-color: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color);
}

.nav ul {
    display: flex;
}

.nav ul li {
    text-align: center;
    font-size: 15px;
    flex: 1;
    position: relative;
}

.nav ul li:hover {
    background: var(--bg-gray-light);
}

.nav ul li a {
    display: block;
    padding: 0 16px;
    font-weight: 500;
    transition: var(--transition);
}

/* 导航下拉框样式 */
#navbox {
    position: absolute;
    z-index: 999999;
    top: 56px;
    left: 0;
    background: var(--bg-white);
    width: 100%;
    box-shadow: var(--shadow-medium);
    border-radius: 0 0 var(--radius-medium) var(--radius-medium);
}

#navbox ul {
    width: 100%;
    padding: 12px 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

#navbox li {
    padding: 8px 16px;
    text-align: center;
}

#navbox li:hover {
    background: var(--bg-gray-light);
    border-radius: var(--radius-small);
}

#navbox li a {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* 容器样式升级 */
.wrap-box {
    margin: 16px 12px;
    background-color: var(--bg-card) !important;
    border-radius: var(--radius-large);
    box-shadow: 0 2px 8px var(--shadow-color);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.wrap-title {
    position: relative;
    height: 48px;
    line-height: 48px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    font-size: 16px;
    padding: 0 16px;
    font-weight: 600;
}

.wrap-title span,
.wrap-title span a {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.wrap-title .more {
    position: absolute;
    right: 16px;
    top: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-color);
    transition: var(--transition);
}

.wrap-title .more:hover {
    color: var(--accent-hover);
}

.wrap-title-2 {
    border-bottom: 2px solid var(--accent-color);
    background: var(--bg-white);
    height: 48px;
    line-height: 48px;
    padding-left: 16px;
    font-weight: 600;
    font-size: 16px;
    margin: 16px 12px;
    border-radius: var(--radius-medium) var(--radius-medium) 0 0;
    box-shadow: var(--shadow-light);
}

.block-box {
    width: 100%;
    margin: 0;
    padding: 0;
    clear: both;
    overflow: hidden;
}

/* 导航列表样式 */
.navbar-list {
    width: 100%;
    margin: 16px 0;
}

.navbar-list ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px;
}

.navbar-list li a {
    display: block;
    padding: 12px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-medium);
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.navbar-list li a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.navbar-list li.state a {
    background: var(--accent-color);
    color: white;
}

/* 搜索框样式升级 */
.novel_search {
    background: var(--bg-white);
    padding: 16px 12px;
    margin: 16px 12px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-light);
}

#novel_search {
    width: 100%;
    display: flex;
    gap: 0;
}

#novel_search input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-medium) 0 0 var(--radius-medium);
    background: var(--bg-gray-light);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
}

#novel_search input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.1);
}

#novel_search button {
    border: none;
    height: 44px;
    padding: 0 24px;
    cursor: pointer;
    background: var(--accent-color);
    color: white;
    font-size: 15px;
    font-weight: 500;
    border-radius: 0 var(--radius-medium) var(--radius-medium) 0;
    transition: var(--transition);
}

#novel_search button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* 排行榜样式升级 */
.rank-box {
    padding: 16px;
}

.rank-book-first {
    height: 120px;
    clear: both;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--bg-gray-light);
    border-radius: var(--radius-medium);
    padding: 16px;
    transition: var(--transition);
}

.rank-book-first:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.rank-book-first .book-img {
    float: left;
    width: 80px;
    position: relative;
}

.rank-book-first .book-img img {
    width: 80px;
    height: 100px;
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-light);
}

.rank-book-first .book-info {
    padding: 0 0 0 16px;
    height: 100px;
    overflow: hidden;
}

.rank-book-first .book-info h4 {
    font: 600 16px/24px -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.rank-book-first .book-info p {
    font: 400 13px/20px -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-secondary);
    margin: 4px 0;
}

.rank-book-list li {
    position: relative;
    line-height: 44px;
    padding: 8px 16px 8px 48px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.rank-book-list li:hover {
    background: var(--bg-gray-light);
}

.rank-book-list li:last-child {
    border: none;
}

.rank-book-list li span {
    position: absolute;
    top: 12px;
    left: 16px;
    display: inline-block;
    background: var(--text-tertiary);
    color: white;
    width: 24px;
    height: 20px;
    line-height: 20px;
    border-radius: var(--radius-small);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
}

.rank-book-list li span.no1,
.rank-box .no1 {
    background: var(--danger-color);
}

.rank-book-list li span.no2,
.rank-box .no2 {
    background: var(--warning-color);
}

.rank-book-list li span.no3,
.rank-box .no3 {
    background: var(--success-color);
}

/* 推荐焦点样式 */
.rec-focus {
    padding: 16px;
}

.rec-focus-book {
    height: 120px;
    margin-bottom: 16px;
    background: var(--bg-gray-light);
    border-radius: var(--radius-medium);
    padding: 16px;
    transition: var(--transition);
}

.rec-focus-book:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.rec-focus-book .book-img {
    float: left;
    width: 80px;
}

.rec-focus-book .book-img img {
    width: 80px;
    height: 100px;
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-light);
}

.rec-focus-book .book-info {
    padding: 0 0 0 16px;
    height: 100px;
    overflow: hidden;
}

.rec-focus-book .book-info h2 {
    font: 600 16px/24px -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.rec-focus-book .book-info p {
    font: 400 13px/20px -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-secondary);
    margin: 4px 0;
}

/* 分类书籍样式 */
.sort-box {
    padding: 16px;
}

.sort-book-first {
    height: 120px;
    margin-bottom: 16px;
    background: var(--bg-gray-light);
    border-radius: var(--radius-medium);
    padding: 16px;
    transition: var(--transition);
}

.sort-book-first:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.sort-book-first .book-img {
    float: left;
    width: 80px;
}

.sort-book-first .book-img img {
    width: 80px;
    height: 100px;
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-light);
}

.sort-book-first .book-info {
    padding: 0 0 0 16px;
    height: 100px;
    overflow: hidden;
}

.sort-book-first .book-info h4 {
    font: 600 16px/24px -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.sort-book-first .book-info p {
    font: 400 13px/20px -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-secondary);
    margin: 4px 0;
}

.sort-book-list li {
    line-height: 44px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    transition: var(--transition);
}

.sort-book-list li:hover {
    background: var(--bg-gray-light);
}

.sort-book-list li:last-child {
    border: none;
}

.sort-book-list li span {
    position: absolute;
    top: 12px;
    right: 16px;
    font: 400 12px/20px -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-tertiary);
}

/* 分类导航样式升级 */
.navpf {
    background: var(--bg-white);
    box-shadow: var(--shadow-light);
    margin: 16px 12px;
    border-radius: var(--radius-large);
    overflow: hidden;
}

.sortChannel_nav {
    background: var(--bg-white);
    min-height: 48px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-light);
}

.sortChannel_nav:last-child {
    border-bottom: none;
}

.sortChannel_nav a {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 4px;
    border-radius: var(--radius-small);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    line-height: 32px;
    height: 32px;
}

.sortChannel_nav a:hover {
    background: var(--bg-gray-light);
}

.sortChannel_nav a.on {
    background: var(--accent-color);
    color: white;
    font-weight: 600;
}

.sortChannel_nav a.on2 {
    background: var(--accent-color);
    color: white;
}

/* 标签样式升级 */
.tag span {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: var(--radius-small);
    margin-right: 8px;
    font-weight: 500;
}

.tag .red {
    color: var(--danger-color);
    background: rgba(245, 74, 69, 0.1);
    border: 1px solid rgba(245, 74, 69, 0.2);
}

.tag .orange {
    color: var(--warning-color);
    background: rgba(255, 136, 0, 0.1);
    border: 1px solid rgba(255, 136, 0, 0.2);
}

.tag .blue {
    color: var(--accent-color);
    background: rgba(51, 112, 255, 0.1);
    border: 1px solid rgba(51, 112, 255, 0.2);
}

.tag .green {
    color: var(--success-color);
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.2);
}

/* 书架样式升级 */
.bookcase-book {
    position: relative;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-card) !important;
    margin: 0 12px 12px;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.bookcase-book:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.bookcase-book .book-img {
    float: left;
    width: 80px;
}

.bookcase-book .book-img img {
    width: 80px;
    height: 100px;
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-light);
}

.bookcase-book .book-info {
    padding-left: 16px;
    height: 100px;
    overflow: hidden;
}

.bookcase-book h4 {
    font-size: 16px;
    font-weight: 600;
    height: 24px;
    line-height: 24px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.bookcase-book .author,
.bookcase-book .classify,
.bookcase-book .read {
    color: var(--text-secondary);
    font: 400 13px/20px -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 4px 0;
}

.bookcase-book .del-btn {
    position: absolute;
    right: 16px;
    top: 16px;
}

.bookcase-book .del-btn a {
    display: block;
    width: 60px;
    height: 32px;
    line-height: 32px;
    border-radius: var(--radius-small);
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.bookcase-book .del-btn .border-btn {
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    background: rgba(245, 74, 69, 0.1);
}

.bookcase-book .del-btn .border-btn:hover {
    background: var(--danger-color);
    color: white;
}

/* 书籍详情样式升级 */
.book-main {
    padding: 20px 16px;
    background: var(--bg-card) !important;
    margin: 16px 12px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-light);
}

.book-main .book-img {
    width: 90px;
    height: 120px;
    float: left;
    margin-right: 16px;
}

.book-main .book-img img {
    width: 90px;
    height: 120px;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-medium);
}

.book-main .book-info {
    overflow: hidden;
    padding-top: 8px;
}

.book-main .bookname h1 {
    font: 600 20px/28px -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.book-main .bookname span {
    font: 400 14px/20px -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-secondary);
    margin-left: 8px;
}

.book-main .book-info p {
    font: 400 14px/22px -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 6px 0;
    color: var(--text-secondary);
}

.book-main .tag {
    margin: 12px 0;
}

.book-main .book-info .update span,
.book-main .book-info .time span {
    color: var(--text-tertiary);
    font-weight: 500;
}

.book-main .book-info .update a {
    color: var(--accent-color);
    font-weight: 500;
}

/* 按钮组样式升级 */
.book-detail-btn {
    margin: 20px 0 0;
    clear: both;
}

.btn-group {
    display: flex;
    gap: 12px;
    width: 100%;
}

.btn-group-cell {
    flex: 1;
}

.btn-normal {
    display: block;
    height: 44px;
    line-height: 44px;
    text-align: center;
    border-radius: var(--radius-medium);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.novel_info .btn-normal {
    background: var(--accent-color);
    color: white;
}

.novel_info .btn-normal:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.novel_info .btn-normal.abt1 {
    background: var(--success-color);
}

.novel_info .btn-normal.abt1:hover {
    background: #00b896;
}

.novel_info .btn-normal.abt3 {
    background: var(--warning-color);
}

.novel_info .btn-normal.abt3:hover {
    background: #e67700;
}

/* 章节列表样式升级 */
.chapter-list {
    background: var(--bg-white);
    border-radius: var(--radius-medium);
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
}

.chapter-list li {
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
}

.chapter-list li:last-child {
    border-bottom: none;
}

.chapter-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 44px;
}

.chapter-list li a:hover {
    background-color: var(--bg-gray-light);
    color: var(--accent-color);
    transform: translateX(4px);
}

.chapter-list li a span:first-child {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
}

.chapter-list li a span:last-child {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* 隐藏结构化数据的meta标签 */
.chapter-list meta {
    display: none !important;
}

/* 阅读设置样式升级 */
.set {
    width: 100%;
    min-height: 48px;
    padding: 8px 0;
    background-color: var(--bg-card) !important;
    box-shadow: var(--shadow-light);
    margin: 16px 12px;
    border-radius: var(--radius-medium);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid var(--border-color);
}

.set .set1 {
    margin: 0 8px;
    padding: 6px 12px;
    border: 1px solid var(--border-normal);
    border-radius: var(--radius-small);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--bg-secondary) !important;
}

.set .set1:hover {
    background-color: var(--accent-color) !important;
    color: white !important;
    border-color: var(--accent-color);
}

.set .set2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 16px;
}

.set .set2 span {
    padding: 6px 12px;
    border: 1px solid var(--border-normal);
    border-radius: var(--radius-small);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--bg-secondary) !important;
}

.set .set2 span:hover {
    background-color: var(--accent-color) !important;
    color: white !important;
    border-color: var(--accent-color);
}

/* 内容区域样式升级 */
.content {
    margin: 16px 12px;
    background-color: var(--bg-card) !important;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.content h1 {
    padding: 20px 16px;
    font-weight: 600;
    font-size: 20px;
    text-align: center;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-gray-light);
}

.txt {
    line-height: 1.8;
    padding: 24px 20px;
    font-size: 17px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    text-align: justify;
    color: var(--text-primary);
    word-spacing: 1px;
    letter-spacing: 0.5px;
    background-color: var(--bg-card) !important;
}

/* 章节导航按钮升级 */
.chapter-page-btn {
    margin: 0;
    padding: 16px 12px;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color);
}

.chapter-page-btn ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.chapter-page-btn li a {
    display: block;
    height: 44px;
    line-height: 44px;
    text-align: center;
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary);
    border-radius: var(--radius-medium);
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.chapter-page-btn li a:hover {
    background-color: var(--accent-color) !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* 页面导航样式 */
.pagebtn {
    height: 44px;
    width: 100%;
    margin: 16px 0;
    font-size: 14px;
}

.pagebtnbox {
    position: relative;
    display: block;
    height: 44px;
    margin: 0 12px;
    background: var(--bg-white);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-light);
}

.pageleftbtn,
.pagerightbtn {
    width: 80px;
    height: 44px;
    line-height: 44px;
    position: absolute;
    text-align: center;
    background: var(--bg-white);
    border-radius: var(--radius-medium);
    font-weight: 500;
    transition: var(--transition);
}

.pageleftbtn {
    left: 0;
}

.pagerightbtn {
    right: 0;
}

.pageleftbtn:hover,
.pagerightbtn:hover {
    background: var(--accent-color);
    color: white;
}

.pagecenterbtn {
    height: 44px;
    line-height: 44px;
    text-align: center;
    margin: 0 80px;
    background: var(--bg-gray-light);
    border-radius: var(--radius-medium);
}

/* 底部样式升级 */
.footer {
    height: 56px;
    line-height: 56px;
    background: var(--bg-white);
    padding: 16px 0;
    text-align: center;
    box-shadow: var(--shadow-light);
    margin-top: 24px;
}

.footer ul {
    display: flex;
}

.footer li {
    text-align: center;
    font-size: 15px;
    flex: 1;
    font-weight: 500;
}

.footer li a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer li a:hover {
    color: var(--accent-color);
}

/* 其他按钮样式 */
.btn-mulu {
    padding: 12px 24px;
    display: block;
    width: auto;
    max-width: 200px;
    text-align: center;
    margin: 16px auto;
    border-radius: var(--radius-medium);
    background: var(--accent-color);
    color: white;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.btn-mulu:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* 页码样式 */
.page_num {
    text-align: center;
    font-size: 14px;
    padding: 16px;
    margin: 0 12px;
    background: var(--bg-white);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page_num select {
    padding: 8px 12px;
    height: 36px;
    border: 1px solid var(--border-normal);
    background: var(--bg-white);
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.page_num select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.1);
}

.page_num a {
    height: 36px;
    line-height: 36px;
    padding: 0 16px;
    background: var(--bg-gray-light);
    border-radius: var(--radius-small);
    font-weight: 500;
    transition: var(--transition);
}

.page_num a:hover {
    background: var(--accent-color);
    color: white;
}

/* 登录页面样式升级 */
.novel_login .login {
    background: var(--bg-white);
    margin: 16px 12px;
    padding: 24px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
}

.novel_login .login h2 {
    font-size: 20px;
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 24px;
}

.novel_login .login input[type="text"],
.novel_login .login input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-medium);
    background: var(--bg-gray-light);
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition);
}

.novel_login .login input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.1);
}

.novel_login .login_btn a {
    display: block;
    background: var(--accent-color);
    color: white;
    border-radius: var(--radius-medium);
    text-align: center;
    margin: 16px 0;
    height: 44px;
    line-height: 44px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.novel_login .login_btn a:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* 分类页面样式 */
.sort_list > li {
    padding: 12px 16px;
    height: auto;
    line-height: 24px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.sort_list > li:hover {
    background: var(--bg-gray-light);
}

.sort_list > li .s2 a {
    color: var(--text-primary);
    font-weight: 500;
}

.sort_list > li .s2 a:hover {
    color: var(--accent-color);
}

.sort_list > li .s5 {
    float: right;
    color: var(--text-tertiary);
    font-size: 13px;
}

.sort_page_num {
    text-align: center;
    padding: 16px;
    margin: 0 12px;
    background: var(--bg-white);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-light);
}

.sort_page_num > a {
    padding: 8px 16px;
    background: var(--accent-color);
    margin: 4px;
    color: white;
    display: inline-block;
    border-radius: var(--radius-small);
    font-weight: 500;
    transition: var(--transition);
}

.sort_page_num > a:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.sort_page_num > a.page_on {
    background: var(--text-primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wrap-box {
        margin: 12px 8px;
    }
    
    .navbar-list ul {
        padding: 0 8px;
    }
    
    .novel_search {
        margin: 12px 8px;
        padding: 12px 8px;
    }
    
    .book-main {
        margin: 12px 8px;
        padding: 16px 12px;
    }
    
    .book-main .book-img {
        width: 70px;
        height: 90px;
        margin-right: 12px;
    }
    
    .book-main .book-img img {
        width: 70px;
        height: 90px;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .chapter-page-btn ul {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .set {
        margin: 12px 8px;
        padding: 8px;
    }
    
    .set .set2 {
        margin: 0;
        width: 100%;
        justify-content: center;
    }
    
    .content {
        margin: 12px 8px;
    }
    
    .txt {
        padding: 20px 16px;
        font-size: 16px;
        line-height: 1.7;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #e9eaed;
        --text-secondary: #bdc1c6;
        --text-tertiary: #9aa0a6;
        --bg-white: #1f2329;
        --bg-gray-light: #36383c;
        --bg-gray: #4e5058;
        --border-light: #4e5058;
        --border-normal: #5f6266;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wrap-box,
.bookcase-book,
.rec-focus-book,
.sort-book-first,
.rank-book-first {
    animation: fadeIn 0.3s ease-out;
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 分类导航样式 - 飞书风格 */
.qs_nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 16px;
    margin: 12px;
    background: var(--bg-white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-light);
    margin-bottom: var(--spacing-large);
}

.qs_nav li {
    flex: 1;
    min-width: 100px;
}

.qs_nav a {
    display: block;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--bg-secondary), #f8f9ff);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-medium);
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.qs_nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.qs_nav a:hover::before {
    left: 100%;
}

.qs_nav a:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.qs_nav a:active {
    transform: translateY(0);
    box-shadow: var(--shadow-small);
}

/* 移动端优化 */
@media (max-width: 767px) {
    .qs_nav {
        padding: 12px;
        gap: 6px;
        margin: 8px;
    }
    
    .qs_nav li {
        min-width: 80px;
        flex: 0 0 calc(33.333% - 4px);
    }
    
    .qs_nav a {
        padding: 10px 8px;
        font-size: 13px;
    }
}

/* SEO 辅助样式 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.no-results ul {
    text-align: left;
    max-width: 300px;
    margin: 16px auto;
}

.no-results li {
    margin: 8px 0;
    padding-left: 16px;
    position: relative;
}

.no-results li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* 阅读进度条 */
#reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #007AFF, #34C759);
    z-index: 9999;
    transition: width 0.3s ease;
}

/* 阅读功能按钮基础样式 */
.reading-btn {
    position: fixed;
    width: 50px;
    height: 50px;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 9998;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    border: none;
    outline: none;
}

#back-to-top {
    bottom: 100px;
    right: 20px;
    background: #007AFF;
    font-size: 20px;
    display: none;
}

#back-to-top:hover, #back-to-top:active {
    background: #0056CC;
    transform: scale(1.1);
}

#auto-scroll {
    bottom: 30px;
    right: 20px;
    background: #34C759;
    font-size: 16px;
}

#auto-scroll:hover, #auto-scroll:active {
    background: #28A745;
    transform: scale(1.1);
}

#auto-scroll.scrolling {
    background: #FF6B35;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 按钮样式优化 */

/* 移动端适配 */
@media (max-width: 767px) {
    .reading-btn {
        width: 48px;
        height: 48px;
        right: 16px;
        font-size: 16px;
    }
    
    #back-to-top {
        bottom: 90px;
        font-size: 20px;
    }
    
    #auto-scroll {
        bottom: 25px;
        font-size: 16px;
    }
    
    #reading-progress-bar {
        height: 4px;
    }
}

/* iPhone等小屏幕优化 */
@media (max-width: 414px) {
    .reading-btn {
        width: 46px;
        height: 46px;
        right: 12px;
    }
    
    #back-to-top {
        bottom: 85px;
        font-size: 18px;
    }
    
    #auto-scroll {
        bottom: 20px;
        font-size: 14px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 375px) {
    .reading-btn {
        width: 44px;
        height: 44px;
        right: 10px;
    }
    
    #back-to-top {
        bottom: 80px;
        font-size: 18px;
    }
    
    #auto-scroll {
        bottom: 15px;
        font-size: 14px;
    }
}

/* 横屏模式 */
@media (max-width: 926px) and (orientation: landscape) {
    .reading-btn {
        width: 40px;
        height: 40px;
    }
    
    #back-to-top {
        bottom: 15px;
        right: 70px;
        font-size: 16px;
    }
    
    #auto-scroll {
        bottom: 15px;
        right: 15px;
        font-size: 14px;
    }
}

/* 安全区域适配 (iPhone X/11/12/13/14/15等) */
@supports (padding: max(0px)) {
    @media (max-width: 767px) {
        .reading-btn {
            right: max(16px, calc(env(safe-area-inset-right, 0px) + 16px));
        }
        
        #back-to-top {
            bottom: max(90px, calc(env(safe-area-inset-bottom, 0px) + 90px));
        }
        
        #auto-scroll {
            bottom: max(25px, calc(env(safe-area-inset-bottom, 0px) + 25px));
        }
    }
}

/* iPhone 15 Pro Max 等大屏幕适配 */
@media (max-width: 430px) and (min-width: 415px) {
    .reading-btn {
        width: 48px;
        height: 48px;
        right: 16px;
    }
    
    #back-to-top {
        bottom: 95px;
        font-size: 20px;
    }
    
    #auto-scroll {
        bottom: 30px;
        font-size: 16px;
    }
}

/* 强制显示按钮 - 调试用 */
@media (max-width: 767px) {
    .reading-btn {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    #auto-scroll {
        display: flex !important;
    }
}

/* 其余原有样式保持不变 */
























