/* 文章功能样式 */

/* 文章目录样式 */
.toc-container {
    background-color: #222;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.toc-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
    color: #fff;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}

.toc-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.toc-list a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.toc-list a:hover {
    color: #fff;
}

/* 不同级别的目录项 */
.toc-level-1 { padding-left: 0; }
.toc-level-2 { padding-left: 20px; }
.toc-level-3 { padding-left: 40px; }
.toc-level-4 { padding-left: 60px; }
.toc-level-5 { padding-left: 80px; }
.toc-level-6 { padding-left: 100px; }

/* 可缩放的图片样式 */
.zoomable {
    cursor: pointer;
    transition: transform 0.3s;
}

.zoomable:hover {
    transform: scale(1.02);
}

/* 图片放大浮层 */
.image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: zoom-out;
}

.image-zoom-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* 修复VIP界面文章卡片的滚动条问题 */
.article-card::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.article-card {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    overflow-y: auto;
}

/* 优化数学公式容器样式 */
.math-block {
    overflow-x: auto;
    padding: 10px 0;
    max-width: 100%;
    scrollbar-width: thin;
}

.math-block::-webkit-scrollbar {
    height: 6px;
}

.math-block::-webkit-scrollbar-track {
    background: rgba(240, 240, 240, 0.2);
    border-radius: 10px;
}

.math-block::-webkit-scrollbar-thumb {
    background-color: rgba(136, 136, 136, 0.5);
    border-radius: 10px;
}

/* 确保货币符号正确显示 */
.article-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 数学公式样式 */
.math-inline {
    display: inline-block;
    padding: 2px 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.math-block .math-inline {
    display: block;
    padding: 10px;
    margin: 10px 0;
    background: rgba(255,255,255,0.05);
    border-left: 3px solid #007acc;
}