/* Markets News - Dark Finance Theme */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2128;
    --bg-hover: #252c35;
    --border: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #656d76;
    --green: #00d68f;
    --green-dark: #00a86b;
    --green-glow: rgba(0, 214, 143, 0.15);
    --gold: #f0b429;
    --gold-dark: #c99a2e;
    --red: #f85149;
    --blue: #58a6ff;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--gold);
}

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

/* ====== NAVBAR ====== */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary) !important;
}

.logo-icon {
    font-size: 1.5rem;
}

.accent {
    color: var(--green);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-links a.active {
    color: var(--green);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}

/* ====== MAIN CONTENT ====== */
.main-content {
    padding: 1.5rem 1rem;
    min-height: calc(100vh - 200px);
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* ====== ARTICLE CARDS ====== */
.articles-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: all 0.2s;
}

.article-card:hover {
    border-color: var(--green);
    box-shadow: 0 0 20px var(--green-glow);
    transform: translateY(-1px);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.source-badge {
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-tag {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.cat-markets { background: rgba(0, 214, 143, 0.15); color: var(--green); }
.cat-earnings { background: rgba(240, 180, 41, 0.15); color: var(--gold); }
.cat-economy { background: rgba(88, 166, 255, 0.15); color: var(--blue); }
.cat-commodities { background: rgba(248, 81, 73, 0.15); color: var(--red); }
.cat-options { background: rgba(188, 140, 255, 0.15); color: #bc8cff; }
.cat-general { background: rgba(139, 148, 158, 0.15); color: var(--text-secondary); }

.time-ago {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: auto;
}

.article-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.article-title a {
    color: var(--text-primary);
}

.article-title a:hover {
    color: var(--green);
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.article-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green);
}

.source-link {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.source-link:hover {
    color: var(--text-secondary);
}

/* ====== ARTICLE DETAIL ====== */
.breadcrumb {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.article-detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.article-image {
    margin: 1.5rem 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.article-body p {
    margin-bottom: 1rem;
}

.article-body a {
    color: var(--green);
}

.btn-source {
    display: inline-block;
    background: var(--green);
    color: var(--bg-primary) !important;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-source:hover {
    background: var(--gold);
    color: var(--bg-primary) !important;
}

/* ====== SIDEBAR ====== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 80px;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.widget-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--green);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.category-list,
.source-list {
    list-style: none;
}

.category-list li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.category-list li a:hover,
.category-list li.active a {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.source-list li {
    padding: 0.4rem 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ====== AD SLOTS ====== */
.ad-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.ad-banner {
    min-height: 90px;
}

.ad-sidebar {
    min-height: 250px;
}

.ad-inline {
    min-height: 90px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* ====== EMPTY STATE ====== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* ====== FOOTER ====== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ====== TICKER BAR (decorative) ====== */
@keyframes pulse-green {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

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

    .sidebar {
        position: static;
    }

    .article-detail-title {
        font-size: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .article-card {
        padding: 1rem;
    }

    .article-title {
        font-size: 1rem;
    }

    .time-ago {
        margin-left: 0;
        width: 100%;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
