/* Custom Fintech & Quant Terminal Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #060913;
  --bg-secondary: #0b1120;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-subtle: rgba(51, 65, 85, 0.6);
  --accent-cyan: #00f2fe;
  --accent-emerald: #10b981;
  --accent-blue: #38bdf8;
  --accent-purple: #a855f7;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
}

.font-mono {
  font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #060913;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

/* Cyber Grid & Background Glows */
.cyber-grid {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.radar-glow {
  background: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.15), transparent 70%);
}

.emerald-glow {
  background: radial-gradient(circle at 80% 30%, rgba(16, 185, 129, 0.12), transparent 60%);
}

/* Glassmorphic card styling */
.glass-card {
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.12);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.5), 0 0 20px -4px rgba(56, 189, 248, 0.15);
}

/* Glowing text and borders */
.glow-cyan {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
}

.glow-emerald {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #00f2fe 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-emerald {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Terminal Component */
.terminal-window {
  background: #080d1a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.terminal-header {
  background: #0f172a;
  padding: 10px 16px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

/* Live Ticker Bar */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background-color: rgba(8, 13, 26, 0.95);
  border-top: 1px solid rgba(30, 41, 59, 0.8);
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
  white-space: nowrap;
}

.ticker {
  display: inline-flex;
  animation: ticker 35s linear infinite;
}

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

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

/* Pulse Beacon */
.status-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  position: relative;
}

.status-beacon::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.4);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(0.6); opacity: 0; }
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #38bdf8;
  padding: 14px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  animation: slideIn 0.3s forwards ease-out;
}

@keyframes slideIn {
  to { transform: translateX(0); }
}

/* Interactive Accordion */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-open .accordion-content {
  max-height: 300px;
}

.accordion-open .accordion-icon {
  transform: rotate(180deg);
}

/* Code block highlight styling */
.code-token-keyword { color: #f43f5e; font-weight: 600; }
.code-token-func { color: #38bdf8; font-weight: 500; }
.code-token-string { color: #10b981; }
.code-token-number { color: #f59e0b; }
.code-token-comment { color: #64748b; font-style: italic; }
.code-token-type { color: #a855f7; }
