/* ============================================
   Easy Table of Contents 样式优化
   ============================================ */

/* ----- 浮动按钮位置 ----- */
div.ez-toc-sticky-container,
#ez-toc-sticky-container,
.ez-toc-sticky-container {
    bottom: 200px !important;
    right: 12px !important;
    top: auto !important;
}

/* ----- 按钮样式 ----- */
div.ez-toc-sticky-toggle,
#ez-toc-sticky-toggle,
.ez-toc-sticky-toggle {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* ----- 目录弹窗 ----- */
div.ez-toc-sticky-fixed,
#ez-toc-sticky-fixed,
.ez-toc-sticky-fixed,
.ez-toc-sticky-fixed-container {
    background: rgba(255, 255, 255, 0.8) !important; /* 80%透明 */
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
}

/* ----- 去掉所有线条 ----- */
.ez-toc-sticky-fixed *,
#ez-toc-sticky-fixed *,
.ez-toc-sticky-fixed ul,
.ez-toc-sticky-fixed li,
.ez-toc-sticky-fixed a {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
    outline: none !important;
}

/* ----- 目录内容靠下（flexbox方式）----- */
.ez-toc-sticky-fixed nav,
#ez-toc-sticky-fixed nav,
.ez-toc-sticky-fixed .ez-toc-list,
#ez-toc-sticky-fixed .ez-toc-list {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    min-height: 100% !important;
}

/* ----- 目录标题 ----- */
.ez-toc-sticky-fixed .ez-toc-title,
#ez-toc-sticky-fixed .ez-toc-title,
.ez-toc-sticky-fixed .ez-toc-sticky-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
    padding-bottom: 0 !important;
    border: none !important;
}

/* ----- 目录列表字体和行距 ----- */
.ez-toc-sticky-fixed ul li a,
#ez-toc-sticky-fixed ul li a,
.ez-toc-sticky-fixed .ez-toc-list a {
    font-size: 15px !important;
    line-height: 1.8 !important;
    padding: 10px 14px !important;
    display: block !important;
    color: #374151 !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
    background: transparent !important;
}

.ez-toc-sticky-fixed ul li a:hover,
#ez-toc-sticky-fixed ul li a:hover {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #15803d !important;
}

/* ----- 列表间距 ----- */
.ez-toc-sticky-fixed ul,
#ez-toc-sticky-fixed ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.ez-toc-sticky-fixed ul li,
#ez-toc-sticky-fixed ul li {
    margin: 4px 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* ----- 移动端适配 ----- */
@media (max-width: 768px) {
    div.ez-toc-sticky-container,
    #ez-toc-sticky-container {
        bottom: 200px !important;
        right: 10px !important;
    }
    
    div.ez-toc-sticky-fixed,
    #ez-toc-sticky-fixed {
        max-height: 55vh !important;
        width: 85% !important;
    }
    
    .ez-toc-sticky-fixed ul li a,
    #ez-toc-sticky-fixed ul li a {
        font-size: 14px !important;
        padding: 12px 14px !important;
    }
}