/* 小工具容器基础样式 */
.news-flash-global-widget {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    padding: 16px;
    margin-bottom: 24px;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

/* 小工具标题样式 */
.news-flash-global-widget .widget-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f2f5; 
    display: inline-block;
    line-height: 1.4;
}

/* 文章列表容器 */
.news-flash-widget-posts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px; 
}

/* 文章列表项样式（核心优化） */
.news-flash-widget-item {
    display: flex;
    align-items: flex-start; 
    background-color: #f9fafb;
    padding: 14px; /* 缩小内边距 */
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* 列表项悬浮效果 */
.news-flash-widget-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background-color: #fff;
    color: #111827;
}

/* 序号标记样式（缩小尺寸+多色） */
.news-flash-widget-item::before {
    content: attr(data-index);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; /* 缩小序号尺寸 */
    height: 28px;
    font-size: 13px; /* 缩小字体 */
    color: #fff;
    border-radius: 6px;
    margin-right: 10px; /* 缩小间距 */
    flex-shrink: 0; 
    background: var(--item-color, #409eff); 
}

/* 动态颜色配置 */
.news-flash-widget-item:nth-child(1) { --item-color: #409eff; }
.news-flash-widget-item:nth-child(2) { --item-color: #67c23a; }
.news-flash-widget-item:nth-child(3) { --item-color: #e6a23c; }
.news-flash-widget-item:nth-child(4) { --item-color: #f56c6c; }
.news-flash-widget-item:nth-child(5) { --item-color: #909399; }
.news-flash-widget-item:nth-child(6) { --item-color: #722ed1; }

/* 文章内容容器（流式排版） */
.news-flash-widget-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 文章标题样式 */
.news-flash-widget-title {
    font-size: 14px; /* 缩小标题 */
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 文章元信息（日期、阅读量等） */
.news-flash-widget-meta {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 无内容提示样式 */
.no-news-flash {
    text-align: center;
    padding: 20px;
    color: #95a5a6;
    font-size: 14px;
    background-color: #f9fafb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 「浏览全部」按钮样式 */
.news-flash-widget-more {
    margin-top: 16px;
    text-align: center;
}

.news-flash-widget-more .btn-primary {
    display: inline-block;
    padding: 8px 20px;
    background-color: #409eff; 
    color: #fff;
    font-size: 14px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.news-flash-widget-more .btn-primary:hover {
    background-color: #66b1ff; 
}

/* 响应式适配（移动端） */
@media (max-width: 768px) {
    .news-flash-global-widget {
        padding: 12px;
    }

    .news-flash-widget-item {
        padding: 12px;
    }

    .news-flash-widget-title {
        font-size: 13px;
    }
}