/* 阅读器容器 */
.reader-container {padding: 15px 0;background: #f5f5f5;}

.reader-container .reader__inner{
    display: flex;
    height: calc(100vh - 30px);
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    padding-bottom:25px;
}
.reader-container .dbottom{
    height:20px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
/* 左侧边栏 */
.sidebar {
    width: 280px;
    border-right: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    background: #fff;
    height: 100%;
}

/* 侧边栏头部 */
.sidebar-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.sidebar-header h2 {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* 头部按钮组 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 设置按钮 */
.settings-btn {
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

/* 关闭按钮 */
.close-sidebar {
    display: none;
}

.settings-btn:hover,
.close-sidebar:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.04);
}

/* 设置面板样式 */
.settings-panel {
    /* position: absolute;
    top: 100%;
    right: 0;
    width: 280px; */
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    padding: 16px;
    display: none;
    z-index: 1000;
}

.settings-panel.active {
    display: block;
}

/* 设置组样式优化 */
.settings-group {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.settings-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: #333;
}

.settings-group label span {
    color: #666;
    font-size: 12px;
    font-family: monospace;
}

/* 滑块样式优化 */
.settings-group input[type="range"] {
    width: 100%;
    height: 2px;
    background: #e8e8e8;
    border-radius: 1px;
    -webkit-appearance: none;
    margin: 8px 0;
}

.settings-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 1.5px solid var(--thm-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}
.settings-group select{height:30px;width:100%;border: 1px solid #e8e8e8;}
/* 颜色设置样式优化 */
.color-presets {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.color-preset {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.color-preset:hover {
    transform: scale(1.05);
}

.color-preset.active {
    box-shadow: 0 0 0 2px var(--thm-primary);
}

/* 自定义颜色输入 */
.custom-color-input {
    margin-top: 8px;
}

.custom-color-input label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

/* 颜色选择器样式 */
.settings-group input[type="color"] {
    -webkit-appearance: none;
    width: 100%;
    height: 32px;
    padding: 2px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    cursor: pointer;
}

.settings-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.settings-group input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

/* 目录导航 */
.catalog {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    height: 0;
}

.chapter-item {
    margin-bottom: 4px;
}

.chapter-item a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s;
}

.chapter-item a:hover {
    background: rgba(0, 0, 0, 0.02);
}

.chapter-item a.active {
    color: var(--thm-primary);
    background: rgba(24, 144, 255, 0.05);
}

.sub-chapters {
    margin-left: 16px;
    position: relative;
}

.sub-chapters::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #f0f0f0;
}

.sub-chapter-item {
    position: relative;
    padding-left: 12px;
}

.sub-chapter-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 8px;
    height: 1px;
    background: #f0f0f0;
}

.sub-sub-chapters {
    margin-left: 24px;
    position: relative;
}

.sub-sub-chapters::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #f0f0f0;
}

/* 右侧内容区 */
.content {
    flex: 1;
    background-color: var(--bg-color, #fff);
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* Internet Explorer/Edge */
    user-select: none; padding-bottom: 30px;   
}
.content__inner{
    overflow-y: auto;
    height: 100%;
    padding-left:5px;
}
.content h2{
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}
.content .but{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.chapter-content h2.label{
    height:50px;
    text-align: right;
    display: block;
    
}  
.empty-content{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 16px;
    color: #999;
}
/* 全屏模式样式 */
.reader.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-color, #fff);
    z-index: 9999;
    max-width: none;
    margin: 0;
    padding: 40px;
    overflow-y: auto;
}

/* 全屏按钮样式 */
.fullscreen-btn {
    /* position: absolute;
    right: 10px;
    top: 10px; */
    width: 23px;
    height: 23px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fullscreen-btn:hover {
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 阅读区域 */
.reader {
    margin: 0 auto;
    transition: all 0.3s;
    background-color: transparent;
    padding:20px;
    border-radius: 4px;
    height: 100%;
}

.reader.fullscreen {
    max-width: none;
    padding: 60px;
}
.reader .no-buy{
    height: 100%;
    font-size: 20px;
    position: relative;
}
.reader .no-buy .no-buy__img{
    height: 100%;
    overflow-y: auto;
}
.reader .no-buy .no-buy__img img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.reader .no-buy .no-buy__text{
    padding: 10px 0;
    justify-content: center;
    line-height: 30px;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    bottom: 0px;
    position: absolute;
    /* width: 100%; */
    width: calc(100% - 3px);
    font-size: 15px;
    text-align:center;
}
.no-buy__text p:hover{
    color: var(--thm-primary);
    cursor: pointer;
}

/* 章节导航按钮样式 */
.chapter-nav {
    position: relative;
    z-index: 100;
}

/* PC端导航按钮样式 */
.nav-desktop {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 15px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    min-width: 100px;
}

.nav-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: var(--thm-primary);
    color: var(--thm-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.nav-btn svg {
    transition: transform 0.3s ease;
}

.nav-btn.prev:hover svg {
    transform: translateX(-2px);
}

.nav-btn.next:hover svg {
    transform: translateX(2px);
}

/* 移动端导航按钮样式 */
.nav-mobile {
    display: none;
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 1000;
    pointer-events: none;
}

.nav-btn-mobile {
    position: absolute;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.nav-btn-mobile.prev {
    left: 15px;
}

.nav-btn-mobile.next {
    right: 15px;
}

.nav-btn-mobile:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.nav-btn-mobile:active {
    transform: scale(0.95);
}

/* 全屏模式下的移动端按钮 */
.reader.fullscreen .nav-mobile {
    z-index: 10001;
}

.reader.fullscreen .nav-btn-mobile {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}

.reader.fullscreen .nav-btn-mobile:hover {
    background: rgba(0, 0, 0, 0.8);
}
/* 加载骨架屏 */
.loading-skeleton {
    padding: 20px;
}

.skeleton-title {
    height: 32px;
    background: #fcebe9;
    margin-bottom: 24px;
    width: 60%;
    border-radius: 4px;
}

.skeleton-line {
    height: 16px;
    background: #fcebe9;
    margin-bottom: 16px;
    border-radius: 4px;
}
.skeleton-line.a{width: 80%;}
.skeleton-line.b{width: 70%;}
.skeleton-line.c{width: 60%;}
.skeleton-line:last-child { width: 85%;}

/* 移动端按钮默认隐藏 */
.close-sidebar,
.menu-btn {
    display: none;
}

/* 桌面端默认显示侧边栏 */
.sidebar {
    width: 290px;
    border-right: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    background: #fff;
    height: 100%;
}

/* 移动端样式 */
@media (max-width: 768px) {
    /* 隐藏PC端导航按钮，显示移动端导航按钮 */
    .nav-desktop {
        display: none;
    }
    
    .nav-mobile {
        display: block;
    }
    .chapter-content{
        padding-bottom: 30px;
    }
    /* 显示移动端按钮 */
    .close-sidebar {
        padding: 4px;
        background: transparent;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        color: #999;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .menu-btn {
        /* position: absolute;
        left: 10px;
        top: 10px; */
        z-index: 99;
        width: 36px;
        height: 36px;
        border-radius: 4px;
        background: #fff;
        border: 1px solid #eee;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #666;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    /* 侧边栏默认隐藏 */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 9000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
        height: 100vh;
    }

    /* 侧边栏显示状态 */
    .sidebar.active {
        transform: translateX(0);
    }

    /* 隐藏菜单按钮当侧边栏显示时 */
    .sidebar.active ~ .menu-btn {
        display: none;
    }

    .reader {
        padding: 20px;
    }

    .reader.fullscreen {
        padding: 30px;
    }

    .settings-panel {
        position: fixed;
        top: 52px;
        left: 0;
        right: 0;
        width: auto;
        border-radius: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .settings-container {
        position: relative;
    }
    
    /* 移动端导航按钮调整 */
    .nav-btn-mobile {
        width: 45px;
        height: 45px;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(8px);
    }
    .nav-btn-mobile.prev,.nav-btn-mobile.next{
        background: rgba(0, 0, 0, 0.1);
        backdrop-filter: none;
        color: #fff;
    }
    .nav-btn-mobile.prev {
        left: 10px;
    }
    
    .nav-btn-mobile.next {
        right: 10px;
    }
}

/* 过渡动画 */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ccc;
} 