/* SkyeGate live demo — used on /skyegate/ (inline) and /skyegate/demo/ (full page) */

.demo-card {
  max-width: 720px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 32px;
}

.demo-picker { margin-bottom: 24px; }
.demo-picker label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 8px;
}
.demo-picker-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
#presetSelect {
  flex: 1;
  min-width: 280px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
  color: #fff;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}
#categoryBadge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold, #c9a84c);
  border: 1px solid rgba(201, 168, 76, 0.3);
}

.gate-area {
  margin-top: 24px;
  padding: 40px 24px;
  background: linear-gradient(135deg, rgba(13, 27, 42, 0.5) 0%, rgba(27, 40, 56, 0.5) 100%);
  border: 1px solid rgba(108, 60, 231, 0.2);
  border-radius: 12px;
  text-align: center;
  min-height: 220px;
  position: relative;
}
.gate-icon { font-size: 3rem; margin-bottom: 16px; line-height: 1; }
.gate-title { font-size: 1.4rem; font-weight: 600; margin: 0 0 12px; }
.gate-sub { font-size: 0.95rem; opacity: 0.75; margin: 0 0 24px; }

#connectBtn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #6C3CE7, #5a2dd6);
  color: #fff;
  box-shadow: 0 4px 14px rgba(108, 60, 231, 0.3);
  transition: all 0.2s ease;
}
#connectBtn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a2dd6, #4a1dc6);
  box-shadow: 0 6px 20px rgba(108, 60, 231, 0.4);
  transform: translateY(-1px);
}
#connectBtn:disabled { opacity: 0.6; cursor: not-allowed; }

.detected {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.detected span {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(108, 60, 231, 0.1);
  border: 1px solid rgba(108, 60, 231, 0.25);
  color: #cbd5e1;
}
.status { margin-top: 16px; font-size: 0.9rem; opacity: 0.7; min-height: 1.2em; }
.status.error { color: #ef4444; opacity: 1; }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 3px solid rgba(108, 60, 231, 0.15);
  border-top-color: #6C3CE7;
  border-radius: 50%;
  animation: sg-spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes sg-spin { to { transform: rotate(360deg); } }

.state-pass { color: #10b981; }
.state-fail { color: #ef4444; }
.state-pass .gate-icon, .state-fail .gate-icon { font-size: 3.5rem; }

.actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.actions button {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.actions button:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.4); }
.actions button.share { border-color: rgba(108, 60, 231, 0.5); color: #a78bfa; }
.actions button.share:hover { background: rgba(108, 60, 231, 0.1); }

.proof { max-width: 720px; margin: 32px auto 80px; }
.proof summary {
  cursor: pointer;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  list-style: none;
}
.proof summary::-webkit-details-marker { display: none; }
.proof summary::before { content: "▸  "; opacity: 0.6; }
.proof[open] summary::before { content: "▾  "; }
.proof-content {
  padding: 20px 24px 8px;
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.85;
}
.proof-content ol { padding-left: 24px; margin: 12px 0; }
.proof-content code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

@media (max-width: 600px) {
  .demo-card { padding: 20px; margin: 20px 16px; }
  .gate-area { padding: 28px 16px; }
  #presetSelect { min-width: 0; width: 100%; }
}
