.acht-category-tree,
.acht-tag-tree {
    padding-left: 0 !important;
    margin: 0 !important;
}

.acht-category-tree section,
.acht-tag-tree section {
    margin: 5px 0 !important;
}

/* 加上線條樣式 */
.acht-category-tree section.acht-with-lines:not(:last-child),
.acht-tag-tree section.acht-with-lines:not(:last-child) {
    border-bottom: 1px dashed #ccc !important;
    padding-bottom: 5px !important;
    margin-bottom: 10px !important;
}

/* 新增的容器樣式 */
.acht-category-container,
.acht-tag-container {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.acht-category-item,
.acht-tag-item,
.acht-category-item:hover,
.acht-tag-item:hover {
    cursor: pointer !important;
    padding: 5px !important;
    border-radius: 3px !important;
    transition: background-color 0.2s !important;
    /* 使用 flex 佈局以更好地控制對齊 */
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    width: calc(100% - 20px) !important;
    box-sizing: border-box !important;
    /* 防止換行 */
    white-space: nowrap !important;
    text-decoration: none !important;
    color: #333 !important;
}

.acht-category-item:hover,
.acht-tag-item:hover {
    background-color: #f0f0f0 !important;
    text-decoration: none !important;
}

/* 展開/收闔圖示樣式 */
.acht-toggle-icon {
    display: inline-block !important;
    width: 15px !important;
    text-align: center !important;
    margin-right: 5px !important;
    font-weight: bold !important;
    transition: opacity 0.2s ease !important;
    /* 確保圖示不會被推擠 */
    flex-shrink: 0 !important;
    /* 防止換行 */
    white-space: nowrap !important;
}

/* 確保分類項目容器使用 flex 佈局 */
.acht-category-item > *,
.acht-tag-item > * {
    flex-shrink: 0 !important;
}

/* 展開狀態的子清單 */
.acht-category-children,
.acht-tag-children,
.acht-post-list {
    padding-left: 20px !important;
    margin: 0 !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, transform 0.3s ease-in-out !important;
}

/* 收闔狀態的子清單 */
.acht-category-children.collapsed,
.acht-tag-children.collapsed,
.acht-post-list.collapsed {
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
}

/* 展開/收合全部按鈕 */
.acht-expand-collapse-buttons {
    margin-bottom: 10px !important;
}

.acht-expand-collapse-buttons a {
    text-decoration: none !important;
    color: #0073aa !important;
    font-weight: bold !important;
}

.acht-expand-collapse-buttons a:hover {
    text-decoration: underline !important;
}

.acht-separator {
    color: #999 !important;
}

/* 文章列表 */
.acht-post-list {
    padding-left: 20px !important;
    margin: 5px 0 !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, transform 0.3s ease-in-out !important;
}

/* 為文章列表增加圓點 */
.acht-post-item::before {
    content: "•" !important;
    position: absolute !important;
    left: 0 !important;
    color: #666 !important;
}

.acht-post-item {
    margin: 3px 0 !important;
    position: relative !important;
    padding-left: 15px !important;
    /* 確保文章項目不會被推擠 */
    width: 100% !important;
    box-sizing: border-box !important;
    /* 限制文字最多顯示一行 (預設) */
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.5em !important;
    max-height: 1.5em !important;
}

/* 支持多行顯示的文章標題 */
.acht-post-item.acht-post-item-lines-2 {
    -webkit-line-clamp: 2 !important;
    max-height: 3em !important;
}

.acht-post-item.acht-post-item-lines-3 {
    -webkit-line-clamp: 3 !important;
    max-height: 4.5em !important;
}

.acht-post-item a {
    text-decoration: none !important;
    color: #333 !important;
    /* 限制文字最多顯示一行 (預設) */
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.5em !important;
    max-height: 1.5em !important;
}

/* 支持多行顯示的文章連結 */
.acht-post-item.acht-post-item-lines-2 a {
    -webkit-line-clamp: 2 !important;
    max-height: 3em !important;
}

.acht-post-item.acht-post-item-lines-3 a {
    -webkit-line-clamp: 3 !important;
    max-height: 4.5em !important;
}

.acht-post-item a:hover {
    text-decoration: underline !important;
}

/* 文章計數 */
.acht-category-count,
.acht-tag-count {
    margin-left: 5px !important;
    color: #666 !important;
    font-size: 0.9em !important;
}

/* RSS 圖示 */
.acht-rss-link {
    margin-left: 5px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.acht-rss-icon {
    width: 12px !important;
    height: 12px !important;
    vertical-align: middle !important;
}