#stock-radar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.stock-radar-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.stock-radar-btn, .stock-radar-refresh {
  padding: 10px 20px;
  border: 2px solid #007cba;
  background: #fff;
  color: #007cba;
  cursor: pointer;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.stock-radar-btn:hover, .stock-radar-refresh:hover {
  background: #007cba;
  color: #fff;
}

.stock-radar-btn.active {
  background: #007cba;
  color: #fff;
}

.stock-radar-refresh {
  margin-left: auto;
  border-color: #28a745;
  color: #28a745;
}

.stock-radar-refresh:hover {
  background: #28a745;
  color: #fff;
}

.stock-radar-refresh.loading {
  opacity: 0.6;
  pointer-events: none;
}

.stock-radar-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 20px;
}

.stock-radar-section {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border: 1px solid #e1e1e1;
}

.stock-radar-section h3 {
  margin: 0 0 20px 0;
  text-align: center;
  font-size: 1.4em;
  color: #333;
}

.winners-section h3 {
  color: #4CAF50;
}

.losers-section h3 {
  color: #F44336;
}

.stock-radar-chart {
  height: 300px;
  margin-bottom: 20px;
  position: relative;
}

.stock-list {
  max-height: 400px;
  overflow-y: auto;
}

.stock-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.stock-item:hover {
  background-color: #f8f9fa;
}

.stock-item:last-child {
  border-bottom: none;
}

.stock-rank {
  font-weight: bold;
  font-size: 1.2em;
  color: #666;
  margin-right: 15px;
  min-width: 30px;
}

.stock-info {
  flex: 1;
  margin-right: 15px;
}

.stock-symbol {
  font-weight: bold;
  font-size: 1.1em;
  color: #333;
}

.stock-name {
  font-size: 0.9em;
  color: #666;
  margin-top: 2px;
}

.stock-metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.stock-price {
  font-weight: bold;
  color: #333;
}

.stock-change {
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

.stock-change.positive {
  background-color: #d4edda;
  color: #155724;
}

.stock-change.negative {
  background-color: #f8d7da;
  color: #721c24;
}

.stock-volume {
  font-size: 0.8em;
  color: #666;
}

.stock-radar-loading {
  display: none;
  text-align: center;
  padding: 40px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007cba;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
  margin: 0 auto 20px;
}

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

.stock-radar-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

.last-updated {
  text-align: center;
  color: #666;
  font-size: 0.9em;
  margin-top: 20px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
  .stock-radar-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .stock-radar-controls {
    justify-content: center;
  }
  
  .stock-radar-btn, .stock-radar-refresh {
    padding: 8px 16px;
    font-size: 0.9em;
  }
  
  .stock-radar-refresh {
    margin-left: 0;
    margin-top: 10px;
  }
  
  .stock-item {
    flex-wrap: wrap;
  }
  
  .stock-metrics {
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
    margin-top: 5px;
  }
}

@media (max-width: 480px) {
  #stock-radar-container {
    padding: 10px;
  }
  
  .stock-radar-section {
    padding: 15px;
  }
  
  .stock-radar-chart {
    height: 250px;
  }
  
  .stock-item {
    padding: 10px;
  }
  
  .stock-symbol {
    font-size: 1em;
  }
  
  .stock-name {
    font-size: 0.8em;
  }
}

/* Animation for chart loading */
.stock-radar-chart canvas {
  transition: opacity 0.3s ease;
}

.stock-radar-chart.loading canvas {
  opacity: 0.5;
}

/* Hover effects for better interactivity */
.stock-item.winner {
  border-left: 4px solid #4CAF50;
}

.stock-item.loser {
  border-left: 4px solid #F44336;
}

.stock-item.winner:hover {
  background-color: #f1f8e9;
}

.stock-item.loser:hover {
  background-color: #ffebee;
}