* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#app {
    max-width: 800px;
    margin: 0 auto;
}

.home {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
}

.book-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.book-item {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.book-item:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.book-cover {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    margin-bottom: 10px;
    background-color: #f5f5f5;
}


.float-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    z-index: 1000;
}

.chapter-list {
    position: fixed;
    bottom: 54px;
    left: 0;
    right: 0;
    background: #fff;
    max-height: 60vh;
    overflow-y: auto;
    border-top: 1px solid #ddd;
    transform: translateY(100%);
    transition: transform 0.3s;
    z-index: 999;
}

.chapter-list.show {
    transform: translateY(0);
}

.chapter-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.chapter-item:hover {
    background-color: #f5f5f5;
}

.chapter-item.active {
    background-color: #e8f5e9;
    color: #4CAF50;
}

button {
    padding: 8px 16px;
    border: none;
    background: #4CAF50;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #45a049;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.intro {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.loading {
    text-align: center;
    padding: 20px;
}

.content p {
    margin-bottom: 1em;
    text-indent: 2em;
}

.author {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.chapter-count {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.error-message {
    color: red;
    text-align: center;
    padding: 20px;
    white-space: pre-line;
}
.book-cover{
    background-image: url('/static/img/img.jpg');
    background-size: cover; /* 背景图片覆盖整个容器 */
    background-repeat: no-repeat; /* 背景图片不重复 */
    background-position: center; /* 背景图片居中 */
}
.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}






.book-info {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
}

.book-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.back-btn {
    margin-right: 20px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    cursor: pointer;
}

.book-main {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.book-cover-info img {
    width: 200px;
    height: 280px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.book-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}



.read-btn:hover {
    background-color: #45a049;
}

.book-intro {
    margin-top: 20px;
}

.intro-content {
    line-height: 1.6;
    white-space: pre-line;
}


.top-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.nav-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #f0f0f0;
    cursor: pointer;
    font-size: 14px;
}

.nav-btn:hover {
    background-color: #e0e0e0;
}


.book-item {
    position: relative;
    display: flex;
    flex-direction: column;
}

.book-content {
    cursor: pointer;
    flex: 1;
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-btn:hover {
    background-color: #cc0000;
}


/* 搜索页样式 */
div.search-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
}

div.search-page-container .search-page-header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 10px 0;
    z-index: 100;
    border-bottom: 1px solid #eee;
}

div.search-page-container .search-page-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

div.search-page-container .search-page-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    height: auto;
    line-height: normal;
    width: auto;
    box-sizing: border-box;
}

div.search-page-container .search-page-bar button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    height: auto;
    line-height: normal;
    width: auto;
}

div.search-page-container .search-page-bar button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

div.search-page-container .search-page-loading,
div.search-page-container .search-page-error,
div.search-page-container .search-page-empty {
    text-align: center;
    padding: 20px;
    color: #666;
}

div.search-page-container .search-page-error {
    color: #f44336;
}

div.search-page-container .search-page-results {
    margin-top: 16px;
}

div.search-page-container .search-page-book-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

div.search-page-container .search-page-book-item:hover {
    background-color: #f5f5f5;
}

div.search-page-container .search-page-book-cover {
    width: 70px;
    margin-right: 15px;
    flex-shrink: 0;
}

div.search-page-container .search-page-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    max-width: none;
}

div.search-page-container .search-page-book-info {
    flex: 1;
    min-width: 0;
}

div.search-page-container .search-page-book-title {
    margin: 0;
    padding: 0;
    font-size: 16px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;
    line-height: 1.4;
}

div.search-page-container em {
    font-style: initial;
    font-weight: bold;
    color: #ff7c01;
}


div.search-page-container .search-page-book-author {
    margin: 4px 0 0 0;
    padding: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* 移动端适配 */
@media (max-width: 600px) {
    div.search-page-container {
        padding: 10px;
    }

    div.search-page-container .search-page-book-cover {
        width: 70px;
    }

    div.search-page-container .search-page-book-title {
        font-size: 15px;
    }

    div.search-page-container .search-page-book-author {
        font-size: 13px;
    }
}





/* 阅读设置 */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.settings-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}

.dark .settings-content {
    background-color: #2a2a2a;
    color: #fff;
}

.settings-section {
    margin: 15px 0;
}

.settings-section h4 {
    margin-bottom: 10px;
}

.theme-buttons {
    display: flex;
    gap: 10px;
}

.theme-buttons button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.theme-buttons button.bai {
    background: #fff;
    color: #000;
}

.theme-buttons button.hei {
    background: #000;
    color: #fff;
}
.theme-buttons button.active {
    background: #007bff;
    color: #fff;
}

.color-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-buttons button {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
}

.color-buttons button.active {
    border-color: #007bff;
}

input[type="range"] {
    width: 100%;
    margin: 10px 0;
}



