/**
 * 快讯插入器 - 前端样式
 * 用于美化文章中插入的快讯卡片
 */

/* 快讯容器 */
.news-flash-container {
    margin: 30px 0;
    padding: 0;
}

/* 单个快讯卡片 - 玻璃风格 */
.news-flash-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 153, 255, 0.2);
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 153, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.news-flash-card:hover {
    box-shadow: 0 6px 20px rgba(0, 153, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(0, 153, 255, 0.4);
}

.news-flash-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #0099FF;
}

/* 快讯头部 */
.news-flash-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.news-flash-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.news-flash-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #1a1a1a;
    margin: 0;
}

.news-flash-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.news-flash-title a:hover {
    color: #667eea;
}

/* 快讯内容描述 */
.news-flash-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 12px 0;
    padding-left: 36px;
}

/* 快讯底部元信息 */
.news-flash-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #999;
}

.news-flash-source {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-flash-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}

.news-flash-platform {
    font-weight: 500;
    color: #666;
}

.news-flash-hot {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.news-flash-time {
    color: #999;
    font-size: 12px;
}

/* 平台来源标识（右上角） */
.news-flash-platform-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 153, 255, 0.1);
    color: #0099FF;
    padding: 4px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(0, 153, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .news-flash-card {
        padding: 16px;
        border-radius: 8px;
    }
    
    .news-flash-title {
        font-size: 15px;
    }
    
    .news-flash-desc {
        font-size: 13px;
        padding-left: 0;
    }
    
    .news-flash-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .news-flash-index {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .news-flash-card {
        background: #1a1a1a;
        border-color: #333;
        color: #e1e1e1;
    }
    
    .news-flash-title,
    .news-flash-title a {
        color: #e1e1e1;
    }
    
    .news-flash-title a:hover {
        color: #8b9cff;
    }
    
    .news-flash-desc {
        color: #aaa;
    }
    
    .news-flash-meta {
        border-top-color: #333;
    }
    
    .news-flash-platform {
        color: #aaa;
    }
}

/* SEO 优化：结构化数据样式 */
.news-flash-card[itemscope] {
    /* 使用 Schema.org 的 NewsArticle 类型 */
}

/* 打印样式 */
@media print {
    .news-flash-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .news-flash-card:hover {
        transform: none;
    }
}