.predictiva-news-container {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Header Styles */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: #2c3e50;
    margin: 0;
}

.header-icon {
    width: 32px;
    height: 32px;
}

.header-controls {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Search Container */
.search-container {
    position: relative;
    width: 280px;
}

.search-container input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid #dce0e3;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Category Filter */
.category-filter select {
    padding: 10px 16px;
    border: 1px solid #dce0e3;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-filter select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Refresh Button */
.refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.refresh-btn:active {
    transform: translateY(0);
}

/* Layout Styles */
.news-content {
    min-height: 400px;
}

.card-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

.list-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.compact-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* News Item Styles */
.news-item {
    background: white;
    border: 1px solid #ecf0f1;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.news-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.news-item:hover::before {
    transform: scaleY(1);
}

.news-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* Category Badges */
.news-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-market-analysis { background: #e8f4fd; color: #2980b9; }
.category-economic-indicators { background: #fff3cd; color: #856404; }
.category-corporate-news { background: #d4edda; color: #155724; }
.category-technology-trends { background: #f8d7da; color: #721c24; }
.category-regulatory-updates { background: #e2e3e5; color: #383d41; }
.category-commodity-prices { background: #d1ecf1; color: #0c5460; }
.category-currency-markets { background: #e7e8ea; color: #495057; }
.category-investment-insights { background: #f5e6ff; color: #6f42c1; }

/* Relevance Score */
.relevance-score {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #f39c12;
    font-weight: 600;
}

/* Title and Summary */
.news-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-summary {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta Information */
.news-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.news-source,
.news-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #7f8c8d;
}

/* Action Buttons */
.news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.source-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.source-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* No Articles State */
.no-articles {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.no-articles p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 16px 0 8px 0;
}

.no-articles-hint {
    font-size: 14px !important;
    color: #95a5a6 !important;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #3498db;
    border-radius: 6px;
    color: #3498db;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #3498db;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #dce0e3;
    color: #95a5a6;
}

.page-info {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

/* Modal Styles */
.article-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.article-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 80%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 16px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid #ecf0f1;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding-right: 20px;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 160px);
    overflow-y: auto;
}

.modal-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-category {
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: #e8f4fd;
    color: #2980b9;
}

.modal-source,
.modal-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #7f8c8d;
}

.modal-article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #2c3e50;
}

.modal-article-content p {
    margin-bottom: 16px;
}

.modal-footer {
    padding: 20px 24px;
    background: #f8f9fa;
    border-top: 1px solid #ecf0f1;
}

.modal-source-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-source-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .card-layout {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
    
    .modal-content {
        width: 90%;
    }
}

@media (max-width: 768px) {
    .news-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-container {
        width: 100%;
    }
    
    .card-layout {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        border-radius: 12px;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .news-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .read-more-btn,
    .source-link {
        width: 100%;
        justify-content: center;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .predictiva-news-container {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .news-item {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    .news-title {
        color: #ffffff;
    }
    
    .news-summary {
        color: #b0b0b0;
    }
    
    .modal-content {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    .modal-header {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
        border-bottom-color: #3a3a3a;
    }
}