/* ===== Tags Cloud Custom Styles ===== */
.tags-page-warp .col .tag-item {
    display: block;
    background: #fff;
    border-radius: 16px;
    padding: 20px !important;
    margin-bottom: 0;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}
.tags-page-warp .col .tag-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.tags-page-warp .col .tag-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.18);
    border-color: transparent;
    text-decoration: none;
    color: inherit;
}
.tags-page-warp .col .tag-item:hover::before {
    opacity: 1;
}
.tags-page-warp .col .tag-item .tag-substr {
    width: 52px; height: 52px;
    min-width: 52px;
    border-radius: 14px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    transition: all 0.35s ease;
}
.tags-page-warp .col .tag-item:hover .tag-substr {
    transform: scale(1.1) rotate(-3deg);
}
.tags-page-warp .col .tag-item b.text-dark {
    font-size: 15px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
    transition: color 0.3s ease;
}
.tags-page-warp .col .tag-item:hover b.text-dark {
    color: #667eea !important;
}
.tags-page-warp .col .tag-item .small.text-muted {
    font-size: 12px !important;
    letter-spacing: 0.3px;
}
.tags-page-warp .col .tag-item .small.text-muted .b {
    color: #667eea;
    font-weight: 700;
    font-size: 16px;
    margin-right: 2px;
}
/* Sorting buttons */
.section-title .btn-outline-info {
    border: 2px solid #667eea;
    color: #667eea;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}
.section-title .btn-outline-info.active,
.section-title .btn-outline-info:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}
/* Archive hero */
.archive-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}
.archive-hero .archive-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
/* Responsive tweaks */
@media (max-width: 767.98px) {
    .tags-page-warp .col .tag-item {
        padding: 14px !important;
    }
    .tags-page-warp .col .tag-item .tag-substr {
        width: 42px; height: 42px; min-width: 42px;
        font-size: 18px; border-radius: 10px;
    }
}


/* ===== Compact Sidebar Tag Cloud (#tag_cloud-5) ===== */
#tag_cloud-5 .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1;
}
#tag_cloud-5 .tagcloud .tag-cloud-link {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px !important;
    font-weight: 500;
    text-decoration: none;
    color: #595d69 !important;
    background: #f0f1f3;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
}
#tag_cloud-5 .tagcloud .tag-cloud-link:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102,126,234,0.25);
}
#tag_cloud-5 .tagcloud .tag-link-position-1 {
    background: rgba(102,126,234,0.08);
    color: #667eea !important;
    font-weight: 700;
    font-size: 13px !important;
}
#tag_cloud-5 .tagcloud .tag-link-position-2 {
    background: rgba(118,75,162,0.08);
    color: #764ba2 !important;
    font-weight: 700;
    font-size: 13px !important;
}
#tag_cloud-5 .widget-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
}
#tag_cloud-5 .widget-title::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: #764ba2;
    margin-left: 0;
    vertical-align: bottom;
    margin-bottom: -2px;
}



/* ===== Sidebar Widgets ===== */

/* --- 排行榜展示 --- */
.sidebar-ranking-list .ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.25s ease;
    margin-bottom: 8px;
}
.sidebar-ranking-list .ranking-item:last-child {
    margin-bottom: 0;
}
.sidebar-ranking-list .ranking-item:hover {
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06));
    transform: translateX(4px);
}
.sidebar-ranking-list .ranking-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #a1a1a8, #76787e);
}
.sidebar-ranking-list .ranking-item:nth-child(1) .ranking-num {
    background: linear-gradient(135deg, #f7c32e, #f0a500);
}
.sidebar-ranking-list .ranking-item:nth-child(2) .ranking-num {
    background: linear-gradient(135deg, #b0b0b8, #8a8a92);
}
.sidebar-ranking-list .ranking-item:nth-child(3) .ranking-num {
    background: linear-gradient(135deg, #cd8032, #b5651d);
}
.sidebar-ranking-list .ranking-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}
.sidebar-ranking-list .ranking-title a {
    color: #333 !important;
    text-decoration: none;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-ranking-list .ranking-title a:hover {
    color: #667eea !important;
}

/* --- 近期文章 (block-3) --- */
#block-3 .wp-block-latest-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}
#block-3 .wp-block-latest-posts li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f1f3;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
#block-3 .wp-block-latest-posts li:last-child {
    border-bottom: none;
}
#block-3 .wp-block-latest-posts li::before {
    content: '';
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: #667eea;
    margin-top: 7px;
    transition: all 0.2s;
}
#block-3 .wp-block-latest-posts li:hover::before {
    background: #764ba2;
    transform: scale(1.4);
}
#block-3 .wp-block-latest-posts__post-title {
    font-size: 13px;
    font-weight: 500;
    color: #333 !important;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#block-3 .wp-block-latest-posts__post-title:hover {
    color: #667eea !important;
}

/* --- 近期评论 (block-4) --- */
#block-4 .wp-block-latest-comments {
    list-style: none;
    padding: 0;
    margin: 0;
}
#block-4 .wp-block-latest-comments__comment {
    padding: 10px 0;
    border-bottom: 1px solid #f0f1f3;
}
#block-4 .wp-block-latest-comments__comment:last-child {
    border-bottom: none;
}
#block-4 .wp-block-latest-comments__comment-meta {
    font-size: 12px;
    line-height: 1.6;
    color: #595d69;
}
#block-4 .wp-block-latest-comments__comment-author {
    font-weight: 600;
    color: #333 !important;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06));
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}
#block-4 .wp-block-latest-comments__comment-author:hover {
    color: #667eea !important;
}
#block-4 .wp-block-latest-comments__comment-link {
    color: #667eea !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
