/* ==========================================================================
   components-demos.css
   Maxime Heckel Style: Interactive Algorithm Demos & Controls
   ========================================================================== */


.maxime-demos-wrapper {
  margin-top: 10px;
  margin-bottom: 60px;
}

.demos-intro-header {
  margin-bottom: 35px;
}

.demos-main-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  margin: 6px 0 10px 0;
}

.demos-subtext {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

.demo-card-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.2);
  color: var(--text-main);
}

.demo-header {
  margin-bottom: 20px;
}

.demo-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.demo-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 8px 0;
}

.demo-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.demo-interactive-stage {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .demo-interactive-stage {
    flex-direction: column;
  }
}

.canvas-wrapper {
  flex: 1;
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  max-width: 600px;
  display: block;
  cursor: crosshair;
}

.canvas-hint {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 10px;
  color: #64748b;
  background: rgba(15, 23, 42, 0.7);
  padding: 2px 8px;
  border-radius: 4px;
  pointer-events: none;
}

.demo-control-panel {
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 900px) {
  .demo-control-panel {
    width: 100%;
  }
}

.panel-section {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 14px 16px;
}

.panel-title {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.algo-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.algo-btn.primary-btn {
  background: #7c3aed;
  border: 1px solid #9333ea;
  color: #ffffff;
}

.algo-btn.primary-btn:hover {
  background: #6d28d9;
}

.algo-btn.secondary-btn {
  background: #0284c7;
  border: 1px solid #0369a1;
  color: #ffffff;
}

.algo-btn.secondary-btn:hover {
  background: #0369a1;
}

.algo-btn.accent-btn {
  background: #059669;
  border: 1px solid #047857;
  color: #ffffff;
}

.algo-btn.accent-btn:hover {
  background: #047857;
}

.algo-btn.outline-btn {
  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
}

.algo-btn.outline-btn:hover {
  background: #1e293b;
  color: #e2e8f0;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  margin-bottom: 8px;
}

.metric-label {
  color: #94a3b8;
}

.metric-value {
  color: #e2e8f0;
  font-weight: 700;
}

.metric-value.highlight {
  color: #c084fc;
}

.text-emerald {
  color: #34d399 !important;
}

.metric-status-badge {
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px;
  border-radius: 4px;
  background: #1e293b;
  color: #94a3b8;
  margin-top: 10px;
}

.metric-status-badge.running {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.metric-status-badge.optimal {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.algo-slider {
  width: 100%;
  accent-color: #a855f7;
  cursor: pointer;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.math-constraint {
  font-size: 11px;
  line-height: 1.6;
  color: #cbd5e1;
  background: #020617;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #1e293b;
}

/* --------------------------------------------------------------------------
