/* AI一族文章工具栏 - 完整CSS修复版 */
#aiNewToolbar.ai-new-toolbar {
    position: fixed;
    left: 220px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 15px 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 收起状态 */
#aiNewToolbar.ai-new-toolbar.collapsed {
    left: -70px;
    opacity: 0;
    visibility: hidden;
}

.ai-tb-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: white;
    font-size: 20px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.ai-tb-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s;
}

.ai-tb-btn:hover::before {
    opacity: 1;
}

.ai-tb-btn i { 
    display: block; 
    margin-bottom: 4px; 
    position: relative;
    z-index: 1;
}

.ai-tb-btn span {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

/* 按钮颜色 */
.ai-tb-share { 
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.ai-tb-tools { 
    background: linear-gradient(135deg, #4299e1, #3182ce);
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}
.ai-tb-feedback { 
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.ai-tb-toggle-toolbar { 
    background: linear-gradient(135deg, #718096, #4a5568);
    box-shadow: 0 4px 15px rgba(113, 128, 150, 0.3);
}

.ai-tb-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.ai-tb-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* 收起状态切换按钮 */
/* 收起状态切换按钮 */
.ai-tb-toggle {
    position: fixed;
    left: 220px;           /* 改为220px，与工具栏保持一致 */
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.ai-tb-toggle.visible { 
    display: flex;
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ai-tb-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
}

/* 功能面板 */
.ai-tb-panel {
    position: fixed;
    left: 290px;
    top: 50%;
    transform: translateY(-50%) scale(0.95);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 340px;
    max-height: 75vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.ai-tb-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
    pointer-events: auto;
}

/* 面板层级 */
.ai-share-panel { z-index: 10002; }
.ai-func-panel { z-index: 10003; }
.ai-feedback-panel { z-index: 10004; }

.ai-tb-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.ai-tb-panel-header h4 {
    color: #2d3748;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-tb-close {
    background: rgba(226, 232, 240, 0.5);
    border: none;
    color: #718096;
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-tb-close:hover {
    color: #4a5568;
    background: rgba(226, 232, 240, 0.8);
    transform: rotate(90deg);
}

/* 分享网格 */
.ai-tb-share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.ai-tb-share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 12px 8px;
    border-radius: 12px;
    transition: all 0.25s;
    background: rgba(248, 250, 252, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.3);
}

.ai-tb-share-item span {
    color: #2d3748; /* 分享图标下面的文字颜色 */
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
}
.ai-tb-share-item:hover { 
    background: rgba(237, 242, 247, 0.8); 
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.ai-tb-share-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: transform 0.3s;
}

.ai-tb-share-item:hover .ai-tb-share-icon {
    transform: scale(1.1);
}

/* 分享平台颜色 */
.wechat { background: linear-gradient(135deg, #07C160, #05A150); }
.wechat-moment { background: linear-gradient(135deg, #07C160, #05A150); }
.qq { background: linear-gradient(135deg, #12B7F5, #0A9BDA); }
.qzone { background: linear-gradient(135deg, #FFC107, #FF9800); }
.weibo { background: linear-gradient(135deg, #E6162D, #C20C22); }
.douyin { background: linear-gradient(135deg, #000000, #FF2D55); }
.xiaohongshu { background: linear-gradient(135deg, #FF2442, #FF6B9D); }
.copy { background: linear-gradient(135deg, #A0AEC0, #718096); }
.qrcode { background: linear-gradient(135deg, #805AD5, #6B46C1); }

/* 功能菜单网格 */
.ai-tb-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.ai-tb-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    border-radius: 14px;
    cursor: pointer;
    background: rgba(248, 250, 252, 0.8);
    border: 2px solid rgba(226, 232, 240, 0.4);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.ai-tb-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s;
}

.ai-tb-menu-item:hover {
    background: rgba(237, 242, 247, 0.9);
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
    border-color: rgba(66, 153, 225, 0.3);
}

.ai-tb-menu-item:hover::before {
    opacity: 1;
}

.ai-tb-menu-icon {
    font-size: 22px;
    margin-bottom: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.ai-tb-menu-text {
    font-size: 13px;
    color: #4a5568;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* 图标颜色 */
.collect-icon { color: #ff6b6b; }
.toc-icon { color: #4dabf7; }
.notes-icon { color: #51cf66; }
.audio-icon { color: #ffd43b; }
.recommend-icon { color: #9775fa; }
.search-icon { color: #f76707; }

/* 收藏状态 */
.collected {
    background: linear-gradient(135deg, #ffec99, #ffd43b) !important;
    border-color: #ffd43b !important;
}

.collected .collect-icon {
    color: #e67700 !important;
}

/* 朗读状态 */
.reading {
    background: linear-gradient(135deg, #ffd43b, #ffc107) !important;
    border-color: #ffc107 !important;
}

.reading .audio-icon {
    color: #e67700 !important;
}

/* 功能区域通用样式 */
.ai-tb-notes-area,
.ai-tb-search-area,
.ai-tb-recommend-area {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(233, 236, 239, 0.6);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-tb-notes-area.active,
.ai-tb-search-area.active,
.ai-tb-recommend-area.active {
    display: block;
}

.ai-tb-notes-header,
.ai-tb-search-header,
.ai-tb-recommend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ai-tb-notes-header h5,
.ai-tb-search-header h5,
.ai-tb-recommend-header h5 {
    margin: 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-tb-notes-close,
.ai-tb-search-close,
.ai-tb-recommend-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
}

.ai-tb-notes-close:hover,
.ai-tb-search-close:hover,
.ai-tb-recommend-close:hover {
    background: rgba(233, 236, 239, 0.8);
    color: #495057;
}

/* 笔记区域 */
.ai-tb-notes-input {
    width: 100%;
    height: 140px;
    padding: 14px;
    border: 2px solid rgba(206, 212, 218, 0.5);
    border-radius: 12px;
    font-size: 14px;
    color: #495057;
    resize: vertical;
    margin-bottom: 15px;
    font-family: inherit;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9);
}

.ai-tb-notes-input:focus {
    outline: none;
    border-color: #4dabf7;
    box-shadow: 0 0 0 4px rgba(77, 171, 247, 0.15);
    background: white;
}

.ai-tb-notes-actions {
    display: flex;
    gap: 10px;
}

.ai-tb-notes-save,
.ai-tb-notes-clear {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.ai-tb-notes-save {
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.3);
}

.ai-tb-notes-clear {
    background: rgba(233, 236, 239, 0.8);
    color: #495057;
}

.ai-tb-notes-save:hover {
    background: linear-gradient(135deg, #40c057, #2f9e44);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(81, 207, 102, 0.4);
}

.ai-tb-notes-clear:hover {
    background: rgba(222, 226, 230, 0.9);
    transform: translateY(-2px);
}

/* 搜索区域 */
.ai-tb-search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.ai-tb-search-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid rgba(206, 212, 218, 0.5);
    border-radius: 12px;
    font-size: 14px;
    color: #495057;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s;
}

.ai-tb-search-input:focus {
    outline: none;
    border-color: #4dabf7;
    box-shadow: 0 0 0 4px rgba(77, 171, 247, 0.15);
    background: white;
}

.ai-tb-search-btn {
    padding: 0 24px;
    background: linear-gradient(135deg, #f76707, #e8590c);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.25s;
    min-width: 60px;
}

.ai-tb-search-btn:hover {
    background: linear-gradient(135deg, #e8590c, #d9480f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 103, 7, 0.3);
}

.ai-tb-search-results {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(206, 212, 218, 0.3);
}

.ai-tb-search-result-item {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border-left: 4px solid #f76707;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-tb-search-result-item:hover {
    background: rgba(247, 103, 7, 0.1);
    transform: translateX(5px);
}

.ai-tb-search-result-item .highlight {
    background: #ffec99;
    padding: 2px 4px;
    border-radius: 4px;
    color: #e67700;
    font-weight: 600;
}

.ai-tb-search-actions {
    display: flex;
    gap: 10px;
}

.ai-tb-search-clear,
.ai-tb-search-close-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.ai-tb-search-clear {
    background: rgba(255, 236, 153, 0.8);
    color: #e67700;
}

.ai-tb-search-close-btn {
    background: rgba(206, 212, 218, 0.8);
    color: #495057;
}

.ai-tb-search-clear:hover {
    background: rgba(255, 236, 153, 1);
    transform: translateY(-2px);
}

.ai-tb-search-close-btn:hover {
    background: rgba(206, 212, 218, 1);
    transform: translateY(-2px);
}

/* 推荐区域 */
.ai-tb-recommend-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.ai-tb-recommend-loading {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-size: 14px;
}

.ai-tb-recommend-item {
    padding: 14px 16px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border: 2px solid rgba(151, 117, 250, 0.2);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.ai-tb-recommend-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #9775fa, #7950f2);
}

.ai-tb-recommend-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(151, 117, 250, 0.15);
    border-color: rgba(151, 117, 250, 0.4);
}

.ai-tb-recommend-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.4;
}

.ai-tb-recommend-excerpt {
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 反馈表单 */
.ai-tb-feedback-form {
    margin-top: 15px;
}

.ai-tb-feedback-type h5 {
    color: #4a5568;
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: 600;
}

.ai-tb-feedback-types {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.ai-tb-feedback-types label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    padding: 8px 12px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 10px;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.ai-tb-feedback-types label:hover {
    background: rgba(237, 242, 247, 0.9);
}

.ai-tb-feedback-types input[type="radio"]:checked + span {
    font-weight: 600;
    color: #4299e1;
}

.ai-tb-feedback-types input[type="radio"] {
    margin: 0;
    accent-color: #4299e1;
}

.ai-tb-feedback-content textarea {
    width: 100%;
    height: 120px;
    padding: 16px;
    border: 2px solid rgba(226, 232, 240, 0.5);
    border-radius: 12px;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 15px;
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9);
}

.ai-tb-feedback-content textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.15);
    background: white;
}

.ai-tb-feedback-contact input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(226, 232, 240, 0.5);
    border-radius: 12px;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 20px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9);
}

.ai-tb-feedback-contact input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.15);
    background: white;
}

.ai-tb-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.ai-tb-submit-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

/* 模态框 */
.ai-tb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 10005;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
    padding: 20px;
}

.ai-tb-modal.active {
    display: flex;
}

.ai-tb-modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
    animation: modalSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ai-tb-modal-sm {
    max-width: 360px;
}

.ai-tb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(237, 242, 247, 0.9));
}

.ai-tb-modal-header h4 {
    margin: 0;
    color: #2d3748;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-tb-modal-close {
    background: rgba(226, 232, 240, 0.6);
    border: none;
    color: #718096;
    cursor: pointer;
    font-size: 18px;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-tb-modal-close:hover {
    color: #4a5568;
    background: rgba(226, 232, 240, 0.9);
    transform: rotate(90deg);
}

.ai-tb-modal-body {
    padding: 32px 28px;
    text-align: center;
}

.ai-tb-modal-body p {
    margin: 12px 0;
    color: #4a5568;
    line-height: 1.6;
    font-size: 15px;
}

.ai-tb-modal-footer {
    padding: 24px 28px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

.ai-tb-modal-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 120px;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.3);
}

.ai-tb-modal-btn:hover {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(66, 153, 225, 0.4);
}

.ai-tb-modal-btn-secondary {
    background: linear-gradient(135deg, #718096, #4a5568);
    box-shadow: 0 6px 20px rgba(113, 128, 150, 0.3);
}

.ai-tb-modal-btn-secondary:hover {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    box-shadow: 0 10px 25px rgba(113, 128, 150, 0.4);
}

/* 二维码容器 */
.ai-tb-qrcode-container {
    text-align: center;
    padding: 20px 0;
}

#aiQrcodeImage {
    width: 240px;
    height: 240px;
    margin: 0 auto 25px;
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 3px solid rgba(233, 236, 239, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

#aiQrcodeImage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #667eea, #764ba2, #805ad5);
}

#aiQrcodeImage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.qrcode-loading {
    color: #666;
    text-align: center;
    padding: 60px 0;
}

.qrcode-loading .fa-spinner {
    margin-bottom: 20px;
}

.ai-tb-qrcode-tip {
    color: #4a5568;
    font-size: 16px;
    font-weight: 600;
    margin: 5px 0 10px 0;
}

.ai-tb-qrcode-desc {
    color: #718096;
    font-size: 14px;
    margin-top: 15px;
    font-style: italic;
}

/* 成功图标 */
.ai-tb-success-icon {
    font-size: 72px;
    color: #51cf66;
    margin-bottom: 24px;
    animation: successPulse 1.2s ease infinite;
}

/* 消息提示 */
.ai-tb-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 28px;
    border-radius: 16px;
    font-weight: 600;
    z-index: 10006;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    display: none;
    animation: toastSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: white;
    text-align: center;
    max-width: 360px;
    font-size: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounceIn {
    0% { 
        opacity: 0;
        transform: translateY(-50%) scale(0.3);
    }
    50% { 
        opacity: 0.9;
        transform: translateY(-50%) scale(1.1);
    }
    80% { 
        opacity: 1;
        transform: translateY(-50%) scale(0.9);
    }
    100% { 
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

@keyframes toastSlideUp {
    from { 
        opacity: 0;
        transform: translateX(-50%) translateY(40px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes modalSlideUp {
    from { 
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes successPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* ========== 目录容器样式 ========== */
.ai-tb-toc-container {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: rgba(248, 249, 250, 0.9);
    border-radius: 16px;
    border: 2px solid rgba(226, 232, 240, 0.5);
    animation: slideDown 0.3s ease;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(233, 236, 239, 0.6);
}

.toc-header h5 {
    margin: 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

/* 滚动条样式 */
.toc-list::-webkit-scrollbar {
    width: 6px;
}

.toc-list::-webkit-scrollbar-track {
    background: rgba(233, 236, 239, 0.5);
    border-radius: 3px;
}

.toc-list::-webkit-scrollbar-thumb {
    background: rgba(173, 181, 189, 0.5);
    border-radius: 3px;
}

.toc-list::-webkit-scrollbar-thumb:hover {
    background: rgba(173, 181, 189, 0.8);
}

.toc-item {
    display: block;
    padding: 12px 16px;
    margin-bottom: 8px;
    color: #4299e1;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-left: 4px solid #4299e1;
    border: 1px solid rgba(226, 232, 240, 0.3);
}

.toc-item:hover {
    background: rgba(66, 153, 225, 0.1);
    transform: translateX(8px);
    border-color: rgba(66, 153, 225, 0.5);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.15);
}

.toc-item.toc-h3 {
    border-left-color: #a0aec0;
    margin-left: 24px;
    font-size: 14px;
    padding: 10px 16px;
}

.toc-footer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(233, 236, 239, 0.6);
    text-align: center;
}

.toc-footer small {
    color: #718096;
    font-size: 12px;
}

.toc-item-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc-item-icon {
    font-size: 14px;
}

.toc-item-text {
    font-size: 15px;
    font-weight: 500;
}

.toc-h3 .toc-item-text {
    font-size: 14px;
    font-weight: 400;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #aiNewToolbar.ai-new-toolbar {
        flex-direction: row;
        left: 50%;
        top: auto;
        bottom: 20px;
        transform: translateX(-50%);
        width: auto;
        padding: 12px 16px;
        gap: 15px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    #aiNewToolbar.ai-new-toolbar.collapsed {
        left: 50%;
        bottom: -80px;
    }
    
    .ai-tb-btn {
        width: 46px;
        height: 46px;
        font-size: 18px;
        border-radius: 10px;
    }
    
    .ai-tb-btn span {
        font-size: 10px;
    }
    
.ai-tb-toggle {
    left: calc(50% + 120px);  /* 在居中基础上向右偏移120px */
    top: auto;
    bottom: 20px;
    transform: translateX(-50%); /* 保持这个，确保按钮本身居中 */
}
    
    .ai-tb-panel {
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) scale(0.95) !important;
        width: 90vw !important;
        max-width: 380px !important;
        max-height: 85vh;
        padding: 20px;
    }
    
    .ai-tb-panel.active {
        transform: translate(-50%, -50%) scale(1) !important;
    }
    
    .ai-tb-share-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .ai-tb-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .ai-tb-modal-content {
        width: 95%;
        max-width: 380px;
        margin: 0 10px;
    }
    
    #aiQrcodeImage {
        width: 200px;
        height: 200px;
        padding: 20px;
    }
    
    .ai-tb-toast {
        max-width: 90%;
        font-size: 14px;
        padding: 14px 20px;
        bottom: 80px;
    }
    
    /* 目录响应式 */
    .ai-tb-toc-container {
        padding: 16px;
        margin-top: 15px;
    }
    
    .toc-item {
        padding: 10px 14px;
        margin-bottom: 6px;
    }
    
    .toc-item.toc-h3 {
        margin-left: 20px;
        padding: 8px 14px;
    }
}

@media (max-width: 480px) {
    .ai-tb-share-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ai-tb-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ai-tb-panel {
        padding: 16px;
    }
    
    .ai-tb-modal-content {
        max-width: 320px;
    }
    
    #aiQrcodeImage {
        width: 180px;
        height: 180px;
        padding: 16px;
    }
}

/* 高亮搜索文本 */
.search-highlight {
    background: #ffec99 !important;
    color: #e67700 !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    animation: highlightPulse 1.5s infinite;
}

@keyframes highlightPulse {
    0%, 100% { 
        background: #ffec99;
        color: #e67700;
    }
    50% { 
        background: #ffd43b;
        color: #e67700;
    }
}
/* ========== 新增功能图标颜色样式 ========== */

/* 明暗模式图标 */
.theme-icon { 
    color: #f59e0b; /* 橙色 */
}

/* 减小字体图标 */
.font-decrease-icon { 
    color: #4299e1; /* 蓝色，与其他功能图标协调 */
}

/* 增大字体图标 */
.font-increase-icon { 
    color: #4299e1; /* 蓝色，与减小字体保持一致 */
}

/* 字体大小图标的特殊布局（确保+-号正确显示） */
.ai-tb-menu-item[title="减小字体"] .ai-tb-menu-icon,
.ai-tb-menu-item[title="增大字体"] .ai-tb-menu-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-tb-menu-item[title="减小字体"] .fa-minus,
.ai-tb-menu-item[title="增大字体"] .fa-plus {
    position: absolute;
    font-size: 0.8em;
    bottom: 2px;
    right: 2px;
}

/* 确保明暗模式图标与其他图标大小一致 */
.ai-tb-menu-item[data-action="theme-toggle"] .ai-tb-menu-icon {
    font-size: 22px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 如果需要悬停效果可以添加 */
.ai-tb-menu-item[data-action="theme-toggle"]:hover .theme-icon {
    color: #d97706; /* 悬停时深一点的橙色 */
}

.ai-tb-menu-item[title="减小字体"]:hover .font-decrease-icon,
.ai-tb-menu-item[title="增大字体"]:hover .font-increase-icon {
    color: #3182ce; /* 悬停时深一点的蓝色 */
}