/* [Pulso-Supabase] Centro de celebraciones: lienzo, hologramas y panel. */
.cf-celeb-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 250; pointer-events: none; }

/* Holograma: texto grande con degradado, línea de escáner y brillo */
.cf-holo {
  --hc: #e879f9; position: fixed; left: 50%; top: 38%; z-index: 251; pointer-events: none; text-align: center;
  transform: translate(-50%, -50%); padding: 18px 34px 16px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 13, 38, .72), rgba(18, 13, 38, .45));
  border: 1px solid color-mix(in srgb, var(--hc) 55%, transparent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 0 40px -6px var(--hc), 0 24px 60px -24px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: cf-holo-in .5s cubic-bezier(.2, .9, .2, 1.2) both;
}
.cf-holo::before { /* línea de escáner */
  content: ''; position: absolute; left: 0; right: 0; height: 40%; top: -40%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--hc) 30%, transparent), transparent);
  animation: cf-holo-scan 1.1s ease-out .1s both;
}
.cf-holo b {
  display: block; font-size: clamp(34px, 9vw, 64px); font-weight: 900; letter-spacing: -1px; line-height: 1.05; white-space: nowrap;
  background: linear-gradient(90deg, #fff, var(--hc) 60%, #fff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--hc) 70%, transparent));
}
.cf-holo small { display: block; margin-top: 6px; font-size: 14px; font-weight: 700; letter-spacing: .6px; color: rgba(245, 243, 255, .85); text-transform: uppercase; }
.cf-holo-sale { animation: cf-holo-out .45s ease-in both; }
@keyframes cf-holo-in { from { opacity: 0; transform: translate(-50%, -40%) scale(.85); filter: blur(6px); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; } }
@keyframes cf-holo-out { to { opacity: 0; transform: translate(-50%, -60%) scale(1.04); filter: blur(4px); } }
@keyframes cf-holo-scan { to { top: 110%; } }

/* Panel */
.cf-celeb {
  position: fixed; z-index: 170; left: 50%; top: 50%; width: min(520px, calc(100vw - 32px)); max-height: min(86vh, 760px); overflow-y: auto;
  padding: 22px 18px 18px; border-radius: 24px; color: #f5f3ff;
  background: radial-gradient(120% 60% at 50% -10%, rgba(168, 85, 247, .28), transparent 60%), linear-gradient(180deg, #17122e, #100c22);
  border: 1px solid rgba(232, 121, 249, .28); box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  transform: translate(-50%, -46%) scale(.96); opacity: 0; visibility: hidden; transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .2s, visibility 0s linear .22s;
  scrollbar-width: thin; scrollbar-color: rgba(232, 121, 249, .3) transparent; color-scheme: dark;
}
.cf-celeb.cf-open { transform: translate(-50%, -50%); opacity: 1; visibility: visible; transition-delay: 0s; }
.cf-celeb .cf-mmenu-grip { display: none; }
.cf-celeb .cf-perfil-x { border-color: rgba(255, 255, 255, .15); color: rgba(245, 243, 255, .7); }
.cf-celeb-head { display: flex; align-items: center; gap: 12px; margin: 0 44px 16px 0; }
.cf-celeb-head b { display: block; font-size: 20px; letter-spacing: -.3px; }
.cf-celeb-head small { display: block; font-size: 12.5px; color: rgba(226, 228, 245, .6); }
.cf-celeb-logo { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #f43f5e, #a855f7); box-shadow: 0 10px 26px -10px rgba(168, 85, 247, .9); }
.cf-celeb-logo svg { width: 70%; height: 70%; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; animation: cf-celeb-trazo 2.4s ease-in-out infinite; }
@keyframes cf-celeb-trazo { 0% { stroke-dashoffset: 40; } 45%, 100% { stroke-dashoffset: 0; } }
.cf-celeb-master {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, rgba(244, 63, 94, .16), rgba(168, 85, 247, .18)); border: 1px solid rgba(232, 121, 249, .35);
}
.cf-celeb-master b { display: block; font-size: 15px; }
.cf-celeb-master small { display: block; font-size: 12px; color: rgba(226, 228, 245, .6); }
.cf-celeb-lista h4 { margin: 18px 4px 8px; font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(232, 121, 249, .8); }
.cf-celeb-lista.cf-celeb-off { opacity: .45; }
.cf-celeb-item {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px;
  border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); transition: border-color .2s, background .2s;
}
.cf-celeb-item.cf-on { border-color: rgba(232, 121, 249, .3); background: rgba(168, 85, 247, .07); }
.cf-celeb-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; background: rgba(255, 255, 255, .05); }
.cf-celeb-item.cf-on .cf-celeb-ico { background: rgba(168, 85, 247, .18); box-shadow: 0 0 18px -6px rgba(232, 121, 249, .8); }
.cf-celeb-txt b { display: block; font-size: 14px; }
.cf-celeb-txt small { display: block; font-size: 12px; line-height: 1.3; color: rgba(226, 228, 245, .58); }
.cf-celeb-probar {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(232, 121, 249, .35); background: transparent; color: #f0abfc;
  font-size: 12px; cursor: pointer; transition: background .2s, box-shadow .2s;
}
.cf-celeb-probar:hover:not(:disabled) { background: rgba(232, 121, 249, .15); box-shadow: 0 0 14px rgba(232, 121, 249, .45); }
.cf-celeb-probar:disabled { opacity: .35; cursor: default; }

/* Interruptor tipo píldora */
.cf-sw { appearance: none; -webkit-appearance: none; position: relative; width: 46px; height: 26px; flex: 0 0 auto; border-radius: 99px; cursor: pointer; margin: 0;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .12); transition: background .25s, box-shadow .25s; }
.cf-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.cf-sw:checked { background: linear-gradient(135deg, #f43f5e, #a855f7); border-color: transparent; box-shadow: 0 0 16px -4px rgba(232, 121, 249, .9); }
.cf-sw:checked::after { transform: translateX(20px); }
.cf-sw:disabled { opacity: .5; cursor: default; }
.cf-sw:focus-visible { outline: 2px solid #f0abfc; outline-offset: 2px; }

@media (max-width: 700px) {
  .cf-celeb { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 88vh; border-radius: 24px 24px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateY(105%); opacity: 1; }
  .cf-celeb.cf-open { transform: translateY(0); }
  .cf-celeb .cf-mmenu-grip { display: block; background: rgba(255, 255, 255, .2); }
  .cf-celeb-item { grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 10px; padding: 10px; }
  .cf-celeb-ico { width: 38px; height: 38px; font-size: 19px; }
  .cf-holo { padding: 14px 22px 12px; max-width: calc(100vw - 40px); }
}
@media (prefers-reduced-motion: reduce) { .cf-holo, .cf-holo::before, .cf-celeb-logo svg { animation: none; } }
