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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 14px;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-card .value {
    font-size: 32px;
    font-weight: bold;
    color: #2563eb;
}

/* Filters */
.filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.filter-group label {
    font-weight: 500;
}

select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
    cursor: pointer;
}

.btn, .btn-secondary {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn {
    background: #2563eb;
    color: white;
}

.btn:hover:not(:disabled) {
    background: #1d4ed8;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f3f4f6;
    color: #333;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Posts */
.posts {
    display: grid;
    gap: 15px;
}

.post-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 10px;
}

.post-source {
    display: inline-block;
    padding: 4px 12px;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.post-date {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.post-summary {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
    color: #444;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.post-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

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

.post-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    padding: 3px 8px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 11px;
    color: #666;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
}

.page-info {
    font-weight: 500;
    color: #666;
}

/* No posts */
.no-posts {
    background: white;
    padding: 60px 20px;
    border-radius: 8px;
    text-align: center;
    color: #666;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Error page */
.error-page {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.error-page h2 {
    color: #dc2626;
    margin-bottom: 20px;
}

.error-page pre {
    background: #f3f4f6;
    padding: 15px;
    border-radius: 6px;
    text-align: left;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 12px;
}

.error-page .btn {
    margin-top: 20px;
}
