/* blog-enhance.css - TOC高亮 + 搜索高亮 + 阅读时间 */

/* TOC 当前章节高亮 */
.toc-wrapper .toc-active {
    color: #f75357 !important;
    font-weight: bold;
}
.toc-wrapper .toc-active::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background-color: #f75357;
    border-radius: 2px;
}
.toc-wrapper li {
    position: relative;
}

/* 搜索结果高亮 */
mark {
    background: #fff3b0;
    color: #333;
    padding: 0 2px;
    border-radius: 2px;
}

/* 阅读时间 */
.reading-time {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    margin-left: 1rem;
}
.reading-time i {
    font-size: 0.8rem;
}

/* 阅读进度条增强 */
.read-progress-feature {
    background: linear-gradient(90deg, #f75357, #ff8a80) !important;
    height: 3px !important;
}

/* 相关文章推荐 */
.related-posts {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #f75357;
}
.related-title {
    font-size: 1.2rem;
    color: #333;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}
.related-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.related-item {
    display: flex;
    flex-direction: column;
    padding: 0.8rem;
    background: #fff;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border: 1px solid #eee;
}
.related-item:hover {
    background: #fff5f5;
    border-color: #f75357;
    transform: translateX(5px);
}
.related-date {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.3rem;
}
.related-item .related-title {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin: 0 0 0.3rem 0;
    border: none;
    padding: 0;
}
.related-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.related-tags .tag {
    font-size: 0.75rem;
    color: #f75357;
    background: #fff5f5;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}
.no-related {
    color: #999;
    font-style: italic;
    margin: 0;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    mark {
        background: #5c4b00;
        color: #fff;
    }
    .related-posts {
        background: #2a2a2a;
        border-left-color: #f75357;
    }
    .related-title {
        color: #eee;
        border-bottom-color: #444;
    }
    .related-item {
        background: #333;
        border-color: #444;
        color: #eee;
    }
    .related-item:hover {
        background: #3a2a2a;
        border-color: #f75357;
    }
    .related-item .related-title {
        color: #eee;
    }
    .related-tags .tag {
        background: #3a2a2a;
    }
}
