:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d1117;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 35, 54, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(0, 242, 254, 0.3);
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-persian: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Outfit', sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(0, 242, 254, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(79, 172, 254, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 60%);
  color: var(--text-primary);
  font-family: var(--font-persian);
  min-height: 100vh;
  line-height: 1.6;
  direction: rtl;
}

.radar-app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

/* TOP NAVIGATION */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  margin-bottom: 20px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.radar-pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 16px var(--accent-cyan);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; filter: drop-shadow(0 0 8px #00f2fe); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.status-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.channel-chips {
  display: flex;
  gap: 8px;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

/* KPI BAR */
.kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.kpi-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.kpi-icon {
  font-size: 1.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

/* NAV TABS */
.nav-tabs {
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--font-persian);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(79, 172, 254, 0.15) 100%);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.refresh-btn {
  margin-right: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 9px 16px;
  border-radius: 10px;
  font-family: var(--font-persian);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--accent-cyan);
}

/* TAB PANELS */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel-header {
  margin-bottom: 20px;
}

.panel-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.panel-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}

/* SIGNAL CARD */
.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.signal-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
}

.signal-card.buy::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.signal-card.sell::before {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.signal-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.ticker-badge {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 12px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  direction: ltr;
}

.action-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  direction: ltr;
}

.action-badge.buy {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.action-badge.sell {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-badge.spread {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.param-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  direction: ltr;
}

.param-item {
  display: flex;
  flex-direction: column;
}

.param-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.param-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-mono);
}

.card-rationale {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
  border-radius: 8px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
}

/* TRENDING TICKERS GRID */
.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.trending-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.2s ease;
}

.trending-item:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.trending-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.trending-ticker {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-cyan);
  direction: ltr;
}

.trending-count {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 6px;
  color: #fff;
}

.sentiment-bar-wrap {
  margin-bottom: 10px;
}

.sentiment-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
}

.sentiment-bull {
  background: var(--accent-green);
  height: 100%;
}

.sentiment-bear {
  background: var(--accent-red);
  height: 100%;
}

.sentiment-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* NEWS & CATALYST CARD */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  position: relative;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #ec4899);
}

.news-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-3px);
}

.news-headline {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.4;
}

.news-impact-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 12px;
  direction: ltr;
}

.news-impact-tag.bullish {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.news-impact-tag.bearish {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.strategy-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.strategy-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}

.strategy-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

/* VOICE STAGE */
.voice-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

.orb-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.orb-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.25) 0%, rgba(79, 172, 254, 0.1) 60%, transparent 70%);
  filter: blur(16px);
  animation: orb-pulse 4s ease-in-out infinite;
}

.orb-core {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #4facfe 0%, #00f2fe 50%, #000 100%);
  box-shadow: 0 0 40px rgba(0, 242, 254, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.4);
  position: relative;
  z-index: 2;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(0, 242, 254, 0.3);
  animation: spin 20s linear infinite;
}

.ring-1 { width: 160px; height: 160px; }
.ring-2 { width: 190px; height: 190px; animation-direction: reverse; }

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

@keyframes orb-pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

.voice-prompt {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.mic-button {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  border: none;
  color: #07090e;
  padding: 14px 32px;
  border-radius: 30px;
  font-family: var(--font-persian);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.35);
  transition: all 0.2s ease;
}

.mic-button:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.5);
}

.mic-button.recording {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  animation: pulse-mic 1s infinite alternate;
}

@keyframes pulse-mic {
  from { box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }
  to { box-shadow: 0 0 30px rgba(239, 68, 68, 0.8); }
}

.voice-transcript-card {
  margin-top: 30px;
  max-width: 600px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
}

.transcript-header {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

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

.loading-state {
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .top-nav { flex-direction: column; gap: 14px; text-align: center; }
  .channel-chips { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
}









.source-link-wrap {
  margin: 16px 0 10px;
}

.source-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.12) 0%, rgba(79, 172, 254, 0.12) 100%);
  border: 1px solid rgba(0, 242, 254, 0.5);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.15);
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  font-family: var(--font-persian);
  width: 100%;
  box-sizing: border-box;
}

.source-link-btn:hover {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.25) 0%, rgba(79, 172, 254, 0.25) 100%);
  border-color: #00f2fe;
  box-shadow: 0 0 24px rgba(0, 242, 254, 0.4);
  transform: translateY(-2px);
  color: #fff !important;
}

.source-btn-label-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-btn-icon {
  font-size: 1.1rem;
}

.source-btn-name {
  background: rgba(0, 242, 254, 0.22);
  border: 1px solid rgba(0, 242, 254, 0.45);
  color: #00f2fe;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  direction: ltr;
}

.source-btn-arrow {
  color: #94a3b8;
  font-size: 0.78rem;
  font-family: var(--font-persian);
}
