.demo-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  pointer-events: none;
  will-change: transform;
}

.demo-cursor img {
  display: block;
  width: 18px;
  height: 18px;
  transition: transform 0.12s ease;
}

.demo-cursor.pressing img {
  transform: scale(0.86);
}

.demo-target-highlight {
  background: var(--accent-soft) !important;
}

.demo-btn-active {
  transform: scale(0.98);
  filter: brightness(0.95);
}

.demo-rule-removing {
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.demo-context-menu,
.demo-context-submenu {
  position: absolute;
  z-index: 9000;
  min-width: 188px;
  padding: 5px 0;
  border-radius: 10px;
  background: rgba(42, 42, 42, 0.96);
  color: #f2f2f2;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
  line-height: 1.2;
}

.demo-context-submenu {
  min-width: 248px;
}

.demo-context-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  white-space: nowrap;
}

.demo-context-item.muted {
  color: rgba(242, 242, 242, 0.92);
}

.demo-context-item.demo-context-active,
.demo-context-item.demo-context-clicked {
  background: rgba(59, 130, 246, 0.95);
  color: #fff;
}

.demo-context-parent.demo-context-active {
  background: rgba(59, 130, 246, 0.95);
  color: #fff;
}

.demo-context-separator {
  height: 1px;
  margin: 5px 0;
  background: rgba(255, 255, 255, 0.1);
}

.demo-context-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.demo-context-chevron {
  margin-left: auto;
  opacity: 0.72;
  font-size: 14px;
}

.demo-copy-toast {
  position: absolute;
  z-index: 9500;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.94);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .demo-cursor {
    display: none;
  }
}
