.eagent-news-wrap {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.eagent-news-scroll-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 12px;
}

.eagent-news-scroll-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #f0a030;
    background: #fff;
    color: #e65100;
    border-radius: 4px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.eagent-news-scroll-btn:hover {
    background: #fff8e1;
}

.eagent-news-track-wrap {
    overflow: hidden;
    width: 100%;
}

.eagent-news-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 12px;
    scrollbar-width: thin;
}

.eagent-news-track::-webkit-scrollbar {
    height: 6px;
}

.eagent-news-track::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.eagent-news-card {
    flex: 0 0 220px;
    max-width: 220px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.eagent-news-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.eagent-news-card-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    background: #8a8a8c;
}

.eagent-news-card-body {
    padding: 12px;
}

.eagent-news-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.eagent-news-card-meta {
    font-size: 11px;
    color: #1976d2;
}

.eagent-news-loading,
.eagent-news-error,
.eagent-news-empty {
    padding: 24px 12px;
    text-align: center;
    color: #666;
    width: 100%;
}

.eagent-news-list-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.eagent-news-list-lead {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 20px;
}

.eagent-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.eagent-news-list-page .eagent-news-card {
    flex: none;
    max-width: none;
    width: 100%;
}

.eagent-news-load-more-wrap {
    text-align: center;
    margin: 28px 0 12px;
}

/* Detail page */
body.eagent-news-detail-page {
    margin: 0;
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
}

.eagent-news-detail-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.eagent-news-detail-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.eagent-news-detail-img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
    background: #8a8a8c;
}

.eagent-news-detail-body {
    padding: 20px;
}

.eagent-news-detail-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 10px;
}

.eagent-news-detail-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 16px;
}

.eagent-news-detail-source {
    color: #1976d2;
    font-weight: 600;
}

.eagent-news-detail-content {
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
}

.eagent-news-detail-actions {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.eagent-news-detail-back {
    display: inline-block;
    margin-bottom: 16px;
    color: #1976d2;
    text-decoration: none;
}

.eagent-news-detail-back:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .eagent-news-card {
        flex-basis: 180px;
        max-width: 180px;
    }

    .eagent-news-card-img {
        height: 110px;
    }

    .eagent-news-grid {
        grid-template-columns: 1fr;
    }
}