#block-4 .wp-block-latest-comments__comment-link:hover {
    color: #764ba2 !important;
    text-decoration: underline;
}

/* --- Widget title universal --- */
.sidebar .widget-title,
.sidebar .wp-block-heading {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    position: relative;
}
.sidebar .widget-title::after,
.sidebar .wp-block-heading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #764ba2;
}



/* ===== Sidebar Widgets ===== */

/* --- 排行榜展示 --- */
.sidebar-ranking-list .ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.25s ease;
    margin-bottom: 8px;
}
.sidebar-ranking-list .ranking-item:last-child {
    margin-bottom: 0;
}
.sidebar-ranking-list .ranking-item:hover {
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06));
    transform: translateX(4px);
}
.sidebar-ranking-list .ranking-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #a1a1a8, #76787e);
}
.sidebar-ranking-list .ranking-item:nth-child(1) .ranking-num {
    background: linear-gradient(135deg, #f7c32e, #f0a500);
}
.sidebar-ranking-list .ranking-item:nth-child(2) .ranking-num {
    background: linear-gradient(135deg, #b0b0b8, #8a8a92);
}
.sidebar-ranking-list .ranking-item:nth-child(3) .ranking-num {
    background: linear-gradient(135deg, #cd8032, #b5651d);
}
.sidebar-ranking-list .ranking-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}
.sidebar-ranking-list .ranking-title a {
    color: #333 !important;
    text-decoration: none;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-ranking-list .ranking-title a:hover {
    color: #667eea !important;
}

/* --- 近期文章 (block-3) --- */
#block-3 .wp-block-latest-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}
#block-3 .wp-block-latest-posts li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f1f3;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
#block-3 .wp-block-latest-posts li:last-child {
    border-bottom: none;
}
#block-3 .wp-block-latest-posts li::before {
    content: '';
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: #667eea;
    margin-top: 7px;
    transition: all 0.2s;
}
#block-3 .wp-block-latest-posts li:hover::before {
    background: #764ba2;
    transform: scale(1.4);
}
#block-3 .wp-block-latest-posts__post-title {
    font-size: 13px;
    font-weight: 500;
    color: #333 !important;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#block-3 .wp-block-latest-posts__post-title:hover {
    color: #667eea !important;
}

/* --- 近期评论 (block-4) --- */
#block-4 .wp-block-latest-comments {
    list-style: none;
    padding: 0;
    margin: 0;
}
#block-4 .wp-block-latest-comments__comment {
    padding: 10px 0;
    border-bottom: 1px solid #f0f1f3;
}
#block-4 .wp-block-latest-comments__comment:last-child {
    border-bottom: none;
}
#block-4 .wp-block-latest-comments__comment-meta {
    font-size: 12px;
    line-height: 1.6;
    color: #595d69;
}
#block-4 .wp-block-latest-comments__comment-author {
    font-weight: 600;
    color: #333 !important;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06));
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}
#block-4 .wp-block-latest-comments__comment-author:hover {
    color: #667eea !important;
}
#block-4 .wp-block-latest-comments__comment-link {
    color: #667eea !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
#block-4 .wp-block-latest-comments__comment-link:hover {
    color: #764ba2 !important;
    text-decoration: underline;
}

/* --- Widget title universal --- */
.sidebar .widget-title,
.sidebar .wp-block-heading {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    position: relative;
}
.sidebar .widget-title::after,
.sidebar .wp-block-heading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #764ba2;
}



/* ===== Sidebar Widgets ===== */

/* --- 排行榜展示 --- */
.sidebar-ranking-list .ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.25s ease;
    margin-bottom: 8px;
}
.sidebar-ranking-list .ranking-item:last-child {
    margin-bottom: 0;
}
.sidebar-ranking-list .ranking-item:hover {
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06));
    transform: translateX(4px);
}
.sidebar-ranking-list .ranking-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #a1a1a8, #76787e);
}
.sidebar-ranking-list .ranking-item:nth-child(1) .ranking-num {
    background: linear-gradient(135deg, #f7c32e, #f0a500);
}
.sidebar-ranking-list .ranking-item:nth-child(2) .ranking-num {
    background: linear-gradient(135deg, #b0b0b8, #8a8a92);
}
.sidebar-ranking-list .ranking-item:nth-child(3) .ranking-num {
    background: linear-gradient(135deg, #cd8032, #b5651d);
}
.sidebar-ranking-list .ranking-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}
.sidebar-ranking-list .ranking-title a {
    color: #333 !important;
    text-decoration: none;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-ranking-list .ranking-title a:hover {
    color: #667eea !important;
}

/* --- 近期文章 (block-3) --- */
#block-3 .wp-block-latest-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}
#block-3 .wp-block-latest-posts li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f1f3;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
#block-3 .wp-block-latest-posts li:last-child {
    border-bottom: none;
}
#block-3 .wp-block-latest-posts li::before {
    content: '';
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: #667eea;
    margin-top: 7px;
    transition: all 0.2s;
}
#block-3 .wp-block-latest-posts li:hover::before {
    background: #764ba2;
    transform: scale(1.4);
}
#block-3 .wp-block-latest-posts__post-title {
    font-size: 13px;
    font-weight: 500;
    color: #333 !important;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#block-3 .wp-block-latest-posts__post-title:hover {
    color: #667eea !important;
}

