/* style.css (Light Theme - Rewritten) */

:root {
    --bg-color: #f4f6f8; /* A light grey background */
    --panel-bg: #ffffff; /* White panels */
    --border-color: #e5e7eb; /* Softer border color */
    --text-color: #1f2937; /* Dark grey for primary text */
    --text-secondary: #6b7280; /* Medium grey for secondary text */
    --accent-color: #3b82f6; /* A nice blue for accents */
    --red: #ef4444;
    --orange: #f97316;
    --yellow: #eab308;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

header, footer {
    flex-shrink: 0;
    padding: 12px 24px;
    background-color: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1em;
    font-weight: 600;
}

footer {
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    font-size: 0.8em;
    text-align: center;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--accent-color);
}

.main-container {
    display: flex;
    flex-grow: 1;
    height: calc(100% - 100px);
    background-color: var(--panel-bg);
}

.news-list-panel, .news-detail-panel {
    overflow-y: auto;
    padding: 20px;
}

.news-list-panel {
    width: 35%;
    min-width: 320px;
    max-width: 480px;
    border-right: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.news-detail-panel {
    flex-grow: 1;
}

.news-item {
    padding: 15px;
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.news-item.active {
    background-color: #ebf4ff;
    border-color: var(--accent-color);
}

.news-item-title {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.news-item-meta {
    font-size: 0.8em;
    color: var(--text-secondary);
}

.tag {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: 700;
    color: #fff; /* White text for better contrast on colored backgrounds */
    white-space: nowrap;
}

.tag-High { background-color: var(--red); }
.tag-Medium-High { background-color: var(--orange); }
.tag-Medium { background-color: var(--yellow); color: #1f2937; }
.tag-Medium-Low, .tag-Low { background-color: #9ca3af; }

.detail-header h2 {
    margin-top: 0;
    font-size: 1.8em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.detail-meta a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 1.1em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.detail-section-content {
    background-color: #f9fafb; /* Slightly off-white background for content blocks */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    line-height: 1.7;
    white-space: pre-wrap; /* Preserve line breaks from the data */
}

.stock-card {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 18px;
    margin-top: 15px;
}

.stock-card-header {
    font-size: 1.15em;
    font-weight: 600;
    margin-bottom: 12px;
}

.stock-card p {
    margin: 8px 0;
}

.stock-card .sentiment-good {
    color: #16a34a; /* A darker green for better readability */
    font-weight: 600;
}
.stock-card .sentiment-bad {
    color: #dc2626; /* A darker red */
    font-weight: 600;
}

.status-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 1.1em;
}