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

body {
    background-color: #faf9f6;
    color: #2a2a2a;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Header Styling */
.site-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #2a2a2a;
}

.header-content {
    margin-bottom: 25px;
}

.site-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 5px;
}

.site-tagline {
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
}

.view-toggle {
    display: flex;
    gap: 0;
    border: 2px solid #2a2a2a;
    width: fit-content;
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    background: white;
    color: #2a2a2a;
    font-weight: 600;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    border-right: 2px solid #2a2a2a;
}

.nav-btn:last-child {
    border-right: none;
}

.nav-btn.active {
    background: #2a2a2a;
    color: white;
}

.nav-btn:hover:not(.active) {
    background: #f0f0f0;
}

/* Search Section */
.search-box {
    background: white;
    border: 2px solid #2a2a2a;
    padding: 25px;
    margin-bottom: 30px;
}

.search-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
select {
    padding: 12px;
    border: 2px solid #2a2a2a;
    background: white;
    font-family: Georgia, serif;
    font-size: 1rem;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(42, 42, 42, 0.1);
}

.search-btn {
    padding: 12px 20px;
    background: #2a2a2a;
    color: white;
    border: 2px solid #2a2a2a;
    font-weight: bold;
    cursor: pointer;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 25px;
}

.search-btn:hover {
    background: #1a1a1a;
}

.search-btn:active {
    transform: scale(0.98);
}

/* Error Message */
.error-message {
    display: none;
    background: #ffe6e6;
    border: 2px solid #cc0000;
    padding: 15px;
    margin-bottom: 20px;
    color: #cc0000;
    font-weight: bold;
}

.error-message.show {
    display: block;
}

/* News Feed */
.news-feed {
    min-height: 200px;
}

.article-card {
    padding: 25px 0;
    border-bottom: 1px solid #ddd;
}

.article-card:hover {
    background: rgba(0, 0, 0, 0.015);
}

.article-layout {
    display: flex;
    gap: 25px;
}

.article-image {
    width: 280px;
    height: 180px;
    flex-shrink: 0;
    border: 1px solid #ddd;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
}

.article-image img:hover {
    filter: grayscale(0%);
}

.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.source-tag {
    background: #2a2a2a;
    color: white;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date {
    font-size: 0.8rem;
    color: #888;
    font-family: Arial, sans-serif;
}

.article-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

.article-title a {
    color: #2a2a2a;
    text-decoration: none;
}

.article-title a:hover {
    text-decoration: underline;
}

.article-description {
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1;
}

.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-link {
    color: #2a2a2a;
    text-decoration: underline;
    font-weight: 600;
    font-size: 0.9rem;
}

.save-btn {
    padding: 8px 16px;
    border: 2px solid #2a2a2a;
    background: white;
    color: #2a2a2a;
    cursor: pointer;
    font-weight: bold;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.save-btn.saved {
    background: #2a2a2a;
    color: white;
}

.save-btn:hover:not(.saved) {
    background: #f5f5f5;
}

/* Saved View */
.saved-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.saved-header h2 {
    font-size: 2rem;
    font-style: italic;
}

.clear-btn {
    background: none;
    border: none;
    color: #cc0000;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.clear-btn:hover {
    color: #990000;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-style: italic;
}

/* Footer */
.site-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #888;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.github-link {
    color: #2a2a2a;
    display: inline-flex;
    align-items: center;
}

.github-link:hover {
    color: #000;
}

/* Utility Classes */
.hidden {
    display: none;
}

.view-container {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2a2a2a;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-title {
        font-size: 2.5rem;
    }
    
    .search-grid {
        grid-template-columns: 1fr;
    }
    
    .search-btn {
        margin-top: 0;
    }
    
    .article-layout {
        flex-direction: column;
    }
    
    .article-image {
        width: 100%;
        height: 200px;
    }
    
    .view-toggle {
        width: 100%;
    }
    
    .nav-btn {
        flex: 1;
    }
}