/* ── Demo Sections ── */
.demo-section {
  padding: 0 0 60px;
}

.demo-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-pink);
  margin-bottom: 16px;
}

.demo-stage {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 120px;
  position: relative;
}

.demo-interactive-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-pink);
  background: rgba(255, 92, 241, 0.08);
  border: 1px solid rgba(255, 92, 241, 0.2);
  border-radius: 4px;
  padding: 3px 8px;
  pointer-events: none;
}

.demo-cta-arrows {
  text-align: center;
  font-size: 1.2rem;
  color: var(--color-pink);
  margin-top: 16px;
  margin-bottom: 2px;
  letter-spacing: 0.5em;
  animation: arrow-bounce 1.2s ease-in-out infinite;
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}

.flow-viz-wrap {
  position: relative;
  height: 110px;
  margin-top: 8px;
  margin-bottom: 2px;
}
.flow-viz-wrap svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.demo-result-annotation {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  background: rgba(255, 92, 241, 0.05);
  border-left: 3px solid var(--color-pink);
  padding: 10px 14px;
  margin-top: 12px;
  border-radius: 0 6px 6px 0;
  line-height: 1.5;
}

.demo-reset {
  display: inline-block;
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.demo-reset:hover {
  color: var(--color-text);
}

/* ── File Cards ── */
.file-cards {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.file-card {
  flex: 1;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}
.file-card.selectable {
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.file-card.selectable:hover {
  border-color: var(--color-text-muted);
}
.file-card.selected {
  border-color: var(--color-text-muted);
  box-shadow: none;
}
.file-card.flow-primary {
  border-color: #FF5CF1;
}
.file-card.flow-secondary {
  border-color: #e2e2e5;
  opacity: 0.6;
}
.file-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.file-card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.file-card-check {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: transparent;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.file-card.selected .file-card-check {
  border-color: var(--color-text-muted);
  background: var(--color-text-muted);
  color: #fff;
}
.file-card-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
}
.file-card-size {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ── Demo Tables ── */
.demo-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.demo-table th,
.demo-table td {
  padding: 6px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.demo-table th {
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  cursor: default;
}
.demo-table th.hl-col,
.demo-table td.hl-col {
  background: rgba(255, 92, 241, 0.08);
}

/* ── More Rows Footer ── */
.more-rows {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-style: italic;
  padding: 6px 12px;
  border-bottom: none;
}

.hl-pink { background: rgba(255, 92, 241, 0.08); }
.hl-cyan { background: rgba(64, 229, 255, 0.08); }

/* ── Toggles & Buttons ── */
.demo-toggle {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  margin: 8px 0;
}
.demo-toggle button {
  padding: 6px 16px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.demo-toggle button.active {
  background: var(--gradient);
  color: #fff;
}
.demo-toggle button:not(.active):hover {
  background: var(--color-surface-2);
}

.demo-btn {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.8rem;
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s;
}
.demo-btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.demo-btn:hover {
  border-color: var(--color-text-muted);
}
.demo-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.demo-btn.active {
  border-color: var(--color-pink);
  color: var(--color-pink);
}

.demo-btn-outline {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.8rem;
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s;
}
.demo-btn-outline:hover {
  border-color: var(--color-text-muted);
}

/* ── Demo Controls Row ── */
.demo-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
}

/* ── Row Animation ── */
@keyframes row-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.row-animate {
  animation: row-enter 0.3s ease forwards;
}

/* ── Column Slide-in ── */
@keyframes col-slide-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.col-animate {
  animation: col-slide-in 0.3s ease forwards;
}

/* ── Column Pair Suggestions ── */
.column-pairs {
  display: flex;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.column-pair {
  flex: 1;
  padding: 12px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 180px;
}
.column-pair:hover {
  border-color: var(--color-text-muted);
}
.column-pair.selected {
  border-color: var(--color-pink);
  box-shadow: 0 0 0 1px var(--color-pink);
}
.column-pair-cols {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.column-pair-match {
  font-size: 0.72rem;
  color: #22c55e;
  font-weight: 500;
}

/* ── Thinking Dots ── */
.thinking-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.thinking-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-pink);
  border-radius: 50%;
  animation: thinking-bounce 1s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes thinking-bounce {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* ── Suggestion Cards ── */
.suggestion-cards {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.suggestion-card {
  flex: 1;
  padding: 16px;
  background: var(--color-bg);
  border: 2px solid var(--color-pink);
  border-radius: 8px;
  cursor: pointer;
  transition: box-shadow 0.2s;
  animation: suggestion-pulse 1.8s ease-in-out infinite;
}
.suggestion-card:hover {
  box-shadow: 0 4px 16px rgba(255, 92, 241, 0.2);
  animation: none;
}
.suggestion-card.active {
  border-color: var(--color-pink);
}
.suggestion-card.deselected {
  border-color: #333;
  animation: none;
  opacity: 0.55;
}
.suggestion-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  animation: none;
}
.suggestion-card.interacted {
  animation: none;
}
@keyframes suggestion-pulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 92, 241, 0);
  }
  50% {
    box-shadow: 0 0 16px rgba(255, 92, 241, 0.2);
  }
}
.suggestion-card-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
  gap: 12px;
}
.suggestion-card-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}
.suggestion-card-size {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-text-muted);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Chart Wrapper ── */
.chart-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 12px 0;
}

/* ── Analysis Results Table ── */
.results-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin: 12px 0;
  min-width: 500px;
}
.results-table th,
.results-table td {
  padding: 6px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.results-table th {
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}
.results-table .significant {
  background: rgba(255, 92, 241, 0.08);
  font-weight: 600;
}

/* ── Select / Dropdown ── */
.demo-select {
  padding: 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
}

/* ── Progress Bar ── */
.demo-progress {
  width: 100%;
  height: 6px;
  background: var(--color-surface-2);
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0;
}
.demo-progress-fill {
  height: 100%;
  width: 0;
  background: var(--gradient);
  border-radius: 3px;
  transition: width 1.5s ease;
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-pathogenic { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.badge-benign { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.badge-vus { background: rgba(234, 179, 8, 0.12); color: #ca8a04; }

/* ── Filter Toggle ── */
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  cursor: pointer;
  margin: 8px 0;
  user-select: none;
}
.filter-toggle input[type="checkbox"] {
  accent-color: var(--color-pink);
}

/* ── Gene Network ── */
.network-wrapper {
  margin: 12px 0;
}
.network-svg {
  width: 100%;
  max-width: 460px;
  display: block;
}
.network-svg .node-circle {
  cursor: pointer;
  transition: r 0.2s;
}
.network-svg .node-circle:hover {
  r: 24;
}
.network-svg .node-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--color-text);
  text-anchor: middle;
  pointer-events: none;
}
.network-svg .edge-line {
  stroke: var(--color-border);
  transition: opacity 0.3s;
}

.network-tooltip {
  position: absolute;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  z-index: 10;
  max-width: 200px;
}
.network-tooltip strong {
  display: block;
  margin-bottom: 4px;
}

/* ── Slider ── */
.demo-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.demo-slider-row input[type="range"] {
  flex: 1;
  max-width: 200px;
  accent-color: var(--color-pink);
}

/* ── Option Buttons (Augment) ── */
.option-buttons {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

/* ── Auto-detect label ── */
.auto-detect {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

/* ── Gene Select Cards ── */
.gene-select-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.gene-select-cards .file-card {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
}
.gene-select-cards .file-card-header {
  padding: 8px 12px 4px;
}
.gene-card-loc {
  font-size: 0.72rem;
  color: #22c55e;
  font-weight: 500;
  padding: 0 12px 8px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .file-cards { flex-direction: column; }
  .suggestion-cards { flex-direction: column; }
  .option-buttons { flex-direction: column; }
  .column-pairs { flex-direction: column; }
  .gene-select-cards { flex-direction: column; }
  .demo-stage { padding: 16px; }
  .flow-viz-wrap { height: 0; overflow: hidden; }
  .demo-table-wrap { margin: 0 -16px; padding: 0 16px; }
}
