.ai-toc-plugin-sidebar {
    position: absolute;
    top: 100px;
    right: 20px;
    width: 300px;
    z-index: 9999;
}

.ai-toc-plugin-container {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.ai-toc-plugin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.ai-toc-plugin-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ai-toc-plugin-toggle {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 12px;
}

.ai-toc-plugin-toggle:hover {
    background: #e0e0e0;
}

.ai-toc-plugin-content {
    max-height: 60vh;
    overflow-y: auto;
}

.ai-toc-plugin-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.ai-toc-plugin-content ul ul {
    padding-left: 20px;
}

.ai-toc-plugin-content li {
    margin: 6px 0;
    line-height: 1.4;
    position: relative;
}

/* 中文序号样式 */
.ai-toc-plugin-content > ul {
    counter-reset: section;
}

.ai-toc-plugin-content > ul > li {
    counter-increment: section;
    font-weight: bold;
}

.ai-toc-plugin-content > ul > li:before {
    content: counter(section, cjk-ideographic) "、";
    margin-right: 5px;
}

.ai-toc-plugin-content > ul > li > ul {
    counter-reset: subsection;
}

.ai-toc-plugin-content > ul > li > ul > li {
    counter-increment: subsection;
    font-weight: normal;
    margin-left: 15px;
}

.ai-toc-plugin-content > ul > li > ul > li:before {
    content: counter(subsection) ". ";
    margin-right: 5px;
}

.ai-toc-plugin-content > ul > li > ul > li > ul {
    counter-reset: subsubsection;
}

.ai-toc-plugin-content > ul > li > ul > li > ul > li {
    counter-increment: subsubsection;
    margin-left: 30px;
}

.ai-toc-plugin-content > ul > li > ul > li > ul > li:before {
    content: "(" counter(subsubsection) ") ";
    margin-right: 5px;
}

.ai-toc-plugin-content a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 3px 5px;
    border-radius: 3px;
    transition: all 0.2s;
}

.ai-toc-plugin-content a:hover {
    background-color: #f5f5f5;
    color: #0073aa;
}

.ai-toc-plugin-content a.active {
    background-color: #0073aa;
    color: white;
}

/* 内容中标题的高亮效果 */
.toc-highlight {
    animation: highlight 2s ease;
    background-color: rgba(255, 255, 0, 0.2);
}

@keyframes highlight {
    0% { background-color: rgba(255, 255, 0, 0.5); }
    100% { background-color: transparent; }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .ai-toc-plugin-sidebar {
        display: none;
    }
}

/* 打印样式 */
@media print {
    .ai-toc-plugin-sidebar {
        display: none;
    }
}