/* ============================================================
   阅读器样式 - 增强版
   ============================================================ */

.reader-body { background: #f5f0e8; }

/* 顶部栏 */
.reader-header { position: fixed; top: 0; left: 0; right: 0; background: #fff; border-bottom: 1px solid #e8e8e8; z-index: 100; transition: transform 0.3s; }
.reader-header.hidden { transform: translateY(-100%); }
.reader-header-inner { display: flex; align-items: center; padding: 10px 20px; gap: 15px; }
.reader-back { color: #e65540; font-size: 14px; flex-shrink: 0; text-decoration: none; }
.reader-book-title { font-size: 14px; color: #666; flex-shrink: 0; }
.reader-chapter-title { flex: 1; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-tools { display: flex; gap: 10px; flex-shrink: 0; }
.tool-btn { padding: 5px 12px; border: 1px solid #e0e0e0; border-radius: 15px; background: #fff; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.tool-btn:hover { border-color: #e65540; color: #e65540; }

/* 设置面板 */
.reader-settings { position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; display: none; }
.reader-settings.show { display: block; }
.settings-panel { background: #fff; border-radius: 16px 16px 0 0; padding: 20px; box-shadow: 0 -4px 20px rgba(0,0,0,0.1); position: relative; max-height: 70vh; overflow-y: auto; }
.settings-panel h4 { font-size: 16px; margin-bottom: 15px; }
.setting-group { margin-bottom: 15px; }
.setting-group label { display: block; font-size: 14px; color: #666; margin-bottom: 8px; }
.setting-options { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* 字体大小按钮 */
.size-btn, .font-btn, .lh-btn, .flip-btn { padding: 6px 16px; border: 1px solid #e0e0e0; border-radius: 15px; background: #fff; cursor: pointer; font-size: 13px; transition: all 0.2s; }
.size-btn.active, .font-btn.active, .lh-btn.active, .flip-btn.active { background: #e65540; color: #fff; border-color: #e65540; }
.size-btn:hover, .font-btn:hover, .lh-btn:hover, .flip-btn:hover { border-color: #e65540; }

/* 背景色按钮 */
.bg-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #e0e0e0; cursor: pointer; transition: all 0.2s; }
.bg-btn.active { border-color: #e65540; box-shadow: 0 0 0 2px rgba(230,85,64,0.3); }
.bg-white { background: #ffffff; }
.bg-cream { background: #f5f0e8; }
.bg-green { background: #e8f5e9; }
.bg-pink { background: #fce4ec; }
.bg-blue { background: #e3f2fd; }
.bg-dark { background: #263238; }

/* 亮度调节 */
.brightness-control { display: flex; align-items: center; gap: 10px; }
.brightness-slider { flex: 1; height: 6px; -webkit-appearance: none; appearance: none; background: linear-gradient(to right, #333, #fff); border-radius: 3px; outline: none; cursor: pointer; }
.brightness-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #e65540; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2); cursor: pointer; }
.brightness-slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #e65540; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2); cursor: pointer; }
.brightness-icon { font-size: 16px; }
.brightness-value { font-size: 12px; color: #999; min-width: 36px; }

/* 自动滚动和语音朗读按钮 */
.autoscroll-btn, .tts-btn { 
    padding: 8px 20px; 
    border: 1px solid #e0e0e0; 
    border-radius: 20px; 
    background: #fff; 
    cursor: pointer; 
    font-size: 13px; 
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.autoscroll-btn:hover, .tts-btn:hover { 
    border-color: #e65540; 
    color: #e65540;
}
.autoscroll-btn.active, .tts-btn.active { 
    background: #e65540; 
    color: #fff; 
    border-color: #e65540;
}
.autoscroll-btn.active:hover, .tts-btn.active:hover {
    background: #d44a35;
}

/* 设置子分组 */
.setting-sub-group {
    margin-top: 10px;
    padding-left: 10px;
    border-left: 2px solid #f0f0f0;
}
.setting-sub-group label {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
}

/* 速度按钮 */
.speed-btn, .rate-btn {
    padding: 5px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.speed-btn.active, .rate-btn.active {
    background: #e65540;
    color: #fff;
    border-color: #e65540;
}
.speed-btn:hover, .rate-btn:hover {
    border-color: #e65540;
}

.settings-close { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 14px; cursor: pointer; color: #999; padding: 5px 10px; border-radius: 15px; }
.settings-close:hover { background: #f5f5f5; color: #333; }

/* 目录面板 */
.reader-catalog { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200; display: none; background: rgba(0,0,0,0.3); }
.reader-catalog.show { display: flex; }
.catalog-panel { width: 350px; max-width: 90vw; background: #fff; height: 100%; overflow-y: auto; box-shadow: 4px 0 20px rgba(0,0,0,0.1); }
.catalog-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid #e8e8e8; position: sticky; top: 0; background: #fff; z-index: 1; }
.catalog-header h4 { font-size: 16px; }
.catalog-close { background: none; border: none; font-size: 18px; cursor: pointer; color: #999; }
.catalog-list { padding: 10px 0; }
.catalog-item { display: block; padding: 12px 20px; font-size: 14px; color: #666; border-bottom: 1px solid #f5f5f5; transition: background 0.2s; position: relative; text-decoration: none; }
.catalog-item:hover { background: #f8f8f8; }
.catalog-item.active { background: #fff0ed; color: #e65540; font-weight: 500; }
.catalog-item .vip-badge { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); background: #ff9900; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 8px; }

/* 阅读内容 */
.reader-content { max-width: 800px; margin: 0 auto; padding: 70px 20px 100px; }
.reader-container { background: #fff; border-radius: 12px; padding: 40px; min-height: 60vh; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.chapter-title { font-size: 24px; font-weight: bold; margin-bottom: 15px; text-align: center; color: #333; }

/* 章节信息栏 */
.chapter-meta { display: flex; justify-content: center; gap: 20px; font-size: 13px; color: #999; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }

/* 章节正文 */
.chapter-body { font-size: 18px; line-height: 2; color: #333; }

/* 段落样式（支持段评交互） */
.content-paragraph { margin-bottom: 1em; text-indent: 2em; position: relative; cursor: pointer; padding: 2px 4px; border-radius: 4px; transition: background 0.2s; }
.content-paragraph:hover { background: rgba(230,85,64,0.05); }
.content-paragraph:active { background: rgba(230,85,64,0.1); }

/* 段落评论图标 */
.paragraph-comment-icon { display: inline-block; font-size: 12px; color: #e65540; cursor: pointer; margin-left: 4px; vertical-align: super; opacity: 0.7; transition: opacity 0.2s; }
.paragraph-comment-icon:hover { opacity: 1; }

.author-say { margin-top: 30px; padding: 20px; background: #f8f8f8; border-radius: 8px; border-left: 3px solid #e65540; }
.author-say h4 { font-size: 15px; margin-bottom: 8px; color: #e65540; }
.author-say p { font-size: 14px; color: #666; line-height: 1.7; }

/* 章节互动栏 */
.chapter-actions { display: flex; justify-content: center; gap: 20px; margin: 30px 0; padding: 20px 0; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
.action-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 10px 20px; border-radius: 8px; transition: background 0.2s; }
.action-btn:hover { background: #f5f5f5; }
.action-icon { font-size: 24px; }
.action-text { font-size: 12px; color: #666; }

/* 页脚导航 */
.chapter-nav { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid #e8e8e8; gap: 10px; }
.nav-btn { padding: 10px 20px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 14px; color: #666; transition: all 0.2s; text-decoration: none; flex: 1; text-align: center; }
.nav-btn:hover { border-color: #e65540; color: #e65540; }
.nav-btn.disabled { color: #ccc; cursor: not-allowed; }
.nav-btn.disabled:hover { border-color: #e0e0e0; color: #ccc; }
.nav-catalog { background: #e65540; color: #fff; border-color: #e65540; }
.nav-catalog:hover { background: #d44a35; color: #fff; }

/* ==================== 段评弹出面板 ==================== */
.segment-popup { position: absolute; z-index: 300; background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); padding: 15px; min-width: 300px; max-width: 500px; }
.segment-popup-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }
.segment-popup-title { font-size: 15px; font-weight: 600; color: #333; }
.segment-popup-quote { font-size: 12px; color: #999; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.segment-popup-close { background: none; border: none; font-size: 16px; cursor: pointer; color: #999; padding: 2px 6px; }
.segment-popup-close:hover { color: #333; }

.segment-popup-list { max-height: 300px; overflow-y: auto; margin-bottom: 12px; }
.segment-loading, .segment-empty { text-align: center; padding: 20px; color: #999; font-size: 14px; }

.segment-comment-item { padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.segment-comment-item:last-child { border-bottom: none; }
.sc-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.sc-user { font-size: 13px; color: #e65540; font-weight: 500; }
.sc-time { font-size: 11px; color: #bbb; }
.sc-content { font-size: 14px; color: #333; line-height: 1.6; margin-bottom: 5px; }
.sc-footer { display: flex; gap: 15px; }
.sc-like, .sc-reply { font-size: 12px; color: #999; cursor: pointer; transition: color 0.2s; }
.sc-like:hover, .sc-reply:hover { color: #e65540; }
.sc-like.liked { color: #e65540; }

.segment-popup-input { display: flex; gap: 8px; align-items: flex-end; }
.segment-popup-input textarea { flex: 1; border: 1px solid #e0e0e0; border-radius: 8px; padding: 8px 12px; font-size: 13px; resize: none; outline: none; }
.segment-popup-input textarea:focus { border-color: #e65540; }
.segment-popup-input .btn-sm { padding: 6px 14px; font-size: 13px; white-space: nowrap; }

.segment-popup-login { text-align: center; padding: 10px; font-size: 13px; color: #999; }
.segment-popup-login a { color: #e65540; }

/* 书评 */
.reader-comments { margin-top: 30px; padding-top: 20px; border-top: 1px solid #e8e8e8; }
.comment-title { font-size: 16px; margin-bottom: 15px; }
.comment-input-box { margin-bottom: 20px; }
.comment-input-box textarea { width: 100%; border: 1px solid #e0e0e0; border-radius: 8px; padding: 12px; font-size: 14px; resize: vertical; outline: none; min-height: 80px; box-sizing: border-box; }
.comment-input-box textarea:focus { border-color: #e65540; }
.comment-submit-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.comment-tip { font-size: 12px; color: #bbb; }
.comment-login-tip { text-align: center; padding: 15px; color: #999; font-size: 14px; }
.comment-login-tip a { color: #e65540; }

.comment-item { padding: 15px 0; border-bottom: 1px solid #f5f5f5; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-user { font-size: 14px; color: #e65540; font-weight: 500; }
.comment-time { font-size: 12px; color: #bbb; }
.comment-content { font-size: 14px; color: #333; line-height: 1.7; margin-bottom: 8px; }
.comment-footer { display: flex; gap: 15px; }
.comment-action { font-size: 12px; color: #999; cursor: pointer; transition: color 0.2s; }
.comment-action:hover { color: #e65540; }

/* 底部栏 */
.reader-footer { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid #e8e8e8; z-index: 100; transition: transform 0.3s; }
.reader-footer.hidden { transform: translateY(100%); }
.reader-footer-inner { display: flex; justify-content: space-around; padding: 10px 20px; }
.footer-nav-btn { font-size: 14px; color: #666; padding: 5px 15px; text-decoration: none; }
.footer-nav-btn:hover { color: #e65540; }

/* 阅读进度浮层 */
.reading-progress-float { position: fixed; right: 20px; bottom: 60px; background: rgba(0,0,0,0.6); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 12px; z-index: 99; transition: opacity 0.3s; }

/* 夜间模式 */
.reader-body.night-mode { background: #1a1a1a; }
.reader-body.night-mode .reader-header { background: #263238; border-color: #37474f; }
.reader-body.night-mode .reader-header-inner { color: #fff; }
.reader-body.night-mode .reader-back { color: #ff7a66; }
.reader-body.night-mode .reader-container { background: #263238; }
.reader-body.night-mode .chapter-title { color: #e0e0e0; }
.reader-body.night-mode .chapter-meta { color: #666; border-color: #37474f; }
.reader-body.night-mode .chapter-body { color: #bbb; }
.reader-body.night-mode .content-paragraph:hover { background: rgba(255,255,255,0.03); }
.reader-body.night-mode .author-say { background: #1e2a30; border-color: #ff7a66; }
.reader-body.night-mode .author-say h4 { color: #ff7a66; }
.reader-body.night-mode .author-say p { color: #999; }
.reader-body.night-mode .chapter-actions { border-color: #37474f; }
.reader-body.night-mode .action-text { color: #999; }
.reader-body.night-mode .action-btn:hover { background: #37474f; }
.reader-body.night-mode .reader-footer { background: #263238; border-color: #37474f; }
.reader-body.night-mode .footer-nav-btn { color: #aaa; }
.reader-body.night-mode .nav-btn { border-color: #37474f; color: #aaa; }
.reader-body.night-mode .nav-catalog { background: #e65540; color: #fff; border-color: #e65540; }
.reader-body.night-mode .settings-panel { background: #263238; color: #e0e0e0; }
.reader-body.night-mode .settings-panel h4 { color: #e0e0e0; }
.reader-body.night-mode .setting-group label { color: #999; }
.reader-body.night-mode .size-btn, .reader-body.night-mode .font-btn, .reader-body.night-mode .lh-btn, .reader-body.night-mode .flip-btn { background: #37474f; border-color: #455a64; color: #ccc; }
.reader-body.night-mode .speed-btn, .reader-body.night-mode .rate-btn { background: #37474f; border-color: #455a64; color: #ccc; }
.reader-body.night-mode .speed-btn.active, .reader-body.night-mode .rate-btn.active { background: #e65540; color: #fff; border-color: #e65540; }
.reader-body.night-mode .autoscroll-btn, .reader-body.night-mode .tts-btn { background: #37474f; border-color: #455a64; color: #ccc; }
.reader-body.night-mode .autoscroll-btn:hover, .reader-body.night-mode .tts-btn:hover { border-color: #ff7a66; color: #ff7a66; }
.reader-body.night-mode .autoscroll-btn.active, .reader-body.night-mode .tts-btn.active { background: #e65540; color: #fff; border-color: #e65540; }
.reader-body.night-mode .setting-sub-group { border-color: #37474f; }
.reader-body.night-mode .catalog-panel { background: #263238; }
.reader-body.night-mode .catalog-header { background: #263238; border-color: #37474f; }
.reader-body.night-mode .catalog-header h4 { color: #e0e0e0; }
.reader-body.night-mode .catalog-item { color: #bbb; border-color: #37474f; }
.reader-body.night-mode .catalog-item:hover { background: #37474f; }
.reader-body.night-mode .catalog-item.active { background: #37474f; color: #ff7a66; }
.reader-body.night-mode .segment-popup { background: #263238; }
.reader-body.night-mode .segment-popup-header { border-color: #37474f; }
.reader-body.night-mode .segment-popup-title { color: #e0e0e0; }
.reader-body.night-mode .sc-content { color: #bbb; }
.reader-body.night-mode .comment-content { color: #bbb; }
.reader-body.night-mode .comment-input-box textarea { background: #37474f; border-color: #455a64; color: #e0e0e0; }
.reader-body.night-mode .reader-comments { border-color: #37474f; }
.reader-body.night-mode .comment-item { border-color: #37474f; }
.reader-body.night-mode .segment-comment-item { border-color: #37474f; }
.reader-body.night-mode .segment-popup-input textarea { background: #37474f; border-color: #455a64; color: #e0e0e0; }

/* 响应式 */
@media (max-width: 768px) {
    .reader-content { padding: 60px 15px 80px; }
    .reader-container { padding: 25px 15px; }
    .chapter-title { font-size: 20px; }
    .chapter-body { font-size: 16px; }
    .chapter-nav { flex-direction: column; gap: 8px; }
    .nav-btn { text-align: center; }
    .reader-tools { gap: 5px; }
    .tool-btn { padding: 5px 8px; font-size: 12px; }
    .reader-chapter-title { display: none; }
    .chapter-actions { gap: 10px; }
    .action-btn { padding: 8px 12px; }
    .action-icon { font-size: 20px; }
    .segment-popup { min-width: 260px; max-width: calc(100vw - 30px); left: 15px !important; right: 15px !important; }
    .chapter-meta { flex-wrap: wrap; gap: 10px; }
}

/* 阅读进度条 */
#readingProgressBar { position: fixed; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(0,0,0,0.1); z-index: 999; }
#readingProgressBar .progress-fill { height: 100%; background: #e65540; width: 0%; transition: width 0.1s; }

/* ==================== 语音朗读播放器 ==================== */
.tts-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-radius: 16px 16px 0 0;
}
.tts-player.show {
    transform: translateY(0);
}
.tts-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.tts-player-title {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tts-player-title .tts-icon {
    font-size: 18px;
    animation: ttsPulse 1.5s ease-in-out infinite;
}
.tts-player-title .tts-icon.paused {
    animation: none;
}
@keyframes ttsPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.tts-player-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.tts-player-close:hover {
    background: rgba(255,255,255,0.3);
}

/* 当前朗读段落预览 */
.tts-current-text {
    padding: 8px 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* 进度条 */
.tts-progress-wrapper {
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tts-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.tts-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}
.tts-time {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    min-width: 35px;
    text-align: center;
}

/* 控制按钮区 */
.tts-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 16px;
}
.tts-ctrl-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.tts-ctrl-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}
.tts-ctrl-btn:active {
    transform: scale(0.95);
}
.tts-ctrl-btn.primary {
    width: 52px;
    height: 52px;
    background: #fff;
    color: #764ba2;
    font-size: 20px;
}
.tts-ctrl-btn.primary:hover {
    background: rgba(255,255,255,0.9);
}
.tts-ctrl-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 设置行 */
.tts-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.tts-setting-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 12px;
    transition: background 0.2s;
}
.tts-setting-item:hover {
    background: rgba(255,255,255,0.1);
}
.tts-setting-item.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.tts-setting-icon {
    font-size: 14px;
}

/* 语音选择弹窗 */
.tts-voice-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.tts-voice-popup.show {
    transform: translateY(0);
}
.tts-voice-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.tts-voice-popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.tts-voice-popup-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
}
.tts-voice-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tts-voice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.tts-voice-item:hover {
    border-color: #764ba2;
    background: #f8f5ff;
}
.tts-voice-item.active {
    border-color: #764ba2;
    background: #f0e8ff;
}
.tts-voice-name {
    font-size: 14px;
    color: #333;
}
.tts-voice-lang {
    font-size: 12px;
    color: #999;
}
.tts-voice-check {
    color: #764ba2;
    font-size: 16px;
}

/* 定时关闭弹窗 */
.tts-timer-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.tts-timer-popup.show {
    transform: translateY(0);
}
.tts-timer-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}
.tts-timer-option {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #333;
}
.tts-timer-option:hover {
    border-color: #764ba2;
    background: #f8f5ff;
}
.tts-timer-option.active {
    border-color: #764ba2;
    background: #764ba2;
    color: #fff;
}

/* 朗读中的段落高亮 */
.content-paragraph.tts-speaking {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-left: 3px solid #764ba2;
    padding-left: 12px;
    margin-left: -15px;
    border-radius: 0 4px 4px 0;
    transition: all 0.3s ease;
}

/* 夜间模式播放器 */
.reader-body.night-mode .tts-player {
    background: linear-gradient(135deg, #37474f 0%, #263238 100%);
}
.reader-body.night-mode .tts-ctrl-btn.primary {
    background: #e65540;
    color: #fff;
}

/* 响应式 */
@media (max-width: 768px) {
    .tts-player {
        border-radius: 12px 12px 0 0;
    }
    .tts-controls {
        gap: 15px;
        padding: 10px 12px;
    }
    .tts-ctrl-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .tts-ctrl-btn.primary {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    .tts-settings-row {
        padding: 6px 12px 10px;
    }
    .tts-setting-item {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* 夜间模式进度条 */
.reader-body.night-mode #readingProgressBar { background: rgba(255,255,255,0.1); }
