/* BeautyAI Debug Interface Styles */
/* Simple WebSocket Debug Tool Enhanced UI */

/* Light theme (default) CSS variable system */
:root {
  --primary-color: #6366f1; /* indigo */
  --primary-accent: #8b5cf6; /* violet */
  --primary-accent-alt: #ec4899; /* pink */
  --success-color: #16a34a;
  --warning-color: #f59e0b;
  --danger-color: #dc2626;
  --info-color: #0ea5e9;
  --dark-color: #1f2937;
  --light-color: #f8fafc;
  --border-color: #e2e8f0;
  --border-color-strong: #cbd5e1;
  --text-muted: #64748b;
  --font-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-elevated: 0 8px 28px -6px rgba(0,0,0,0.15);
  --border-radius: 16px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --transition: all 0.25s cubic-bezier(.4,.0,.2,1);
  --gradient-primary: linear-gradient(135deg,var(--primary-color),var(--primary-accent));
  --gradient-accent: linear-gradient(135deg,var(--primary-accent),var(--primary-accent-alt));
  --gradient-surface: linear-gradient(145deg,#ffffff,#f1f5f9);
  --surface-glass: rgba(255,255,255,0.6);
  --blur: saturate(180%) blur(14px);
  --focus-ring: 0 0 0 3px rgba(99,102,241,.35);
}

/* Dark theme activation */
body.dark-theme {
  --primary-color: #818cf8;
  --primary-accent: #a78bfa;
  --primary-accent-alt: #f472b6;
  --success-color: #22c55e;
  --warning-color: #fbbf24;
  --danger-color: #f87171;
  --info-color: #38bdf8;
  --dark-color: #0f172a;
  --light-color: #1e293b;
  --border-color: #334155;
  --border-color-strong: #475569;
  --text-muted: #94a3b8;
  --gradient-surface: linear-gradient(145deg,#1e293b,#0f172a);
  --surface-glass: rgba(30,41,59,0.65);
  background: radial-gradient(circle at 30% 20%, #1e293b, #0f172a 70%);
  color: #f1f5f9;
}

/* Base styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
  color: var(--dark-color);
  background: radial-gradient(circle at 20% 20%, #f0f4ff, #e9efff 30%, #eef2ff 60%, #f8fafc 90%);
  margin: 0;
  padding: 32px clamp(12px,3vw,42px) 64px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Decorative blurred gradients */
body::before, body::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .35;
  z-index: 0;
}
body::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle,#6366f1 0%,transparent 70%);
  top: -140px; left: -140px;
}
body::after {
  width: 560px; height: 560px;
  background: radial-gradient(circle,#ec4899 0%,transparent 70%);
  bottom: -180px; right: -160px;
}

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

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary-color), #005a9e);
  color: white;
  padding: 30px;
  border-radius: var(--border-radius);
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 15px;
}

.header h1 i {
  font-size: 2rem;
}

