* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #1e293b;
    line-height: 1.5;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.header {
    background-color: #0f172a;
    color: #ffffff;
    padding: 24px 0;
    border-bottom: 3px solid #2563eb;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.subtitle {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-refresh {
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-refresh:hover {
    background-color: #1d4ed8;
}

.last-updated {
    font-size: 0.8rem;
    color: #94a3b8;
}

.last-updated.status-error {
    color: #fca5a5;
}

.btn-refresh:disabled {
    opacity: 0.7;
    cursor: wait;
}

.feed-empty {
    background: #fff;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #64748b;
    line-height: 1.6;
}

.feed-empty code {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Ticker Bar */
.ticker-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.ticker-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ticker-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticker-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 4px 0 2px 0;
}

.ticker-change {
    font-size: 0.8rem;
    font-weight: 600;
}

.ticker-change.up { color: #16a34a; }
.ticker-change.down { color: #dc2626; }
.ticker-change.neutral { color: #64748b; }

/* Controls */
.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.tab-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.search-box input {
    padding: 7px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    width: 250px;
    outline: none;
}

.search-box input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

/* News Feed */
.feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.news-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}

.news-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.07);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.tag-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.tag-stocks { background: #e0e7ff; color: #3730a3; }
.tag-bonds { background: #fef3c7; color: #92400e; }
.tag-macro { background: #dcfce7; color: #166534; }

.source-name {
    color: #64748b;
    font-weight: 500;
}

.time-stamp {
    color: #94a3b8;
    margin-left: auto;
}

.news-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.news-title a {
    color: #0f172a;
    text-decoration: none;
}

.news-title a:hover {
    color: #2563eb;
}

.news-desc {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.45;
}

.news-tickers {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.ticker-pill {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 20px 0;
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: auto;
}
