/* Blur, glass & light demos. Every rule is scoped under a .bl-* root. */

/* glassmorphism */
.bl-scene { position: absolute; inset: 0; display: grid; place-items: center; background: #171235; overflow: hidden; }
.bl-blob { position: absolute; border-radius: 50%; filter: blur(2px); animation: bl-drift 9s ease-in-out infinite alternate; }
.bl-b1 { width: 46%; aspect-ratio: 1; left: 8%; top: 4%; background: radial-gradient(circle at 30% 30%, var(--d-pink), #b0205e); }
.bl-b2 { width: 38%; aspect-ratio: 1; right: 6%; bottom: -6%; background: radial-gradient(circle at 30% 30%, var(--d-cyan), #0d6e9a); animation-delay: -3s; }
.bl-b3 { width: 24%; aspect-ratio: 1; right: 22%; top: 8%; background: radial-gradient(circle at 30% 30%, var(--d-amber), #c4640a); animation-delay: -6s; }
@keyframes bl-drift { to { transform: translate(14%, 10%) scale(1.08); } }
.bl-glass {
  position: relative; width: min(62%, 280px); padding: 16px 18px; border-radius: 18px; color: #fff;
  background: rgb(255 255 255 / 0.12); border: 1px solid rgb(255 255 255 / 0.28);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.3);
}
.bl-glass p { margin: 0; }
.bl-glass-k { font-size: 11px; opacity: 0.75; }
.bl-glass-t { font-size: 20px; font-weight: 750; margin-top: 2px !important; }
.bl-glass-s { font-size: 13px; opacity: 0.8; }
.bl-glass-bar { margin-top: 12px; height: 4px; border-radius: 4px; background: rgb(255 255 255 / 0.25); overflow: hidden; }
.bl-glass-bar span { display: block; height: 100%; width: 40%; background: #fff; border-radius: 4px; animation: bl-prog 9s linear infinite; }
@keyframes bl-prog { from { width: 8%; } to { width: 92%; } }

/* liquid glass */
.bl-lg { position: absolute; inset: 0; overflow: hidden; background: #f4f5fa; }
.bl-lg-svg { position: absolute; }
.bl-lg-content { position: absolute; inset: 0; padding: 6% 7%; display: grid; align-content: center; gap: 4px; color: #1f2440; }
.bl-lg-content p { margin: 0; font-weight: 900; font-stretch: 125%; font-size: clamp(30px, 11cqi, 52px); line-height: 0.92; letter-spacing: -0.03em; }
.bl-lg-content p + p { color: var(--d-violet); }
.bl-lg-icons { display: flex; gap: 8px; margin-top: 10px; }
.bl-lg-icons i { width: 26px; height: 26px; border-radius: 8px; background: var(--d-pink); }
.bl-lg-icons i:nth-child(2) { background: var(--d-amber); }
.bl-lg-icons i:nth-child(3) { background: var(--d-lime); }
.bl-lg-icons i:nth-child(4) { background: var(--d-cyan); }
.bl-lg-icons i:nth-child(5) { background: var(--d-blue); }
.bl-lg-icons i:nth-child(6) { background: var(--d-coral); }
.bl-lg-lens {
  position: absolute; left: 30%; top: 30%; width: 44%; height: 38%; border-radius: 999px; cursor: grab; touch-action: none;
  background: rgb(255 255 255 / 0.08);
  -webkit-backdrop-filter: blur(1.5px) saturate(1.8) brightness(1.06);
  backdrop-filter: blur(1.5px) saturate(1.8) brightness(1.06);
  box-shadow: inset 0 1.5px 0 rgb(255 255 255 / 0.9), inset 0 -1px 0 rgb(255 255 255 / 0.5), inset 0 0 22px rgb(255 255 255 / 0.35), inset 6px 0 14px -10px rgb(0 0 0 / 0.2), 0 10px 26px rgb(20 24 60 / 0.25);
  animation: bl-lg-float 7s ease-in-out infinite alternate;
}
@supports (backdrop-filter: url(#bl-lg-f)) {
  .bl-lg-lens { backdrop-filter: url(#bl-lg-f) blur(1px) saturate(1.8) brightness(1.06); }
}
.bl-lg.is-dragged .bl-lg-lens { animation: none; cursor: grabbing; }
@keyframes bl-lg-float { from { transform: translate(-40%, -30%); } to { transform: translate(40%, 35%); } }

/* gaussian blur */
.bl-gb { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; gap: 10px; padding: 14px 16px 12px; }
.bl-gb-frame { position: relative; overflow: hidden; border-radius: 10px; }
.bl-gb-art { position: absolute; inset: 0; transform: scale(1.06); filter: blur(var(--r)); background: linear-gradient(#ffd38a, #ff8f6b 55%, #7b5cff); }
.bl-gb-sun { position: absolute; left: 58%; top: 18%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: #fff4c8; }
.bl-gb-hill { position: absolute; left: -10%; right: 30%; bottom: -30%; height: 75%; border-radius: 50% 50% 0 0; background: #3b2a8f; }
.bl-gb-hill2 { left: 35%; right: -20%; height: 60%; background: #23195e; }
.bl-gb-art b { position: absolute; left: 8%; top: 12%; color: #fff; font-size: 22px; font-weight: 800; }
.bl-gb-ctl { display: flex; align-items: center; gap: 10px; font: 500 12px var(--f-mono); color: var(--stage-ink); }
.bl-gb-ctl span { white-space: nowrap; }
.bl-gb-ctl input { flex: 1; min-width: 0; accent-color: var(--d-violet); }

/* scrim */
.bl-scrim { position: absolute; inset: 0; overflow: hidden; }
.bl-app { position: absolute; inset: 0; padding: 12px; display: grid; grid-template-rows: auto 1fr 1fr; gap: 10px; }
.bl-app-bar { display: flex; gap: 8px; align-items: center; height: 26px; padding: 0 10px; border-radius: 8px; background: var(--stage-card); }
.bl-app-bar i { width: 34px; height: 8px; border-radius: 4px; background: var(--stage-line); }
.bl-app-bar i:first-child { width: 14px; height: 14px; border-radius: 50%; background: var(--d-violet); }
.bl-app-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bl-app-row b { border-radius: 8px; background: var(--stage-card); border-top: 26px solid color-mix(in srgb, var(--d-cyan) 45%, var(--stage-card)); }
.bl-app-row + .bl-app-row b { border-top-color: color-mix(in srgb, var(--d-amber) 45%, var(--stage-card)); }
.bl-scrim-layer {
  position: absolute; inset: 0; background: rgb(10 12 30 / 0.45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: bl-scrim 6s ease infinite;
}
.bl-scrim-dialog {
  position: absolute; left: 50%; top: 50%; width: min(70%, 260px); translate: -50% -50%;
  display: grid; gap: 4px; padding: 16px; border-radius: 14px; background: var(--stage-card); color: var(--stage-ink);
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.35); animation: bl-dialog 6s ease infinite;
}
.bl-scrim-dialog strong { font-size: 15px; }
.bl-scrim-dialog span { font-size: 12.5px; opacity: 0.75; }
.bl-scrim-dialog div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.bl-scrim-dialog em { font-style: normal; font-size: 12px; font-weight: 650; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--stage-line); }
.bl-scrim-dialog em.is-danger { background: #e5484d; border-color: #e5484d; color: #fff; }
@keyframes bl-scrim { 0%, 12% { opacity: 0; } 22%, 80% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes bl-dialog { 0%, 14% { opacity: 0; scale: 0.94; } 24%, 80% { opacity: 1; scale: 1; } 88%, 100% { opacity: 0; scale: 0.97; } }

/* progressive blur */
.bl-pb { position: absolute; inset: 0; overflow: hidden; }
.bl-pb-feed { position: absolute; inset: 0 14px; display: grid; gap: 8px; align-content: start; padding-top: 12px; animation: bl-feed 14s linear infinite; }
.bl-pb-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--stage-card); font-size: 13px; font-weight: 550; }
.bl-pb-item i { flex: none; width: 26px; height: 26px; border-radius: 50%; background: hsl(var(--h) 85% 62%); }
@keyframes bl-feed { to { transform: translateY(-50%); } }
.bl-pb-blur { position: absolute; left: 0; right: 0; bottom: 0; height: 55%; pointer-events: none; }
.bl-pb-blur i { position: absolute; inset: 0; }
.bl-pb-blur i:nth-child(1) { backdrop-filter: blur(0.5px); -webkit-mask: linear-gradient(transparent 0%, #000 12.5%, #000 25%, transparent 37.5%); mask: linear-gradient(transparent 0%, #000 12.5%, #000 25%, transparent 37.5%); }
.bl-pb-blur i:nth-child(2) { backdrop-filter: blur(1px); -webkit-mask: linear-gradient(transparent 12.5%, #000 25%, #000 37.5%, transparent 50%); mask: linear-gradient(transparent 12.5%, #000 25%, #000 37.5%, transparent 50%); }
.bl-pb-blur i:nth-child(3) { backdrop-filter: blur(2px); -webkit-mask: linear-gradient(transparent 25%, #000 37.5%, #000 50%, transparent 62.5%); mask: linear-gradient(transparent 25%, #000 37.5%, #000 50%, transparent 62.5%); }
.bl-pb-blur i:nth-child(4) { backdrop-filter: blur(4px); -webkit-mask: linear-gradient(transparent 37.5%, #000 50%, #000 62.5%, transparent 75%); mask: linear-gradient(transparent 37.5%, #000 50%, #000 62.5%, transparent 75%); }
.bl-pb-blur i:nth-child(5) { backdrop-filter: blur(8px); -webkit-mask: linear-gradient(transparent 50%, #000 62.5%, #000 75%, transparent 87.5%); mask: linear-gradient(transparent 50%, #000 62.5%, #000 75%, transparent 87.5%); }
.bl-pb-blur i:nth-child(6) { backdrop-filter: blur(16px); -webkit-mask: linear-gradient(transparent 62.5%, #000 75%); mask: linear-gradient(transparent 62.5%, #000 75%); }

/* blur-up */
.bl-bu { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; gap: 8px; padding: 14px 16px 10px; }
.bl-bu-frame { position: relative; overflow: hidden; border-radius: 10px; background: #9bb8d8; }
.bl-bu-art { position: absolute; inset: 0; background: linear-gradient(#8fd3ff, #c9ecff 55%, #2b6fa8 56%, #164a7a); animation: bl-bu 5s ease-in-out infinite; }
.bl-bu-sun { position: absolute; left: 18%; top: 14%; width: 16%; aspect-ratio: 1; border-radius: 50%; background: #fff3b0; box-shadow: 0 0 0 6px #fff3b055; }
.bl-bu-sea { position: absolute; left: 0; right: 0; top: 56%; height: 6px; background: repeating-linear-gradient(90deg, #ffffff88 0 12px, transparent 12px 26px); }
.bl-bu-boat { position: absolute; left: 58%; top: 40%; width: 18%; height: 16%; background: linear-gradient(#ffffff 0 55%, #e8524a 55%); clip-path: polygon(0 55%, 100% 55%, 82% 100%, 18% 100%, 18% 55%, 50% 0, 50% 55%); }
@keyframes bl-bu { 0%, 30% { filter: blur(14px) saturate(1.2); transform: scale(1.1); } 50%, 92% { filter: blur(0); transform: scale(1); } 100% { filter: blur(14px) saturate(1.2); transform: scale(1.1); } }
.bl-bu-cap { margin: 0; position: relative; height: 16px; font: 500 11.5px var(--f-mono); }
.bl-bu-cap span { position: absolute; inset: 0; }
.bl-bu-a { animation: bl-bu-a 5s step-end infinite; }
.bl-bu-b { animation: bl-bu-b 5s step-end infinite; }
@keyframes bl-bu-a { 0% { opacity: 1; } 40% { opacity: 0; } 96% { opacity: 1; } }
@keyframes bl-bu-b { 0% { opacity: 0; } 40% { opacity: 1; } 96% { opacity: 0; } }

/* blur fade */
.bl-bf { display: grid; justify-items: start; gap: 8px; padding: 0 9%; width: 100%; }
.bl-bf > * { margin: 0; animation: bl-bf 4.8s cubic-bezier(0.2, 0.7, 0.2, 1) infinite both; animation-delay: calc(var(--i) * 90ms); }
.bl-bf-k { font: 600 11.5px var(--f-mono); color: var(--d-violet); }
.bl-bf-h { font-size: clamp(20px, 7cqi, 28px); font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.05; }
.bl-bf-p { font-size: 13.5px; opacity: 0.8; max-width: 32ch; }
.bl-bf-btn { margin-top: 4px; font-size: 12.5px; font-weight: 650; padding: 7px 12px; border-radius: 8px; background: var(--stage-ink); color: var(--stage); }
@keyframes bl-bf {
  0% { opacity: 0; filter: blur(10px); transform: translateY(10px); }
  14%, 82% { opacity: 1; filter: blur(0); transform: none; }
  94%, 100% { opacity: 0; filter: blur(6px); transform: none; }
}

/* glow */
.bl-glow { display: grid; justify-items: center; gap: 22px; }
.bl-glow-btn {
  font-size: 14px; font-weight: 700; padding: 11px 20px; border-radius: 10px; color: #fff; background: #4b33d6;
  box-shadow: 0 0 0 1px #7b5cff, 0 0 12px #7b5cff99, 0 0 36px #7b5cff66;
  animation: bl-pulse 2.4s ease-in-out infinite;
}
@keyframes bl-pulse { 50% { box-shadow: 0 0 0 1px #9f86ff, 0 0 18px #7b5cffcc, 0 0 60px #7b5cffaa; } }
.bl-glow-neon {
  margin: 0; font: italic 400 34px/1 var(--f-body); color: #ffe9f4;
  text-shadow: 0 0 4px #fff, 0 0 10px var(--d-pink), 0 0 22px var(--d-pink), 0 0 44px #ff4f9a99;
  animation: bl-flicker 5s steps(1) infinite;
}
@keyframes bl-flicker { 0%, 100% { opacity: 1; } 71% { opacity: 0.55; } 72% { opacity: 1; } 74% { opacity: 0.6; } 75% { opacity: 1; } }

/* ambient backlight */
.bl-amb { display: flex; align-items: center; gap: 22px; padding: 0 8%; }
.bl-amb-cover { position: relative; flex: none; width: clamp(96px, 36cqi, 150px); aspect-ratio: 1; isolation: isolate; }
.bl-amb-cover i { position: absolute; inset: 0; border-radius: 10px; animation: bl-amb 9s ease-in-out infinite; }
.bl-amb-cover::before, .bl-amb-cover::after { content: none; }
.bl-amb-a { background: radial-gradient(circle at 30% 30%, #ffd166, transparent 60%), linear-gradient(135deg, #ff4f9a, #7b5cff); }
.bl-amb-b { background: radial-gradient(circle at 70% 35%, #c6ff6b, transparent 55%), linear-gradient(135deg, #19c3d6, #2f7bff); animation-delay: -3s !important; }
.bl-amb-c { background: radial-gradient(circle at 40% 70%, #fff1a8, transparent 55%), linear-gradient(135deg, #ff6b4a, #ffb020); animation-delay: -6s !important; }
/* the backlight is a blurred, enlarged copy of the same three layers */
.bl-amb-cover { box-shadow: none; }
.bl-amb-cover i { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08); }
.bl-amb-cover i::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: inherit; filter: blur(34px) saturate(1.7); transform: scale(1.15); opacity: 0.85; }
@keyframes bl-amb { 0%, 28% { opacity: 1; } 33%, 95% { opacity: 0; } 100% { opacity: 1; } }
.bl-amb-meta { display: grid; gap: 4px; position: relative; }
.bl-amb-meta strong { font-size: 17px; }
.bl-amb-meta span { font-size: 13px; opacity: 0.7; }

/* edge fade */
.bl-ef { display: grid; gap: 18px; width: 100%; padding: 0 14px; }
.bl-ef-row { display: grid; gap: 6px; }
.bl-ef-lab { font: 500 11px var(--f-mono); opacity: 0.7; }
.bl-ef-track { overflow: hidden; border-radius: 8px; padding: 6px 0; background: color-mix(in srgb, var(--stage-card) 55%, transparent); }
.bl-ef-mask { -webkit-mask: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent); mask: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent); }
.bl-ef-move { display: flex; gap: 8px; width: max-content; animation: bl-ef 16s linear infinite; }
.bl-ef-move b { font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--stage-card); border: 1px solid var(--stage-line); white-space: nowrap; }
@keyframes bl-ef { to { transform: translateX(calc(-50% - 4px)); } }

/* depth of field */
.bl-dof { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(#d9e4ff, #f4e6ff); }
.bl-dof-l { position: absolute; inset: 0; animation: 7.5s ease-in-out infinite both; }
.bl-dof-back { animation-name: bl-dof-back; }
.bl-dof-back i { position: absolute; bottom: 18%; width: 22%; aspect-ratio: 0.6; border-radius: 40% 40% 6px 6px; background: #8b7fd6; }
.bl-dof-back i:nth-child(1) { left: 4%; height: 50%; }
.bl-dof-back i:nth-child(2) { left: 28%; height: 62%; background: #a698ef; }
.bl-dof-back i:nth-child(3) { left: 58%; height: 46%; }
.bl-dof-back i:nth-child(4) { left: 80%; height: 58%; background: #a698ef; }
.bl-dof-mid { display: grid; place-items: center; animation-name: bl-dof-mid; }
.bl-dof-mid span { padding: 16px 26px; border-radius: 14px; background: #fff; color: #1f2440; font-size: 22px; font-weight: 850; font-stretch: 120%; box-shadow: 0 14px 30px rgb(40 30 110 / 0.25); }
.bl-dof-front { animation-name: bl-dof-front; }
.bl-dof-front i { position: absolute; width: 34%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #ffd166, #ff6b4a); }
.bl-dof-front i:nth-child(1) { left: -10%; bottom: -16%; }
.bl-dof-front i:nth-child(2) { right: -8%; top: -18%; width: 26%; background: radial-gradient(circle at 40% 40%, #7af0ff, #19c3d6); }
.bl-dof-cap { position: absolute; right: 10px; bottom: 8px; margin: 0; display: flex; gap: 4px; font: 600 10.5px var(--f-mono); }
.bl-dof-cap span { padding: 3px 7px; border-radius: 999px; background: rgb(255 255 255 / 0.7); color: #1f2440; animation: 7.5s step-end infinite; }
.bl-dof-cap span:nth-child(1) { animation-name: bl-cap1; }
.bl-dof-cap span:nth-child(2) { animation-name: bl-cap2; }
.bl-dof-cap span:nth-child(3) { animation-name: bl-cap3; }
@keyframes bl-dof-back { 0%, 28% { filter: blur(5px); } 36%, 62% { filter: blur(0); } 70%, 100% { filter: blur(7px); } }
@keyframes bl-dof-mid { 0%, 28% { filter: blur(0); } 36%, 62% { filter: blur(4px); } 70%, 100% { filter: blur(3px); } }
@keyframes bl-dof-front { 0%, 28% { filter: blur(6px); } 36%, 62% { filter: blur(10px); } 70%, 100% { filter: blur(0); } }
@keyframes bl-cap1 { 0% { background: rgb(255 255 255 / 0.7); color: #1f2440; } 33% { background: #1f2440; color: #fff; } 66% { background: rgb(255 255 255 / 0.7); color: #1f2440; } }
@keyframes bl-cap2 { 0% { background: #1f2440; color: #fff; } 33% { background: rgb(255 255 255 / 0.7); color: #1f2440; } }
@keyframes bl-cap3 { 0% { background: rgb(255 255 255 / 0.7); color: #1f2440; } 66% { background: #1f2440; color: #fff; } }
