/**
 * BrightLiz - Decision Twin Styles
 * Aesthetic: Mission Control - Clean, Technical, Impressive
 */

/* ==================== VARIABLES LOCALES ==================== */
.decision-page {
  --twin-green: #10b981;
  --twin-red: #ef4444;
  --twin-orange: #f59e0b;
  --twin-purple: #a855f7;
  --twin-blue: #3b82f6;
  --canvas-bg: rgba(5, 15, 25, 0.95);
  --node-bg: rgba(10, 25, 40, 0.9);
  --glow-gold: rgba(212, 175, 55, 0.4);
  --glow-green: rgba(16, 185, 129, 0.4);
  --glow-red: rgba(239, 68, 68, 0.5);
}

/* ==================== PAGE LAYOUT ==================== */
.decision-page {
  min-height: 100vh;
  background: var(--bg);
}

/* ==================== HERO ==================== */
.decision-hero {
  padding: 100px 0 40px;
  text-align: center;
  background: 
    radial-gradient(ellipse at 50% -20%, rgba(16, 185, 129, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

/* Back link styled in responsive section */

.decision-hero .hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--twin-green);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

.decision-hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.15;
  font-weight: 700;
}

.decision-hero h1 .accent {
  color: var(--gold);
  background: linear-gradient(135deg, var(--gold), var(--gold-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.decision-hero .hero-subtitle {
  font-size: 17px;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ==================== SIMULATION ZONE ==================== */
.simulation-zone {
  padding: 40px 0 80px;
}

/* ==================== STACK SELECTOR ==================== */
.stack-selector {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.stack-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.stack-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.stack-chip.active {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
}

.chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transition: box-shadow 0.3s;
}

.chip-dot.current { background: var(--twin-red); }
.chip-dot.enterprise { background: var(--twin-orange); }
.chip-dot.smart { background: var(--twin-green); }

.stack-chip.active .chip-dot.current { box-shadow: 0 0 12px var(--twin-red); }
.stack-chip.active .chip-dot.enterprise { box-shadow: 0 0 12px var(--twin-orange); }
.stack-chip.active .chip-dot.smart { box-shadow: 0 0 12px var(--twin-green); }

.chip-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ==================== TWIN CANVAS ==================== */
.twin-canvas {
  position: relative;
  background: var(--canvas-bg);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 50px 30px 30px;
  margin-bottom: 32px;
  overflow: visible;
  min-height: 280px;
  transition: border-color 0.3s ease;
}

/* Subtle grid pattern */
.twin-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, rgba(212, 175, 55, 0.02) 1px, transparent 1px),
    linear-gradient(rgba(212, 175, 55, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Ambient glow effect */
.twin-canvas::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(212, 175, 55, 0.03), transparent 60%);
  pointer-events: none;
}

.flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ==================== PROCESS ROW ==================== */
.process-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 10;
  flex-wrap: nowrap;
  min-height: 140px;
}

/* ==================== PROCESS NODES ==================== */
.process-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  background: var(--node-bg);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.process-node:hover {
  transform: translateY(-4px);
  border-color: var(--stack-color, var(--gold));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.process-node.start,
.process-node.end {
  border-radius: 28px;
}

.process-node.critical {
  /* No special color - will use stack color when active */
}

/* Node pulse animation */
.node-pulse {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid transparent;
  opacity: 0;
  transition: all 0.3s;
}

/* Affected state - uses stack color */
.process-node.affected {
  border-color: var(--stack-color, var(--twin-red)) !important;
  animation: node-alert 1s ease-in-out infinite;
}

.process-node.affected .node-pulse {
  opacity: 1;
  border-color: var(--stack-color, var(--twin-red));
  animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes node-alert {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.1); }
  50% { box-shadow: 0 0 25px 5px rgba(255, 255, 255, 0.15); }
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* Improved state - uses green for smart stack */
.process-node.improved {
  border-color: var(--twin-green) !important;
  box-shadow: 0 0 20px var(--glow-green);
}

.node-icon {
  width: 24px;
  height: 24px;
  color: var(--muted);
  flex-shrink: 0;
}

.node-icon svg {
  width: 100%;
  height: 100%;
}

.process-node:hover .node-icon,
.process-node.affected .node-icon {
  color: var(--text);
}

.process-node.improved .node-icon {
  color: var(--twin-green);
}

.node-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  width: 110px;
}

.node-actor {
  font-size: 10px;
  color: var(--muted);
  padding: 3px 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
}

/* SPOF Badge */
.spof-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  padding: 3px 7px;
  background: var(--twin-red);
  color: white;
  font-size: 8px;
  font-weight: 800;
  border-radius: 4px;
  letter-spacing: 0.5px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s;
}

.spof-badge.visible {
  opacity: 1;
  transform: scale(1);
  animation: spof-pulse 2s ease-in-out infinite;
}

@keyframes spof-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 0 8px 3px rgba(239, 68, 68, 0.3); }
}