.header .subtitle {
  margin: 10px 0 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Status indicator */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.status-indicator.connected {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.status-indicator.connecting {
  background-color: rgba(255, 193, 7, 0.1);
  color: var(--warning-color);
  border: 1px solid var(--warning-color);
}

.status-indicator.disconnected {
  background-color: rgba(108, 117, 125, 0.1);
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
}

.status-indicator.error {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
}

/* Debug panels grid */
.debug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.debug-panel {position:relative;background:var(--surface-glass);backdrop-filter:var(--blur);-webkit-backdrop-filter:var(--blur);border-radius:var(--border-radius);border:1px solid var(--border-color);box-shadow:var(--shadow);overflow:hidden;z-index:1;}
.debug-panel::before{content:"";position:absolute;inset:0;background:linear-gradient(120deg,rgba(255,255,255,0.4),rgba(255,255,255,0));pointer-events:none;opacity:.55;}
body.dark-theme .debug-panel{background:rgba(30,41,59,0.55);} 

.panel-header {background:linear-gradient(90deg,rgba(99,102,241,0.12),rgba(139,92,246,0.08));padding:24px 26px;border-bottom:1px solid var(--border-color);display:flex;justify-content:space-between;align-items:flex-start;gap:18px;}
body.dark-theme .panel-header{background:linear-gradient(90deg,rgba(99,102,241,0.18),rgba(139,92,246,0.12));}

.panel-header h2{margin:0;font-size:clamp(1.07rem,1.2rem + .3vw,1.5rem);letter-spacing:.5px;color:var(--dark-color);display:flex;align-items:center;gap:12px;font-weight:600;}
body.dark-theme .panel-header h2{color:#f1f5f9;}

.panel-header h2 i {
  color: var(--primary-color);
}

.panel-content {
  padding: 20px;
}

/* Compact Configuration Row Layout */
.config-row-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.dark-theme .config-row-compact {
  background: rgba(30, 41, 59, 0.7);
}

.config-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  flex: 1;
}

.config-item.file-upload-compact {
  min-width: 220px;
  flex: 1.2;
}

.config-item.websocket-item {
  min-width: 280px;
  flex: 1.5;
}

/* Compact File Upload Styles */
.compact-file-upload {
  position: relative;
}

.file-upload-button {
  position: relative;
}

.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-accent));
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  width: 100%;
  min-height: 48px;
  font-size: 0.9rem;
}



.upload-btn i {
  font-size: 1.1rem;
}

.supported-formats-compact {
  text-align: center;
  margin-top: 6px;
  opacity: 0.7;
}

