{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "bg-horizon-rise",
  "type": "registry:component",
  "title": "Horizon Rise",
  "description": "A sun rising behind the curved edge of a planet: the atmosphere rim brightens, a lens streak spreads along the horizon and the stars fade. Loops or rises once and holds.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "overlay",
    "background",
    "sunrise",
    "planet",
    "horizon",
    "css",
    "launch"
  ],
  "docs": "https://hyperblur.dev/effects/bg-horizon-rise",
  "files": [
    {
      "path": "registry/hyperblur/bg-horizon-rise.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/bg-horizon-rise.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface BgHorizonRiseProps extends React.HTMLAttributes<HTMLDivElement> {\n  color?: string;\n  accent?: string;\n  background?: string;\n  horizon?: number;\n  stars?: number;\n  loop?: boolean;\n  speed?: number;\n  children?: React.ReactNode;\n}\n\nconst css = `\n.hb-vd13 { position: absolute; inset: 0; overflow: hidden; pointer-events: none; box-sizing: border-box; background: var(--hb-vd13-bg); container-type: size; isolation: isolate; }\n.hb-vd13 *, .hb-vd13 *::before, .hb-vd13 *::after { box-sizing: border-box; }\n.hb-vd13-sky { position: absolute; inset: 0; background: linear-gradient(180deg, var(--hb-vd13-bg) 0%, color-mix(in srgb, var(--hb-vd13-a) 12%, var(--hb-vd13-bg)) calc(var(--hb-vd13-h) - 4%), var(--hb-vd13-bg) 100%); }\n.hb-vd13-warm { position: absolute; inset: 0; background: radial-gradient(70% 46% at 50% var(--hb-vd13-h), color-mix(in srgb, var(--hb-vd13-c) 55%, transparent) 0%, color-mix(in srgb, var(--hb-vd13-a) 22%, transparent) 42%, transparent 72%); }\n.hb-vd13-star { position: absolute; width: 1.5px; height: 1.5px; border-radius: 50%; background: #fff; }\n.hb-vd13-stars { position: absolute; inset: 0; opacity: 0.15; }\n.hb-vd13-sun { position: absolute; left: 50%; top: var(--hb-vd13-h); width: 30cqmin; aspect-ratio: 1; border-radius: 50%; translate: -50% -42%; background: radial-gradient(circle at 50% 50%, #fff 0%, var(--hb-vd13-c) 34%, color-mix(in srgb, var(--hb-vd13-c) 40%, transparent) 52%, transparent 70%); filter: blur(2px); }\n.hb-vd13-planet { position: absolute; left: 50%; top: var(--hb-vd13-h); width: 290cqw; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: radial-gradient(60% 6% at 50% 0%, color-mix(in srgb, var(--hb-vd13-a) 18%, #05070d) 0%, #04050a 100%); }\n.hb-vd13-rim { position: absolute; left: 50%; top: var(--hb-vd13-h); width: 290cqw; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; box-shadow: inset 0 1.5px 0 0 color-mix(in srgb, #fff 80%, var(--hb-vd13-c)), inset 0 10px 22px -8px color-mix(in srgb, var(--hb-vd13-c) 75%, transparent), inset 0 40px 70px -30px color-mix(in srgb, var(--hb-vd13-a) 60%, transparent), 0 -6px 26px -4px color-mix(in srgb, var(--hb-vd13-c) 70%, transparent), 0 -30px 90px -10px color-mix(in srgb, var(--hb-vd13-a) 55%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 47%, #000 53%, transparent 70%); mask-image: linear-gradient(90deg, transparent 30%, #000 47%, #000 53%, transparent 70%); }\n.hb-vd13-flare { position: absolute; left: 50%; top: var(--hb-vd13-h); width: 82%; height: 2px; translate: -50% -1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--hb-vd13-c) 70%, transparent) 30%, #fff 50%, color-mix(in srgb, var(--hb-vd13-c) 70%, transparent) 70%, transparent); filter: blur(0.6px); }\n.hb-vd13-streak { position: absolute; left: 50%; top: var(--hb-vd13-h); width: 46%; height: 14px; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--hb-vd13-c) 60%, transparent), transparent); filter: blur(4px); }\n.hb-vd13-run .hb-vd13-sun { animation: hb-vd13-sun var(--hb-vd13-d) cubic-bezier(0.45, 0, 0.25, 1) var(--hb-vd13-n) var(--hb-vd13-dir) both; }\n.hb-vd13-run .hb-vd13-warm, .hb-vd13-run .hb-vd13-flare, .hb-vd13-run .hb-vd13-streak { animation: hb-vd13-glow var(--hb-vd13-d) cubic-bezier(0.45, 0, 0.25, 1) var(--hb-vd13-n) var(--hb-vd13-dir) both; }\n.hb-vd13-run .hb-vd13-rim { animation: hb-vd13-rim var(--hb-vd13-d) cubic-bezier(0.45, 0, 0.25, 1) var(--hb-vd13-n) var(--hb-vd13-dir) both; }\n.hb-vd13-run .hb-vd13-stars { animation: hb-vd13-stars var(--hb-vd13-d) cubic-bezier(0.45, 0, 0.25, 1) var(--hb-vd13-n) var(--hb-vd13-dir) both; }\n.hb-vd13-in { position: relative; z-index: 1; width: 100%; height: 100%; pointer-events: auto; font-family: inherit; }\n@keyframes hb-vd13-sun { from { translate: -50% 10%; } to { translate: -50% -42%; } }\n@keyframes hb-vd13-glow { from { opacity: 0.12; } to { opacity: 1; } }\n@keyframes hb-vd13-rim { from { opacity: 0.3; } to { opacity: 1; } }\n@keyframes hb-vd13-stars { from { opacity: 1; } to { opacity: 0.15; } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-vd13-run .hb-vd13-sun, .hb-vd13-run .hb-vd13-warm, .hb-vd13-run .hb-vd13-flare, .hb-vd13-run .hb-vd13-streak, .hb-vd13-run .hb-vd13-rim, .hb-vd13-run .hb-vd13-stars { animation: none; }\n}\n`;\n\nfunction hash(i: number) {\n  let x = Math.imul(i ^ 0x13198a2e, 0x03707344);\n  x ^= x >>> 15;\n  x = Math.imul(x, 0xa4093822);\n  x ^= x >>> 13;\n  return (x >>> 0) / 4294967296;\n}\n\nexport function BgHorizonRise({\n  color = \"#ffd3a1\",\n  accent = \"#2f7bff\",\n  background = \"#03040a\",\n  horizon = 72,\n  stars = 60,\n  loop = true,\n  speed = 1,\n  children,\n  className = \"\",\n  style,\n  ...rest\n}: BgHorizonRiseProps) {\n  const k = 1 / Math.max(0.05, speed);\n  const hz = Math.max(30, Math.min(92, horizon));\n  const starList = Array.from({ length: Math.max(0, Math.min(200, Math.round(stars))) }, (_, i) => ({\n    x: (hash(i * 3 + 1) * 100).toFixed(2),\n    y: (hash(i * 3 + 2) * (hz - 8)).toFixed(2),\n    o: (0.2 + 0.7 * hash(i * 3 + 3)).toFixed(2),\n  }));\n\n  return (\n    <div\n      className={`hb-vd13 hb-vd13-run ${className}`}\n      style={\n        {\n          \"--hb-vd13-bg\": background,\n          \"--hb-vd13-a\": accent,\n          \"--hb-vd13-c\": color,\n          \"--hb-vd13-h\": `${hz}%`,\n          \"--hb-vd13-d\": `${((loop ? 11 : 5) * k).toFixed(2)}s`,\n          \"--hb-vd13-n\": loop ? \"infinite\" : \"1\",\n          \"--hb-vd13-dir\": loop ? \"alternate\" : \"normal\",\n          ...style,\n        } as React.CSSProperties\n      }\n      {...rest}\n    >\n      <style href=\"hb-bg-horizon-rise\" precedence=\"default\">{css}</style>\n      <div className=\"hb-vd13-sky\" aria-hidden=\"true\" />\n      <div className=\"hb-vd13-stars\" aria-hidden=\"true\">\n        {starList.map((s, i) => (\n          <span key={i} className=\"hb-vd13-star\" style={{ left: `${s.x}%`, top: `${s.y}%`, opacity: s.o }} />\n        ))}\n      </div>\n      <div className=\"hb-vd13-warm\" aria-hidden=\"true\" />\n      <div className=\"hb-vd13-sun\" aria-hidden=\"true\" />\n      <div className=\"hb-vd13-planet\" aria-hidden=\"true\" />\n      <div className=\"hb-vd13-rim\" aria-hidden=\"true\" />\n      <div className=\"hb-vd13-streak\" aria-hidden=\"true\" />\n      <div className=\"hb-vd13-flare\" aria-hidden=\"true\" />\n      {children ? <div className=\"hb-vd13-in\">{children}</div> : null}\n    </div>\n  );\n}\n"
    }
  ]
}