/* ============================================
 * Category Page Header - Optimized Light/Dark Adaptive System
 * ============================================ */

/* Container */
.category-lists #page-header,
.layout_category #page-header {
    padding: 50px 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

/* Light 背景下的 Header */
body.light-background .category-lists #page-header,
body.light-background .layout_category #page-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-left: 6px solid var(--theme-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Dark 背景下的 Header */
body.dark-background .category-lists #page-header,
body.dark-background .layout_category #page-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-left: 6px solid var(--theme-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ============================================
 * Page Title (CATEGORY label)
 * ============================================ */
#page-header .page-title {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Light 背景 */
body.light-background #page-header .page-title {
    color: #666 !important;
    text-shadow: none;
}

/* Dark 背景 */
body.dark-background #page-header .page-title {
    color: rgba(255, 255, 255, 0.8) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Folder Icon */
#page-header .page-title::before {
    content: '📂 ';
    margin-right: 8px;
}

/* ============================================
 * Category Title Main
 * ============================================ */
.category-title-main {
    font-size: 36px;
    font-weight: 700;
    margin: 10px 0 15px 0;
    line-height: 1.2;
}

/* Light 背景 */
body.light-background .category-title-main {
    color: #2a2a2a !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Dark 背景 */
body.dark-background .category-title-main {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ============================================
 * Stats Bar
 * ============================================ */
.category-stats {
    font-size: 14px;
    padding-top: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
    transition: all 0.3s ease;
}

/* Light 背景 */
body.light-background .category-stats {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-background .category-stats .stat-item {
    color: #666 !important;
}

/* Dark 背景 */
body.dark-background .category-stats {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-background .category-stats .stat-item {
    color: rgba(255, 255, 255, 0.85) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Stat Items */
.category-stats .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.category-stats .stat-item::before {
    font-size: 14px;
}

/* Post Count Stat */
.stat-posts::before {
    content: '📝';
}

/* Latest Update Stat */
.stat-updated::before {
    content: '🕐';
}

/* ============================================
 * Mobile Responsiveness
 * ============================================ */
@media screen and (max-width: 768px) {

    .category-lists #page-header,
    .layout_category #page-header {
        padding: 30px 20px;
    }

    .category-title-main {
        font-size: 28px;
    }

    .category-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}