/* ============================================
   News Module - Enhanced with Images & Articles
   ============================================ */

.news-module {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000000;
    overflow: hidden;
}

/* Header */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(180deg, #0a0a0a 0%, #000000 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.news-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-main-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.news-main-title i {
    color: #F39C12;
}

.news-subtitle {
    font-size: 12px;
    color: #666;
}

.news-badge {
    padding: 3px 8px;
    background: rgba(243, 156, 18, 0.15);
    color: #F39C12;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
}

.news-header-controls {
    display: flex;
    gap: 8px;
}

.news-header-controls select {
    padding: 8px 30px 8px 12px;
    background: rgba(255, 255, 255, 0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 6px center;
    background-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    appearance: none;
    outline: none;
}

.news-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.news-btn:hover {
    background: rgba(243, 156, 18, 0.1);
    border-color: rgba(243, 156, 18, 0.3);
    color: #F39C12;
}

/* Content Layout */
.news-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.news-list {
    width: 420px;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-detail {
    flex: 1;
    overflow-y: auto;
    background: #000000;
}

/* News Card */
.news-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.news-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.news-card.active {
    border-color: rgba(243, 156, 18, 0.4);
    background: rgba(243, 156, 18, 0.05);
}

.news-card.high {
    border-left: 3px solid #ef4444;
}

.news-card.medium {
    border-left: 3px solid #22c55e;
}

.news-card.low {
    border-left: 3px solid #eab308;
}

.news-card-image {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-currency {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #F39C12;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.news-card-content {
    padding: 14px;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.news-source {
    font-size: 11px;
    font-weight: 600;
    color: #F39C12;
}

.news-time {
    font-size: 11px;
    color: #666;
}

.impact-badge {
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
}

.impact-badge.high {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.impact-badge.medium {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.impact-badge.low {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.news-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-summary {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.news-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.news-tag {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    font-size: 10px;
    border-radius: 3px;
}

/* Article Detail */
.news-detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #444;
}

.news-detail-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.news-detail-placeholder p {
    font-size: 14px;
}

.article-detail {
    position: relative;
    padding-bottom: 40px;
}

.article-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.article-close:hover {
    background: rgba(239, 68, 68, 0.8);
}

.article-hero {
    height: 250px;
    overflow: hidden;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    padding: 24px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.article-source,
.article-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #888;
}

.article-source i,
.article-time i {
    color: #F39C12;
}

.article-currency {
    padding: 4px 10px;
    background: rgba(243, 156, 18, 0.15);
    color: #F39C12;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.article-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 24px;
}

.article-content {
    color: #C0C4CF;
    font-size: 15px;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 16px;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 24px 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.article-tag {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.article-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.article-action-btn:hover {
    background: rgba(243, 156, 18, 0.1);
    border-color: rgba(243, 156, 18, 0.3);
    color: #F39C12;
}

/* Responsive */
@media (max-width: 1200px) {
    .news-list {
        width: 350px;
    }
}

@media (max-width: 900px) {
    .news-content {
        flex-direction: column;
    }
    
    .news-list {
        width: 100%;
        max-height: 50%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    
    .news-card-image {
        height: 80px;
    }
}

@media (max-width: 600px) {
    .news-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .news-header-controls {
        width: 100%;
        justify-content: space-between;
    }
}
