﻿@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Newsreader:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --bg-base: #0A0A0F;
    --bg-surface: #12121A;
    --bg-card: #282840;
    --bg-card-hover: #323250;
    --bg-elevated: #1E1E2A;
    --text-bright: #F0F0F5;
    --text-primary: #DCDCE5;
    --text-secondary: #9898A8;
    --text-muted: #5C5C70;
    --accent: #FF6B35;
    --accent-glow: rgba(255,107,53,0.15);
    --accent-hover: #FF8555;
    --cyan: #22D3EE;
    --green: #34D399;
    --red: #EF4444;
    --amber: #FBBF24;
    --border: rgba(255,255,255,0.14);
    --border-hover: rgba(255,255,255,0.25);
    --glass: rgba(18,18,26,0.88);
    --glass-border: rgba(255,255,255,0.08);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(255,107,53,0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --font-display: 'Manrope', system-ui, sans-serif;
    --font-body: 'Newsreader', Georgia, serif;
    --category-local: #34D399;
    --category-state: #FBBF24;
    --category-national: #60A5FA;
    --category-sports: #FB7185;
    --category-world: #A78BFA;
    --category-finance: #10B981;
    --breaking-bg: #DC2626;
    --transition: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
    --bg-base: #F5F5F0;
    --bg-surface: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8F8F5;
    --bg-elevated: #FFFFFF;
    --text-bright: #0A0A0F;
    --text-primary: #1A1A25;
    --text-secondary: #5C5C70;
    --text-muted: #9898A8;
    --border: rgba(0,0,0,0.08);
    --border-hover: rgba(0,0,0,0.15);
    --glass: rgba(255,255,255,0.92);
    --glass-border: rgba(0,0,0,0.06);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 30px rgba(255,107,53,0.05);
    --accent-glow: rgba(255,107,53,0.08);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font-display);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Subtle noise overlay ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.35;
}

/* ══════════════ HEADER ══════════════ */
.top-bar {
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 60px;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.logo-icon {
    background: var(--accent);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 0 20px rgba(255,107,53,0.3);
    transition: transform 0.3s var(--transition);
}

.logo:hover .logo-icon { transform: rotate(-8deg) scale(1.1); }

.logo-text {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.8px;
    color: var(--text-bright);
}

/* ── Nav tabs ── */
.category-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}
.category-tabs::-webkit-scrollbar { display: none; }

.tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 16px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-xs);
    white-space: nowrap;
    transition: all 0.25s var(--transition);
}
.tab:hover { color: var(--text-bright); background: rgba(255,255,255,0.05); }
.tab.active { background: var(--accent); color: white; box-shadow: 0 0 16px rgba(255,107,53,0.25); }

/* ── Finance dropdown ── */
.tab-group {
    position: relative;
    display: flex;
    align-items: center;
}

.tab-chevron {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 6px 6px 2px;
    font-size: 11px;
    cursor: pointer;
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    transition: color 0.2s;
    line-height: 1;
}
.tab-chevron:hover { color: var(--text-bright); }
.tab-group.open .tab-chevron { color: var(--accent); }
.tab-group.open > .tab,
.tab-group.finance-active > .tab { background: var(--accent); color: white; box-shadow: 0 0 16px rgba(255,107,53,0.25); }
.tab-group.open .tab-chevron { color: white; }

.tab-dropdown {
    display: none;
    position: fixed;
    min-width: 170px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 0;
    z-index: 2000;
    box-shadow: var(--shadow-md);
}
.tab-group.open .tab-dropdown { display: block; }

.tab-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.tab-dropdown a:hover { background: rgba(255,255,255,0.06); color: var(--text-bright); }
.tab-dropdown a.active { color: var(--accent); }
.tab-dropdown .dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Header actions ── */
.search-box { position: relative; }

