/*
Theme Name: Neon News - Dark Mode (Blindspot Style)
Version: 3.0
Description: Dark theme with political bias and sentiment indicators
*/

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ============================================================================
   CSS VARIABLES - DARK THEME DESIGN SYSTEM
   ============================================================================ */

:root {
    /* Dark Theme Colors */
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --accent-color: #e0e0e0;
    --border-color: #333333;

    /* Political Bias Colors */
    --bias-left: #4285f4;
    --bias-center: #9e9e9e;
    --bias-right: #ea4335;

    /* Sentiment Colors */
    --sentiment-positive: #34a853;
    --sentiment-neutral: #fbbc04;
    --sentiment-negative: #ea4335;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* ============================================================================
   LAYOUT CONTAINERS
   ============================================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-main {
    width: 100%;
    min-height: 100vh;
    padding-top: 20px;
}

/* ============================================================================
   STICKY HEADER
   ============================================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 24px;
    font-weight: 900;
    color: var(--text-main);
    margin: 0;
}

.site-title a {
    color: inherit;
}

.header-search {
    display: flex;
    align-items: center;
}

.search-icon {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-main);
    transition: transform 0.2s;
}

.search-icon:hover {
    transform: scale(1.1);
}

/* Category Bar */
.category-bar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.category-list {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-item {
    flex-shrink: 0;
}

.category-link {
    display: block;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-link:hover {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

.category-link.active {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

/* ============================================================================
   ARTICLE GRID
   ============================================================================ */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding: 20px 0;
}

/* ============================================================================
   ARTICLE CARDS
   ============================================================================ */

.article-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #444;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.source-badge {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-main);
    font-weight: 500;
}

.source-icon {
    width: 20px;
    height: 20px;
    background-color: #333;
    border-radius: 50%;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.card-image {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    background: #333;
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: var(--text-main);
}

.card-title a {
    color: inherit;
    pointer-events: none;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ============================================================================
   BIAS BAR
   ============================================================================ */

.bias-bar-container {
    margin: 12px 0;
}

.bias-bar-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bias-bar {
    height: 6px;
    background: linear-gradient(to right, var(--bias-left) 0%, var(--bias-center) 50%, var(--bias-right) 100%);
    border-radius: 3px;
    position: relative;
}

.bias-indicator {
    position: absolute;
    top: -3px;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid var(--card-bg);
    border-radius: 50%;
    transform: translateX(-50%);
}

.bias-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
    text-align: center;
}

/* ============================================================================
   SENTIMENT INDICATOR
   ============================================================================ */

.sentiment-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.sentiment-indicator.positive {
    background-color: rgba(52, 168, 83, 0.2);
    color: var(--sentiment-positive);
}

.sentiment-indicator.neutral {
    background-color: rgba(251, 188, 4, 0.2);
    color: var(--sentiment-neutral);
}

.sentiment-indicator.negative {
    background-color: rgba(234, 67, 53, 0.2);
    color: var(--sentiment-negative);
}

/* ============================================================================
   EXPANDABLE CONTENT
   ============================================================================ */

.article-content-expanded {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.read-more-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--text-muted);
    padding-bottom: 2px;
    transition: opacity 0.2s;
}

.read-more-link:hover {
    opacity: 0.8;
}

/* ============================================================================
   SINGLE POST PAGE
   ============================================================================ */

.archive-header-wrapper {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 30px 0;
    margin-bottom: 30px;
}

.page-header {
    margin-bottom: 20px;
}

.page-title,
.entry-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 15px;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-box {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content ol,
.entry-content ul {
    margin: 20px 0;
    padding-left: 30px;
}

.entry-content li {
    margin-bottom: 12px;
}

.entry-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ============================================================================
   TAGS AND CATEGORIES
   ============================================================================ */

.meta-item.category-meta,
.meta-item.tags-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.meta-item.category-meta a,
.meta-item.tags-meta a {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.85rem;
    transition: all 0.2s;
    text-decoration: none;
}

.meta-item.category-meta a:hover,
.meta-item.tags-meta a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #555;
    transform: translateY(-1px);
}

/* ============================================================================
   MOBILE BOTTOM BAR
   ============================================================================ */

.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: block;
    }

    body {
        padding-bottom: 70px;
    }
}

.bottom-bar-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
}

.bottom-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    min-width: 60px;
}

.bottom-bar-item:hover {
    color: var(--text-main);
}

.bottom-bar-item.active {
    color: var(--text-main);
}

.bottom-bar-icon {
    font-size: 20px;
}

/* ============================================================================
   PAGINATION
   ============================================================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.page-numbers {
    padding: 8px 12px;
    color: var(--text-muted);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.page-numbers:hover {
    color: var(--text-main);
    border-color: #444;
}

.page-numbers.current {
    background-color: #333;
    color: var(--text-main);
    border-color: #444;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .page-title,
    .entry-title {
        font-size: 1.5rem;
    }

    .article-box {
        padding: 20px;
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--bg-color);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}