/* 閱讀頁樣式 */
body {
    background-color: #ffffff;
    overflow: visible !important;
}

/* 主題顏色 */
body.theme-white {
    background-color: #f5f5f5;
}

body.theme-white .read-content,
body.theme-white .chapter-title {
    background-color: #ffffff;
}

body.theme-white .read-header,
body.theme-white .read-footer {
    background-color: #fafafa;
}

body.theme-white .header-qrcode {
    background-color: #fafafa;
}

body.theme-white .header-qrcode::before {
    border-right-color: #fafafa;
}

body.theme-beige1 {
    background-color: #F0EBE0;
}

body.theme-beige1 .read-content,
body.theme-beige1 .chapter-title {
    background-color: #FAF6ED;
}

body.theme-beige1 .read-header,
body.theme-beige1 .read-footer {
    background-color: #FDFBF5;
}

body.theme-beige1 .header-qrcode {
    background-color: #FDFBF5;
}

body.theme-beige1 .header-qrcode::before {
    border-right-color: #FDFBF5;
}

body.theme-beige2 {
    background-color: #EDE3C7;
}

body.theme-beige2 .read-content,
body.theme-beige2 .chapter-title {
    background-color: #F6EDD4;
}

body.theme-beige2 .read-header,
body.theme-beige2 .read-footer {
    background-color: #FAF4E4;
}

body.theme-beige2 .header-qrcode {
    background-color: #FAF4E4;
}

body.theme-beige2 .header-qrcode::before {
    border-right-color: #FAF4E4;
}

body.theme-green {
    background-color: #DFEADC;
}

body.theme-green .read-content,
body.theme-green .chapter-title {
    background-color: #EAF4E9;
}

body.theme-green .read-header,
body.theme-green .read-footer {
    background-color: #F2F9F1;
}

body.theme-green .header-qrcode {
    background-color: #F2F9F1;
}

body.theme-green .header-qrcode::before {
    border-right-color: #F2F9F1;
}

body.theme-blue {
    background-color: #DBE9EB;
}

body.theme-blue .read-content,
body.theme-blue .chapter-title {
    background-color: #E8F3F5;
}

body.theme-blue .read-header,
body.theme-blue .read-footer {
    background-color: #F0F8FA;
}

body.theme-blue .header-qrcode {
    background-color: #F0F8FA;
}

body.theme-blue .header-qrcode::before {
    border-right-color: #F0F8FA;
}

body.theme-pink {
    background-color: #EADCD9;
}

body.theme-pink .read-content,
body.theme-pink .chapter-title {
    background-color: #F4E6E5;
}

body.theme-pink .read-header,
body.theme-pink .read-footer {
    background-color: #F9F1F0;
}

body.theme-pink .header-qrcode {
    background-color: #F9F1F0;
}

body.theme-pink .header-qrcode::before {
    border-right-color: #F9F1F0;
}

body.theme-gray {
    background-color: #DBDBD9;
}

body.theme-gray .read-content,
body.theme-gray .chapter-title {
    background-color: #E5E5E4;
}

body.theme-gray .read-header,
body.theme-gray .read-footer {
    background-color: #EFEFEE;
}

body.theme-gray .header-qrcode {
    background-color: #EFEFEE;
}

body.theme-gray .header-qrcode::before {
    border-right-color: #EFEFEE;
}

body.theme-night {
    background-color: #2a2b2a;
}

body.theme-night .read-content,
body.theme-night .chapter-title {
    background-color: #464847;
}

body.theme-night .read-header,
body.theme-night .read-footer {
    background-color: #5a5b5a;
}

body.theme-night .header-qrcode {
    background-color: #5a5b5a;
}

body.theme-night .header-qrcode::before {
    border-right-color: #5a5b5a;
}

body.theme-night .chapter-name,
body.theme-night .chapter-content-main {
    color: #d0d0d0;
}

