{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "notfound-broken-plug",
  "type": "registry:component",
  "title": "404 Broken Plug",
  "description": "A 404 page with a flickering neon code and an unplugged cable whose plug and socket throw sparks. The retry button plugs it back in with a short reconnect animation.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "not-found",
    "404",
    "error page",
    "neon",
    "flicker",
    "illustration",
    "retry"
  ],
  "docs": "https://hyperblur.dev/effects/notfound-broken-plug",
  "files": [
    {
      "path": "registry/hyperblur/notfound-broken-plug.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/notfound-broken-plug.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface NotfoundBrokenPlugLink {\n  label: string;\n  href: string;\n}\n\nexport interface NotfoundBrokenPlugProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  code?: string;\n  title?: string;\n  subtitle?: string;\n  retryLabel?: string;\n  retryMessage?: string;\n  primary?: NotfoundBrokenPlugLink;\n  secondary?: NotfoundBrokenPlugLink;\n  onRetry?: () => void;\n  onReport?: () => void;\n  accent?: string;\n}\n\nconst css = `\n.hb-kg4 {\n  --hb-kg4-accent: #ffb020;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kg4 *, .hb-kg4 *::before, .hb-kg4 *::after { box-sizing: border-box; }\n.hb-kg4::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  background:\n    radial-gradient(40% 36% at 50% 22%, color-mix(in srgb, var(--hb-kg4-accent) 18%, transparent), transparent 70%),\n    radial-gradient(60% 40% at 50% 100%, rgba(255, 255, 255, .04), transparent 70%),\n    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 64px);\n  pointer-events: none;\n}\n.hb-kg4-inner {\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: 64px 20px 72px;\n  text-align: center;\n}\n.hb-kg4-code {\n  display: flex;\n  justify-content: center;\n  gap: .04em;\n  margin: 0;\n  font-size: clamp(96px, 16cqi, 156px);\n  font-weight: 250;\n  line-height: .9;\n  letter-spacing: -.02em;\n  color: color-mix(in srgb, var(--hb-kg4-accent) 30%, #fff);\n  user-select: none;\n}\n.hb-kg4-char {\n  text-shadow:\n    0 0 4px color-mix(in srgb, var(--hb-kg4-accent) 90%, #fff),\n    0 0 14px var(--hb-kg4-accent),\n    0 0 36px var(--hb-kg4-accent),\n    0 0 80px color-mix(in srgb, var(--hb-kg4-accent) 60%, transparent);\n  animation: hb-kg4-flicker 5s linear infinite;\n}\n.hb-kg4-char:nth-child(2) { animation: hb-kg4-flicker-b 3.4s linear infinite; }\n.hb-kg4-char:nth-child(3) { animation-delay: -1.7s; }\n.hb-kg4[data-state=\"connecting\"] .hb-kg4-char { animation: hb-kg4-steady .5s ease forwards; }\n.hb-kg4-scene { position: relative; max-width: 720px; margin: 18px auto 0; }\n.hb-kg4-scene svg { display: block; width: 100%; height: auto; overflow: visible; }\n.hb-kg4-plug { transition: transform .9s cubic-bezier(.65, 0, .35, 1); }\n.hb-kg4[data-state=\"connecting\"] .hb-kg4-plug { transform: translateX(72px); transition-duration: .7s; }\n.hb-kg4-spark {\n  transform-box: fill-box;\n  transform-origin: center;\n  stroke: var(--hb-kg4-accent);\n  animation: hb-kg4-spark 1.6s ease-out infinite;\n  animation-delay: var(--hb-kg4-d);\n}\n.hb-kg4-hole { fill: #050505; }\n.hb-kg4-glow { fill: var(--hb-kg4-accent); animation: hb-kg4-pulse 1.6s ease-in-out infinite; }\n.hb-kg4-burst { opacity: 0; transform-box: fill-box; transform-origin: center; }\n.hb-kg4[data-state=\"connecting\"] .hb-kg4-burst { animation: hb-kg4-burst .6s ease-out .62s; }\n.hb-kg4[data-state=\"connecting\"] .hb-kg4-spark { animation: none; opacity: 0; }\n.hb-kg4[data-state=\"connecting\"] .hb-kg4-glow { animation: none; opacity: 1; }\n.hb-kg4-title {\n  margin: 26px 0 0;\n  font-size: clamp(28px, 4.2cqi, 42px);\n  font-weight: 650;\n  line-height: 1.1;\n  letter-spacing: -.03em;\n  text-wrap: balance;\n}\n.hb-kg4-sub {\n  margin: 12px auto 0;\n  max-width: 480px;\n  color: #8f8f8f;\n  font-size: 16px;\n  line-height: 1.6;\n  text-wrap: pretty;\n}\n.hb-kg4-actions {\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-items: center;\n  gap: 10px;\n  margin-top: 28px;\n}\n.hb-kg4-btn {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  min-height: 44px;\n  padding: 0 20px;\n  border: 1px solid transparent;\n  border-radius: 999px;\n  font: inherit;\n  font-size: 14px;\n  font-weight: 600;\n  text-decoration: none;\n  white-space: nowrap;\n  cursor: pointer;\n  transition: transform .2s cubic-bezier(.2, .8, .2, 1), background-color .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .2s ease;\n}\n.hb-kg4-btn svg { width: 16px; height: 16px; flex: none; }\n.hb-kg4-btn:focus-visible, .hb-kg4-link:focus-visible { outline: 2px solid var(--hb-kg4-accent); outline-offset: 3px; }\n.hb-kg4-retry {\n  background: var(--hb-kg4-accent);\n  color: #1a1204;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 0 1px color-mix(in srgb, var(--hb-kg4-accent) 60%, #000), 0 10px 30px -10px var(--hb-kg4-accent);\n}\n.hb-kg4-retry:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 0 1px color-mix(in srgb, var(--hb-kg4-accent) 60%, #000), 0 14px 36px -8px var(--hb-kg4-accent); }\n.hb-kg4-retry:disabled { cursor: progress; opacity: .85; }\n.hb-kg4[data-state=\"connecting\"] .hb-kg4-retry svg { animation: hb-kg4-rot .8s linear infinite; }\n.hb-kg4-ghost { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03); color: #ededed; }\n.hb-kg4-ghost:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .07); }\n.hb-kg4-link {\n  padding: 0 8px;\n  border-radius: 6px;\n  color: #a1a1a1;\n  font-size: 14px;\n  text-decoration: underline;\n  text-decoration-color: rgba(255, 255, 255, .2);\n  text-underline-offset: 4px;\n  transition: color .2s ease, text-decoration-color .2s ease;\n}\n.hb-kg4-link:hover { color: #ededed; text-decoration-color: var(--hb-kg4-accent); }\n.hb-kg4-status {\n  min-height: 20px;\n  margin: 18px 0 0;\n  color: #8f8f8f;\n  font-family: ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\n  font-size: 12px;\n}\n.hb-kg4-status b { color: var(--hb-kg4-accent); font-weight: 500; }\n@container (min-width: 760px) {\n  .hb-kg4-inner { padding: 80px 40px 88px; }\n}\n@keyframes hb-kg4-flicker {\n  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }\n  20%, 24%, 55% { opacity: .25; text-shadow: none; }\n}\n@keyframes hb-kg4-flicker-b {\n  0%, 40%, 44%, 70%, 72%, 74%, 100% { opacity: 1; }\n  42% { opacity: .15; text-shadow: none; }\n  71%, 73% { opacity: .4; text-shadow: none; }\n}\n@keyframes hb-kg4-steady { from { opacity: .4; } to { opacity: 1; filter: brightness(1.25); } }\n@keyframes hb-kg4-spark {\n  0% { opacity: 0; transform: scale(.4); }\n  12% { opacity: 1; transform: scale(1.1); }\n  30% { opacity: .2; transform: scale(.9); }\n  40% { opacity: 1; transform: scale(1); }\n  60%, 100% { opacity: 0; transform: scale(.5); }\n}\n@keyframes hb-kg4-pulse { 0%, 100% { opacity: .15; } 50% { opacity: .9; } }\n@keyframes hb-kg4-burst {\n  0% { opacity: 0; transform: scale(.3); }\n  30% { opacity: 1; transform: scale(1.2); }\n  100% { opacity: 0; transform: scale(1.6); }\n}\n@keyframes hb-kg4-rot { to { transform: rotate(360deg); } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-kg4-char, .hb-kg4-spark, .hb-kg4-glow, .hb-kg4[data-state=\"connecting\"] .hb-kg4-burst, .hb-kg4[data-state=\"connecting\"] .hb-kg4-retry svg { animation: none; }\n  .hb-kg4-glow { opacity: .6; }\n  .hb-kg4-plug, .hb-kg4-btn, .hb-kg4-link { transition: none; }\n  .hb-kg4-btn:hover { transform: none; }\n}\n`;\n\nconst sparks = [\n  { x: 336, y: 62, r: -30, d: \"0s\" },\n  { x: 340, y: 98, r: 30, d: \".5s\" },\n  { x: 392, y: 58, r: 210, d: \".25s\" },\n  { x: 390, y: 102, r: 150, d: \".85s\" },\n];\n\nfunction Spark({ x, y, r, d }: { x: number; y: number; r: number; d: string }) {\n  return (\n    <g transform={`translate(${x} ${y}) rotate(${r})`}>\n      <g className=\"hb-kg4-spark\" style={{ \"--hb-kg4-d\": d } as React.CSSProperties} strokeWidth=\"2\" strokeLinecap=\"round\" fill=\"none\">\n        <path d=\"M0 0h10\" />\n        <path d=\"M2-6l7-3\" />\n        <path d=\"M2 6l7 3\" />\n      </g>\n    </g>\n  );\n}\n\nexport function NotfoundBrokenPlug({\n  code = \"404\",\n  title = \"Looks like this link came unplugged\",\n  subtitle = \"We couldn't connect you to that page. It may have been moved or deleted, or the address has a typo.\",\n  retryLabel = \"Retry connection\",\n  retryMessage = \"Reconnected. The line is fine, the page just isn't there.\",\n  primary = { label: \"Go to homepage\", href: \"/\" },\n  secondary = { label: \"Report a problem\", href: \"mailto:support@voltline.io?subject=Broken%20link\" },\n  onRetry,\n  onReport,\n  accent = \"#ffb020\",\n  className = \"\",\n  style,\n  ...rest\n}: NotfoundBrokenPlugProps) {\n  const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n  const [state, setState] = React.useState<\"idle\" | \"connecting\">(\"idle\");\n  const [attempts, setAttempts] = React.useState(0);\n  const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  const vars = { \"--hb-kg4-accent\": accent, ...style } as React.CSSProperties;\n\n  React.useEffect(() => () => {\n    if (timer.current) clearTimeout(timer.current);\n  }, []);\n\n  const retry = () => {\n    if (state === \"connecting\") return;\n    onRetry?.();\n    setState(\"connecting\");\n    timer.current = setTimeout(() => {\n      setState(\"idle\");\n      setAttempts((n) => n + 1);\n    }, 1500);\n  };\n\n  return (\n    <section className={`hb-kg4 ${className}`} style={vars} data-state={state} aria-labelledby={`${uid}-title`} {...rest}>\n      <style href=\"hb-notfound-broken-plug\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kg4-inner\">\n        <p className=\"hb-kg4-code\" aria-label={`Error ${code}`}>\n          {code.split(\"\").map((c, i) => (\n            <span key={i} className=\"hb-kg4-char\" aria-hidden=\"true\">{c}</span>\n          ))}\n        </p>\n        <div className=\"hb-kg4-scene\" aria-hidden=\"true\">\n          <svg viewBox=\"0 0 720 150\" fill=\"none\">\n            <defs>\n              <linearGradient id={`${uid}-body`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                <stop offset=\"0\" stopColor=\"#2a2a2a\" />\n                <stop offset=\"1\" stopColor=\"#151515\" />\n              </linearGradient>\n              <linearGradient id={`${uid}-prong`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                <stop offset=\"0\" stopColor=\"#f4f4f5\" />\n                <stop offset=\"1\" stopColor=\"#9a9aa2\" />\n              </linearGradient>\n            </defs>\n            <path d=\"M-40 128C90 128 130 80 230 80\" stroke=\"#202020\" strokeWidth=\"11\" strokeLinecap=\"round\" />\n            <path d=\"M-40 126C90 126 130 78 230 78\" stroke=\"rgba(255,255,255,.07)\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n            <path d=\"M760 128C620 128 590 80 456 80\" stroke=\"#202020\" strokeWidth=\"11\" strokeLinecap=\"round\" />\n            <path d=\"M760 126C620 126 590 78 456 78\" stroke=\"rgba(255,255,255,.07)\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n            <ellipse cx=\"360\" cy=\"140\" rx=\"210\" ry=\"6\" fill=\"rgba(0,0,0,.6)\" />\n            <g className=\"hb-kg4-plug\">\n              <path d=\"M200 80h34\" stroke=\"#202020\" strokeWidth=\"14\" strokeLinecap=\"round\" />\n              <rect x=\"228\" y=\"56\" width=\"66\" height=\"48\" rx=\"12\" fill={`url(#${uid}-body)`} stroke=\"rgba(255,255,255,.12)\" />\n              <path d=\"M244 68v24M254 68v24M264 68v24\" stroke=\"rgba(255,255,255,.1)\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n              <rect x=\"294\" y=\"62\" width=\"10\" height=\"36\" rx=\"3\" fill=\"#1d1d1d\" stroke=\"rgba(255,255,255,.1)\" />\n              <rect x=\"304\" y=\"67\" width=\"28\" height=\"7\" rx=\"2\" fill={`url(#${uid}-prong)`} />\n              <rect x=\"304\" y=\"86\" width=\"28\" height=\"7\" rx=\"2\" fill={`url(#${uid}-prong)`} />\n            </g>\n            <g>\n              <rect x=\"400\" y=\"50\" width=\"60\" height=\"60\" rx=\"14\" fill={`url(#${uid}-body)`} stroke=\"rgba(255,255,255,.12)\" />\n              <rect x=\"406\" y=\"56\" width=\"48\" height=\"48\" rx=\"10\" fill=\"none\" stroke=\"rgba(255,255,255,.06)\" />\n              <rect className=\"hb-kg4-hole\" x=\"400\" y=\"66\" width=\"12\" height=\"9\" rx=\"2\" />\n              <rect className=\"hb-kg4-hole\" x=\"400\" y=\"85\" width=\"12\" height=\"9\" rx=\"2\" />\n              <rect className=\"hb-kg4-glow\" x=\"400\" y=\"68\" width=\"4\" height=\"5\" rx=\"1\" />\n              <rect className=\"hb-kg4-glow\" x=\"400\" y=\"87\" width=\"4\" height=\"5\" rx=\"1\" />\n              <circle cx=\"444\" cy=\"80\" r=\"3\" fill=\"#0a0a0a\" stroke=\"rgba(255,255,255,.12)\" />\n            </g>\n            {sparks.map((s, i) => (\n              <Spark key={i} {...s} />\n            ))}\n            <g className=\"hb-kg4-burst\" style={{ stroke: \"var(--hb-kg4-accent)\" }} strokeWidth=\"2.2\" strokeLinecap=\"round\">\n              <path d=\"M400 80h-16M400 80l-12-12M400 80l-12 12M400 80V62M400 80v18\" />\n            </g>\n          </svg>\n        </div>\n        <h1 id={`${uid}-title`} className=\"hb-kg4-title\">{title}</h1>\n        {subtitle && <p className=\"hb-kg4-sub\">{subtitle}</p>}\n        <div className=\"hb-kg4-actions\">\n          <button type=\"button\" className=\"hb-kg4-btn hb-kg4-retry\" onClick={retry} disabled={state === \"connecting\"}>\n            <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n              <path d=\"M13 8a5 5 0 1 1-1.6-3.7M13 2.5v3h-3\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            </svg>\n            {state === \"connecting\" ? \"Reconnecting\" : retryLabel}\n          </button>\n          <a className=\"hb-kg4-btn hb-kg4-ghost\" href={primary.href}>{primary.label}</a>\n          <a className=\"hb-kg4-link\" href={secondary.href} onClick={onReport}>{secondary.label}</a>\n        </div>\n        <p className=\"hb-kg4-status\" aria-live=\"polite\">\n          {state === \"connecting\" ? \"Connecting to the page...\" : attempts > 0 ? <><b>Attempt {attempts}:</b> {retryMessage}</> : \"\"}\n        </p>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}