/* ==========================================================================
   Pop-up "Boss completo" (js/components/celebrate.js) — animação "Anel a 100%"
   (protótipo aprovado: research/mockup-popup-complete.html, opção 6).
   Cores do protótipo (dourado neutro, igual em todas as paletas); texto com tokens de base.css.
   Contraste: nome #ffe08a / linha var(--muted) / eyebrow dourado sobre #10141a-#171b21 ≥ 7:1;
   botão #2a1d00 sobre #e8c765 ≈ 10:1.
   ========================================================================== */
.cel-ov {
  --cel-gold: #e8c765;
  --cel-gold-2: #a8801f;
  --cel-ok: #4eda80;
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 45%, #241c06ee, #05070aee 72%);
  animation: cel-fade 0.35s both;
}
@keyframes cel-fade { from { opacity: 0; } to { opacity: 1; } }
.cel-cv { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.cel-flash { position: fixed; inset: 0; z-index: 3; background: #fff; opacity: 0; pointer-events: none; }
.cel-flash.is-go { animation: cel-flash 0.6s ease-out; }
@keyframes cel-flash { 0% { opacity: 0.9; } 100% { opacity: 0; } }
.cel-stage { position: relative; z-index: 2; width: min(92vw, 400px); text-align: center; }

.cel-card {
  position: relative;
  padding: 24px 18px 18px;
  border-radius: 16px;
  background: linear-gradient(#171b21, #10141a);
  border: 2px solid var(--cel-gold);
  box-shadow: 0 0 0 1px #e8c76544, 0 0 60px -6px var(--cel-gold);
  color: var(--text);
  animation: cel-pop 0.7s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
@keyframes cel-pop { from { transform: scale(0.4) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.cel-eyebrow { font: 800 11px var(--font-body); letter-spacing: 0.22em; color: var(--cel-gold); }

/* Anel: arte/emblema do boss esbatida no centro, por baixo da percentagem */
.cel-ring { position: relative; width: 170px; height: 170px; margin: 10px auto; }
.cel-ring svg { position: relative; width: 100%; height: 100%; transform: rotate(-90deg); }
.cel-ring .cel-bg { stroke: #ffffff1c; }
.cel-ring .cel-fg { stroke: var(--cel-gold); stroke-linecap: round; filter: drop-shadow(0 0 6px var(--cel-gold)); }
.cel-art {
  position: absolute;
  inset: 22px;
  width: calc(100% - 44px);
  height: calc(100% - 44px);
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.22;
  transition: opacity 0.6s ease;
}
.cel-art.is-emblem { object-fit: contain; }
.cel-ring.is-done .cel-art { opacity: 0.32; }
.cel-pc {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 800 34px var(--font-body);
  color: var(--text);
  text-shadow: 0 1px 6px #000c;
  font-variant-numeric: tabular-nums;
}
.cel-ring.is-done .cel-pc { color: var(--cel-ok); }

.cel-name {
  font: 900 24px var(--font-name);
  color: #ffe08a;
  margin: 6px 0 2px;
  overflow-wrap: anywhere;
  animation: cel-rise 0.6s 2.6s both;
}
.cel-line { color: var(--muted); font-size: 13px; margin: 0; animation: cel-rise 0.6s 2.8s both; }
@keyframes cel-rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.cel-cta { margin-top: 14px; animation: cel-rise 0.5s 3.4s both; }
.cel-continue,
.cel-continue:hover {
  background: var(--cel-gold);
  border-color: var(--cel-gold);
  color: #2a1d00;
  padding: 10px 22px;
  font-weight: 700;
}
.cel-continue:hover { filter: brightness(1.08); }
.cel-continue:focus-visible { outline: 2px solid var(--cel-gold); outline-offset: 3px; box-shadow: none; }

/* Som on/off no canto do cartão */
.cel-snd {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #e8c76555;
  background: #0006;
  color: var(--cel-gold);
  cursor: pointer;
}
.cel-snd .icon { width: 18px; height: 18px; }
.cel-snd[aria-pressed="false"] { color: var(--muted); border-color: #ffffff2a; }
.cel-snd:hover { background: #e8c7651f; }
.cel-snd:focus-visible { outline: 2px solid var(--cel-gold); outline-offset: 2px; }

/* Sem animação (prefers-reduced-motion): cartão parado, anel já cheio, texto visível */
.cel-ov.is-static,
.cel-ov.is-static .cel-card,
.cel-ov.is-static .cel-name,
.cel-ov.is-static .cel-line,
.cel-ov.is-static .cel-cta { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .cel-ov, .cel-card, .cel-name, .cel-line, .cel-cta, .cel-flash.is-go { animation: none !important; }
  .cel-art { transition: none; }
}

@media (max-width: 400px) {
  .cel-ring { width: 150px; height: 150px; }
  .cel-name { font-size: 21px; }
}
