/* 统计栏核心样式 */
.jiuling-stats-bar {
    display: flex;
    align-items: center;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 100%;
    box-sizing: border-box;
    color-scheme: light dark;
}

/* 白天模式样式 */
body:not(.dark-theme) .jiuling-stats-bar {
    background: #fff;
    border: 1px solid #ebeef5;
    color: #303133;
}

/* 夜间模式样式 */
body.dark-theme .jiuling-stats-bar {
    background: #1e1e1e;
    border: 1px solid #2c2c2c;
    color: #c9c9c9;
}

/* 无边框模式 */
.jiuling-stats-bar.no-border {
    background: transparent !important;
    border: none !important;
    padding: 8px 0 !important;
}

/* 图标固定彩色样式 */
#stats-today-icon { color: #ff4d4f !important; }
.jiuling-stats-bar .stats-item:nth-child(3) i { color: #1890ff !important; }
.jiuling-stats-bar .stats-item:nth-child(5) i { color: #13c2c2 !important; }
.jiuling-stats-bar .stats-item:nth-child(7) i { color: #52c41a !important; }
.jiuling-stats-bar .stats-item:nth-child(9) i { color: #fa8c16 !important; }
.jiuling-stats-bar .stats-item:nth-child(11) i { color: #722ed1 !important; }
.jiuling-stats-bar .stats-item:nth-child(13) i { color: #faad14 !important; }

/* 图标美化效果 */
.jiuling-stats-bar .stats-item i {
    transition: all 0.3s ease;
    transform-origin: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.jiuling-stats-bar .stats-item:hover i {
    transform: scale(1.15);
    filter: brightness(1.2);
}

/* 今日发布的特殊颜色 */
body.dark-theme #stats-today-count { color: #ff7a45; }
body:not(.dark-theme) #stats-today-count { color: #ff4d4f; }

/* 其他统计数字的暗色模式适配 */
body.dark-theme #stats-posts-count { color: #91bfff; }
body.dark-theme #stats-topic-count { color: #89e8e8; }
body.dark-theme #stats-comments-count { color: #b7eb8f; }
body.dark-theme #stats-users-count { color: #ffd591; }
body.dark-theme #stats-uptime-count { color: #d3adf7; }
body.dark-theme #stats-pageviews-count { color: #ffe58f; }

/* 白天模式数字颜色 */
body:not(.dark-theme) #stats-posts-count { color: #1890ff; }
body:not(.dark-theme) #stats-topic-count { color: #13c2c2; }
body:not(.dark-theme) #stats-comments-count { color: #52c41a; }
body:not(.dark-theme) #stats-users-count { color: #fa8c16; }
body:not(.dark-theme) #stats-uptime-count { color: #722ed1; }
body:not(.dark-theme) #stats-pageviews-count { color: #faad14; }

/* 分割线颜色 */
body:not(.dark-theme) .stats-divider { color: #dcdde0; }
body.dark-theme .stats-divider { color: #4e4e4e; }

/* 滚动欢迎信息样式 */
.stats-welcome-container {
    overflow: hidden;
    max-width: 300px;
    flex-shrink: 0;
    height: 20px;
    line-height: 20px;
}

.stats-welcome-scroll {
    transition: transform 0.5s ease-in-out;
}

.stats-welcome-item {
    height: 20px;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .jiuling-stats-bar {
        flex-wrap: wrap;
        gap: 8px 12px;
        padding: 10px;
        justify-content: center;
    }
    .jiuling-stats-bar.no-border {
        padding: 10px 0 !important;
    }
    .jiuling-stats-bar .stats-item {
        font-size: 12px;
        margin: 2px 0;
    }
    .jiuling-stats-bar .stats-divider { display: none; }
    .stats-welcome-container { display: none !important; }
}

@media (max-width: 375px) {
    .jiuling-stats-bar .stats-item {
        font-size: 11px;
        flex: 1 0 40%;
        justify-content: center;
    }
}