:root {
    --bg: #0f172a;
    --sidebar: #1e293b;
    --accent: #3b82f6;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --card: #1e293b;
    --green: #10b981;
    --red: #f43f5e;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: var(--sidebar);
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 { font-size: 1.1rem; margin: 0; font-weight: 700; }
.badge { font-size: 0.65rem; background: var(--accent); padding: 2px 6px; border-radius: 4px; margin-left: 10px; text-transform: uppercase; }
.disclaimer { font-size: 0.75rem; color: var(--text-muted); }

main { display: flex; flex: 1; overflow: hidden; }

.sidebar {
    width: 260px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.search-box { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
input { 
    flex: 1; 
    background: var(--bg); 
    border: 1px solid var(--border); 
    color: white; 
    padding: 0.5rem; 
    border-radius: 4px; 
    font-size: 0.9rem;
}
button { 
    background: var(--accent); 
    border: none; 
    color: white; 
    padding: 0.5rem 0.75rem; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 0.9rem;
    font-weight: 500;
}
button:hover { background: #2563eb; }

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.6rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.ticker-nav h3 { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.ticker-list { overflow-y: auto; flex: 1; }
.ticker-item {
    padding: 0.6rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
    font-weight: 500;
}
.ticker-item:hover { background: rgba(255,255,255,0.05); }
.ticker-item.active { background: rgba(59, 130, 246, 0.2); color: var(--accent); border-left: 3px solid var(--accent); border-radius: 0 4px 4px 0; }

.content-area { flex: 1; overflow-y: auto; padding: 1.5rem 2.5rem; }
.hidden { display: none !important; }

.welcome-screen { text-align: center; max-width: 700px; margin: 5rem auto; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; margin-top: 3rem; }
.feature { background: var(--card); padding: 1.5rem; border-radius: 8px; border: 1px solid var(--border); }
.feature span { font-size: 2rem; display: block; margin-bottom: 1rem; }

.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
#currentTickerTitle { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.tabs { display: flex; gap: 0.25rem; background: var(--sidebar); padding: 0.25rem; border-radius: 6px; }
.tab-btn { background: transparent; color: var(--text-muted); padding: 0.4rem 1rem; }
.tab-btn.active { background: var(--bg); color: white; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

.analysis-grid { display: flex; flex-direction: column; gap: 1rem; }
.analysis-card { background: var(--card); border-radius: 10px; border: 1px solid var(--border); }
.card-header { padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 0.95rem; background: rgba(255,255,255,0.02); }
.card-body { padding: 1.25rem; font-size: 0.95rem; line-height: 1.6; }

.card-body h3 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.75rem; color: var(--accent); }
.card-body h4 { font-size: 1rem; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.card-body p { margin: 0 0 0.75rem 0; }
.card-body ul { margin: 0 0 1rem 0; padding-left: 1.25rem; }
.card-body li { margin-bottom: 0.4rem; }
.card-body strong { color: white; }

.table-container { background: var(--card); border-radius: 8px; border: 1px solid var(--border); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: rgba(255,255,255,0.02); color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; padding: 1rem; border-bottom: 1px solid var(--border); }
td { padding: 1rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 600; color: var(--text-muted); }

.news-item { padding: 1.25rem; border-bottom: 1px solid var(--border); background: var(--card); transition: background 0.2s; }
.news-item:hover { background: rgba(255,255,255,0.02); }
.news-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.5rem; }
.news-source { font-size: 0.7rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.news-date { font-size: 0.75rem; color: var(--text-muted); }
.news-headline { display: block; margin-bottom: 0.5rem; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.1rem; line-height: 1.4; }
.news-headline:hover { color: var(--accent); }
.news-summary { font-size: 0.9rem; margin: 0; color: var(--text-muted); line-height: 1.5; }

.empty-msg { color: var(--text-muted); text-align: center; padding: 3rem 1rem; font-size: 0.9rem; font-style: italic; }

.lang-switcher { display: flex; gap: 4px; margin-right: 20px; }
.lang-btn { 
    background: var(--bg); 
    border: 1px solid var(--border); 
    color: var(--text-muted); 
    padding: 4px 8px; 
    font-size: 0.7rem; 
    border-radius: 4px; 
    cursor: pointer;
}
.lang-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.user-info { display: flex; align-items: center; }