.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    z-index: 2000;
    overflow: hidden;
    display: none;
    max-height: 480px;
    overflow-y: auto;
}
.search-dropdown.open { display: block; }
.sd-section-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 10px 14px 4px; }
.sd-divider { height: 1px; background: var(--border); margin: 4px 0; }
.sd-item { display: flex; align-items: center; gap: 8px; padding: 9px 14px; cursor: pointer; transition: background 0.1s; text-decoration: none; color: inherit; }
.sd-item:hover, .sd-item.focused { background: rgba(255,255,255,0.06); }
.sd-type { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 3px; white-space: nowrap; flex-shrink: 0; letter-spacing: 0.3px; }
.sd-type.equity { background: rgba(59,130,246,0.15); color: #60a5fa; }
.sd-type.etf    { background: rgba(245,158,11,0.15); color: #fbbf24; }
.sd-type.crypto { background: rgba(167,139,250,0.15); color: #a78bfa; }
.sd-type.index  { background: rgba(16,185,129,0.15); color: #10b981; }
.sd-type.forex  { background: rgba(34,211,238,0.15); color: #22d3ee; }
.sd-type.future { background: rgba(255,107,53,0.15); color: #ff6b35; }
.sd-type.fund   { background: rgba(132,204,22,0.15); color: #84cc16; }
.sd-type.other  { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.sd-sym  { font-weight: 800; font-size: 13px; color: var(--text-bright); min-width: 52px; flex-shrink: 0; }
.sd-name { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.sd-exch { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
.sd-news-icon { flex-shrink: 0; font-size: 14px; }
.sd-news-title { font-size: 12px; color: var(--text-primary); line-height: 1.4; flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sd-empty { padding: 14px; font-size: 12px; color: var(--text-muted); text-align: center; }
.sd-footer { padding: 8px 14px; font-size: 11px; color: var(--text-muted); border-top: 1px solid var(--border); text-align: center; cursor: pointer; }
.sd-footer:hover { color: var(--accent); }
@media (max-width: 600px) {
    .search-dropdown {
        position: fixed;
        left: 16px;
        right: 16px;
        width: auto;
        top: 60px;
        transform: none;
    }
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.search-box input {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-bright);
    padding: 8px 16px;
    border-radius: 24px;
    font-family: var(--font-display);
    font-size: 13px;
    width: 200px;
    outline: none;
    transition: all 0.4s var(--transition);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus {
    background: rgba(255,255,255,0.06);
    border-color: var(--accent);
    width: 280px;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-icon {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.btn-icon:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--border-hover);
    color: var(--text-bright);
}
.btn-icon.spinning svg { animation: spin 0.8s linear infinite; }

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

/* ══════════════ WEATHER ══════════════ */
.weather-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 20px 28px;
    margin-bottom: 28px;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    overflow: hidden;
}
.weather-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(34,211,238,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.weather-current { display: flex; align-items: center; gap: 16px; flex-shrink: 0; position: relative; z-index: 1; }
.weather-icon { font-size: 44px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }
.weather-temp { display: flex; align-items: flex-start; }
.temp-value { font-size: 48px; font-weight: 800; line-height: 1; letter-spacing: -2px; }
.temp-unit { font-size: 18px; font-weight: 500; margin-top: 6px; opacity: 0.7; }
.weather-details { display: flex; flex-direction: column; gap: 2px; }
.weather-condition { font-size: 15px; font-weight: 700; }
.weather-location { font-size: 12px; opacity: 0.6; font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }
.weather-extra { display: flex; gap: 16px; font-size: 12px; opacity: 0.7; font-weight: 500; }

.weather-forecast { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; position: relative; z-index: 1; }
.weather-forecast::-webkit-scrollbar { display: none; }
.forecast-day {
    text-align: center;
    min-width: 64px;
    padding: 10px 8px;
    border-radius: var(--radius-xs);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
}
.forecast-day:hover { background: rgba(255,255,255,0.1); }
.forecast-day .day-name { font-size: 11px; font-weight: 700; margin-bottom: 4px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.5px; }
.forecast-day .day-icon { font-size: 20px; margin: 4px 0; }
.forecast-day .day-temps { font-size: 13px; font-weight: 600; }
.forecast-day .day-lo { opacity: 0.4; }

/* ══════════════ LAYOUT ══════════════ */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* ══════════════ MARKET TICKERS ══════════════ */
.market-tickers { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; }

.ticker-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 38px;
}

.ticker-label {
    flex-shrink: 0;
    padding: 0 14px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-right: 1px solid var(--border);
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    min-width: 110px;
}

.ticker-label.indices    { color: var(--category-national); background: rgba(96,165,250,0.08); }
.ticker-label.commodities{ color: var(--category-finance);  background: rgba(16,185,129,0.08); }
.ticker-label.forex      { color: #22D3EE;                  background: rgba(34,211,238,0.08); }
.ticker-label.bonds      { color: var(--category-state);    background: rgba(251,191,36,0.08); }
.ticker-label.crypto     { color: #A78BFA;                  background: rgba(167,139,250,0.08); }
a.ticker-label { text-decoration: none; transition: opacity 0.2s; }
a.ticker-label:hover { opacity: 0.75; }

.ticker-track { flex: 1; overflow: hidden; position: relative; }

.ticker-inner {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    will-change: transform;
    animation: tickerScroll 40s linear infinite;
}

.ticker-bar:hover .ticker-inner { animation-play-state: paused; }

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px;
    font-size: 12px;
    font-weight: 600;
    border-right: 1px solid var(--border);
    height: 38px;
}

.ticker-name { color: var(--text-muted); font-weight: 600; }
.ticker-price { color: var(--text-bright); font-weight: 700; font-variant-numeric: tabular-nums; }
.ticker-change { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ticker-change.up   { color: var(--green); }
.ticker-change.down { color: var(--red); }
.ticker-change.flat { color: var(--text-muted); }

.ticker-loading {
    padding: 0 20px;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Ticker / breaking banner ── */
.breaking-ticker {
    background: var(--breaking-bg);
    color: white;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    animation: pulseGlow 2s infinite;
    overflow: hidden;
}
.breaking-ticker .label {
    background: white;
    color: var(--breaking-bg);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    flex-shrink: 0;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
    50% { box-shadow: 0 0 12px 2px rgba(220,38,38,0.2); }
}

/* ══════════════ HERO ══════════════ */
.hero-section { margin-bottom: 32px; }

.hero-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 380px;
    max-height: 480px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.4s var(--transition), box-shadow 0.4s var(--transition);
}
.hero-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: transform 0.6s var(--transition);
}
.hero-card:hover .hero-image { transform: scale(1.03); }

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 48px 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 380px;
    max-height: 480px;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    color: white;
}

.hero-badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; }

.hero-content h2 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.8px;
    max-width: 700px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hero-content p {
    font-family: var(--font-body);
    color: rgba(255,255,255,0.8);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: 600px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}
.hero-meta .card-source { color: var(--accent); font-weight: 600; text-decoration: none; }
.hero-meta .card-source:hover { text-decoration: underline; }

/* ══════════════ ARTICLE GRID ══════════════ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* ══════════════ AD TILE (matches article card size in grid) ══════════════ */
.ad-tile {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    min-height: 220px;
    display: flex;
    flex-direction: column;
}
.ad-tile .ad-bar {
    flex: 1;
    border-radius: 0;
    height: 100%;
    min-height: 220px;
}

/* ══════════════ ARTICLE CARD ══════════════ */
.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.35s var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    animation: cardReveal 0.5s var(--transition) both;
}
.article-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
    box-shadow: var(--shadow-glow);
}
.article-card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,107,53,0.15);
}
.article-card:hover::after { opacity: 1; }

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.articles-grid .article-card:nth-child(1) { animation-delay: 0s; }
.articles-grid .article-card:nth-child(2) { animation-delay: 0.05s; }
.articles-grid .article-card:nth-child(3) { animation-delay: 0.1s; }
.articles-grid .article-card:nth-child(4) { animation-delay: 0.15s; }
.articles-grid .article-card:nth-child(5) { animation-delay: 0.2s; }
.articles-grid .article-card:nth-child(6) { animation-delay: 0.25s; }
.articles-grid .article-card:nth-child(7) { animation-delay: 0.3s; }
.articles-grid .article-card:nth-child(8) { animation-delay: 0.35s; }

.card-image-wrapper { overflow: hidden; position: relative; }
.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s var(--transition);
    display: block;
}
.article-card:hover .card-image { transform: scale(1.05); }

.card-image-placeholder {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: rgba(255,255,255,0.3);
}
.card-image-placeholder.local    { background: linear-gradient(135deg, #059669, #10b981); }
.card-image-placeholder.state    { background: linear-gradient(135deg, #d97706, #fbbf24); }
.card-image-placeholder.national { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.card-image-placeholder.sports   { background: linear-gradient(135deg, #dc2626, #fb7185); }
.card-image-placeholder.world    { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.card-image-placeholder.finance  { background: linear-gradient(135deg, #047857, #10b981); }

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

.card-badges { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }

.badge {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.badge.local    { background: rgba(52,211,153,0.12);  color: var(--category-local); }
.badge.state    { background: rgba(251,191,36,0.12);  color: var(--category-state); }
.badge.national { background: rgba(96,165,250,0.12);  color: var(--category-national); }
.badge.sports   { background: rgba(251,113,133,0.12); color: var(--category-sports); }
.badge.world    { background: rgba(167,139,250,0.12); color: var(--category-world); }
.badge.finance  { background: rgba(16,185,129,0.12);  color: var(--category-finance); }
.badge.breaking { background: var(--breaking-bg); color: white; animation: pulseGlow 2s infinite; }
.badge.featured { background: rgba(255,107,53,0.12); color: var(--accent); }

.card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-bright);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.2px;
    transition: color 0.2s;
}
.article-card:hover .card-title { color: var(--accent); }

.card-summary {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-weight: 500;
}
.card-source { color: var(--text-secondary); font-weight: 600; text-decoration: none; }
.card-source:hover { color: var(--accent); text-decoration: underline; }

/* ══════════════ SECTION DIVIDERS ══════════════ */
.section-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 4px;
    margin-top: 8px;
}
.section-header h3 {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
}
.section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ══════════════ LOADING ══════════════ */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px;
    grid-column: 1 / -1;
}
.spinner {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.loading-spinner p { margin-top: 14px; color: var(--text-muted); font-size: 13px; font-weight: 500; }
.load-more-container { text-align: center; padding: 24px 0 40px; }
.scroll-spinner { display: flex; justify-content: center; padding: 24px 0; }

/* ══════════════ EMPTY STATE ══════════════ */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    grid-column: 1 / -1;
}
.empty-state h3 { font-size: 22px; font-weight: 700; color: var(--text-bright); margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 14px; }

/* ══════════════ FOOTER ══════════════ */
/* ── Video strip (live stream, injected every 9 article cards) ─────────────── */
.video-strip {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px 18px;
    margin: 4px 0;
    animation: cardReveal .4s var(--transition) both;
}
.video-strip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.video-strip-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
}
.video-strip-source {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-bright);
}
.video-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #fff;
    background: #e02020;
    border-radius: 4px;
    padding: 2px 7px;
    margin-left: auto;
}
.video-live-badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .35; }
}
.yt-live-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}
.yt-live-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    border: none;
}
.yt-disclaimer {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 8px;
    opacity: .6;
}
/* ─────────────────────────────────────────────────────────────────────────── */

/* ── Shared ad bar ─────────────────────────────────────────────────────────── */
.ad-bar {
    width: 100%;
    height: 90px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
}
.ad-bar-shimmer {
    position: absolute; inset: 0;
    background: linear-gradient(
        90deg,
        var(--bg-elevated) 0%,
        var(--border)      45%,
        var(--bg-elevated) 100%
    );
    background-size: 250% 100%;
    animation: ad-bar-sweep 1.8s ease-in-out infinite;
    border-radius: 8px;
    transition: opacity .4s ease;
    pointer-events: none;
    z-index: 0;
}
.ad-bar-shimmer::after {
    content: 'Advertisement';
    position: absolute; bottom: 5px; right: 10px;
    font-size: 9px; letter-spacing: .5px; text-transform: uppercase;
    color: var(--text-muted); opacity: .45;
}
@keyframes ad-bar-sweep {
    0%   { background-position:  220% 0; }
    100% { background-position: -220% 0; }
}
.ad-bar-inner {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity .35s ease;
    z-index: 1;
}
.ad-bar.ad-filled .ad-bar-shimmer  { opacity: 0; }
.ad-bar.ad-filled .ad-bar-inner    { opacity: 1; }
.ad-bar.ad-rotating .ad-bar-inner  { opacity: 0; transition: opacity .25s ease; }
.ad-bar.ad-rotating .ad-bar-shimmer{ opacity: 1; }

@media (max-width: 600px) { .ad-bar { height: 50px; } }

/* ── Spacing wrappers ──────────────────────────────────────────────────────── */
.ad-bar-wrap         { padding: 14px 24px; }
.ad-bar-wrap-inset   { padding: 14px 0; }
/* ─────────────────────────────────────────────────────────────────────────── */

.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}
.footer-inner { max-width: 1440px; margin: 0 auto; }
.footer-stats { margin-bottom: 6px; font-size: 11px; letter-spacing: 0.3px; text-transform: uppercase; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 10px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 12px; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ══════════════ ARTICLE PAGE ══════════════ */
.article-page { max-width: 800px; margin: 0 auto; padding: 40px 24px 80px; }
.article-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 28px;
    transition: color 0.2s;
}
.article-back:hover { color: var(--accent); }

.article-hero-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.article-headline {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    color: var(--text-bright);
    margin-bottom: 16px;
}

.article-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.article-byline a { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 14px; }
.article-byline a:hover { text-decoration: underline; }
.article-byline span { color: var(--text-muted); font-size: 13px; }

.article-body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.75;
    color: var(--text-primary);
}
.article-body p { margin-bottom: 20px; }
.article-body h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin: 32px 0 16px; color: var(--text-bright); }
.article-body h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin: 24px 0 12px; color: var(--text-bright); }
.article-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 20px;
    margin: 24px 0;
    color: var(--text-secondary);
    font-style: italic;
}
.article-body a { color: var(--accent); }

