/* ========== DEMOS & INTERACTIVE ========== */
.demo-hero {
  text-align: center;
  padding: 160px 24px 60px;
  max-width: 800px;
  margin: 0 auto;
}
.demo-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff, var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.demo-hero p { color: var(--text-muted); font-size: 1.125rem; }

.demo-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Network Topology */
.network-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 32px 0;
  padding: 32px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: 12px;
}
.net-node {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: 2px solid rgba(0,212,255,0.2);
  transition: all 0.5s;
  position: relative;
}
.net-node.safe { border-color: var(--green); background: rgba(0,255,136,0.1); }
.net-node.threat { border-color: var(--red); background: rgba(255,51,102,0.15); animation: pulse-threat 2s infinite; }
.net-node.scanning { border-color: var(--blue); background: rgba(0,212,255,0.1); animation: pulse-scan 1.5s infinite; }
.net-node.blocked { border-color: var(--purple); background: rgba(108,58,237,0.1); }

@keyframes pulse-threat {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,51,102,0.4); }
  50% { box-shadow: 0 0 20px 8px rgba(255,51,102,0.2); }
}
@keyframes pulse-scan {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,255,0.3); }
  50% { box-shadow: 0 0 15px 5px rgba(0,212,255,0.15); }
}

/* Chat Interface */
.chat-container {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  max-width: 700px;
  margin: 32px auto;
}
.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-header .agent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.chat-header .agent-info h4 { font-size: 0.9rem; font-weight: 600; }
.chat-header .agent-info span { font-size: 0.75rem; color: var(--green); }
.chat-messages {
  height: 400px;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.2); border-radius: 2px; }

.chat-msg {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
}
.chat-msg.agent {
  align-self: flex-start;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.15);
  color: var(--text-muted);
}
.chat-msg.user {
  align-self: flex-end;
  background: rgba(108,58,237,0.15);
  border: 1px solid rgba(108,58,237,0.2);
  color: #fff;
}
.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 12px;
}
.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}
.chat-input-area input:focus { border-color: rgba(0,212,255,0.4); }
.chat-input-area button {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Quiz / Questionnaire */
.quiz-container {
  max-width: 700px;
  margin: 32px auto;
}
.quiz-progress {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-bottom: 32px;
  overflow: hidden;
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 2px;
  transition: width 0.5s ease;
}
.quiz-question {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
}
.quiz-question h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; }
.quiz-options { display: flex; flex-direction: column; gap: 12px; }
.quiz-option {
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.quiz-option:hover { border-color: rgba(0,212,255,0.3); background: rgba(0,212,255,0.05); }
.quiz-option.selected { border-color: var(--blue); background: rgba(0,212,255,0.08); }
.quiz-option .radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-dim);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quiz-option.selected .radio { border-color: var(--blue); }
.quiz-option.selected .radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}

/* Results */
.results-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  margin: 32px auto;
  max-width: 600px;
}
.results-score {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.results-label { font-size: 1rem; color: var(--text-muted); margin-bottom: 24px; }
.results-breakdown { text-align: left; margin: 24px 0; }
.results-breakdown .result-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.result-item .label { color: var(--text-muted); }
.result-item .value { font-weight: 600; }
.result-item .value.good { color: var(--green); }
.result-item .value.warn { color: #ffaa00; }
.result-item .value.bad { color: var(--red); }

/* Gauge */
.gauge-container {
  width: 200px;
  height: 100px;
  margin: 0 auto 24px;
  position: relative;
  overflow: hidden;
}
.gauge-bg, .gauge-fill {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 16px solid transparent;
  position: absolute;
  top: 0;
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}
.gauge-bg { border-top-color: rgba(255,255,255,0.06); border-left-color: rgba(255,255,255,0.06); border-right-color: rgba(255,255,255,0.06); }
.gauge-fill {
  border-top-color: var(--green);
  border-left-color: var(--green);
  border-right-color: var(--green);
  transform: rotate(0deg);
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
}
.gauge-value {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  font-weight: 800;
}

@media (max-width: 768px) {
  .demo-hero h1 { font-size: 2rem; }
  .network-grid { grid-template-columns: repeat(3, 1fr); }
  .chat-messages { height: 300px; }
}
