/* 币圈新闻美化样式 - 设计师优化版本 */

/* 新闻区域整体优化 */
.crypto-news-section {
    padding: 20px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    margin-bottom: 20px;
}

/* 新闻卡片设计升级 */
.crypto-news-item {
    margin-bottom: 18px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 140px; /* 固定高度确保视觉统一 */
    display: flex;
    flex-direction: column;
}

/* 悬浮效果优化 */
.crypto-news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
    border-color: #007bff;
}

/* 添加精美的左侧装饰条 */
.crypto-news-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.crypto-news-item:hover::before {
    opacity: 1;
}

/* 新闻行布局优化 */
.crypto-news-item .news-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1; /* 占用剩余空间 */
    min-height: 0; /* 允许收缩 */
}

/* 缩略图区域美化 */
.crypto-news-item .news-thumb {
    flex-shrink: 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.crypto-news-item:hover .news-thumb {
    transform: scale(1.05);
}

.crypto-news-item .news-thumb img {
    width: 64px !important;
    height: 44px !important;
    object-fit: cover;
    border-radius: 8px;
    transition: filter 0.3s ease;
}

.crypto-news-item:hover .news-thumb img {
    filter: brightness(1.1);
}

/* 内容区域优化 */
.crypto-news-item .news-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* 占满容器高度 */
}

/* 新闻摘要样式 */
.crypto-news-item .news-summary {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 最多显示2行 */
    -webkit-box-orient: vertical;
    flex: 1; /* 占用剩余空间 */
}

/* 元信息区域美化 */
.crypto-news-item .news-meta {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 分类标签重新设计 */
.crypto-news-item .category-tag {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
    transition: transform 0.2s ease;
}

.crypto-news-item:hover .category-tag {
    transform: scale(1.05);
}

/* 推荐标签美化 */
.crypto-news-item .top-tag {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 2px 4px rgba(255, 107, 107, 0.2); }
    50% { box-shadow: 0 4px 8px rgba(255, 107, 107, 0.4); }
    100% { box-shadow: 0 2px 4px rgba(255, 107, 107, 0.2); }
}

/* 标题样式优化 */
.crypto-news-item .news-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
    color: #212529;
    flex-shrink: 0; /* 不收缩 */
    height: 39px; /* 固定高度容纳最多2行标题 (15px * 1.3 * 2) */
    display: flex;
    align-items: flex-start;
}

.crypto-news-item .news-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 标题最多2行 */
    -webkit-box-orient: vertical;
}

.crypto-news-item .news-title a:hover {
    color: #007bff;
    text-decoration: none;
}

/* 信息行美化 */
.crypto-news-item .news-info {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto; /* 推到底部 */
    flex-shrink: 0; /* 不收缩 */
    padding-top: 8px;
}

.crypto-news-item .news-info .time {
    color: #007bff;
    font-weight: 500;
}

/* 分隔符美化 */
.crypto-news-item .news-info span:not(:last-child):after {
    content: '•';
    margin-left: 8px;
    color: #dee2e6;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .crypto-news-section {
        padding: 15px 10px;
        margin-bottom: 15px;
    }
    
    .crypto-news-item {
        margin-bottom: 15px;
        padding: 14px;
        border-radius: 10px;
        height: 120px; /* 移动端固定高度 */
    }
    
    .crypto-news-item .news-row {
        gap: 12px;
    }
    
    .crypto-news-item .news-thumb img {
        width: 56px !important;
        height: 38px !important;
    }
    
    .crypto-news-item .news-title {
        font-size: 14px;
        margin-bottom: 6px;
        height: 36px; /* 移动端标题固定高度 (14px * 1.3 * 2) */
    }
    
    .crypto-news-item .news-summary {
        font-size: 12px;
        margin: 6px 0;
        -webkit-line-clamp: 2; /* 移动端也保持2行摘要 */
    }
    
    .crypto-news-item .news-info {
        font-size: 11px;
        gap: 6px;
        padding-top: 6px;
    }
}

/* 加载动画 */
.crypto-news-item {
    animation: fadeInUp 0.6s ease-out;
}

.crypto-news-item:nth-child(2) { animation-delay: 0.1s; }
.crypto-news-item:nth-child(3) { animation-delay: 0.2s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 区域标题优化 */
.u-title1 {
    position: relative;
    margin-bottom: 20px;
}

.u-title1 p label {
    position: relative;
    font-size: 18px;
    font-weight: 700;
    color: #212529;
}

.u-title1 p label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 30px;
    height: 3px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 2px;
}

/* 查看更多按钮优化 */
.u-more1 {
    font-size: 13px;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.u-more1:hover {
    color: #0056b3;
    text-decoration: none;
}

.u-more1::after {
    content: '→';
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.u-more1:hover::after {
    transform: translateX(3px);
}

/* 空状态优化 */
.no-news {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 14px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.no-news i {
    font-size: 32px;
    margin-bottom: 10px;
    color: #adb5bd;
}
