/* Simple Sequential Debug Panel */

.simple-debug-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 600px;
  max-height: calc(100vh - 40px);
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.simple-debug-panel.hidden {
  display: none;
}

.debug-header {
  padding: 12px 16px;
  background: #2a2a2a;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  gap: 12px;
}

.debug-header h3 {
  margin: 0;
  font-size: 14px;
  color: #fff;
  flex: 1;
}

.debug-header button {
  background: #3a3a3a;
  border: 1px solid #555;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.debug-header button:hover {
  background: #4a4a4a;
}

.debug-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.debug-empty {
  color: #888;
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
}

.debug-step {
  margin-bottom: 16px;
  background: #252525;
  border: 1px solid #333;
  border-radius: 6px;
  overflow: hidden;
}

.step-header {
  padding: 10px 12px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #333;
}

.step-number {
  background: #4a9eff;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 11px;
}

.step-title {
  flex: 1;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

.step-time {
  color: #888;
  font-size: 11px;
}

.step-content {
  padding: 12px;
  font-size: 12px;
  color: #ccc;
}

/* User Message */
.user-message {
  padding: 12px;
  background: #1a3a1a;
  border-left: 3px solid #10b981;
  border-radius: 4px;
  color: #a7f3d0;
}

/* API Request */
.api-request {
  padding: 12px;
  background: #1a1a3a;
  border-left: 3px solid #4a9eff;
  border-radius: 4px;
}

.api-request strong {
  display: block;
  color: #4a9eff;
  margin-bottom: 8px;
}

.api-request details {
  margin-top: 8px;
}

.api-request summary {
  cursor: pointer;
  color: #a8daff;
  font-weight: 600;
  padding: 4px;
  background: rgba(74, 158, 255, 0.1);
  border-radius: 3px;
}

.api-request summary:hover {
  background: rgba(74, 158, 255, 0.2);
}

.api-request pre {
  margin: 8px 0 0 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  overflow-x: auto;
  font-size: 10px;
  line-height: 1.4;
  color: #c2e7ff;
}

/* API Response */
.api-response {
  padding: 12px;
  background: #3a1a1a;
  border-left: 3px solid #10b981;
  border-radius: 4px;
}

.api-response strong {
  display: block;
  color: #10b981;
  margin-bottom: 8px;
}

.response-meta {
  color: #facc15;
  font-size: 11px;
  margin-bottom: 8px;
  padding: 6px;
  background: rgba(250, 204, 21, 0.1);
  border-radius: 3px;
}

.api-response details {
  margin-top: 8px;
}

.api-response summary {
  cursor: pointer;
  color: #6ee7b7;
  font-weight: 600;
  padding: 4px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 3px;
}

.api-response summary:hover {
  background: rgba(16, 185, 129, 0.2);
}

.api-response pre {
  margin: 8px 0 0 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  overflow-x: auto;
  font-size: 10px;
  line-height: 1.4;
  color: #d1fae5;
  max-height: 300px;
  overflow-y: auto;
}

/* Task List */
.task-list {
  padding: 12px;
  background: #3a2a1a;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
}

.task-list strong {
  display: block;
  color: #fbbf24;
  margin-bottom: 8px;
}

.task-list ul {
  margin: 0;
  padding-left: 20px;
}

.task-list li {
  color: #fde68a;
  margin: 4px 0;
  font-size: 11px;
  line-height: 1.5;
}

/* Task Execution */
.task-execution {
  padding: 12px;
  background: #2a1a3a;
  border-left: 3px solid #a78bfa;
  border-radius: 4px;
}

.task-execution strong {
  display: block;
  color: #c4b5fd;
  margin-bottom: 6px;
}

.task-execution div {
  color: #e9d5ff;
  font-size: 11px;
}

/* Info Message (NEW - Phase 15) */
.info-message {
  padding: 12px;
  background: #1a2a3a;
  border-left: 3px solid #60a5fa;
  border-radius: 4px;
}

.info-message strong {
  display: block;
  color: #93c5fd;
  margin-bottom: 8px;
}

.info-content {
  color: #dbeafe;
  font-size: 11px;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Context-Aware Metrics (NEW - Phase 15) */
.context-aware-metrics {
  padding: 14px;
  background: linear-gradient(135deg, #1a3a2a 0%, #2a1a3a 100%);
  border-left: 4px solid #10b981;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.context-aware-metrics strong {
  display: block;
  color: #6ee7b7;
  margin-bottom: 12px;
  font-size: 13px;
}

.metrics-list {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}

.metrics-list li {
  color: #d1fae5;
  margin: 6px 0;
  font-size: 11px;
  line-height: 1.6;
  padding: 4px 8px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 3px;
}

.metrics-list .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
}

.metrics-list .badge.beginner {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  color: #b30000;
}

.metrics-list .badge.intermediate {
  background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
  color: #d63031;
}

.metrics-list .badge.advanced {
  background: linear-gradient(135deg, #74ebd5 0%, #0ac194 100%);
  color: #00695c;
}

/* Performance Metrics (NEW - Phase 15) */
.performance-metrics {
  padding: 14px;
  background: linear-gradient(135deg, #3a1a1a 0%, #1a1a3a 100%);
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.performance-metrics strong {
  display: block;
  color: #fbbf24;
  margin-bottom: 12px;
  font-size: 13px;
}

.performance-metrics .success {
  color: #10b981;
  font-weight: 700;
}

/* Scrollbar */
.debug-content::-webkit-scrollbar {
  width: 8px;
}

.debug-content::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.debug-content::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 4px;
}

.debug-content::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