.content p {
    margin: 0.5em 0;
    text-align: justify;
}

/* Base styles */
.reading-container {
    min-height: 100vh;
    transition: all 0.3s ease;
}



/* Dark theme */
.reading-container.dark {
    background-color: #1a1a1a;
    color: #d4d4d4;
}

.reading-container.dark .top-nav,
.reading-container.dark .chapter-list,
.reading-container.dark .float-bar {
    background-color: #2d2d2d;
    color: #d4d4d4;
    border-color: #404040;
}

.reading-container.dark .read-btn,
.reading-container.dark .float-bar button {
    background-color: #2d2d2d;
    color: #d4d4d4;
    border: 1px solid #404040;
}

.reading-container.dark .read-btn:hover,
.reading-container.dark .float-bar button:hover {
    background-color: #3d3d3d;
}

.reading-container.dark .chapter-item {
    border-bottom: 1px solid #404040;
}

.reading-container.dark .chapter-item:hover {
    background-color: #3d3d3d;
}

.reading-container.dark .chapter-item.active {
    background-color: #4d4d4d;
}

/* Background color variations */
.reading-container[style*="background-color: #f4f4f4"] .top-nav,
.reading-container[style*="background-color: #f4f4f4"] .chapter-list,
.reading-container[style*="background-color: #f4f4f4"] .float-bar {
    background-color: #ffffff;
}

.reading-container[style*="background-color: #ffffff"] .top-nav,
.reading-container[style*="background-color: #ffffff"] .chapter-list,
.reading-container[style*="background-color: #ffffff"] .float-bar {
    background-color: #f8f8f8;
}

.reading-container[style*="background-color: #f8f3e8"] .top-nav,
.reading-container[style*="background-color: #f8f3e8"] .chapter-list,
.reading-container[style*="background-color: #f8f3e8"] .float-bar {
    background-color: #fff9ee;
}

.reading-container[style*="background-color: #e8f3f8"] .top-nav,
.reading-container[style*="background-color: #e8f3f8"] .chapter-list,
.reading-container[style*="background-color: #e8f3f8"] .float-bar {
    background-color: #eef9fe;
}

.reading-container[style*="background-color: #e8f8e8"] .top-nav,
.reading-container[style*="background-color: #e8f8e8"] .chapter-list,
.reading-container[style*="background-color: #e8f8e8"] .float-bar {
    background-color: #eefee8;
}


/* Content spacing */
.reading-page {
    padding: 0px 20px 60px;
    max-width: 800px;
    line-height: 1.8;
    font-size: 18px;
    margin: 0 auto;
}

/* 目录列表样式 */


.chapter-list-header {
    padding: 10px;
    border-bottom: 1px solid;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 1;
}

.sort-btn {
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}


.chapter-item.active {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Light theme */
.reading-container.light .sort-btn {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #e0e0e0;
}

.reading-container.light .sort-btn:hover {
    background-color: #f0f0f0;
}

.reading-container.light .chapter-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Dark theme */
.reading-container.dark .sort-btn {
    background-color: #2d2d2d;
    color: #d4d4d4;
    border: 1px solid #404040;
}

.reading-container.dark .sort-btn:hover {
    background-color: #3d3d3d;
}

.reading-container.dark .chapter-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.reading-container.dark .chapter-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.reading-container.dark .chapter-item.active {
    background-color: rgba(255, 255, 255, 0.1);
}




.reading-container {
    position: relative;
    min-height: 100vh;
}

.touch-areas {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    z-index: 1;
}

.left-area, .right-area {
    flex: 4;  /* 或者写成 flex-grow: 4; */
    height: 100%;
}

.center-area {
    flex: 2;  /* 或者写成 flex-grow: 2; */
    height: 100%;
}
.top-nav, .float-bar, .chapter-list, .page-indicator {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.top-nav.hidden {
    transform: translateY(-100%);
    position: fixed;
}

.float-bar.hidden {
    transform: translateY(100%);
}

.chapter-list.hidden {
    transform: translateX(-100%);
    display: none;
}

.page-indicator.hidden {
    opacity: 0;
}


.content {
    position: relative;
    padding-bottom: 20px;
}

.page {
    margin: 0;
    padding: 5px 0;
}

.page p {
    margin: 6px 0;
    text-indent: 2em;
}

h2 {
    margin: 10px 0;
    font-size: 1.2em;
    line-height: 1.4;
}


/* 用户引导 */
.guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.guide-content {
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
    align-items: stretch;
}

.guide-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
}

/* 修改 flex 比例 */
.guide-area.left-guide,
.guide-area.right-guide {
    flex: 4; /* 左右区域各占 40% */
}

.guide-area.center-guide {
    flex: 2; /* 中间区域占 20% */
}

.guide-separator {
    width: 1px;
    align-self: stretch;
    margin: 40px 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0.5) 20%,
        rgba(255, 255, 255, 0.5) 80%,
        rgba(255, 255, 255, 0)
    );
}