.article-source-box {
    margin-top: 40px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.article-source-box p { color: var(--text-muted); font-size: 13px; margin: 0; }
.article-source-box a {
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    transition: background 0.2s;
}
.article-source-box a:hover { background: var(--accent-hover); }

/* ── Progress bar (article generation) ── */
.gen-progress-bar {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 32px;
    overflow: hidden;
}
.gen-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s ease;
}
.gen-stage { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* ── Auth ────────────────────────────────────────────────────────────────── */
.auth-avatar  { width:28px;height:28px;border-radius:50%;object-fit:cover; }
.auth-initials{ width:28px;height:28px;border-radius:50%;background:var(--accent);color:#fff;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center; }
.auth-modal-overlay{ position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:1000;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(4px); }
.auth-modal{ background:var(--bg-card);border:1px solid var(--border);border-radius:16px;padding:36px 32px;max-width:360px;width:90%;position:relative;text-align:center; }
.auth-modal-close{ position:absolute;top:12px;right:14px;background:none;border:none;color:var(--text-muted);font-size:18px;cursor:pointer;line-height:1; }
.auth-modal-logo .logo-icon{ font-size:36px;font-weight:900;color:var(--accent); }
.auth-modal-title{ font-size:22px;font-weight:800;margin:12px 0 6px; }
.auth-modal-sub{ font-size:13px;color:var(--text-muted);margin-bottom:24px; }
.auth-google-btn-wrap{ display:flex;justify-content:center;margin-bottom:12px; }
.auth-fb-btn{ width:100%;padding:10px;background:#1877F2;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:16px; }
.auth-fb-btn:hover{ background:#166FE5; }
.auth-modal-terms{ font-size:11px;color:var(--text-muted);opacity:.6; }
.auth-user-menu{ position:fixed;z-index:999;background:var(--bg-card);border:1px solid var(--border);border-radius:12px;min-width:200px;box-shadow:0 8px 32px rgba(0,0,0,.4);overflow:hidden; }
.aum-header{ display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--border); }
.aum-avatar{ width:32px;height:32px;border-radius:50%;object-fit:cover; }
.aum-name{ font-weight:700;font-size:14px; }
.aum-item{ display:block;width:100%;text-align:left;padding:10px 16px;font-size:13px;color:var(--text-primary);text-decoration:none;background:none;border:none;cursor:pointer; }
.aum-item:hover{ background:var(--bg-elevated);color:var(--accent); }
.aum-divider{ height:1px;background:var(--border); }
.aum-signout{ color:#e05252!important; }

/* ── Star / watchlist button ─────────────────────────────────────────────── */
.star-btn{ background:none;border:none;cursor:pointer;padding:4px;line-height:1;color:var(--text-muted);transition:color .2s,transform .15s; }
.star-btn:hover{ color:#f5c518;transform:scale(1.2); }
.star-btn.starred svg{ fill:#f5c518;stroke:#f5c518; }
.star-btn.starred{ color:#f5c518; }
.star-btn svg{ width:20px;height:20px;transition:fill .2s,stroke .2s; }

/* ══════════════ RESPONSIVE ══════════════ */
@media (max-width: 1024px) {
    .hero-content h2 { font-size: 26px; }
    .hero-card, .hero-content { min-height: 300px; max-height: 400px; }
}

@media (max-width: 768px) {
    .top-bar-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px; }
    .category-tabs { order: 3; width: 100%; padding: 4px 0; }
    .top-bar-actions { gap: 6px; }
    .search-box input { width: 140px; }
    .search-box input:focus { width: 180px; }
    .weather-banner { flex-direction: column; padding: 16px; }
    .weather-current { flex-wrap: wrap; }
    .weather-extra { flex-wrap: wrap; gap: 8px; }
    .articles-grid { grid-template-columns: 1fr; gap: 16px; }
    .hero-content { padding: 24px 20px; min-height: 260px; max-height: 360px; }
    .hero-card { min-height: 260px; max-height: 360px; }
    .hero-content h2 { font-size: 22px; }
    .container { padding: 0 16px 40px; }
    .temp-value { font-size: 36px; }
    .article-headline { font-size: 26px; }
    .article-body { font-size: 16px; }
    .article-source-box { flex-direction: column; }
}

@media (max-width: 480px) {
    .tab { padding: 5px 10px; font-size: 12px; }
    .logo-text { display: none; }
    .hero-content h2 { font-size: 20px; }
}