.supported-formats-compact small {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Compact File Preview */
.file-preview-compact {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark-theme .file-preview-compact {
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

.file-details-compact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-icon-compact {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--info-color), var(--primary-accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

.file-info-text {
  flex: 1;
  min-width: 0;
}

.file-name-compact {
  font-weight: 600;
  color: var(--dark-color);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-theme .file-name-compact {
  color: #f1f5f9;
}

.file-meta-compact {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.remove-file-btn-compact {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--danger-color), #b91c1c);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}



/* Compact Progress Bar */
.upload-progress-compact {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.progress-bar-compact {
  height: 4px;
  background-color: var(--light-color);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

body.dark-theme .progress-bar-compact {
  background-color: #374151;
}

.progress-fill-compact {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-accent), var(--success-color));
  background-size: 200% 100%;
  animation: gradientShift 2s ease infinite;
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text-compact {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
}

/* Enhanced WebSocket Status and Selection */
.websocket-info-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 8px 12px;
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

body.dark-theme .websocket-info-compact {
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

.endpoint-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  flex: 1;
}

.status-dot {
  font-size: 0.5rem;
  transition: var(--transition);
}

.status-dot.connected {
  color: var(--success-color);
  animation: pulse 2s infinite;
}

.status-dot.connecting {
  color: var(--warning-color);
  animation: pulse 1s infinite;
}

.status-dot.disconnected {
  color: var(--text-muted);
}

.status-dot.error {
  color: var(--danger-color);
}

/* Action Buttons Layout Enhancement */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.status-and-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* Connection Status Enhancement */
.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 140px;
  justify-content: center;
}

body.dark-theme .connection-status {
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

/* Responsive Design for Action Buttons */
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }
  
  .button-group,
  .status-and-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  
  .status-and-actions {
    align-items: center;
  }
}

/* Compact WebSocket Selector */
.websocket-selector-compact {
  position: relative;
}

.websocket-info-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.endpoint-description-compact {
  color: var(--text-muted);
  font-size: 0.75rem;
  flex: 1;
}

/* Responsive adjustments for compact layout */
@media (max-width: 1200px) {
  .config-row-compact {
    flex-direction: column;
  }
  
  .config-item {
    min-width: 100%;
  }
}

@media (max-width: 768px) {
  .config-row-compact {
    gap: 16px;
    padding: 16px;
  }
  
  .upload-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  
  .file-details-compact {
    gap: 8px;
  }
  
  .file-icon-compact {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
}

/* Configuration Panel */
.config-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:22px;margin-bottom:28px;align-items:start;}

.config-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.config-group label{font-weight:600;color:var(--dark-color);font-size:.7rem;text-transform:uppercase;letter-spacing:.85px;display:flex;align-items:center;gap:8px;opacity:.85;} body.dark-theme .config-group label{color:#e2e8f0;}

.config-input,
.config-select{padding:14px 18px;border:1px solid var(--border-color);border-radius:var(--radius-pill);font-size:.95rem;background:linear-gradient(145deg,#ffffff,#f1f5f9);color:#1f2937;font-weight:500;letter-spacing:.3px;box-shadow:inset 0 1px 2px rgba(0,0,0,0.04);transition:var(--transition);} body.dark-theme .config-select{background:linear-gradient(145deg,#1e293b,#0f172a);color:#f1f5f9;}

.config-input:focus,
.config-select:focus{outline:none;border-color:var(--primary-color);box-shadow:var(--focus-ring);}

.config-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.config-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* Buttons */
.btn{position:relative;display:inline-flex;align-items:center;gap:10px;padding:14px 28px;border:none;border-radius:var(--radius-pill);font-size:.9rem;font-weight:600;cursor:pointer;transition:var(--transition);text-decoration:none;white-space:nowrap;letter-spacing:.35px;line-height:1;box-shadow:0 4px 14px -4px rgba(0,0,0,.25);background:var(--gradient-primary);color:#fff;overflow:hidden;}
.btn i{font-size:1rem;}
.btn:disabled{opacity:.55;cursor:not-allowed;filter:grayscale(.3);} .btn-primary{background:var(--gradient-primary);} .btn-success{background:linear-gradient(135deg,var(--success-color),#059669);} .btn-secondary{background:linear-gradient(135deg,#64748b,#475569);} .btn-outline{background:transparent;border:1px solid var(--border-color);color:var(--dark-color);box-shadow:none;} body.dark-theme .btn-outline{color:#e2e8f0;border-color:var(--border-color-strong);}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Modern WebSocket Selector */
.websocket-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.websocket-select{font-family:var(--font-mono);font-size:.8rem;padding:14px 20px;min-height:56px;line-height:1.35;box-shadow:inset 0 2px 4px rgba(0,0,0,.04);} 

.websocket-select optgroup {
  font-weight: 600;
  color: var(--dark-color);
  padding: 8px 0;
}

.websocket-select option {
  padding: 8px 12px;
  font-family: var(--font-mono);
}

.websocket-info{display:flex;align-items:center;gap:12px;padding:10px 16px;background:linear-gradient(145deg,#ffffff,#f1f5f9);border-radius:var(--radius-pill);font-size:.75rem;font-weight:500;color:var(--text-muted);box-shadow:inset 0 1px 2px rgba(0,0,0,.05);} body.dark-theme .websocket-info{background:linear-gradient(145deg,#1e293b,#0f172a);} 

.protocol-badge{padding:6px 12px;border-radius:var(--radius-pill);font-weight:700;font-size:.6rem;text-transform:uppercase;letter-spacing:1px;box-shadow:0 0 0 1px var(--border-color) inset;}

.protocol-badge.wss {
  background-color: var(--success-color);
  color: white;
}

.protocol-badge.ws {
  background-color: var(--warning-color);
  color: var(--dark-color);
}

.endpoint-description {
  color: var(--text-muted);
  flex: 1;
}

/* Modern File Upload */
.modern-file-upload {
  position: relative;
}

.file-upload-zone{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:56px 26px;border:2.5px dashed var(--border-color);border-radius:26px;background:var(--gradient-surface);transition:all .4s ease;cursor:pointer;min-height:240px;position:relative;overflow:hidden;} body.dark-theme .file-upload-zone{background:linear-gradient(145deg,#1e293b,#0f172a);} 

.file-upload-zone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(0, 122, 204, 0.03) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.file-upload-zone.drag-over {
  border-color: var(--success-color);
  background-color: rgba(40, 167, 69, 0.05);
}

.upload-icon{font-size:3.9rem;color:var(--primary-color);margin-bottom:20px;filter:drop-shadow(0 4px 10px rgba(99,102,241,0.45));transition:all .45s ease;} 



.upload-content {
  text-align: center;
  margin-bottom: 20px;
}

.upload-title{font-size:1.45rem;font-weight:700;color:var(--dark-color);margin:0 0 10px 0;letter-spacing:.5px;} body.dark-theme .upload-title{color:#f8fafc;} 

.upload-subtitle{color:var(--text-muted);margin:0 0 22px 0;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.85px;} 

.supported-formats {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.format-badge{padding:6px 12px;background:linear-gradient(145deg,#ffffff,#f1f5f9);border:1px solid var(--border-color);border-radius:var(--radius-pill);font-size:.55rem;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:1px;box-shadow:0 2px 4px rgba(0,0,0,0.04);} body.dark-theme .format-badge{background:linear-gradient(145deg,#1e293b,#0f172a);} 

.modern-upload-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary-color), #005a9e);
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}



.modern-upload-btn{padding:12px 22px;background:var(--gradient-accent);color:#fff;border:none;border-radius:var(--radius-pill);font-weight:600;cursor:pointer;transition:all .35s ease;display:inline-flex;align-items:center;gap:10px;font-size:.85rem;letter-spacing:.4px;box-shadow:0 4px 16px -6px rgba(139,92,246,.45);min-height:50px;line-height:1;} .modern-upload-btn:hover{box-shadow:0 8px 24px -6px rgba(139,92,246,.55);} 
/* Ensure consistency specifically inside the upload zone */
.file-upload-zone .modern-upload-btn{align-self:center;min-width:200px;}

/* Modern file preview (overrides legacy block below) */
.file-preview{margin-top:20px;padding:20px 22px;background:linear-gradient(145deg,#ffffff,#f1f5f9);border:1px solid var(--border-color);border-radius:26px;box-shadow:0 6px 28px -8px rgba(0,0,0,.18);position:relative;} body.dark-theme .file-preview{background:linear-gradient(145deg,#1e293b,#0f172a);} 
.file-preview-content{display:flex;align-items:center;gap:18px;}
.file-icon{width:58px;height:58px;background:linear-gradient(135deg,var(--info-color),var(--primary-accent));border-radius:18px;display:flex;align-items:center;justify-content:center;color:white;font-size:1.35rem;box-shadow:0 4px 18px -6px rgba(14,165,233,.6);} 
.file-details {
  flex: 1;
}

.file-name {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 4px;
  word-break: break-all;
}

.file-meta {
  display: flex;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-size, .file-type {
  padding: 2px 6px;
  background-color: var(--light-color);
  border-radius: 3px;
}

.remove-file-btn{width:40px;height:40px;background:linear-gradient(135deg,var(--danger-color),#b91c1c);color:white;border:none;border-radius:16px;cursor:pointer;transition:all .35s ease;display:flex;align-items:center;justify-content:center;font-size:.85rem;box-shadow:0 4px 14px -6px rgba(220,38,38,.55);}  

.upload-progress {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.progress-bar {
  height: 8px;
  background-color: var(--light-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill{height:100%;background:linear-gradient(90deg,var(--primary-color),var(--primary-accent),var(--success-color));background-size:200% 100%;animation:gradientShift 6s ease infinite;border-radius:4px;transition:width .3s ease;width:0%;box-shadow:0 2px 6px -1px rgba(0,0,0,.3);} @keyframes gradientShift{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}} 

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Legacy File Upload (keep for backward compatibility) */
.file-upload {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
}



.file-upload input[type="file"] {
  display: none;
}

.file-upload .file-icon {
  font-size: 2rem;
  color: var(--primary-color);
}

.file-upload .file-info {
  flex: 1;
}

.file-upload .file-label {
  font-weight: 500;
  color: var(--dark-color);
}

.file-upload .file-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Pipeline Dashboard */
.pipeline-panel {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 12px;
  overflow: hidden;
}

.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #dee2e6;
}

.pipeline-header h2 {
  color: #495057;
  font-weight: 700;
}

.pipeline-header h2 i {
  color: #6f42c1;
  margin-right: 8px;
}

.performance-grade {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.grade-label {
  font-weight: 600;
  color: #6c757d;
}

.grade-value {
  font-weight: 700;
  color: #495057;
}

/* Pipeline Overview Stats */
.pipeline-overview {
  margin-bottom: 25px;
}

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

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}



.stat-card.total-time .stat-icon {
  background: linear-gradient(135deg, #17a2b8, #138496);
  color: white;
}

.stat-card.session-info .stat-icon {
  background: linear-gradient(135deg, #6f42c1, #5a32a3);
  color: white;
}

.stat-card.bottleneck .stat-icon {
  background: linear-gradient(135deg, #fd7e14, #e8690b);
  color: white;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #495057;
}

/* Pipeline Table */
.pipeline-table-container {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #e9ecef;
}

.pipeline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.pipeline-table thead {
  background: linear-gradient(135deg, #495057, #6c757d);
  color: white;
}

.pipeline-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}

.pipeline-table th.stage-col { width: 25%; }
.pipeline-table th.status-col { width: 15%; }
.pipeline-table th.timing-col { width: 15%; }
.pipeline-table th.progress-col { width: 20%; }
.pipeline-table th.details-col { width: 25%; }

.pipeline-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: all 0.2s ease;
}



.pipeline-table tbody tr:last-child {
  border-bottom: none;
}

.pipeline-table td {
  padding: 16px 12px;
  vertical-align: middle;
}

/* Stage Info */
.stage-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stage-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  font-weight: 600;
}

.stage-icon.upload {
  background: linear-gradient(135deg, #28a745, #1e7e34);
}

.stage-icon.stt {
  background: linear-gradient(135deg, #007bff, #0056b3);
}

.stage-icon.llm {
  background: linear-gradient(135deg, #6f42c1, #5a32a3);
}

.stage-icon.tts {
  background: linear-gradient(135deg, #fd7e14, #e8690b);
}

.stage-name {
  font-weight: 600;
  color: #495057;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 80px;
  justify-content: center;
}

.status-badge.ready {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.status-badge.waiting {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-badge.processing {
  background-color: #cce5ff;
  color: #004085;
  border: 1px solid #99d6ff;
  animation: pulse 1.5s infinite;
}

.status-badge.complete {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-badge.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-badge.idle {
  background-color: #e2e3e5;
  color: #6c757d;
  border: 1px solid #d6d8db;
}

/* Timing */
.timing-value {
  font-weight: 600;
  color: #495057;
  font-family: var(--font-mono);
}

/* Progress Bars */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.3s ease, background-color 0.3s ease;
  position: relative;
}

.progress-bar:not([style*="width: 0"]):after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 20px 20px;
  animation: progress-animation 1s linear infinite;
}

@keyframes progress-animation {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}

#uploadProgress.processing {
  background: linear-gradient(135deg, #28a745, #1e7e34);
}

#sttProgress.processing {
  background: linear-gradient(135deg, #007bff, #0056b3);
}

#llmProgress.processing {
  background: linear-gradient(135deg, #6f42c1, #5a32a3);
}

#ttsProgress.processing {
  background: linear-gradient(135deg, #fd7e14, #e8690b);
}

.progress-bar.complete {
  background: linear-gradient(135deg, #28a745, #1e7e34);
}

.progress-bar.error {
  background: linear-gradient(135deg, #dc3545, #b21f2d);
}

/* Details */
.details-text {
  color: #6c757d;
  font-size: 0.85rem;
  font-style: italic;
}

/* Row states */
.stage-row.active {
  background-color: rgba(0, 123, 255, 0.05);
  border-left: 4px solid #007bff;
}

.stage-row.processing {
  background-color: rgba(111, 66, 193, 0.05);
  border-left: 4px solid #6f42c1;
}

.stage-row.complete {
  background-color: rgba(40, 167, 69, 0.05);
  border-left: 4px solid #28a745;
}

.stage-row.error {
  background-color: rgba(220, 53, 69, 0.05);
  border-left: 4px solid #dc3545;
}

/* Responsive Design for Pipeline Table */
@media (max-width: 768px) {
  .overview-stats {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    flex-direction: row;
    gap: 15px;
  }
  
  .pipeline-table-container {
    overflow-x: auto;
  }
  
  .pipeline-table {
    min-width: 600px;
  }
  
  .pipeline-table th,
  .pipeline-table td {
    padding: 12px 8px;
    font-size: 0.8rem;
  }
  
  .stage-info {
    gap: 8px;
  }
  
  .stage-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .stage-name {
    font-size: 0.85rem;
  }
}

/* Stage Details */
.stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.stage-item {
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
}

.stage-header {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.stage-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 8px;
  min-width: 60px;
}

.stage-status.idle {
  background-color: var(--light-color);
  color: var(--text-muted);
}

.stage-status.ready {
  background-color: rgba(23, 162, 184, 0.1);
  color: var(--info-color);
}

.stage-status.waiting {
  background-color: rgba(255, 193, 7, 0.1);
  color: var(--warning-color);
}

.stage-status.processing {
  background-color: rgba(0, 122, 204, 0.1);
  color: var(--primary-color);
}

.stage-status.complete {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
}

.stage-timing,
.stage-data {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.stage-data {
  word-break: break-all;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Response Panel Enhancement - Remove old styles */
.response-section {
  margin-bottom: 20px;
}

.response-section h3 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  color: var(--dark-color);
}

/* Update old response-content for backward compatibility */
.response-content:not(.chat-container):not(.audio-player-section) {
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--light-color);
  min-height: 60px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.response-content.partial {
  border-left: 4px solid var(--warning-color);
  background-color: rgba(255, 193, 7, 0.05);
}

.response-content.final {
  border-left: 4px solid var(--success-color);
  background-color: rgba(40, 167, 69, 0.05);
}

.response-content.complete {
  border-left: 4px solid var(--primary-color);
  background-color: rgba(0, 122, 204, 0.05);
}
.chat-container {
  max-height: 400px;
  overflow-y: auto;
  padding: 20px;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  position: relative;
}

body.dark-theme .chat-container {
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  margin: 0;
  font-size: 1.1rem;
}

.chat-message {
  display: flex;
  margin-bottom: 16px;
  gap: 12px;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message.assistant {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-message.user .message-bubble {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-accent));
  color: white;
  border-bottom-right-radius: 6px;
}

.chat-message.assistant .message-bubble {
  background: var(--light-color);
  color: var(--dark-color);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 6px;
}

body.dark-theme .chat-message.assistant .message-bubble {
  background: #374151;
  color: #f1f5f9;
  border-color: var(--border-color-strong);
}

.message-content {
  font-size: 0.95rem;
  line-height: 1.4;
}

.message-timestamp {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 4px;
}

.message-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 4px;
  opacity: 0.8;
}

/* Audio Player Section Enhancement */
.audio-player-section {
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
}

body.dark-theme .audio-player-section {
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

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

.audio-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.audio-label {
  font-weight: 600;
  color: var(--dark-color);
  font-size: 0.9rem;
}

body.dark-theme .audio-label {
  color: #f1f5f9;
}

.audio-duration {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Combined Panel Tabs */
.combined-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px 16px 0 0;
  padding: 0 4px;
  gap: 4px;
}

body.dark-theme .combined-tabs {
  background: rgba(30, 41, 59, 0.5);
}

.combined-tabs .tab-button {
  flex: 1;
  padding: 14px 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.combined-tabs .tab-button.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.combined-content {
  padding: 24px;
}

.combined-content .tab-content {
  display: none;
}

.combined-content .tab-content.active {
  display: block;
}

/* Enhanced Stage Details */
.stage-details-enhanced {
  background: transparent;
}

.details-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 4px;
}

body.dark-theme .details-tabs {
  background: rgba(30, 41, 59, 0.6);
}

.stage-tab-button {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.stage-tab-button.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-accent));
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.stage-content .stage-tab-content {
  display: none;
}

.stage-content .stage-tab-content.active {
  display: block;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric-card {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

body.dark-theme .metric-card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

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

.metric-label {
  font-weight: 600;
  color: var(--dark-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.dark-theme .metric-label {
  color: #f1f5f9;
}

/* Progress Rings */
.progress-ring {
  width: 80px;
  height: 80px;
  background: conic-gradient(
    var(--primary-color) 0deg,
    var(--primary-accent) 90deg,
    var(--border-color) 90deg,
    var(--border-color) 360deg
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
}

.progress-ring::before {
  content: '';
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  border-radius: 50%;
  position: absolute;
}

body.dark-theme .progress-ring::before {
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

.progress-ring-value {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark-color);
  font-family: var(--font-mono);
}

body.dark-theme .progress-ring-value {
  color: #f1f5f9;
}

/* Confidence Meter */
.confidence-meter {
  width: 120px;
  height: 24px;
  background: var(--border-color);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, 
    var(--danger-color) 0%, 
    var(--warning-color) 50%, 
    var(--success-color) 100%);
  border-radius: 12px;
  width: 0%;
  transition: width 0.5s ease;
}

.confidence-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 0.75rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* Token Meter */
.token-meter {
  width: 140px;
}

.token-bar {
  height: 20px;
  background: var(--border-color);
  border-radius: 10px;
  display: flex;
  overflow: hidden;
  margin-bottom: 8px;
}

.token-segment {
  height: 100%;
  transition: width 0.5s ease;
}

.token-segment.prompt {
  background: linear-gradient(90deg, var(--info-color), var(--primary-color));
}

.token-segment.completion {
  background: linear-gradient(90deg, var(--primary-accent), var(--success-color));
}

.token-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.prompt-tokens {
  color: var(--info-color);
}

.completion-tokens {
  color: var(--success-color);
}

/* Quality Indicator */
.quality-indicator {
  width: 100px;
}

.quality-bars {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 40px;
  justify-content: center;
}

.quality-bar {
  width: 8px;
  background: var(--border-color);
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
}

.quality-bar:nth-child(1) { height: 20%; }
.quality-bar:nth-child(2) { height: 40%; }
.quality-bar:nth-child(3) { height: 60%; }
.quality-bar:nth-child(4) { height: 80%; }
.quality-bar:nth-child(5) { height: 100%; }

.quality-indicator.high .quality-bar {
  background: linear-gradient(0deg, var(--success-color), var(--primary-color));
}

.quality-indicator.medium .quality-bar:nth-child(-n+3) {
  background: linear-gradient(0deg, var(--warning-color), var(--primary-accent));
}

.quality-indicator.low .quality-bar:nth-child(1) {
  background: linear-gradient(0deg, var(--danger-color), var(--warning-color));
}

/* Detail Group Enhancement */
.detail-group {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

body.dark-theme .detail-group {
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  min-width: 140px;
  text-align: left;
}

.detail-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--dark-color);
  text-align: right;
  word-break: break-word;
  flex: 1;
}

body.dark-theme .detail-value {
  color: #f1f5f9;
}

/* Chat Container Scrollbar */
.chat-container::-webkit-scrollbar {
  width: 6px;
}

.chat-container::-webkit-scrollbar-track {
  background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}



/* Responsive Design for New Components */
@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .chat-message .message-bubble {
    max-width: 90%;
  }
  
  .audio-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .combined-tabs .tab-button {
    font-size: 0.8rem;
    padding: 12px 8px;
  }
  
  .details-tabs {
    flex-direction: column;
    gap: 4px;
  }
  
  .stage-tab-button {
    padding: 10px 12px;
  }
}
.response-section {
  margin-bottom: 20px;
}

.response-section h3 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  color: var(--dark-color);
}

.response-content {
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--light-color);
  min-height: 60px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.response-content.partial {
  border-left: 4px solid var(--warning-color);
  background-color: rgba(255, 193, 7, 0.05);
}

.response-content.final {
  border-left: 4px solid var(--success-color);
  background-color: rgba(40, 167, 69, 0.05);
}

.response-content.complete {
  border-left: 4px solid var(--primary-color);
  background-color: rgba(0, 122, 204, 0.05);
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.audio-controls audio {
  flex: 1;
}

/* Debug Events Log */
.log-panel {
  grid-column: 1 / -1; /* Full width */
}

.log-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.log-filters {
  display: flex;
  gap: 10px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.log-content {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: #1e1e1e;
  color: #d4d4d4;
}

.debug-log {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.4;
}

.log-entry {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px solid #333;
  transition: background-color 0.1s ease;
}



.log-entry.info {
  border-left: 3px solid var(--info-color);
}

.log-entry.warning {
  border-left: 3px solid var(--warning-color);
}

.log-entry.error {
  border-left: 3px solid var(--danger-color);
}

.log-entry.debug {
  border-left: 3px solid var(--text-muted);
}

.log-entry.initial {
  border-left: 3px solid var(--success-color);
}

.log-timestamp {
  color: #569cd6;
  min-width: 80px;
  font-weight: 500;
}

.log-level {
  min-width: 60px;
  font-weight: 600;
  text-transform: uppercase;
}

.log-level.info {
  color: var(--info-color);
}

.log-level.warning {
  color: var(--warning-color);
}

.log-level.error {
  color: var(--danger-color);
}

.log-level.debug {
  color: var(--text-muted);
}

.log-stage {
  min-width: 80px;
  color: #4ec9b0;
  font-weight: 500;
}

.log-message {
  flex: 1;
  color: #d4d4d4;
}

/* Export Panel */
.export-panel {
  grid-column: 1 / -1; /* Full width */
}

.export-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.export-options {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.export-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.session-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  min-width: 80px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }
  
  body {
    padding: 10px;
  }
  
  .header {
    padding: 20px;
    text-align: center;
  }
  
  .header h1 {
    font-size: 2rem;
    flex-direction: column;
    gap: 10px;
  }
  
  .debug-grid {
    grid-template-columns: 1fr;
  }
  
  .config-grid {
    grid-template-columns: 1fr;
  }
  
  .stages-grid {
    grid-template-columns: 1fr;
  }
  
  .export-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .export-options {
    justify-content: center;
  }
  
  .session-stats {
    justify-content: center;
  }
  
  .btn-group {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.5rem;
  }
  
  .panel-header {
    padding: 15px;
  }
  
  .panel-content {
    padding: 15px;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .log-entry {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px;
  }
  
  .log-timestamp,
  .log-level,
  .log-stage {
    min-width: auto;
  }
}

/* Animations */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.status-indicator.connecting {
  animation: pulse 1.5s infinite;
}

.stage-status.processing {
  animation: pulse 1.5s infinite;
}

/* Accessibility */
.btn:focus,
.config-input:focus,
.config-select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.filter-checkbox:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Scrollbar styling for webkit browsers */
.log-content::-webkit-scrollbar {
  width: 8px;
}

.log-content::-webkit-scrollbar-track {
  background: #2d2d30;
}

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

