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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #0a0a0a;
  color: #e6edf3;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1a1a1a;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

h1 {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
}

h2 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.symbol-badge {
  background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
  color: #000;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.symbol-select {
  background: #111111;
  color: #fff;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.symbol-select:hover {
  border-color: #555;
}

.symbol-select:focus {
  border-color: #00d4aa;
}

.symbol-select option {
  background: #111111;
  color: #fff;
}

/* Exchange Section */
.exchanges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.exchange-section {
  background: #111111;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 16px;
}

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

.exchange-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.exchange-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.exchange-dot.binance {
  background: #00d4aa;
  box-shadow: 0 0 8px #00d4aa44;
}

.exchange-dot.bybit {
  background: #ff9f43;
  box-shadow: 0 0 8px #ff9f4344;
}

.exchange-dot.bitget {
  background: #a855f7;
  box-shadow: 0 0 8px #a855f744;
}

.exchange-dot.gate {
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f644;
}

.exchange-dot.kucoin {
  background: #eab308;
  box-shadow: 0 0 8px #eab30844;
}

.exchange-dot.mexc {
  background: #ec4899;
  box-shadow: 0 0 8px #ec489944;
}

.status-indicator {
  display: flex;
  align-items: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat-card {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: #2a2a2a;
}

.stat-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  font-weight: 500;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stat-value.positive {
  color: #00d4aa;
}

.stat-value.negative {
  color: #ff4757;
}

.stat-value.neutral {
  color: #fff;
}

/* Chart */
.chart-container {
  background: #111111;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

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

.chart-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-title > span {
  font-size: 15px;
  font-weight: 500;
  color: #999;
}

.chart-legend {
  display: flex;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.binance {
  background: #00d4aa;
}

.legend-dot.bybit {
  background: #ff9f43;
}

.legend-dot.bitget {
  background: #a855f7;
}

.legend-dot.gate {
  background: #3b82f6;
}

.legend-dot.kucoin {
  background: #eab308;
}

.legend-dot.mexc {
  background: #ec4899;
}

.chart-controls {
  display: flex;
  gap: 4px;
  background: #0a0a0a;
  border-radius: 8px;
  padding: 4px;
}

.chart-controls button {
  background: transparent;
  color: #666;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.chart-controls button:hover {
  color: #999;
  background: #1a1a1a;
}

.chart-controls button.active {
  background: #1a1a1a;
  color: #fff;
}

#cvd-chart {
  width: 100%;
  height: 450px;
}

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #111111;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
}

.note {
  color: #ff9f43;
  font-size: 11px;
}

/* Status Dots */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00d4aa;
  box-shadow: 0 0 8px #00d4aa44;
  animation: pulse 2s infinite;
}

.status-dot.disconnected {
  background: #ff4757;
  box-shadow: 0 0 8px #ff475744;
  animation: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Error */
.error {
  background: #ff475722;
  border: 1px solid #ff475744;
  color: #ff4757;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}
