.demo-hero {
  padding: 80px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
}
.demo-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.demo-hero .lead {
  font-size: 1.125rem;
  color: #64748b;
  max-width: 700px;
  margin: 0 auto;
}
.demo-hero .lead strong {
  color: #6366f1;
}

.demo-playground {
  padding: 40px 0 80px;
}

.demo-step {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}
.demo-step.disabled {
  opacity: 0.5;
  pointer-events: none;
}
.demo-step.active {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.demo-step.completed {
  border-color: #10b981;
}
.demo-step.completed .step-number {
  background: #10b981;
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.step-header h2 {
  font-size: 1.25rem;
  margin: 0 0 4px;
}
.step-header p {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #6366f1;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content {
  padding-left: 52px;
}

.key-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.key-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.key-box.public .key-header {
  background: rgba(16, 185, 129, 0.1);
}
.key-box.private .key-header {
  background: rgba(239, 68, 68, 0.1);
}
.key-box pre {
  margin: 0;
  padding: 12px;
  font-size: 0.625rem;
  max-height: 80px;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  word-break: break-all;
}

.key-header {
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
}

.key-label {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.key-badge {
  font-size: 0.625rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.key-badge.safe {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}
.key-badge.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.metrics-row {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding: 16px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 8px;
}

.metric {
  text-align: center;
}
.metric .metric-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #6366f1;
  font-family: monospace;
}
.metric .metric-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
}

.demo-form-inputs .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.demo-form-inputs .form-group {
  margin-bottom: 16px;
}
.demo-form-inputs .form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.demo-form-inputs .form-group input, .demo-form-inputs .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #1e293b;
}
.demo-form-inputs .form-group input:focus, .demo-form-inputs .form-group textarea:focus {
  outline: none;
  border-color: #6366f1;
}
.demo-form-inputs .form-group input:disabled, .demo-form-inputs .form-group textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.demo-form-inputs .form-group small {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #64748b;
}

.pii-detection {
  margin-top: 16px;
  padding: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
}

.pii-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 8px;
}

.pii-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pii-tags .pii-tag {
  padding: 4px 8px;
  background: rgba(245, 158, 11, 0.2);
  border-radius: 4px;
  font-size: 0.75rem;
}

.encryption-visualization {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  margin: 20px 0;
  background: #f8fafc;
  border-radius: 8px;
}

.viz-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  opacity: 0.4;
  transition: all 0.3s;
}
.viz-step.active {
  opacity: 1;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 8px;
}
.viz-step.complete {
  opacity: 1;
}
.viz-step.complete .viz-icon {
  color: #10b981;
}
.viz-step .viz-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid currentColor;
}
.viz-step .viz-icon.success {
  background: #10b981;
  border-color: #10b981;
  color: white;
}
.viz-step span {
  font-size: 0.75rem;
  color: #64748b;
}

.viz-arrow {
  font-size: 1.5rem;
  color: #64748b;
}

.output-tabs {
  display: flex;
  gap: 4px;
  margin: 20px 0 0;
  border-bottom: 1px solid #e2e8f0;
}
.output-tabs .tab {
  padding: 10px 16px;
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.875rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.output-tabs .tab.active {
  color: #6366f1;
  border-bottom-color: #6366f1;
}

.output-panel {
  background: #0f172a;
  border-radius: 0 0 8px 8px;
}

.tab-content {
  display: none;
  padding: 16px;
}
.tab-content.active {
  display: block;
}
.tab-content pre {
  margin: 0;
  font-size: 0.75rem;
  color: #e2e8f0;
  max-height: 300px;
  overflow: auto;
}
.tab-content pre .key {
  color: #7dd3fc;
}
.tab-content pre .string {
  color: #86efac;
}
.tab-content pre .highlight {
  color: #fbbf24;
}

.server-callout {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 8px;
}
.server-callout .callout-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.2);
  border-radius: 8px;
  color: #0ea5e9;
}
.server-callout .callout-content strong {
  display: block;
  margin-bottom: 4px;
}
.server-callout .callout-content p {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.decrypted-output {
  margin-top: 20px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
}
.decrypted-output .decrypted-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  font-weight: 600;
}
.decrypted-output pre {
  margin: 0;
  padding: 16px;
  background: #0f172a;
  color: #e2e8f0;
}

.demo-summary {
  margin-top: 40px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-radius: 16px;
  text-align: center;
}
.demo-summary h2 {
  font-size: 2rem;
  margin-bottom: 32px;
  color: #10b981;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.summary-item {
  text-align: center;
}
.summary-item .summary-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.summary-item .summary-icon.green {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}
.summary-item h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.summary-item p {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.cta-section {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.cta-section .btn-large {
  padding: 14px 28px;
  font-size: 1rem;
}

.benchmark-section {
  padding: 60px 0;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}
.benchmark-section h2 {
  text-align: center;
  margin-bottom: 8px;
}
.benchmark-section .subtitle {
  text-align: center;
  color: #64748b;
  margin-bottom: 32px;
}

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

.benchmark-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}
.benchmark-card h3 {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.benchmark-card .benchmark-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6366f1;
  font-family: monospace;
  margin-bottom: 8px;
}
.benchmark-card .benchmark-value.measured {
  color: #10b981;
}
.benchmark-card p {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
}

.benchmark-note {
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 24px;
}

.btn-primary, .btn-success, .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
}
.btn-primary:disabled, .btn-success:disabled, .btn-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #6366f1;
  color: white;
}
.btn-primary:hover:not(:disabled) {
  background: #4f46e5;
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-outline {
  background: transparent;
  color: #6366f1;
  border: 1px solid #6366f1;
}

@media (max-width: 576px) {
  .demo-hero h1 {
    font-size: 1.75rem;
  }
  .step-content {
    padding-left: 0;
  }
  .key-display, .demo-form-inputs .form-row, .summary-grid {
    grid-template-columns: 1fr;
  }
  .benchmark-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .encryption-visualization {
    flex-direction: column;
  }
  .viz-arrow {
    transform: rotate(90deg);
  }
  .cta-section {
    flex-direction: column;
    align-items: center;
  }
}
