/* AgentList Styles */

.agent-list {
  padding: 2rem;
  height: 100%;
  overflow-y: auto;
  background: var(--primary-bg);
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
}

.list-title {
  color: var(--primary-text);
  font-size: 2rem;
  font-weight: 900;
  margin: 0;
  text-shadow: 0 0 20px var(--glow-color);
}

.agent-count {
  color: var(--secondary-text);
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--secondary-bg);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.list-controls {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  color: var(--secondary-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-select {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--primary-text);
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 150px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-text);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.agent-card {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  animation: agent-card-enter 0.5s ease-out;
}

.agent-card:hover {
  border-color: var(--primary-text);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
  transform: translateY(-5px);
}

.agent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.agent-type {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.type-icon {
  font-size: 1.5rem;
}

.type-name {
  color: var(--primary-text);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: capitalize;
}

.agent-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-icon {
  font-size: 1rem;
}

.status-name {
  color: var(--secondary-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: capitalize;
}

.agent-info {
  margin-bottom: 1rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.info-label {
  color: var(--secondary-text);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  color: var(--primary-text);
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-task {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--primary-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.task-label {
  color: var(--secondary-text);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.5rem;
}

.task-description {
  color: var(--primary-text);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.agent-metrics {
  margin-bottom: 1.5rem;
}

.metric {
  margin-bottom: 1rem;
}

.metric:last-child {
  margin-bottom: 0;
}

.metric-label {
  color: var(--secondary-text);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.5rem;
}

.metric-bar {
  width: 100%;
  height: 8px;
  background: var(--primary-bg);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  position: relative;
}

.metric-fill {
  height: 100%;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px currentColor;
  position: relative;
}

.metric-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: metric-shine 2s ease-in-out infinite;
}

.metric-value {
  font-size: 0.9rem;
  font-weight: 700;
  text-shadow: 0 0 10px currentColor;
}

.metric-number {
  color: var(--primary-text);
  font-size: 1.2rem;
  font-weight: 900;
  text-shadow: 0 0 10px var(--glow-color);
}

.agent-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--secondary-text);
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.action-btn:hover {
  border-color: var(--primary-text);
  color: var(--primary-text);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.action-btn.monitor:hover {
  border-color: var(--secondary-text);
  color: var(--secondary-text);
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.2);
}

.action-btn.pause:hover {
  border-color: var(--accent-text);
  color: var(--accent-text);
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.2);
}

.action-btn.details:hover {
  border-color: var(--primary-text);
  color: var(--primary-text);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--secondary-text);
}

.empty-state h3 {
  color: var(--primary-text);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1.1rem;
  opacity: 0.8;
}

/* Animations */
@keyframes agent-card-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes metric-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .agent-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
  }
  
  .list-controls {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .agent-list {
    padding: 1rem;
  }
  
  .list-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .list-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-select {
    width: 100%;
    min-width: auto;
  }
  
  .agent-grid {
    grid-template-columns: 1fr;
  }
  
  .agent-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .agent-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .agent-card {
    padding: 1rem;
  }
  
  .list-title {
    font-size: 1.5rem;
  }
  
  .agent-count {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
  }
  
  .action-btn {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
  
  .info-value {
    max-width: 150px;
  }
}