/* --- 近期评论 (block-4) --- */
#block-4 .wp-block-latest-comments {
    list-style: none;
    padding: 0;
    margin: 0;
}
#block-4 .wp-block-latest-comments__comment {
    padding: 10px 0;
    border-bottom: 1px solid #f0f1f3;
}
#block-4 .wp-block-latest-comments__comment:last-child {
    border-bottom: none;
}
#block-4 .wp-block-latest-comments__comment-meta {
    font-size: 12px;
    line-height: 1.6;
    color: #595d69;
}
#block-4 .wp-block-latest-comments__comment-author {
    font-weight: 600;
    color: #333 !important;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06));
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}
#block-4 .wp-block-latest-comments__comment-author:hover {
    color: #667eea !important;
}
#block-4 .wp-block-latest-comments__comment-link {
    color: #667eea !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
#block-4 .wp-block-latest-comments__comment-link:hover {
    color: #764ba2 !important;
    text-decoration: underline;
}

/* --- Widget title universal --- */
.sidebar .widget-title,
.sidebar .wp-block-heading {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    position: relative;
}
.sidebar .widget-title::after,
.sidebar .wp-block-heading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #764ba2;
}



/* ===== Fix sidebar widget selectors ===== */

/* Widget title - target all sidebar widget headings */
.sidebar .widget .widget-title,
.sidebar .widget .wp-block-heading,
.sidebar .widget > h5,
.sidebar .widget > h2,
.sidebar .widget > h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    position: relative;
}
.sidebar .widget .widget-title::after,
.sidebar .widget .wp-block-heading::after,
.sidebar .widget > h5::after,
.sidebar .widget > h2::after,
.sidebar .widget > h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #764ba2;
}