body.theme-night .breadcrumb-link {
    color: #a0a0a0;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    body.theme-night .breadcrumb-link:hover {
        color: var(--primary-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    body.theme-night .breadcrumb-link:hover {
        color: #a0a0a0;
    }
}

body.theme-night .breadcrumb-separator {
    color: #808080;
}

body.theme-night .header-btn,
body.theme-night .footer-btn,
body.theme-night .chapter-item {
    color: #d0d0d0;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    body.theme-night .header-btn:hover,
    body.theme-night .footer-btn:hover,
    body.theme-night .chapter-item:hover {
        color: var(--primary-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    body.theme-night .header-btn:hover,
    body.theme-night .footer-btn:hover,
    body.theme-night .chapter-item:hover {
        color: #d0d0d0;
    }
    
    body.theme-night .header-btn.followed:hover {
        color: var(--primary-color);
    }
}

/* 弹窗主题色适配 */
body.theme-white .feedbackBox,
body.theme-white .catalog-list {
    background-color: #ffffff;
}

body.theme-beige1 .feedbackBox {
    background-color: #FAF6ED;
}

body.theme-beige1 .catalog-list {
    background-color: #FAF6ED;
}

body.theme-beige2 .feedbackBox {
    background-color: #F6EDD4;
}

body.theme-beige2 .catalog-list {
    background-color: #F6EDD4;
}

body.theme-green .feedbackBox {
    background-color: #EAF4E9;
}

body.theme-green .catalog-list {
    background-color: #EAF4E9;
}

body.theme-blue .feedbackBox {
    background-color: #E8F3F5;
}

body.theme-blue .catalog-list {
    background-color: #E8F3F5;
}

body.theme-pink .feedbackBox {
    background-color: #F4E6E5;
}

body.theme-pink .catalog-list {
    background-color: #F4E6E5;
}

body.theme-gray .feedbackBox {
    background-color: #E5E5E4;
}

body.theme-gray .catalog-list {
    background-color: #E5E5E4;
}

body.theme-night .feedbackBox {
    background-color: #464847;
}

body.theme-night .catalog-list {
    background-color: #464847;
}

body.theme-night .feedbackTitle,
body.theme-night .feedbackHistory,
body.theme-night .feedbackForm,
body.theme-night .catalog-item,
body.theme-night .setting-label,
body.theme-night .formLabel,
body.theme-night .historyTitle,
body.theme-night .formTitle {
    color: #d0d0d0;
}

body.theme-night .feedbackClose::before,
body.theme-night .feedbackClose::after {
    background: #d0d0d0;
}

body.theme-night .catalog-item {
    color: #d0d0d0;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    body.theme-night .catalog-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--primary-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    body.theme-night .catalog-item:hover {
        background: transparent;
        color: #d0d0d0;
    }
}

body.theme-night .catalog-item.active {
    background: var(--primary-color);
    color: #ffffff;
}

body.theme-night .setting-btn {
    background: #3a3b3a;
    color: #d0d0d0;
    border-color: #5a5b5a;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    body.theme-night .setting-btn:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    body.theme-night .setting-btn:hover {
        border-color: #5a5b5a;
        color: #d0d0d0;
    }
}

body.theme-night .setting-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

body.theme-night .formTextarea {
    background: #3a3b3a;
    color: #d0d0d0;
    border-color: #5a5b5a;
}

body.theme-night .historyItem {
    background: #3a3b3a;
    border-color: #5a5b5a;
}

body.theme-night .historyContent,
body.theme-night .historyReply {
    color: #d0d0d0;
}

body.theme-night .feedbackTips {
    background: #3a3b3a;
}

body.theme-night .feedbackTips,
body.theme-night .feedbackTips p,
body.theme-night .feedbackTips a {
    color: #d0d0d0;
}

body.theme-night .feedbackTips a {
    color: #d0d0d0;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    body.theme-night .feedbackTips a:hover {
        color: var(--primary-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    body.theme-night .feedbackTips a:hover {
        color: #d0d0d0;
    }
}

body.theme-night .formRadioGroup,
body.theme-night .radioItem,
body.theme-night .radioItem span {
    color: #d0d0d0;
}

body.theme-night .feedbackSubmitBtn {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    body.theme-night .feedbackSubmitBtn:hover {
        background: var(--primary-active-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    body.theme-night .feedbackSubmitBtn:hover {
        background: var(--primary-color);
    }
}

body.theme-night .share-desc {
    color: #d0d0d0;
}

body.theme-night .share-input {
    background: #3a3b3a;
    color: #d0d0d0;
    border-color: #5a5b5a;
}

/* 彈窗z-index */
.mask {
    z-index: 2000;
}

/* 目錄彈窗 */
.catalog-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    align-content: start;
}

.catalog-item {
    display: block;
    padding: 12px 15px;
    color: var(--color-666);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 0;
    transition: all 0.3s;
    font-size: 14px;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    .catalog-item:hover {
        background: var(--primary-light-color);
        color: var(--primary-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    .catalog-item:hover {
        background: transparent;
        color: var(--color-666);
    }
}

.catalog-item.active {
    background: var(--primary-color);
    color: var(--white-color);
}

/* PC端已激活项的hover效果 */
@media (hover: hover) and (pointer: fine) {
    .catalog-item.active:hover {
        background: var(--primary-active-color);
    }
}

/* 移动端已激活项保持原样 */
@media (hover: none) {
    .catalog-item.active:hover {
        background: var(--primary-color);
    }
}

/* 頂部工具欄 */
.read-header {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    background: var(--white-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    min-width: 84px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 8px;
    z-index: 100;
    transition: all 0.3s ease;
}

.read-header.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(-10px);
}

/* AppTopTip 显示隐藏逻辑 */
#apptip {
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
}

#apptip.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

/* read-header 中的 App 下载按钮 */
.header-btn-app {
    position: relative;
}

.header-qrcode {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    width: 200px;
}

.header-qrcode::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid var(--white-color);
}

.header-qrcode .qrcode-item {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.header-qrcode .qrcode-item:hover {
    transform: scale(1.05);
}

.header-qrcode .qrcode-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.header-btn-app:hover .header-qrcode {
    opacity: 1;
    visibility: visible;
}

.header-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    color: var(--color-666);
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 6px;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    .header-btn:hover {
        background-color: var(--primary-light-color);
        color: var(--primary-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    .header-btn:hover {
        background-color: transparent;
        color: var(--color-666);
    }
    
    .header-btn.followed:hover {
        color: var(--primary-color);
    }
}

.header-btn .icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.header-btn span {
    font-size: 12px;
}

/* 主體內容區 */
.read-main {
    padding-top: 0px;
    padding-bottom: 0px;
    width: 1080px;
    margin: 0 auto;
    min-height: 100vh;
}

.read-content {
    background: var(--white-color);
    padding: 0;
    min-height: calc(100vh - 30px);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.chapter-title {
    position: sticky;
    top: 0;
    padding: 10px 15px;
    border-bottom: 1px solid #dcdcdc;
    background: var(--white-color);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 100%;
    gap: 8px;
}

.chapter-title-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 100%;
}

/* PC端 apptip 在 chapter-title 内部，使用相对定位 */
#apptip {
    position: relative !important;
    padding: 0 !important;
    box-shadow: none !important;
    width: 100%;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    max-width: 45%;
    flex-shrink: 0;
}

.breadcrumb-link {
    color: var(--color-666);
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.breadcrumb-link:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    .breadcrumb-link:hover {
        color: var(--primary-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    .breadcrumb-link:hover {
        color: var(--color-666);
    }
}

.breadcrumb-separator {
    color: var(--color-999);
}

.chapter-name {
    font-size: 14px;
    font-weight: normal;
    color: var(--color-333);
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.chapter-content-main {
    font-size: 20px;
    line-height: 2;
    color: var(--color-333);
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

.chapter-content-main p {
    margin-bottom: 20px;
}

/* 漫畫圖片樣式 */
.chapter-content-main .manga-page {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

/* 懶加載圖片樣式 */
img.lazyload {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazyloaded {
    opacity: 1;
}

img.lazyerror {
    opacity: 0.5;
    background: #f0f0f0;
}

/* 章節結束提示 */
.chapter-end {
    padding: 40px 20px;
    text-align: center;
}

.end-text {
    font-size: 16px;
    color: var(--color-999);
    margin: 0;
}

/* 廣告位 */
.chapter-ad {
    margin: 0 auto;
    text-align: center;
    max-width: 100%;
}


/* 底部工具欄 */
.read-footer {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%) translateX(0);
    background: var(--white-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 8px;
    z-index: 100;
    transition: all 0.3s ease;
}

.read-footer.show {
    transform: translateY(-50%) translateX(0);
}

.footer-btn,
.chapter-item {
    display: flex;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    padding: 8px 16px !important;
    color: var(--color-666);
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 6px;
    border: 0;
}

.chapters-container .chapter-item {
    flex-direction: initial !important;
    align-items: center;
    padding: 12px 15px;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    .footer-btn:hover,
    .chapter-item:hover {
        background-color: var(--primary-light-color);
        color: var(--primary-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    .footer-btn:hover,
    .chapter-item:hover {
        background-color: transparent;
        color: var(--color-666);
    }
}

.footer-btn .icon,
.chapter-item .icon {
    width: 28px;
    height: 28px;
    margin-bottom: 4px;
}

.footer-btn span,
.chapter-item span {
    font-size: 11px;
}



/* 分享彈窗 */
#shareModal .feedbackBox {
    width: 500px;
    max-width: 90%;
    top: 50% !important;
    transform: translateY(-50%);
    margin: 0 auto;
    animation: none;
}

#settingsModal .feedbackBox {
    top: 50% !important;
    transform: translateY(-50%);
    margin: 0 auto;
    animation: none;
}

.share-content {
    padding: 30px;
}

.share-desc {
    font-size: 14px;
    color: var(--color-666);
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: center;
}

.share-input-group {
    margin-bottom: 20px;
}

.share-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-ddd);
    border-radius: 6px;
    font-size: 14px;
    color: var(--color-333);
    background: var(--color-efefef);
    cursor: text;
    user-select: all;
}

.share-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.share-copy-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    .share-copy-btn:hover {
        background: var(--primary-active-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    .share-copy-btn:hover {
        background: var(--primary-color);
    }
}

.share-copy-btn .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 設置彈窗 */
.settings-content {
    padding: 20px;
    overflow-y: auto;
}

.setting-item {
    margin-bottom: 30px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: var(--color-333);
    margin-bottom: 15px;
}

.setting-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.setting-btn {
    padding: 8px 20px;
    border: 2px solid var(--color-ddd);
    background: var(--white-color);
    color: var(--color-666);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    .setting-btn:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    .setting-btn:hover {
        border-color: var(--color-ddd);
        color: var(--color-666);
    }
}

.setting-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white-color);
}

.color-options {
    gap: 12px;
}

.color-btn {
    width: 50px;
    height: 50px;
    border: 3px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 只在支持hover的设备上启用hover效果（PC端） */
@media (hover: hover) and (pointer: fine) {
    .color-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
}

/* 移动端点击时不显示hover效果 */
@media (hover: none) {
    .color-btn:hover {
        transform: none;
        box-shadow: none;
    }
}

.color-btn.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--white-color), 0 0 0 4px var(--primary-color);
}

.color-btn .icon {
    width: 24px;
    height: 24px;
    fill: #fff;
    display: block;
}

.pc-only {
    display: block;
}

.catalog-item {
    display: block;
    padding: 12px 15px;
    color: var(--color-666);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 5px;
    transition: all 0.3s;
    font-size: 14px;
}

.catalog-item:hover {
    background: var(--primary-light-color);
    color: var(--primary-color);
}

.catalog-item.active {
    background: var(--primary-color);
    color: var(--white-color);
}

.catalog-item.active:hover {
    background: var(--primary-active-color);
}

/* 收藏按钮已收藏状态样式 */
.header-btn.followed {
    color: var(--primary-color) !important;
}

.header-btn.followed .icon {
    color: var(--primary-color) !important;
}

/* 響應式設計 */
@media screen and (max-width: 1080px) {

    .read-header {
        top: 85px;
        left: auto;
        right: 10px;
        transform: translateX(100%);
        gap: 6px;
        padding: 8px;
        opacity: 0;
        visibility: hidden;
        min-width: 65px;
    }

    .read-header.show {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    /* 移动端 AppTopTip 显示隐藏 - 使用固定定位避免占位 */
    #apptip {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        z-index: 9998;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3) !important;
    }

    #apptip.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* 移动端 read-header 中的 App 下载 */
    .header-qrcode {
        right: 60px;
        left: auto;
        padding: 10px;
        gap: 10px;
        width: 160px;
    }

    .header-qrcode::before {
        left: auto;
        right: -6px;
        border-right: none;
        border-left: 6px solid var(--white-color);
    }

    .header-qrcode .qrcode-img {
        width: 100%;
        height: auto;
    }

    /* 移动端禁用 hover 显示二维码 */
    .header-btn-app:hover .header-qrcode {
        opacity: 0 !important;
        visibility: hidden !important;
    }

    /* 移动端使用 active 类显示二维码 */
    .header-btn-app.active .header-qrcode {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* 移动端主题色适配 - 三角箭头在左侧 */
    body.theme-white .header-qrcode::before {
        border-left-color: #fafafa;
    }

    body.theme-beige1 .header-qrcode::before {
        border-left-color: #FDFBF5;
    }

    body.theme-beige2 .header-qrcode::before {
        border-left-color: #FAF4E4;
    }

    body.theme-green .header-qrcode::before {
        border-left-color: #F2F9F1;
    }

    body.theme-blue .header-qrcode::before {
        border-left-color: #F0F8FA;
    }

    body.theme-pink .header-qrcode::before {
        border-left-color: #F9F1F0;
    }

    body.theme-gray .header-qrcode::before {
        border-left-color: #EFEFEE;
    }

    body.theme-night .header-qrcode::before {
        border-left-color: #5a5b5a;
    }

    .header-btn {
        padding: 6px 8px;
    }

    .header-btn .icon {
        width: 20px;
        height: 20px;
    }

    .header-btn span {
        font-size: 11px;
    }

    .read-main {
        width: 100% !important;
        padding-top: 0;
        padding-bottom: 85px;
    }

    .read-content {
        padding: 0;
        min-height: 100vh !important;
    }

    .chapter-title {
        padding: 8px 12px;
        gap: 12px;
    }

    .breadcrumb {
        font-size: 12px;
        gap: 8px;
    }

    .chapter-name {
        font-size: 12px;
    }

    .chapter-content-main {
        font-size: 16px;
        line-height: 1.8;
        padding: 12px 16px;
    }

    .chapter-content-main p {
        margin-bottom: 16px;
    }

    .read-footer {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        transform: translateY(100%);
        flex-direction: row;
        justify-content: space-around;
        padding: 10px 8px;
        border-radius: 0;
        opacity: 0;
        visibility: hidden;
    }

    .read-footer.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .footer-btn,
    .chapter-item {
        padding: 6px 10px !important;
    }

    .footer-btn .icon,
    .chapter-item .icon {
        width: 24px;
        height: 24px;
    }

    .footer-btn span,
    .chapter-item span {
        font-size: 11px;
    }

    .catalog-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 8px;
    }

    .catalog-item {
        padding: 10px 12px;
        font-size: 13px;
    }

    .pc-only {
        display: none;
    }

    .setting-label {
        font-size: 14px;
    }

    .setting-btn {
        padding: 6px 16px;
        font-size: 13px;
    }

    .color-btn {
        width: 45px;
        height: 45px;

    }
}

/* #apptip 主题色适配 */
body.theme-white #apptip,
body.theme-white .modal-content,
body.theme-white .chapter-end-section {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

body.theme-beige1 #apptip,
body.theme-beige1 .modal-content,
body.theme-beige1 .chapter-end-section {
    background-color: #FAF6ED !important;
    background: #FAF6ED !important;
}

body.theme-beige2 #apptip,
body.theme-beige2 .modal-content,
body.theme-beige2 .chapter-end-section {
    background-color: #F6EDD4 !important;
    background: #F6EDD4 !important;
}

body.theme-green #apptip,
body.theme-green .modal-content,
body.theme-green .chapter-end-section {
    background-color: #EAF4E9 !important;
    background: #EAF4E9 !important;
}

body.theme-blue #apptip,
body.theme-blue .modal-content,
body.theme-blue .chapter-end-section {
    background-color: #E8F3F5 !important;
    background: #E8F3F5 !important;
}

body.theme-pink #apptip,
body.theme-pink .modal-content,
body.theme-pink .chapter-end-section {
    background-color: #F4E6E5 !important;
    background: #F4E6E5 !important;
}

body.theme-gray #apptip,
body.theme-gray .modal-content,
body.theme-gray .chapter-end-section {
    background-color: #E5E5E4 !important;
    background: #E5E5E4 !important;
}

body.theme-night #apptip,
body.theme-night .modal-content,
body.theme-night .chapter-end-section {
    background-color: #464847 !important;
    background: #464847 !important;
}

.chapter-end-section {
    margin: 20px 0 68px;
    box-shadow: none;
    border-radius: 0;
    border: 0;
}

.chapter-end-section .chapter-navigation {
    margin-bottom: 0;
}

.chapter-end-section .next-chapter-btn {
    box-shadow: none;
    padding-top: 12px;
    padding-bottom: 12px;
    color: var(--primary-color);
}


.chapter-complete-title::before,
.chapter-complete-title::after {
    background: linear-gradient(90deg, transparent, #2a2b2a, transparent);
}

body.theme-white .next-chapter-btn {
    background-color: #f2f2f2 !important;
    background: #f2f2f2 !important;
}

body.theme-beige1 .next-chapter-btn {
    background-color: #eee9dd !important;
    background: #eee9dd !important;
}

body.theme-beige2 .next-chapter-btn {
    background-color: #e6d8b2 !important;
    background: #e6d8b2 !important;
}

body.theme-green .next-chapter-btn {
    background-color: #d3e2cf !important;
    background: #d3e2cf !important;
}

body.theme-blue .next-chapter-btn {
    background-color: #cee1e4 !important;
    background: #cee1e4 !important;
}

body.theme-pink .next-chapter-btn {
    background-color: #e4d2ce !important;
    background: #e4d2ce !important;
}

body.theme-gray .next-chapter-btn {
    background-color: #cdcdcb !important;
    background: #cdcdcb !important;
}

body.theme-night .next-chapter-btn {
    background-color: #2a2b2a !important;
    background: #2a2b2a !important;
}

.pagination-wrapper,
.chapter-list {
    background-color: transparent !important;
}

.chapter-item .chapter-name {
    color: var(--color-333) !important;
}

.page-btn {
    background: #f5f5f5 !important;
    color: var(--color-666) !important;
    border-width: 1px !important;
    border: 0 !important;
}

.page-btn:hover {
    background: var(--primary-light-color) !important;
    color: var(--primary-color) !important;
}

body .theme-night .chapter-item .chapter-name,
body.theme-night .chapter-item .chapter-index {
    color: #ddd !important;
}

body.theme-night .chapter-item.current .chapter-name,
body.theme-night .chapter-item:hover .chapter-name,
body.theme-night .chapter-item.current .chapter-index,
body.theme-night .chapter-item:hover .chapter-index {
    color: #333 !important;
}

.page-btn.current {
    background: linear-gradient(135deg, var(--primary-color-2), var(--primary-color)) !important;
    color: var(--white-color) !important;
}

.chapter-item.current::before {
    background: none;
    width: 0;
}

.chapter-item.current,
.chapter-item.current:hover {
    background: var(--primary-light-color);
    transform: translateX(4px);
    border: 0 !important;
}

.chapter-end-section::before {
    display: none;
}

.pagination-nav {
    padding-left: 0;
    padding-right: 0;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
}

.chapter-item .chapter-index {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 600;
    flex-shrink: 0;
    min-width: auto;
}

.chapter-state.state-free {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 600;
    flex-shrink: 0;
    background: transparent;
    box-shadow: none;
    width: auto;
    min-width: auto;
    height: auto;
}

.chapter-item:hover .chapter-state {
    box-shadow: none;
}

.chapter-list-modal .modal-body {
    padding: 15px;
}

.chapter-list-modal .chapter-list {
    box-shadow: none !important;
}

@media screen and (max-width: 1080px) {
    .chapter-list-modal .modal-body {
        padding: 10px;
    }
}