@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-gradient: radial-gradient(circle at 50% 0%, #161824 0%, #0a0b10 100%);
  --bg-color: #0b0c10;
  
  /* Modern Dark Palette */
  --card-bg: rgba(20, 22, 33, 0.55);
  --card-border: rgba(255, 255, 255, 0.07);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  /* Neon Accents */
  --accent-cyan: #00f0ff;
  --accent-purple: #9d4edd;
  --accent-green: #00e676;
  --accent-green-glow: rgba(0, 230, 118, 0.15);
  --accent-red: #ff1744;
  --accent-red-glow: rgba(255, 23, 68, 0.15);
  --accent-warning: #ffb703;
  
  /* Fonts */
  --font-display: 'Outfit', -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  
  /* Layout */
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

body {
  font-family: var(--font-display);
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Glassmorphism Container */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

/* Glowing Button Styles */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #050508;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(0, 240, 255, 0.5);
}

.btn-green {
  background: var(--accent-green);
  color: #050508;
  box-shadow: 0 4px 15px var(--accent-green-glow);
}

.btn-green:hover {
  box-shadow: 0 6px 20px rgba(0, 230, 118, 0.4);
  transform: translateY(-1px);
}

.btn-red {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-red-glow);
}

.btn-red:hover {
  box-shadow: 0 6px 20px rgba(255, 23, 68, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Layout Setup */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header & Controls */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  margin-bottom: 8px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.controls-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.selector-wrapper {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: var(--border-radius-md);
}

.selector-option {
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.selector-option.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

/* Tickers Row */
.tickers-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.ticker-card {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticker-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticker-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.ticker-exchange {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.ticker-data {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticker-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.2rem;
  transition: var(--transition-smooth);
}

.price-up {
  color: var(--accent-green);
  text-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}

.price-down {
  color: var(--accent-red);
  text-shadow: 0 0 10px rgba(255, 23, 68, 0.2);
}

/* Core Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Card Header styles */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title {
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: var(--accent-cyan);
}

.card-body {
  padding: 24px;
}

/* Arbitrage Panel */
.arb-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.metric-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 16px;
  text-align: center;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
}

.metric-value.glow-green {
  color: var(--accent-green);
  text-shadow: 0 0 12px rgba(0, 230, 118, 0.35);
}

.metric-value.glow-red {
  color: var(--accent-red);
}

.arb-spread-visual {
  height: 80px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: relative;
  overflow: hidden;
}

.spread-node {
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.spread-node.right {
  text-align: right;
}

.spread-node-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.spread-node-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
}

.spread-flow-line {
  position: absolute;
  top: 50%;
  left: 15%;
  right: 15%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-50%);
  z-index: 1;
}

.spread-flow-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  z-index: 2;
}

.spread-flow-active {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.05), rgba(157, 77, 221, 0.05));
  transition: width 0.3s ease;
}

.arb-log {
  height: 160px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-md);
  padding: 12px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arb-log-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 6px;
}

.arb-log-time {
  color: var(--text-muted);
}

.arb-log-desc {
  color: var(--text-secondary);
}

.arb-log-profit {
  font-weight: 600;
}

/* Wave Predictor Card */
.wave-indicator-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.signal-ring-outer {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid rgba(255, 255, 255, 0.04);
  position: relative;
  transition: var(--transition-smooth);
}

.signal-ring-inner {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.signal-glow-green {
  border-color: rgba(0, 230, 118, 0.3);
  box-shadow: 0 0 30px rgba(0, 230, 118, 0.25);
  animation: pulse-green 2s infinite ease-in-out;
}

.signal-glow-red {
  border-color: rgba(255, 23, 68, 0.3);
  box-shadow: 0 0 30px rgba(255, 23, 68, 0.25);
  animation: pulse-red 2s infinite ease-in-out;
}

.signal-glow-neutral {
  border-color: rgba(255, 183, 3, 0.3);
  box-shadow: 0 0 30px rgba(255, 183, 3, 0.25);
}

.signal-value {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.2;
}

.signal-subtext {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.tech-indicators-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.indicator-stat {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-md);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ind-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ind-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Paper Trading Simulator */
.balance-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 16px 20px;
  border-radius: var(--border-radius-md);
  margin-bottom: 20px;
}

.bal-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bal-lbl {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bal-val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
}

.pnl-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 4px;
}

.pnl-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
}

.trade-interface {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.trade-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  color: var(--text-primary);
  border-radius: var(--border-radius-md);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  outline: none;
  transition: var(--transition-smooth);
}

.trade-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.input-addon {
  position: absolute;
  right: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-family: var(--font-mono);
}

.trade-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.position-card {
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
}

.pos-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.pos-table {
  width: 100%;
  border-collapse: collapse;
}

.pos-table th, .pos-table td {
  padding: 8px 4px;
  text-align: left;
  font-size: 0.85rem;
}

.pos-table th {
  color: var(--text-muted);
  font-weight: 500;
}

.pos-table td {
  font-family: var(--font-mono);
}

.pos-close-btn {
  background: transparent;
  border: 1px solid rgba(255, 23, 68, 0.3);
  color: var(--accent-red);
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.pos-close-btn:hover {
  background: var(--accent-red);
  color: white;
}

/* Charts Component */
.chart-box {
  width: 100%;
  height: 380px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-md);
  margin-top: 12px;
  position: relative;
  overflow: hidden;
}

.chart-header-controls {
  display: flex;
  gap: 8px;
}

.chart-btn {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chart-btn.active {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Keyframes */
@keyframes pulse-green {
  0% {
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.15);
  }
  50% {
    box-shadow: 0 0 35px rgba(0, 230, 118, 0.35);
  }
  100% {
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.15);
  }
}

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.15);
  }
  50% {
    box-shadow: 0 0 35px rgba(255, 23, 68, 0.35);
  }
  100% {
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.15);
  }
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .tickers-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .tickers-strip {
    grid-template-columns: 1fr;
  }
  
  header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .arb-metrics-grid {
    grid-template-columns: 1fr;
  }
}
