:root {
  --bg-color: #0d1117;
  --glass-bg: rgba(30, 41, 59, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --buy-color: #10b981;
  --sell-color: #ef4444;
  --neutral-color: #eab308;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Glow Effect */
.glow-bg {
  position: absolute;
  top: -10vw;
  left: 50%;
  transform: translateX(-50%);
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(0,0,0,0) 70%);
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
}

.brand h1 span {
  color: var(--accent);
}

.brand-icon {
  font-size: 2rem;
  color: var(--accent);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px currentColor;
}
.dot.connected { background-color: var(--buy-color); color: var(--buy-color); }
.dot.disconnected { background-color: var(--sell-color); color: var(--sell-color); }

.badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.badge.active { background-color: rgba(16, 185, 129, 0.2); color: var(--buy-color); border: 1px solid var(--buy-color); }
.badge.inactive { background-color: rgba(234, 179, 8, 0.2); color: var(--neutral-color); border: 1px solid var(--neutral-color); }

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  padding: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Price Card */
.price-display {
  font-family: 'Outfit', sans-serif;
  font-size: 4rem;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
  margin-top: 1rem;
  color: #fff;
}
.price-display .currency {
  font-size: 2rem;
  vertical-align: super;
  color: var(--text-muted);
}

/* Signal Card */
.signal-box {
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.signal-box.buy {
  background: rgba(16, 185, 129, 0.2);
  color: var(--buy-color);
  border: 1px solid var(--buy-color);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}
.signal-box.sell {
  background: rgba(239, 68, 68, 0.2);
  color: var(--sell-color);
  border: 1px solid var(--sell-color);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}
.signal-box.neutral {
  background: rgba(234, 179, 8, 0.2);
  color: var(--neutral-color);
  border: 1px solid var(--neutral-color);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.95rem;
}
.stat-row:last-of-type { border-bottom: none; }

.reasons-box {
  margin-top: 1rem;
  padding: 0.8rem;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 60px;
}

.execution-log-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.panic-btn {
  background-color: rgba(239, 68, 68, 0.2);
  color: var(--sell-color);
  border: 1px solid var(--sell-color);
  padding: 8px 16px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.panic-btn:hover {
  background-color: var(--sell-color);
  color: white;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

/* Table */
.positions-card, .prediction-card { grid-column: span 2; }
@media (max-width: 800px) { .positions-card, .prediction-card { grid-column: span 1; } }

.table-container { overflow-x: auto; }
table.positions-table {
  width: 100%;
  border-collapse: collapse;
}

table th, table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}
table th {
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}
.empty-state { text-align: center; color: var(--text-muted); padding: 2rem !important; }

/* Dynamic classes for javascript */
.profit { color: var(--buy-color); font-weight: bold; }
.loss { color: var(--sell-color); font-weight: bold; }