.guide-arrow {
    font-size: 40px;
    margin-bottom: 10px;
    animation: bounce 1s infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.guide-text {
    font-size: 18px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.guide-tip {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 深色主题适配 */
.reading-container.dark .guide-text,
.reading-container.dark .guide-tip {
    background-color: rgba(255, 255, 255, 0.2);
}

.reading-container.dark .guide-separator {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0.3) 20%,
        rgba(255, 255, 255, 0.3) 80%,
        rgba(255, 255, 255, 0)
    );
}

/* 移动端适配 */
@media (max-width: 600px) {
    .guide-arrow {
        font-size: 30px;
    }
    
    .guide-text {
        font-size: 16px;
        padding: 6px 12px;
    }
    
    .guide-tip {
        font-size: 12px;
        padding: 6px 12px;
        bottom: 30px;
    }

    .guide-separator {
        margin: 20px 0;
    }
}

/* 横屏适配 */
@media (orientation: landscape) and (max-height: 500px) {
    .guide-separator {
        margin: 15px 0;
    }
    
    .guide-arrow {
        font-size: 24px;
        margin-bottom: 5px;
    }
    
    .guide-text {
        font-size: 14px;
        padding: 4px 10px;
    }
    
    .guide-tip {
        bottom: 20px;
        font-size: 12px;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .guide-separator {
        background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0.8) 20%,
            rgba(255, 255, 255, 0.8) 80%,
            rgba(255, 255, 255, 0)
        );
    }
    
    .guide-text,
    .guide-tip {
        background-color: rgba(0, 0, 0, 0.8);
    }
}


.end-message {
    margin-top: 10px;
    text-align: center;
    color: #c1c4c6;
    font-size: 14px;
}

.load-more .load-more-btn {
    text-align: center;
    padding: 12px 0;
    margin: 20px auto;
    background-color: #f5f5f5;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    width: 90%;
    max-width: 400px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.load-more .load-more-btn:hover {
    background-color: #e5e5e5;
    color: #333;
}

.load-more .load-more-btn:active {
    background-color: #ddd;
    transform: scale(0.98);
}



.hot-books-section {
    padding: 15px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #ff6b6b;
}

.search-page-results,.hot-books-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.search-page-book-item {
    display: flex;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    cursor: pointer;
}

.search-page-book-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.search-page-book-cover {
    overflow: hidden;
    border-radius: 4px;
}


.book-shelf {
    --shelf-primary: #4a90e2;
    --shelf-danger: #e25555;
    --shelf-border: #eaeaea;
    --shelf-text: #333;
    --shelf-background: #fff;
}

.shelf-header {
    padding: 15px;
    border-bottom: 1px solid var(--shelf-border);
    background: var(--shelf-background);
}

.shelf-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.shelf-btn {
    padding: 8px 15px;
    border: 1px solid var(--shelf-primary);
    border-radius: 4px;
    background: var(--shelf-background);
    color: var(--shelf-primary);
    cursor: pointer;
    font-size: 14px;
}

.shelf-btn:hover {
    background: var(--shelf-primary);
    color: var(--shelf-background);
}

.manage-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}


.delete-selected {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: var(--shelf-danger);
    color: white;
    cursor: pointer;
}

