/* MCP Tools Dashboard Styles */
.mcp-dashboard {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e0e0e0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.mcp-dashboard.loading {
  justify-content: center;
  align-items: center;
}

.loading-spinner {
  text-align: center;
  color: #64ffda;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #424242;
  border-top: 3px solid #64ffda;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

/* Header */
.mcp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid #333;
  backdrop-filter: blur(10px);
}

.mcp-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #64ffda;
  text-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
  margin: 0;
}

.mcp-metrics-summary {
  display: flex;
  gap: 30px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.metric-label {
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
}

.metric-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #64ffda;
}

/* Content Layout */
.mcp-content {
  display: flex;
  flex: 1;
  min-height: 0;
}

.mcp-sidebar {
  width: 300px;
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid #333;
  padding: 20px;
  overflow-y: auto;
}

.mcp-sidebar h3 {
  margin: 0 0 15px 0;
  color: #64ffda;
  font-size: 1.2rem;
}

.server-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.server-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.server-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #64ffda;
  transform: translateY(-2px);
}

.server-item.selected {
  background: rgba(100, 255, 218, 0.1);
  border-color: #64ffda;
  box-shadow: 0 4px 12px rgba(100, 255, 218, 0.2);
}

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

.server-name {
  font-weight: 600;
  color: #e0e0e0;
  font-size: 1.1rem;
}

.server-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.server-details {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.server-version {
  font-size: 0.9rem;
  color: #999;
}

.server-type {
  font-size: 0.8rem;
  color: #64ffda;
  text-transform: uppercase;
  font-weight: 600;
}

.server-health {
  margin-bottom: 8px;
}

.health-score {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.health-bar {
  width: 100%;
  height: 4px;
  background: #333;
  border-radius: 2px;
  overflow: hidden;
}

.health-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.server-tools-count {
  font-size: 0.8rem;
  color: #999;
  text-align: center;
  margin-top: 8px;
}

/* Main Content */
.mcp-main {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

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

.tools-header h3 {
  margin: 0;
  color: #64ffda;
  font-size: 1.4rem;
}

.tool-filter {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #333;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 0.9rem;
  width: 200px;
  transition: all 0.3s ease;
}

.tool-filter:focus {
  outline: none;
  border-color: #64ffda;
  box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

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

.tool-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tool-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #64ffda;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.tool-card.selected {
  background: rgba(100, 255, 218, 0.1);
  border-color: #64ffda;
  box-shadow: 0 4px 12px rgba(100, 255, 218, 0.2);
}

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

.tool-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e0e0e0;
  margin: 0;
  word-break: break-word;
}

.tool-category {
  font-size: 0.75rem;
  color: #64ffda;
  background: rgba(100, 255, 218, 0.1);
  padding: 4px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}

.tool-description {
  color: #ccc;
  margin-bottom: 15px;
  line-height: 1.5;
  font-size: 0.9rem;
}

.tool-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-label {
  font-size: 0.7rem;
  color: #999;
  text-transform: uppercase;
}

.stat-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64ffda;
}

.tool-last-used {
  font-size: 0.8rem;
  color: #888;
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid #333;
}

.no-server-selected {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  color: #999;
}

.no-server-selected h3 {
  color: #64ffda;
  margin-bottom: 10px;
}

/* Execution Panel */
.mcp-execution-panel {
  width: 350px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 1px solid #333;
  padding: 20px;
  overflow-y: auto;
}

.mcp-execution-panel h3 {
  margin: 0 0 20px 0;
  color: #64ffda;
  font-size: 1.2rem;
}

.execution-form {
  margin-bottom: 20px;
}

.parameters-section h4 {
  margin: 0 0 15px 0;
  color: #e0e0e0;
  font-size: 1rem;
}

.parameters-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

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

.parameter-input label {
  font-size: 0.9rem;
  color: #ccc;
  font-weight: 500;
}

.parameter-field {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #333;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.parameter-field:focus {
  outline: none;
  border-color: #64ffda;
  box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.execute-button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #64ffda, #4db6ac);
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.execute-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #4db6ac, #64ffda);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 255, 218, 0.3);
}

.execute-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.execution-results {
  margin-top: 20px;
}

.execution-results h4 {
  margin: 0 0 15px 0;
  color: #e0e0e0;
  font-size: 1rem;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 12px;
  font-size: 0.9rem;
}

.result-item.success {
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
}

.result-item.error {
  border-color: #f44336;
  background: rgba(244, 67, 54, 0.1);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.8rem;
}

.result-tool {
  font-weight: 600;
  color: #64ffda;
}

.result-time {
  color: #999;
}

.result-duration {
  color: #ccc;
  font-weight: 500;
}

.result-response {
  color: #ccc;
  line-height: 1.4;
  word-break: break-word;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .mcp-execution-panel {
    width: 300px;
  }
  
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 900px) {
  .mcp-content {
    flex-direction: column;
  }
  
  .mcp-sidebar {
    width: 100%;
    max-height: 200px;
  }
  
  .mcp-execution-panel {
    width: 100%;
    max-height: 300px;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .mcp-metrics-summary {
    flex-wrap: wrap;
    gap: 15px;
  }
}

@media (max-width: 600px) {
  .mcp-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .tools-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .tool-filter {
    width: 100%;
  }
}