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

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

.news-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Back Button */
.back-btn {
    display: inline-block;
    color: #a0a0a0;
    text-decoration: none;
    font-size: 1em;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: #fff;
}

/* Header */
.news-header {
    text-align: center;
    margin-bottom: 40px;
}

.news-header h1 {
    font-size: 3em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.news-header .subtitle {
    color: #a0a0a0;
    font-size: 1.2em;
}

/* Filters Section */
.filters-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.category-tab {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ccc;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.category-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* Bias Filter */
.bias-filter {
    margin-bottom: 25px;
}

.bias-filter h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #ccc;
    text-align: center;
}

.bias-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.bias-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.bias-checkbox input {
    display: none;
}

.bias-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.bias-checkbox input:checked + .checkmark::after {
    content: '\2713';
    font-size: 12px;
    font-weight: bold;
}

/* Bias Colors */
.bias-checkbox.far-left, .bias-badge.far-left {
    background: rgba(0, 48, 143, 0.3);
    color: #4d94ff;
    border: 1px solid rgba(0, 48, 143, 0.5);
}

.bias-checkbox.left, .bias-badge.left {
    background: rgba(30, 100, 200, 0.3);
    color: #6db3f2;
    border: 1px solid rgba(30, 100, 200, 0.5);
}

.bias-checkbox.center-left, .bias-badge.center-left {
    background: rgba(100, 149, 237, 0.3);
    color: #87ceeb;
    border: 1px solid rgba(100, 149, 237, 0.5);
}

.bias-checkbox.center, .bias-badge.center {
    background: rgba(128, 128, 128, 0.3);
    color: #c0c0c0;
    border: 1px solid rgba(128, 128, 128, 0.5);
}

.bias-checkbox.center-right, .bias-badge.center-right {
    background: rgba(237, 149, 100, 0.3);
    color: #f4a460;
    border: 1px solid rgba(237, 149, 100, 0.5);
}

.bias-checkbox.right, .bias-badge.right {
    background: rgba(200, 80, 80, 0.3);
    color: #f28b82;
    border: 1px solid rgba(200, 80, 80, 0.5);
}

.bias-checkbox.far-right, .bias-badge.far-right {
    background: rgba(139, 0, 0, 0.3);
    color: #ff6b6b;
    border: 1px solid rgba(139, 0, 0, 0.5);
}

.bias-checkbox.entertainment, .bias-badge.entertainment {
    background: rgba(255, 105, 180, 0.3);
    color: #ff69b4;
    border: 1px solid rgba(255, 105, 180, 0.5);
}

.bias-checkbox.local, .bias-badge.local {
    background: rgba(34, 139, 34, 0.3);
    color: #90ee90;
    border: 1px solid rgba(34, 139, 34, 0.5);
}

/* Special category tab styles */
.category-tab.nova-tab {
    border: 1px solid rgba(34, 139, 34, 0.5);
}

.category-tab.nova-tab.active {
    background: linear-gradient(135deg, #228b22 0%, #32cd32 100%);
}

.category-tab.culpeper-tab {
    border: 1px solid rgba(139, 69, 19, 0.5);
}

.category-tab.culpeper-tab.active {
    background: linear-gradient(135deg, #8b4513 0%, #d2691e 100%);
}

.category-tab.orioles-tab {
    border: 1px solid rgba(223, 70, 1, 0.5);
}

.category-tab.orioles-tab.active {
    background: linear-gradient(135deg, #df4601 0%, #000000 100%);
}

.category-tab.commanders-tab {
    border: 1px solid rgba(90, 20, 20, 0.5);
}

.category-tab.commanders-tab.active {
    background: linear-gradient(135deg, #5a1414 0%, #ffb612 100%);
}

.bias-checkbox.sports, .bias-badge.sports {
    background: rgba(223, 70, 1, 0.3);
    color: #ff8c42;
    border: 1px solid rgba(223, 70, 1, 0.5);
}

.bias-note {
    text-align: center;
    font-size: 0.85em;
    color: #888;
    margin-top: 15px;
}

.bias-note a {
    color: #667eea;
}

/* Source Filter */
.source-filter {
    margin-bottom: 20px;
}

.source-toggle {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ccc;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-family: inherit;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.source-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.toggle-icon {
    font-size: 1.5em;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.source-toggle.active .toggle-icon {
    transform: rotate(45deg);
}

.source-list {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 10px 10px;
    margin-top: -5px;
}

.source-list.active {
    display: flex;
}

.source-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.source-checkbox:hover {
    background: rgba(255, 255, 255, 0.2);
}

.source-checkbox input {
    display: none;
}

.source-checkbox .checkmark {
    width: 14px;
    height: 14px;
    border: 2px solid #888;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.source-checkbox input:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.source-checkbox input:checked + .checkmark::after {
    content: '\2713';
    font-size: 10px;
    color: #fff;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ccc;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-family: inherit;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading p {
    color: #a0a0a0;
}

/* Error State */
.error-state {
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
    color: #ff9999;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

/* News Card */
.news-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.news-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.news-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.news-source {
    font-size: 0.85em;
    color: #888;
    font-weight: 500;
}

.bias-badge {
    font-size: 0.75em;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.news-card-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-description {
    font-size: 0.9em;
    color: #a0a0a0;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.news-date {
    font-size: 0.8em;
    color: #666;
}

.read-more {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #8b9ff5;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.no-results h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #ccc;
}

/* Load More */
.load-more-container {
    text-align: center;
    padding: 40px 0;
}

.load-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    padding: 15px 40px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1em;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Footer */
.news-footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
    font-size: 0.9em;
}

.news-footer p {
    margin-bottom: 10px;
}

.news-footer .back-link {
    color: #667eea;
    text-decoration: none;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .news-header h1 {
        font-size: 2em;
    }

    .category-tabs {
        gap: 8px;
    }

    .category-tab {
        padding: 10px 16px;
        font-size: 0.9em;
    }

    .bias-checkboxes {
        gap: 8px;
    }

    .bias-checkbox {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .filters-section {
        padding: 20px 15px;
    }
}