/* 近期评论 - more specific selectors */
.sidebar .widget#block-4 .wp-block-latest-comments,
.sidebar .widget_block .wp-block-latest-comments {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment,
.sidebar .widget_block .wp-block-latest-comments__comment {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment:last-child,
.sidebar .widget_block .wp-block-latest-comments__comment:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-meta,
.sidebar .widget_block .wp-block-latest-comments__comment-meta {
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #595d69 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author,
.sidebar .widget_block .wp-block-latest-comments__comment-author {
    font-weight: 600 !important;
    color: #333 !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06)) !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-author:hover {
    color: #667eea !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link,
.sidebar .widget_block .wp-block-latest-comments__comment-link {
    color: #667eea !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-link:hover {
    color: #764ba2 !important;
    text-decoration: underline !important;
}

/* 近期文章 - more specific selectors */
.sidebar .widget#block-3 .wp-block-latest-posts,
.sidebar .widget_block .wp-block-latest-posts {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li,
.sidebar .widget_block .wp-block-latest-posts li {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:last-child,
.sidebar .widget_block .wp-block-latest-posts li:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li::before,
.sidebar .widget_block .wp-block-latest-posts li::before {
    content: '' !important;
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    border-radius: 50% !important;
    background: #667eea !important;
    margin-top: 7px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:hover::before,
.sidebar .widget_block .wp-block-latest-posts li:hover::before {
    background: #764ba2 !important;
    transform: scale(1.4) !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title,
.sidebar .widget_block .wp-block-latest-posts__post-title {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    text-decoration: none !important;
    line-height: 1.5 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title:hover,
.sidebar .widget_block .wp-block-latest-posts__post-title:hover {
    color: #667eea !important;
}



/* ===== Fix sidebar widget selectors ===== */

/* Widget title - target all sidebar widget headings */
.sidebar .widget .widget-title,
.sidebar .widget .wp-block-heading,
.sidebar .widget > h5,
.sidebar .widget > h2,
.sidebar .widget > h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    position: relative;
}
.sidebar .widget .widget-title::after,
.sidebar .widget .wp-block-heading::after,
.sidebar .widget > h5::after,
.sidebar .widget > h2::after,
.sidebar .widget > h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #764ba2;
}

/* 近期评论 - more specific selectors */
.sidebar .widget#block-4 .wp-block-latest-comments,
.sidebar .widget_block .wp-block-latest-comments {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment,
.sidebar .widget_block .wp-block-latest-comments__comment {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment:last-child,
.sidebar .widget_block .wp-block-latest-comments__comment:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-meta,
.sidebar .widget_block .wp-block-latest-comments__comment-meta {
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #595d69 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author,
.sidebar .widget_block .wp-block-latest-comments__comment-author {
    font-weight: 600 !important;
    color: #333 !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06)) !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-author:hover {
    color: #667eea !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link,
.sidebar .widget_block .wp-block-latest-comments__comment-link {
    color: #667eea !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-link:hover {
    color: #764ba2 !important;
    text-decoration: underline !important;
}

/* 近期文章 - more specific selectors */
.sidebar .widget#block-3 .wp-block-latest-posts,
.sidebar .widget_block .wp-block-latest-posts {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li,
.sidebar .widget_block .wp-block-latest-posts li {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:last-child,
.sidebar .widget_block .wp-block-latest-posts li:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li::before,
.sidebar .widget_block .wp-block-latest-posts li::before {
    content: '' !important;
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    border-radius: 50% !important;
    background: #667eea !important;
    margin-top: 7px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:hover::before,
.sidebar .widget_block .wp-block-latest-posts li:hover::before {
    background: #764ba2 !important;
    transform: scale(1.4) !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title,
.sidebar .widget_block .wp-block-latest-posts__post-title {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    text-decoration: none !important;
    line-height: 1.5 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title:hover,
.sidebar .widget_block .wp-block-latest-posts__post-title:hover {
    color: #667eea !important;
}



/* ===== Fix sidebar widget selectors ===== */

/* Widget title - target all sidebar widget headings */
.sidebar .widget .widget-title,
.sidebar .widget .wp-block-heading,
.sidebar .widget > h5,
.sidebar .widget > h2,
.sidebar .widget > h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    position: relative;
}
.sidebar .widget .widget-title::after,
.sidebar .widget .wp-block-heading::after,
.sidebar .widget > h5::after,
.sidebar .widget > h2::after,
.sidebar .widget > h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #764ba2;
}

/* 近期评论 - more specific selectors */
.sidebar .widget#block-4 .wp-block-latest-comments,
.sidebar .widget_block .wp-block-latest-comments {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment,
.sidebar .widget_block .wp-block-latest-comments__comment {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment:last-child,
.sidebar .widget_block .wp-block-latest-comments__comment:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-meta,
.sidebar .widget_block .wp-block-latest-comments__comment-meta {
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #595d69 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author,
.sidebar .widget_block .wp-block-latest-comments__comment-author {
    font-weight: 600 !important;
    color: #333 !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06)) !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-author:hover {
    color: #667eea !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link,
.sidebar .widget_block .wp-block-latest-comments__comment-link {
    color: #667eea !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-link:hover {
    color: #764ba2 !important;
    text-decoration: underline !important;
}

/* 近期文章 - more specific selectors */
.sidebar .widget#block-3 .wp-block-latest-posts,
.sidebar .widget_block .wp-block-latest-posts {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li,
.sidebar .widget_block .wp-block-latest-posts li {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:last-child,
.sidebar .widget_block .wp-block-latest-posts li:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li::before,
.sidebar .widget_block .wp-block-latest-posts li::before {
    content: '' !important;
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    border-radius: 50% !important;
    background: #667eea !important;
    margin-top: 7px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:hover::before,
.sidebar .widget_block .wp-block-latest-posts li:hover::before {
    background: #764ba2 !important;
    transform: scale(1.4) !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title,
.sidebar .widget_block .wp-block-latest-posts__post-title {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    text-decoration: none !important;
    line-height: 1.5 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title:hover,
.sidebar .widget_block .wp-block-latest-posts__post-title:hover {
    color: #667eea !important;
}



/* ===== Fix sidebar widget selectors ===== */

/* Widget title - target all sidebar widget headings */
.sidebar .widget .widget-title,
.sidebar .widget .wp-block-heading,
.sidebar .widget > h5,
.sidebar .widget > h2,
.sidebar .widget > h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    position: relative;
}
.sidebar .widget .widget-title::after,
.sidebar .widget .wp-block-heading::after,
.sidebar .widget > h5::after,
.sidebar .widget > h2::after,
.sidebar .widget > h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #764ba2;
}

/* 近期评论 - more specific selectors */
.sidebar .widget#block-4 .wp-block-latest-comments,
.sidebar .widget_block .wp-block-latest-comments {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment,
.sidebar .widget_block .wp-block-latest-comments__comment {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment:last-child,
.sidebar .widget_block .wp-block-latest-comments__comment:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-meta,
.sidebar .widget_block .wp-block-latest-comments__comment-meta {
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #595d69 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author,
.sidebar .widget_block .wp-block-latest-comments__comment-author {
    font-weight: 600 !important;
    color: #333 !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06)) !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-author:hover {
    color: #667eea !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link,
.sidebar .widget_block .wp-block-latest-comments__comment-link {
    color: #667eea !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-link:hover {
    color: #764ba2 !important;
    text-decoration: underline !important;
}

/* 近期文章 - more specific selectors */
.sidebar .widget#block-3 .wp-block-latest-posts,
.sidebar .widget_block .wp-block-latest-posts {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li,
.sidebar .widget_block .wp-block-latest-posts li {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:last-child,
.sidebar .widget_block .wp-block-latest-posts li:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li::before,
.sidebar .widget_block .wp-block-latest-posts li::before {
    content: '' !important;
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    border-radius: 50% !important;
    background: #667eea !important;
    margin-top: 7px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:hover::before,
.sidebar .widget_block .wp-block-latest-posts li:hover::before {
    background: #764ba2 !important;
    transform: scale(1.4) !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title,
.sidebar .widget_block .wp-block-latest-posts__post-title {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    text-decoration: none !important;
    line-height: 1.5 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title:hover,
.sidebar .widget_block .wp-block-latest-posts__post-title:hover {
    color: #667eea !important;
}



/* ===== Fix sidebar widget selectors ===== */

/* Widget title - target all sidebar widget headings */
.sidebar .widget .widget-title,
.sidebar .widget .wp-block-heading,
.sidebar .widget > h5,
.sidebar .widget > h2,
.sidebar .widget > h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    position: relative;
}
.sidebar .widget .widget-title::after,
.sidebar .widget .wp-block-heading::after,
.sidebar .widget > h5::after,
.sidebar .widget > h2::after,
.sidebar .widget > h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #764ba2;
}

/* 近期评论 - more specific selectors */
.sidebar .widget#block-4 .wp-block-latest-comments,
.sidebar .widget_block .wp-block-latest-comments {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment,
.sidebar .widget_block .wp-block-latest-comments__comment {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment:last-child,
.sidebar .widget_block .wp-block-latest-comments__comment:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-meta,
.sidebar .widget_block .wp-block-latest-comments__comment-meta {
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #595d69 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author,
.sidebar .widget_block .wp-block-latest-comments__comment-author {
    font-weight: 600 !important;
    color: #333 !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06)) !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-author:hover {
    color: #667eea !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link,
.sidebar .widget_block .wp-block-latest-comments__comment-link {
    color: #667eea !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-link:hover {
    color: #764ba2 !important;
    text-decoration: underline !important;
}

/* 近期文章 - more specific selectors */
.sidebar .widget#block-3 .wp-block-latest-posts,
.sidebar .widget_block .wp-block-latest-posts {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li,
.sidebar .widget_block .wp-block-latest-posts li {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:last-child,
.sidebar .widget_block .wp-block-latest-posts li:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li::before,
.sidebar .widget_block .wp-block-latest-posts li::before {
    content: '' !important;
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    border-radius: 50% !important;
    background: #667eea !important;
    margin-top: 7px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:hover::before,
.sidebar .widget_block .wp-block-latest-posts li:hover::before {
    background: #764ba2 !important;
    transform: scale(1.4) !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title,
.sidebar .widget_block .wp-block-latest-posts__post-title {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    text-decoration: none !important;
    line-height: 1.5 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title:hover,
.sidebar .widget_block .wp-block-latest-posts__post-title:hover {
    color: #667eea !important;
}



/* ===== Fix sidebar widget selectors ===== */

/* Widget title - target all sidebar widget headings */
.sidebar .widget .widget-title,
.sidebar .widget .wp-block-heading,
.sidebar .widget > h5,
.sidebar .widget > h2,
.sidebar .widget > h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    position: relative;
}
.sidebar .widget .widget-title::after,
.sidebar .widget .wp-block-heading::after,
.sidebar .widget > h5::after,
.sidebar .widget > h2::after,
.sidebar .widget > h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #764ba2;
}

/* 近期评论 - more specific selectors */
.sidebar .widget#block-4 .wp-block-latest-comments,
.sidebar .widget_block .wp-block-latest-comments {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment,
.sidebar .widget_block .wp-block-latest-comments__comment {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment:last-child,
.sidebar .widget_block .wp-block-latest-comments__comment:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-meta,
.sidebar .widget_block .wp-block-latest-comments__comment-meta {
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #595d69 !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author,
.sidebar .widget_block .wp-block-latest-comments__comment-author {
    font-weight: 600 !important;
    color: #333 !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06)) !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-author:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-author:hover {
    color: #667eea !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link,
.sidebar .widget_block .wp-block-latest-comments__comment-link {
    color: #667eea !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-4 .wp-block-latest-comments__comment-link:hover,
.sidebar .widget_block .wp-block-latest-comments__comment-link:hover {
    color: #764ba2 !important;
    text-decoration: underline !important;
}

/* 近期文章 - more specific selectors */
.sidebar .widget#block-3 .wp-block-latest-posts,
.sidebar .widget_block .wp-block-latest-posts {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li,
.sidebar .widget_block .wp-block-latest-posts li {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f1f3 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:last-child,
.sidebar .widget_block .wp-block-latest-posts li:last-child {
    border-bottom: none !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li::before,
.sidebar .widget_block .wp-block-latest-posts li::before {
    content: '' !important;
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    border-radius: 50% !important;
    background: #667eea !important;
    margin-top: 7px !important;
    transition: all 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts li:hover::before,
.sidebar .widget_block .wp-block-latest-posts li:hover::before {
    background: #764ba2 !important;
    transform: scale(1.4) !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title,
.sidebar .widget_block .wp-block-latest-posts__post-title {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    text-decoration: none !important;
    line-height: 1.5 !important;
    transition: color 0.2s !important;
}
.sidebar .widget#block-3 .wp-block-latest-posts__post-title:hover,
.sidebar .widget_block .wp-block-latest-posts__post-title:hover {
    color: #667eea !important;
}



/* ===== Language Selector: Flag Icons ===== */
/* Hide original select */
.translateSelectLanguage,
.language-selector select {
    display: none !important;
}

/* Flag icon container */
.language-selector {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
}

/* Active language flag as the visible button */
.lang-flags {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
}

.lang-flag-btn {
    width: 28px;
    height: 20px;
    border-radius: 3px;
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    position: relative;
    opacity: 0.5;
}
.lang-flag-btn.active {
    opacity: 1;
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.lang-flag-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}
.lang-flag-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}
/* Flag emoji fallback */
.lang-flag-btn .flag-emoji {
    font-size: 16px;
    line-height: 1;
}

/* ===== Dark Mode: Widget Text Fixes ===== */
[data-bs-theme="dark"] .sidebar .widget-title,
[data-bs-theme="dark"] .sidebar .wp-block-heading,
[data-bs-theme="dark"] .widget .widget-title,
[data-bs-theme="dark"] .widget .wp-block-heading,
[data-bs-theme="dark"] .widget > h5,
[data-bs-theme="dark"] .widget > h2,
[data-bs-theme="dark"] .widget > h3,
[data-bs-theme="dark"] .sidebar h5.widget-title {
    color: #e8e8ec !important;
    border-bottom-color: #667eea !important;
}

[data-bs-theme="dark"] .sidebar-ranking-list .ranking-item {
    background: rgba(255,255,255,0.04) !important;
}
[data-bs-theme="dark"] .sidebar-ranking-list .ranking-title a {
    color: #c8c8d0 !important;
}
[data-bs-theme="dark"] .sidebar-ranking-list .ranking-title a:hover {
    color: #90a4f4 !important;
}

/* Tags in dark mode */
[data-bs-theme="dark"] #tag_cloud-5 .tagcloud .tag-cloud-link {
    background: rgba(255,255,255,0.06) !important;
    color: #b0b0b8 !important;
    border-color: rgba(255,255,255,0.08) !important;
}
[data-bs-theme="dark"] #tag_cloud-5 .tagcloud .tag-cloud-link:hover {
    color: #fff !important;
}
[data-bs-theme="dark"] #tag_cloud-5 .tagcloud .tag-link-position-1,
[data-bs-theme="dark"] #tag_cloud-5 .tagcloud .tag-link-position-2 {
    background: rgba(102,126,234,0.15) !important;
    color: #90a4f4 !important;
}

/* Recent posts in dark mode */
[data-bs-theme="dark"] .wp-block-latest-posts__post-title {
    color: #c8c8d0 !important;
}
[data-bs-theme="dark"] .wp-block-latest-posts__post-title:hover {
    color: #90a4f4 !important;
}
[data-bs-theme="dark"] .wp-block-latest-posts li {
    border-bottom-color: rgba(255,255,255,0.06) !important;
}
[data-bs-theme="dark"] .wp-block-latest-posts li::before {
    background: #667eea !important;
}

/* Recent comments in dark mode */
[data-bs-theme="dark"] .wp-block-latest-comments__comment-author {
    color: #e0e0e8 !important;
    background: rgba(102,126,234,0.12) !important;
}
[data-bs-theme="dark"] .wp-block-latest-comments__comment-link {
    color: #90a4f4 !important;
}
[data-bs-theme="dark"] .wp-block-latest-comments__comment-link:hover {
    color: #b0bfff !important;
}
[data-bs-theme="dark"] .wp-block-latest-comments__comment-meta {
    color: #909098 !important;
}
[data-bs-theme="dark"] .wp-block-latest-comments__comment {
    border-bottom-color: rgba(255,255,255,0.06) !important;
}

/* Light mode fixes (ensure visibility too) */
[data-bs-theme="light"] .sidebar .widget-title,
[data-bs-theme="light"] .widget .wp-block-heading {
    color: #1a1a2e !important;
}


/* ===== Dark Mode Fix: Use theme CSS variables + broader selectors ===== */

/* Widget titles - use theme heading color */
.sidebar .widget .widget-title,
.sidebar .widget .wp-block-heading {
    color: var(--ri-heading-color, #1a1a2e) !important;
}

/* Ranking links */
.sidebar-ranking-list .ranking-item:hover {
    background: rgba(102,126,234,0.08);
}
.sidebar-ranking-list .ranking-title a {
    color: var(--ri-body-color, #333) !important;
}
.sidebar-ranking-list .ranking-title a:hover {
    color: #667eea !important;
}

/* Tag cloud links */
#tag_cloud-5 .tagcloud .tag-cloud-link {
    color: var(--ri-body-color, #555) !important;
}

/* Recent posts titles */
.wp-block-latest-posts__post-title {
    color: var(--ri-body-color, #333) !important;
}
.wp-block-latest-posts__post-title:hover {
    color: #667eea !important;
}
.wp-block-latest-posts li {
    border-bottom-color: var(--ri-border-color, #f0f1f3) !important;
}

/* Recent comments */
.wp-block-latest-comments__comment-author {
    color: var(--ri-heading-color, #333) !important;
}
.wp-block-latest-comments__comment-link {
    color: var(--ri-primary, #667eea) !important;
}
.wp-block-latest-comments__comment-meta {
    color: var(--ri-secondary-color, #595d69) !important;
}
.wp-block-latest-comments__comment {
    border-bottom-color: var(--ri-border-color, #f0f1f3) !important;
}

/* Also fix with explicit dark mode classes that ri-pro uses */
body.dark .sidebar .widget .widget-title,
body.dark .sidebar .wp-block-heading {
    color: #e8e8ec !important;
}
body.dark .sidebar-ranking-list .ranking-title a { color: #c8c8d0 !important; }
body.dark .sidebar-ranking-list .ranking-title a:hover { color: #90a4f4 !important; }
body.dark .sidebar-ranking-list .ranking-item { background: rgba(255,255,255,0.04) !important; }
body.dark .wp-block-latest-posts__post-title { color: #c8c8d0 !important; }
body.dark .wp-block-latest-posts__post-title:hover { color: #90a4f4 !important; }
body.dark .wp-block-latest-posts li { border-bottom-color: rgba(255,255,255,0.06) !important; }
body.dark .wp-block-latest-comments__comment-author { color: #e0e0e8 !important; background: rgba(102,126,234,0.12) !important; }
body.dark .wp-block-latest-comments__comment-link { color: #90a4f4 !important; }
body.dark .wp-block-latest-comments__comment-meta { color: #909098 !important; }
body.dark .wp-block-latest-comments__comment { border-bottom-color: rgba(255,255,255,0.06) !important; }
body.dark #tag_cloud-5 .tagcloud .tag-cloud-link { background: rgba(255,255,255,0.06) !important; color: #b0b0b8 !important; }
body.dark #tag_cloud-5 .tagcloud .tag-cloud-link:hover { color: #fff !important; }

/* Ranking badges dark mode */
body.dark .ranking-num { background: linear-gradient(135deg, #5a5a62, #4a4a52) !important; }
body.dark .ranking-item:nth-child(1) .ranking-num { background: linear-gradient(135deg, #f7c32e, #f0a500) !important; }
body.dark .ranking-item:nth-child(2) .ranking-num { background: linear-gradient(135deg, #8a8a92, #70707a) !important; }
body.dark .ranking-item:nth-child(3) .ranking-num { background: linear-gradient(135deg, #cd8032, #b5651d) !important; }

/* Widget title dark mode */
body.dark .sidebar .widget .widget-title,
body.dark .sidebar .wp-block-heading,
body.dark .sidebar .widget > h5 {
    color: #e8e8ec !important;
    border-bottom-color: #667eea !important;
}

/* Search input dark mode fix */
body.dark .widget_search .wp-block-search__input {
    background: rgba(255,255,255,0.06) !important;
    color: #e0e0e8 !important;
    border-color: rgba(255,255,255,0.1) !important;
}
body.dark .widget_search .wp-block-search__button {
    color: #e0e0e8 !important;
}


/* ===== Language Dropdown: Single Flag ===== */
.lang-dropdown-wrap {
    position: relative;
    display: inline-block;
    z-index: 1050;
}
.lang-current-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.25s ease;
    user-select: none;
    border: 1px solid rgba(255,255,255,0.1);
}
.lang-current-btn:hover {
    background: rgba(255,255,255,0.12);
    transform: scale(1.1);
    border-color: rgba(102,126,234,0.3);
}
.lang-current-btn:hover {
    background: rgba(255,255,255,0.1);
}
.lang-dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    padding: 8px;
    min-width: auto;
    width: auto;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid rgba(0,0,0,0.06);
    z-index: 1060;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lang-dropdown-wrap.open .lang-dropdown-panel {
    opacity: 1;
    transform: translateY(6px);
    pointer-events: auto;
}
.lang-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 22px;
    color: #333;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-radius: 8px;
    min-width: 42px;
    min-height: 38px;
}
.lang-dropdown-item:hover {
    background: rgba(102,126,234,0.1);
    transform: scale(1.15);
}
.lang-dropdown-item.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.15), rgba(118,75,162,0.1));
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102,126,234,0.2);
}
.lang-flag-emoji {
    font-size: 22px;
    line-height: 1;
    pointer-events: none;
}
.lang-dropdown-item:hover {
    background: #f0f1f5;
}
.lang-dropdown-item.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.06));
    color: #667eea;
    font-weight: 600;
}
.lang-dropdown-item small {
    color: #888;
    font-size: 12px;
}
.lang-dropdown-item.active small {
    color: #667eea;
}
/* Dark mode dropdown */
body.dark .lang-dropdown-panel,
[data-bs-theme="dark"] .lang-dropdown-panel {
    background: #2a2d35;
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
body.dark .lang-dropdown-item,
[data-bs-theme="dark"] .lang-dropdown-item {
    color: #d0d0d8;
}
body.dark .lang-dropdown-item:hover,
[data-bs-theme="dark"] .lang-dropdown-item:hover {
    background: rgba(102,126,234,0.15);
    transform: scale(1.15);
}
body.dark .lang-dropdown-item.active,
[data-bs-theme="dark"] .lang-dropdown-item.active {
    background: rgba(102,126,234,0.2);
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}
body.dark .lang-dropdown-item small,
[data-bs-theme="dark"] .lang-dropdown-item small {
    color: #888;
}

/* ===== Danmaku / Barrage Scrolling Notifications ===== */
.danmaku-wrap {
    position: relative;
    overflow: hidden;
    height: 44px;
    background: linear-gradient(90deg, rgba(102,126,234,0.06), rgba(118,75,162,0.06));
    border-radius: 22px;
    margin: 8px 0;
    border: 1px solid rgba(102,126,234,0.1);
    flex: 1;
    min-width: 0;
}
.danmaku-track {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: danmaku-scroll 40s linear infinite;
    will-change: transform;
}
.danmaku-track:hover {
    animation-play-state: paused;
}
.danmaku-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px;
    font-size: 13px;
    color: #555;
    flex-shrink: 0;
}
.danmaku-item .dm-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.danmaku-item .dm-user {
    font-weight: 600;
    color: #333;
}
.danmaku-item .dm-action {
    color: #888;
}
.danmaku-item .dm-link {
    color: #667eea;
    text-decoration: none;
}
.danmaku-item .dm-link:hover {
    text-decoration: underline;
}
@keyframes danmaku-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
/* Dark mode danmaku */
body.dark .danmaku-wrap,
[data-bs-theme="dark"] .danmaku-wrap {
    background: linear-gradient(90deg, rgba(102,126,234,0.06), rgba(118,75,162,0.06));
    border-color: rgba(255,255,255,0.06);
}
body.dark .danmaku-item,
[data-bs-theme="dark"] .danmaku-item {
    color: #b0b0b8;
}
body.dark .danmaku-item .dm-user,
[data-bs-theme="dark"] .danmaku-item .dm-user {
    color: #e0e0e8;
}
body.dark .danmaku-item .dm-action,
[data-bs-theme="dark"] .danmaku-item .dm-action {
    color: #888;
}
body.dark .danmaku-item .dm-link,
[data-bs-theme="dark"] .danmaku-item .dm-link {
    color: #90a4f4;
}



/* ===== Danmaku Enhancement ===== */
.dynamic-warp .owl-carousel,
.dynamic-warp .dynamic-slider {
    display: none !important;
}
.dynamic-warp .dynamic-slider-item {
    display: none !important;
}
.dynamic-warp {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}
.dynamic-warp .me-3 {
    flex-shrink: 0;
}
.danmaku-sep {
    color: #667eea;
    font-weight: bold;
    opacity: 0.4;
    padding: 0 4px;
    flex-shrink: 0;
}
body.dark .danmaku-sep,
[data-bs-theme="dark"] .danmaku-sep {
    color: #90a4f4;
}
/* Mobile danmaku speed */
@media (max-width: 767.98px) {
    .danmaku-track {
        animation-duration: 30s;
    }
    .danmaku-item {
        font-size: 12px;
        padding: 0 12px;
    }
}

/* ===== 广告位区域 ===== */
.ad-banner-zone {
    background: var(--ri-secondary-bg);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--ri-border-color);
}

/* 图片广告行 */
.ad-image-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.ad-image-item a {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ad-image-item a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.ad-img-placeholder {
    width: 100%;
    height: 80px;
    background: var(--ri-tertiary-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--ri-secondary-color);
    font-weight: 500;
    border: 1px dashed var(--ri-border-color);
    transition: all 0.25s ease;
}
.ad-image-item a:hover .ad-img-placeholder {
    border-color: var(--ri-primary, #667eea);
    color: var(--ri-primary, #667eea);
    background: var(--ri-primary-bg-subtle);
}

/* 文字广告表格 */
.ad-text-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ad-text-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.ad-text-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ri-body-color);
    background: var(--ri-tertiary-bg);
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid var(--ri-border-color);
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ad-text-cell:hover {
    background: var(--ri-primary-bg-subtle);
    color: var(--ri-primary, #667eea);
    border-color: var(--ri-primary-border-subtle);
    transform: translateY(-1px);
}

/* ===== 最新内容区域 ===== */
.latest-content-zone {
    background: var(--ri-secondary-bg);
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid var(--ri-border-color);
}
.latest-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ri-primary, #667eea);
}
.latest-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ri-heading-color, inherit);
    margin: 0;
    display: flex;
    align-items: center;
}
.latest-title .badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
}
.latest-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.latest-tab {
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ri-body-color);
    background: var(--ri-tertiary-bg);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}
.latest-tab:hover {
    color: var(--ri-primary, #667eea);
    background: var(--ri-primary-bg-subtle);
    border-color: var(--ri-primary-border-subtle);
}
.latest-tab.active {
    color: #fff;
    background: linear-gradient(135deg, var(--ri-primary, #667eea), #764ba2);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102,126,234,0.25);
}
.latest-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 20px;
}
.latest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--ri-border-color);
    break-inside: avoid;
}
.latest-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ri-body-color);
    text-decoration: none;
    flex: 1;
    min-width: 0;
    transition: color 0.2s;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.latest-item a:hover {
    color: var(--ri-primary, #667eea);
}
.latest-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: var(--ri-primary, #667eea);
    transition: all 0.2s;
}
.latest-item:hover .latest-dot {
    background: var(--ri-secondary, #764ba2);
    transform: scale(1.5);
}
.latest-time {
    font-size: 11px;
    color: var(--ri-tertiary-color);
    white-space: nowrap;
    margin-left: 8px;
    flex-shrink: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 767.98px) {
    .ad-image-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .ad-text-row {
        grid-template-columns: repeat(3, 1fr);
    }
    .latest-list {
        columns: 1;
    }
    .latest-title {
        font-size: 16px;
    }
}

/* ===== 最新内容 - 分页导航 ===== */
.latest-pagination {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--ri-border-color);
}
.page-nav-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ri-body-color);
    background: var(--ri-tertiary-bg);
    border: 1px solid var(--ri-border-color);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}
.page-btn:hover:not(.disabled) {
    color: #fff;
    background: linear-gradient(135deg, var(--ri-primary, #667eea), #764ba2);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
    transform: translateY(-1px);
}
.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.page-info {
    font-size: 13px;
    color: var(--ri-tertiary-color);
    font-weight: 500;
}

/* ===== 火花特效 - 🔥 emoji标记 ===== */
.fire-badge {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    margin-left: 4px;
    animation: fireFlicker 0.8s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 4px rgba(255, 100, 0, 0.7));
}
@keyframes fireFlicker {
    0%   { transform: scale(1) rotate(-3deg); opacity: 0.8; }
    50%  { transform: scale(1.2) rotate(2deg); opacity: 1; }
    100% { transform: scale(1.05) rotate(-1deg); opacity: 0.9; }
}

/* ===== 热门文章 - 火焰侧边条 + 高亮 ===== */
.latest-item.is-hot {
    position: relative;
    overflow: hidden;
}
.latest-item.is-hot::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #ff4500, #ff8c00, #ffd700, #ff4500);
    background-size: 100% 300%;
    animation: fireGlow 2s ease-in-out infinite;
    border-radius: 2px;
    z-index: 1;
}
.latest-item.is-hot::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(90deg, rgba(255,69,0,0.06), transparent);
    pointer-events: none;
}
.latest-item.is-hot a {
    color: var(--ri-primary, #667eea) !important;
    font-weight: 600;
}
.latest-item.is-hot:hover {
    background: rgba(255, 100, 0, 0.04);
}
@keyframes fireGlow {
    0%, 100% { background-position: 0% 0%; }
    50%      { background-position: 0% 100%; }
}

/* hover 火花文字阴影 */
.latest-item.is-hot a:hover {
    text-shadow: 0 0 10px rgba(255, 100, 0, 0.3);
}

/* ===== 加载状态 ===== */
.latest-list.loading {
    transition: opacity 0.2s;
    pointer-events: none;
}
.latest-empty {
    text-align: center;
    color: var(--ri-tertiary-color);
    padding: 20px !important;
    border-bottom: none !important;
    list-style: none !important;
}