/* ==================== FLOW ARROWS ==================== */
.flow-arrow {
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.3s;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.flow-arrow svg {
  width: 20px;
  height: 20px;
}

.flow-arrow.active {
  color: var(--twin-green);
}

.flow-arrow.blocked {
  color: var(--twin-red);
  animation: arrow-flash 0.5s ease-in-out infinite;
}

@keyframes arrow-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ==================== SYSTEM STATUS ==================== */
.system-status {
  position: absolute;
  top: 16px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: all 0.3s;
}

.status-dot.nominal {
  background: var(--twin-green);
  box-shadow: 0 0 8px var(--twin-green);
}

.status-dot.degraded {
  background: var(--twin-orange);
  box-shadow: 0 0 8px var(--twin-orange);
  animation: status-blink 1s ease-in-out infinite;
}

.status-dot.critical {
  background: var(--twin-red);
  box-shadow: 0 0 8px var(--twin-red);
  animation: status-blink 0.5s ease-in-out infinite;
}

@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==================== CONTROL PANEL ==================== */
.control-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

/* ==================== DISRUPTION PANEL ==================== */
.disruption-panel {
  background: rgba(10, 26, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 24px;
}

.panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.disruption-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.disruption-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.disruption-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
}

.disruption-btn.active {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--twin-red);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.disruption-icon {
  font-size: 20px;
}

.disruption-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
}

/* ==================== KPI PANEL ==================== */
.kpi-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(10, 26, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.3s;
}

.kpi-card.warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}

.kpi-card.critical {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.kpi-icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 10px;
  color: var(--gold);
  flex-shrink: 0;
}

.kpi-icon svg {
  width: 100%;
  height: 100%;
}

.kpi-content {
  flex: 1;
}

.kpi-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.kpi-card.warning .kpi-value { color: var(--twin-orange); }
.kpi-card.critical .kpi-value { color: var(--twin-red); }

.kpi-trend {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s;
}

.kpi-trend.visible { opacity: 1; }
.kpi-trend.up { color: var(--twin-red); background: rgba(239, 68, 68, 0.15); }
.kpi-trend.down { color: var(--twin-green); background: rgba(16, 185, 129, 0.15); }

/* ==================== INSIGHT PANEL ==================== */
.insight-panel {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 14px;
  margin-bottom: 40px;
  transition: all 0.4s;
}

.insight-panel.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
  border-color: rgba(245, 158, 11, 0.3);
}

.insight-panel.critical {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
  border-color: rgba(239, 68, 68, 0.3);
}

.insight-icon {
  width: 40px;
  height: 40px;
  padding: 10px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 12px;
  color: var(--twin-green);
  flex-shrink: 0;
}

.insight-panel.warning .insight-icon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--twin-orange);
}

.insight-panel.critical .insight-icon {
  background: rgba(239, 68, 68, 0.15);
  color: var(--twin-red);
}

.insight-icon svg {
  width: 100%;
  height: 100%;
}

.insight-content h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.insight-content p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* ==================== COMPARISON SECTION ==================== */
.comparison-section {
  margin-bottom: 48px;
}

.comparison-section h3 {
  font-size: 18px;
  color: var(--text);
  text-align: center;
  margin-bottom: 24px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.compare-card {
  background: rgba(10, 26, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.3s;
}

.compare-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
}

.compare-card.recommended {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), rgba(10, 26, 42, 0.6));
}

.compare-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--glow-gold);
}

.compare-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.compare-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.compare-dot.current { background: var(--twin-red); }
.compare-dot.enterprise { background: var(--twin-orange); }
.compare-dot.smart { background: var(--twin-green); }

.compare-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.recommended-badge {
  margin-left: auto;
  color: var(--twin-green);
  font-size: 16px;
}

