/* Stiri Aggregator - Clean, neutral design */
:root {
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-muted: #6c757d;
    --primary: #1a73e8;
    --primary-hover: #1557b0;
    --border: #e0e0e0;
    --accent: #e8f0fe;
    --radius: 8px;
    --max-width: 720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 24px 0 20px;
    margin-bottom: 24px;
}

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

.header-inner h1 a {
    color: var(--text);
    text-decoration: none;
}

.header-inner h1 a:hover {
    color: var(--primary);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Story Cards */
.stories-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.story-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: box-shadow 0.15s ease;
}

.story-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.story-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.story-title a {
    color: var(--text);
    text-decoration: none;
}

.story-title a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.story-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.meta-separator {
    margin: 0 6px;
}

.story-summary {
    font-size: 0.925rem;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.6;
}

/* Source links */
.story-sources ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.story-sources li {
    display: inline;
}

.source-link, .story-sources a {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--accent);
    color: var(--primary);
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s;
}

.source-link:hover, .story-sources a:hover {
    background: #d0e2ff;
    color: var(--primary-hover);
}

.source-article-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 4px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 32px 0;
}

.page-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.page-link:hover {
    text-decoration: underline;
}

.page-info {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Single story full view */
.story-full {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
}

.story-full .story-title {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.story-full .story-summary {
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.story-full .story-sources h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.story-full .story-sources ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.story-full .story-sources li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    margin-top: 32px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

footer a {
    color: var(--text-muted);
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 600px) {
    .story-card { padding: 16px; }
    .story-full { padding: 20px; }
    .header-inner h1 { font-size: 1.25rem; }
    .pagination { flex-direction: column; gap: 8px; }
}