.delete-selected:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.import-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog-content {
    background: var(--shelf-background);
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.dialog-content textarea {
    width: 100%;
    height: 150px;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid var(--shelf-border);
    border-radius: 4px;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.dialog-buttons button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.dialog-buttons button:first-child {
    background: var(--shelf-primary);
    color: white;
}

.dialog-buttons button:last-child {
    background: #f5f5f5;
    color: var(--shelf-text);
}



.export-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.export-tip {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.dialog-content textarea {
    width: 100%;
    height: 150px;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid var(--shelf-border);
    border-radius: 4px;
    font-size: 12px;
    word-break: break-all;
    background: #f5f5f5;
}

.dialog-content textarea:read-only {
    background: #f5f5f5;
    cursor: default;
}


/* 书籍选中状态样式 */
.book-item.selected {
    background-color: rgba(74, 144, 226, 0.1); /* 使用与主题色相近的淡色 */
    border: 1px solid var(--shelf-primary);
}

/* 隐藏默认复选框 */
.manage-actions .select-all input[type="checkbox"] {
    display: none;
}

/* 自定义复选框样式 */
.manage-actions .select-all::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid var(--shelf-primary);
    border-radius: 3px;
    vertical-align: middle;
}

.manage-actions .select-all.checked::before {
    background-color: var(--shelf-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

/* 优化书籍项目在管理模式下的样式 */
.book-item.managing {
    transition: all 0.3s ease;
    cursor: pointer;
}

.book-item.managing:hover {
    background-color: rgba(74, 144, 226, 0.05);
}



/* 移除旧的复选框样式 */
.manage-actions .select-all input[type="checkbox"] {
    display: none;
}

/* 移除::before伪元素样式 */
.manage-actions .select-all::before {
    display: none;
}

/* 保留并更新复选框样式 */
.select-all {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    cursor: pointer;
    padding: 5px;
}

.select-all .checkbox {
    width: 20px;
    height: 20px;
    border: 1px solid var(--shelf-primary);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    background-color: white;
    flex-shrink: 0;
}

.select-all.checked .checkbox {
    background-color: var(--shelf-primary);
}

.select-all.checked .checkbox::after {
    content: '';
    position: absolute;
    display: block;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.select-all.partial .checkbox {
    background-color: var(--shelf-primary);
}

.select-all.partial .checkbox::after {
    content: '';
    position: absolute;
    display: block;
    left: 4px;
    top: 8px;
    width: 10px;
    height: 2px;
    background-color: white;
}
.selection-status {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}

.error-report-icon {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    background-color: rgb(255 124 0);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgb(255 137 10);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 12px;
    color: #ffffff;
}


/* 阅读页面热门书籍区域样式 */
div.reading-container .hot-books-section {
    margin-top: 2em;
    padding: 15px;
}

div.reading-container .section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #ff6b6b;
}

div.reading-container .hot-books-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

div.reading-container .search-page-book-item {
    display: flex;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    cursor: pointer;
    border-bottom: none; /* 移除底部边框 */
}

div.reading-container .search-page-book-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

div.reading-container .search-page-book-cover {
    width: 70px;
    height: 100px; /* 添加固定高度 */
    margin-right: 15px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}

div.reading-container .search-page-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

div.reading-container .search-page-book-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

div.reading-container .search-page-book-title {
    margin: 0;
    padding: 0;
    font-size: 16px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;
    line-height: 1.4;
}



div.reading-container .search-page-book-author {
    margin: 4px 0 0 0;
    padding: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

div.reading-container .content p{
    text-indent: initial;
}

/* 深色模式适配 */
div.reading-container.dark .search-page-book-item {
    background: #2d2d2d;
}

div.reading-container.dark .section-title {
    color: #d4d4d4;
}

div.reading-container.dark .search-page-book-title {
    color: #d4d4d4;
}

div.reading-container.dark .search-page-book-author {
    color: #999;
}

/* 移动端适配 */
@media (max-width: 600px) {
    div.reading-container .hot-books-list {
        grid-template-columns: 1fr;
    }

    div.reading-container .search-page-book-title {
        font-size: 15px;
    }

    div.reading-container .search-page-book-author {
        font-size: 13px;
    }
}

.reading-page {
    touch-action: pan-y pinch-zoom;  /* 允许垂直平移和缩放 */
    -webkit-user-select: none;  /* 防止文本选择 */
    user-select: none;
}

.tts-panel {
    position: fixed;
    left: 50%;
    bottom: 68px;
    z-index: 1200;
    width: calc(100% - 24px);
    max-width: 760px;
    padding: 10px 12px;
    transform: translateX(-50%);
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    background: #fff;
    color: #333;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.tts-panel-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tts-control-button,
.tts-option select {
    min-height: 34px;
    padding: 5px 10px;
    border: 1px solid #c9c9c9;
    border-radius: 4px;
    background: #f7f7f7;
    color: #333;
    font-size: 14px;
}

.tts-control-button {
    min-width: 54px;
    background: #1677c8;
    border-color: #1677c8;
    color: #fff;
    cursor: pointer;
}

.tts-control-button.secondary {
    background: #fff;
    border-color: #c9c9c9;
    color: #333;
}

.tts-control-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tts-option,
.tts-autonext {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.tts-autonext input {
    margin: 0;
}

.tts-status {
    min-height: 18px;
    margin-top: 7px;
    color: #555;
    font-size: 12px;
}

.tts-status.error {
    color: #b42318;
}

.reading-container.dark .tts-panel {
    border-color: #484848;
    background: #262626;
    color: #ddd;
}

.reading-container.dark .tts-control-button.secondary,
.reading-container.dark .tts-option select {
    border-color: #555;
    background: #333;
    color: #ddd;
}

.reading-container.dark .tts-status {
    color: #bbb;
}

@media (max-width: 520px) {
    .tts-panel {
        bottom: 62px;
        width: calc(100% - 16px);
        padding: 8px;
    }

    .tts-panel-row {
        gap: 6px;
    }

    .tts-option {
        gap: 4px;
    }

    .tts-control-button,
    .tts-option select {
        min-height: 32px;
        padding: 4px 7px;
        font-size: 13px;
    }
}