.compare-metrics {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compare-metric {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compare-metric .metric-label {
  font-size: 11px;
  color: var(--muted);
  min-width: 70px;
}

.compare-metric .metric-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.compare-metric .metric-fill {
  height: 100%;
  background: var(--twin-green);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.compare-metric .metric-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  min-width: 50px;
  text-align: right;
}

.compare-metric .metric-value.invest {
  color: var(--muted);
  font-weight: 500;
}

/* ==================== CTA ==================== */
.decision-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 60px 0;
  margin-top: 40px;
  background: transparent;
  border: none;
  border-radius: 0;
}

.cta-content h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.cta-content p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .control-panel {
    grid-template-columns: 1fr;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .decision-hero {
    padding: 90px 0 30px;
  }
  
  .decision-hero h1 {
    font-size: 26px;
  }
  
  .simulation-zone {
    padding: 30px 0 60px;
  }
  
  .stack-selector {
    flex-wrap: wrap;
  }
  
  .twin-canvas {
    padding: 30px 16px;
  }
  
  .process-row {
    gap: 8px;
  }
  
  .process-node {
    width: 100px;
    height: 115px;
    padding: 14px 8px;
  }
  
  .node-label {
    font-size: 10px;
    width: 90px;
  }
  
  .node-tech {
    font-size: 8px;
    width: 90px;
    height: 26px;
  }
  
  .node-actor {
    font-size: 9px;
    padding: 2px 8px;
  }
  
  .flow-arrow {
    width: 20px;
    height: 20px;
  }
  
  .flow-arrow svg {
    width: 16px;
    height: 16px;
  }
  
  .disruption-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .kpi-value {
    font-size: 18px;
  }
  
  .decision-cta {
    flex-direction: column;
    text-align: center;
    gap: 24px;
    padding: 40px 0;
  }
}

@media (max-width: 480px) {
  .process-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .process-node {
    width: 160px;
    height: 110px;
  }
  
  .flow-arrow {
    transform: rotate(90deg);
    width: 20px;
    height: 20px;
  }
  
  .system-status {
    position: static;
    justify-content: center;
    margin-bottom: 20px;
  }
  
  .disruption-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.process-node {
  animation: fadeSlideIn 0.4s ease backwards;
}

.process-node:nth-child(1) { animation-delay: 0.05s; }
.process-node:nth-child(3) { animation-delay: 0.1s; }
.process-node:nth-child(5) { animation-delay: 0.15s; }
.process-node:nth-child(7) { animation-delay: 0.2s; }
.process-node:nth-child(9) { animation-delay: 0.25s; }

/* Data flow animation for flow arrows */
.flow-arrow.flowing svg {
  animation: flow-pulse 1s ease-in-out infinite;
}

@keyframes flow-pulse {
  0%, 100% { opacity: 0.4; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(3px); }
}

/* ==================== STACK SECTION ==================== */
.stack-section {
  margin-bottom: 40px;
}

/* ==================== STACK DESCRIPTIONS ==================== */
.stack-descriptions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.stack-desc {
  background: rgba(10, 26, 42, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  opacity: 0.4;
  transition: all 0.3s ease;
  cursor: pointer;
}

.stack-desc:hover {
  opacity: 0.7;
}

.stack-desc.active {
  opacity: 1;
}

/* Couleur de bordure selon la stack active */
.stack-desc.active[data-stack="current"] {
  border-color: var(--twin-red);
}

.stack-desc.active[data-stack="enterprise"] {
  border-color: var(--twin-orange);
}

.stack-desc.active[data-stack="smart"] {
  border-color: var(--twin-green);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stack-desc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stack-desc-badge {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stack-desc-badge.current {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.stack-desc-badge.enterprise {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.stack-desc-badge.smart {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.stack-desc-invest {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.stack-desc-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 16px;
}

.stack-desc-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tech-tag {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted);
}

.tech-tag.highlight {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.stack-desc-metrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.metric-item.positive {
  color: #10b981;
}

.metric-item.negative {
  color: #ef4444;
}

.metric-item .metric-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.metric-item .metric-icon svg {
  width: 100%;
  height: 100%;
}

/* ==================== TWIN WRAPPER ==================== */
.twin-wrapper {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  align-items: stretch;
}

/* ==================== SAMPLE INPUT ==================== */
.sample-input {
  width: 140px;
  flex-shrink: 0;
  background: rgba(10, 26, 42, 0.8);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sample-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--twin-green);
}

.sample-header svg {
  width: 18px;
  height: 18px;
}

.sample-header span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sample-counter {
  margin-bottom: 4px;
}

.sample-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  transition: all 0.3s ease;
}

.sample-number.surge {
  color: var(--twin-orange);
  animation: numberPulse 0.5s ease;
}

.sample-number.crisis {
  color: var(--twin-red);
  animation: numberPulse 0.5s ease;
}

@keyframes numberPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.sample-unit {
  font-size: 11px;
  color: var(--muted);
}

.sample-rate {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.sample-rate span {
  font-weight: 700;
  color: var(--text);
}

/* Ticket Animation */
.sample-animation {
  width: 100%;
  height: 40px;
  position: relative;
  overflow: hidden;
}

.ticket-flow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: ticketFlow 2s linear infinite;
}

.ticket {
  width: 30px;
  height: 8px;
  background: var(--twin-green);
  border-radius: 2px;
  margin: 0 auto;
  opacity: 0.7;
}

.ticket:nth-child(2) {
  width: 24px;
  animation-delay: 0.3s;
}

.ticket:nth-child(3) {
  width: 28px;
  animation-delay: 0.6s;
}

@keyframes ticketFlow {
  0% { transform: translateY(-20px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}

/* Surge animation */
.sample-input.surge .ticket-flow {
  animation-duration: 1s;
}

.sample-input.surge .ticket {
  background: var(--twin-orange);
}

/* Crisis animation */
.sample-input.crisis .ticket-flow {
  animation-duration: 0.5s;
}

.sample-input.crisis .ticket {
  background: var(--twin-red);
}

/* ==================== TWIN CANVAS FLEX ==================== */
.twin-canvas {
  flex: 1;
}

/* ==================== HERO BACK LINK ALIGNMENT ==================== */
.decision-hero .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-top: 30px;
  transition: color 0.2s;
}

.decision-hero .back-link:hover {
  color: var(--gold);
}

.decision-hero .back-link svg {
  width: 16px;
  height: 16px;
}

/* ==================== RESPONSIVE STACK & SAMPLE ==================== */
@media (max-width: 768px) {
  .stack-descriptions {
    grid-template-columns: 1fr;
  }
  
  .twin-wrapper {
    flex-direction: column;
  }
  
  .sample-input {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    padding: 16px;
  }
  
  .sample-animation {
    width: 60px;
    height: 30px;
  }
}

/* ==================== NODE TECH (instead of actor) ==================== */
.node-tech {
  font-size: 9px;
  color: var(--gold);
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
  margin-top: 4px;
  width: 110px;
  height: 28px;
  text-align: center;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== PROCESS LEGEND ==================== */
.process-legend {
  text-align: center;
  padding: 12px 20px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.legend-text {
  font-size: 13px;
  color: var(--muted);
  transition: all 0.3s ease;
}

.process-legend.warning .legend-text {
  color: var(--twin-orange);
}

.process-legend.critical .legend-text {
  color: var(--twin-red);
}

.process-legend.resilient .legend-text {
  color: var(--twin-green);
}

/* ==================== IMPROVED DISRUPTIONS ==================== */
.disruption-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  background: rgba(10, 26, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  min-height: 90px;
}

.disruption-btn:hover {
  background: rgba(10, 26, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.disruption-btn.active {
  border-color: var(--twin-orange);
  background: rgba(245, 158, 11, 0.1);
}

.disruption-btn[data-severity="critical"].active {
  border-color: var(--twin-red);
  background: rgba(239, 68, 68, 0.1);
}

.disruption-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.disruption-icon {
  width: 24px;
  height: 24px;
  color: var(--muted);
  transition: color 0.2s;
}

.disruption-icon svg {
  width: 100%;
  height: 100%;
}

.disruption-btn:hover .disruption-icon,
.disruption-btn.active .disruption-icon {
  color: var(--text);
}

.severity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.6;
}

.severity-dot.warning {
  background: var(--twin-orange);
}

.severity-dot.critical {
  background: var(--twin-red);
}

.disruption-btn.active .severity-dot {
  opacity: 1;
  animation: severityPulse 1.5s infinite;
}

@keyframes severityPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.disruption-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.disruption-impact {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
}

.disruption-btn.active .disruption-impact {
  color: var(--twin-orange);
  opacity: 1;
}

.disruption-btn[data-severity="critical"].active .disruption-impact {
  color: var(--twin-red);
}

/* ==================== DISRUPTION GRID LAYOUT ==================== */
.disruption-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .disruption-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .disruption-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== STACK-BASED THEMING ==================== */
/* Default stack color */
.decision-simulator {
  --stack-color: var(--twin-red);
}

.decision-simulator.stack-current {
  --stack-color: var(--twin-red);
}

.decision-simulator.stack-enterprise {
  --stack-color: var(--twin-orange);
}

.decision-simulator.stack-smart {
  --stack-color: var(--twin-green);
}

/* Apply stack color to key elements */
.decision-simulator .stack-chips .stack-chip.active {
  border-color: var(--stack-color);
  box-shadow: 0 0 20px rgba(var(--stack-color-rgb, 239, 68, 68), 0.2);
}

.decision-simulator .system-status .status-dot.nominal {
  background: var(--stack-color);
  box-shadow: 0 0 10px var(--stack-color);
}

/* Node borders use stack color when active */
.decision-simulator .process-node {
  border-color: rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s ease;
}

.decision-simulator .twin-canvas {
  border-color: rgba(255, 255, 255, 0.1);
}

.decision-simulator.stack-current .twin-canvas {
  border-color: rgba(239, 68, 68, 0.2);
}

.decision-simulator.stack-enterprise .twin-canvas {
  border-color: rgba(245, 158, 11, 0.2);
}

.decision-simulator.stack-smart .twin-canvas {
  border-color: rgba(16, 185, 129, 0.2);
}

/* Process legend border */
.decision-simulator .process-legend {
  border-color: rgba(255, 255, 255, 0.05);
}

.decision-simulator.stack-smart .process-legend {
  border-color: rgba(16, 185, 129, 0.15);
}
