/* ============================================
 * Category Page Transparent Container
 * Optimized Light/Dark Adaptive System
 * ============================================ */

/* 主容器透明 */
#content-inner>#category,
#category,
div#category,
main#content-inner #category,
.layout_category #content-inner,
.layout_category #page {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* ============================================
 * 文章卡片 - 智能适配
 * ============================================ */

/* Light 背景下的文章卡片 */
body.light-background #category .recent-post-item,
body.light-background #category .article-sort-item:not(.year),
body.light-background .layout_category .article-sort-item:not(.year) {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

body.light-background #category .recent-post-item:hover,
body.light-background #category .article-sort-item:not(.year):hover,
body.light-background .layout_category .article-sort-item:not(.year):hover {
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Dark 背景下的文章卡片 */
body.dark-background #category .recent-post-item,
body.dark-background #category .article-sort-item:not(.year),
body.dark-background .layout_category .article-sort-item:not(.year) {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

body.dark-background #category .recent-post-item:hover,
body.dark-background #category .article-sort-item:not(.year):hover,
body.dark-background .layout_category .article-sort-item:not(.year):hover {
    background: rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* ============================================
 * 年份分隔符 - 智能适配
 * ============================================ */

/* 年份分隔符 - 透明背景 */
#category .article-sort-item.year,
.layout_category .article-sort-item.year,
body.light-background #category .article-sort-item.year,
body.light-background .layout_category .article-sort-item.year,
body.dark-background #category .article-sort-item.year,
body.dark-background .layout_category .article-sort-item.year {
    background: transparent !important;
    border: none !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    padding-bottom: 10px !important;
    margin-bottom: 20px !important;
    border-bottom: 2px solid;
}

/* Light 背景下的年份分隔符 */
body.light-background #category .article-sort-item.year,
body.light-background .layout_category .article-sort-item.year {
    color: #2a2a2a !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border-bottom-color: rgba(0, 0, 0, 0.15);
}

/* Dark 背景下的年份分隔符 */
body.dark-background #category .article-sort-item.year,
body.dark-background .layout_category .article-sort-item.year {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

/* ============================================
 * 文章元素文字 - 智能适配
 * ============================================ */

/* Light 背景下的文字 */
body.light-background #category .article-sort-item .article-sort-item-title,
body.light-background .layout_category .article-sort-item .article-sort-item-title {
    color: #2a2a2a !important;
    transition: color 0.3s ease;
}

body.light-background #category .article-sort-item .article-sort-item-title:hover,
body.light-background .layout_category .article-sort-item .article-sort-item-title:hover {
    color: var(--theme-color) !important;
}

body.light-background #category .article-sort-item-time,
body.light-background .layout_category .article-sort-item-time {
    color: #666 !important;
}

/* Dark 背景下的文字 */
body.dark-background #category .article-sort-item .article-sort-item-title,
body.dark-background .layout_category .article-sort-item .article-sort-item-title {
    color: #ffffff !important;
    transition: color 0.3s ease;
}

body.dark-background #category .article-sort-item .article-sort-item-title:hover,
body.dark-background .layout_category .article-sort-item .article-sort-item-title:hover {
    color: var(--theme-color) !important;
}

body.dark-background #category .article-sort-item-time,
body.dark-background .layout_category .article-sort-item-time {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ============================================
 * 侧边栏适配
 * ============================================ */

/* 侧边栏容器透明 */
#aside-content {
    background: transparent !important;
}

/* 侧边栏卡片 - Light 背景 */
body.light-background #aside-content .card-widget {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 侧边栏卡片 - Dark 背景 */
body.dark-background #aside-content .card-widget {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================
 * 文章列表容器透明
 * ============================================ */
.layout_category .article-sort,
#category .article-sort {
    background: transparent !important;
}

/* ============================================
 * 移动端优化
 * ============================================ */
@media screen and (max-width: 768px) {

    body.light-background #category .article-sort-item:not(.year),
    body.light-background .layout_category .article-sort-item:not(.year) {
        padding: 12px 16px;
    }

    body.dark-background #category .article-sort-item:not(.year),
    body.dark-background .layout_category .article-sort-item:not(.year) {
        padding: 12px 16px;
    }
}