/* News Grok - Clean RSS-style aesthetic */

:root {
    --bg-color: #fafafa;
    --text-color: #333;
    --text-muted: #666;
    --link-color: #0066cc;
    --link-hover: #004499;
    --border-color: #ddd;
    --accent-color: #1a1a2e;
    --card-bg: #fff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

#refresh-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

#refresh-btn:hover:not(:disabled) {
    background-color: #2d2d4a;
}

#refresh-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

main {
    min-height: 400px;
}

.news-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.2s;
}

.news-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.headline {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

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

.headline a:hover {
    color: var(--link-color);
}

.snippet {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.source {
    font-weight: 500;
}

.source::before {
    content: "\2022 ";
    color: var(--accent-color);
}

.timestamp {
    color: #888;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state p {
    margin-bottom: 10px;
}

.topics-list {
    margin-top: 30px;
    text-align: left;
    display: inline-block;
}

.topics-list ul {
    list-style: none;
    margin-top: 10px;
}

.topics-list li {
    padding: 5px 0;
    font-size: 0.9rem;
}

.topics-list li::before {
    content: "\2022 ";
    color: var(--accent-color);
    margin-right: 8px;
}

.error {
    text-align: center;
    padding: 40px 20px;
    color: #c53030;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 4px;
}

footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer a {
    color: var(--link-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .news-item {
        padding: 15px;
    }

    .headline {
        font-size: 1.05rem;
    }

    .meta {
        flex-direction: column;
        gap: 5px;
    }
}
