/* ============================================================
   css/festejo.css — Pantalla de festejo cuando el jugador gana (js/festejo.js, 26-10-2026).
   Mismo verde que el inicio (#0d5c35), bolilla dorada, botón naranja. Respeta prefers-reduced-motion.
   ============================================================ */
@font-face { font-family: 'Figtree'; src: url('fuentes/figtree.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }

/* Va por encima de todo, también del cofre de regalos: primero el festejo. Mientras está abierto el cofre queda
   tapado (no se toca su código: sólo se lo esconde desde acá) y vuelve a verse al cerrar. */
.fj-ov { position: fixed; inset: 0; z-index: 100020; background: #0d5c35; color: #fff; overflow-x: hidden; overflow-y: auto;
  font-family: 'Figtree', 'Segoe UI', system-ui, sans-serif; -webkit-overflow-scrolling: touch; animation: fjEntra .25s ease both; }
.fj-ov.fj-saliendo { animation: fjSale .25s ease forwards; }
html.festejo-abierto #cofre-ov, html.festejo-abierto .cv-confetis { visibility: hidden !important; }
html.festejo-abierto, html.festejo-abierto body { overflow: hidden; }

.fj-cuerpo { position: relative; min-height: 100%; box-sizing: border-box; max-width: 440px; margin: 0 auto; padding: 40px 22px 22px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.fj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bolilla dorada con rayos */
.fj-arte { position: relative; width: 220px; height: 220px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.fj-rayos { position: absolute; inset: 0; width: 100%; height: 100%; fill: #1a7f4b; animation: fjGira 14s linear infinite; }
.fj-onda { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; border: 6px solid #fcd34d;
  opacity: 0; animation: fjOnda 1.6s .2s ease-out 2; }
.fj-bola { position: relative; width: 150px; height: 150px; border-radius: 50%; background: #fbbf24; color: #3b2a00;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: inset 0 -12px 0 rgba(0,0,0,.12), 0 10px 30px rgba(0,0,0,.35); animation: fjBola .6s cubic-bezier(.2,1.4,.4,1) both; }
.fj-bola-tit { font-size: calc(13px * var(--lg, 1)); font-weight: 800; letter-spacing: .08em; }
.fj-bola-num { font-size: 44px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.fj-bola-num-chico { font-size: 32px; }
.fj-bola-alc { font-size: calc(13px * var(--lg, 1)); font-weight: 800; }

.fj-titulo { margin: 0; font-size: calc(46px * var(--lg, 1)); font-weight: 900; color: #fcd34d; line-height: 1; }
.fj-monto { font-size: calc(52px * var(--lg, 1)); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; max-width: 100%; overflow-wrap: anywhere; }
.fj-txt { margin: 0; font-size: calc(18px * var(--lg, 1)); line-height: 1.45; color: #d1fae5; max-width: 340px; }
.fj-lista { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 6px; }
.fj-lista li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: rgba(255,255,255,.1); border-radius: 12px;
  padding: 9px 12px; font-size: calc(16px * var(--lg, 1)); text-align: left; line-height: 1.3; }
.fj-lista b { white-space: nowrap; color: #fcd34d; }
.fj-saldo { margin: 2px 0 0; display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); border-radius: 999px;
  padding: 8px 14px; font-size: calc(16px * var(--lg, 1)); font-weight: 800; }
.fj-saldo svg { width: 20px; height: 20px; fill: none; stroke: #4ade80; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.fj-botones { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 10px; }
.fj-btn { display: flex; align-items: center; justify-content: center; min-height: 60px; border-radius: 16px; background: #ea580c; color: #fff;
  font-weight: 900; font-size: calc(21px * var(--lg, 1)); text-decoration: none; box-shadow: 0 6px 0 #9a3412; }
.fj-btn:hover { background: #f97316; color: #fff; }
.fj-btn-linea { min-height: 54px; background: transparent; border: 2px solid rgba(255,255,255,.75); box-shadow: none; font-size: calc(18px * var(--lg, 1)); font-weight: 800; }
.fj-btn-linea:hover { background: rgba(255,255,255,.1); }
.fj-cerrar { min-height: 48px; border: 0; background: transparent; color: #a7f3d0; font: 800 calc(16px * var(--lg, 1)) 'Figtree', 'Segoe UI', sans-serif; cursor: pointer; text-decoration: underline; }
.fj-ov a:focus-visible, .fj-ov button:focus-visible { outline: 3px solid #fde047; outline-offset: 3px; }
.fj-legal { margin: 2px 0 0; font-size: calc(12px * var(--lg, 1)); color: #a7f3d0; }

/* Confeti */
.fj-confeti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.fj-confeti i { position: absolute; left: 50%; top: 30%; width: 11px; height: 6px; border-radius: 2px; opacity: 0;
  animation: fjConfeti 2.8s cubic-bezier(.25,.7,.4,1) both; }
.fj-confeti i.r { width: 9px; height: 9px; border-radius: 50%; }

/* Entradas escalonadas */
.fj-sube { animation: fjSube .6s ease both; }
.fj-t1 { animation-delay: .35s; } .fj-t2 { animation-delay: .6s; } .fj-t3 { animation-delay: 1.5s; } .fj-t4 { animation-delay: 1.8s; }

@keyframes fjEntra { from { opacity: 0; } to { opacity: 1; } }
@keyframes fjSale { to { opacity: 0; } }
@keyframes fjGira { to { transform: rotate(360deg); } }
@keyframes fjOnda { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes fjBola { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes fjSube { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fjConfeti {
  0% { opacity: 0; transform: translate(-50%, -50%); }
  6% { opacity: 1; }
  30% { transform: translate(-50%, -50%) translate(calc(var(--dx) * .6), var(--up)) rotate(calc(var(--r) * .35)); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) rotate(var(--r)); }
}

@media (max-height: 700px) {
  .fj-cuerpo { padding-top: 18px; gap: 10px; }
  .fj-arte { width: 170px; height: 170px; }
  .fj-bola { width: 124px; height: 124px; }
  .fj-bola-num { font-size: 36px; }
  .fj-onda { width: 124px; height: 124px; margin: -62px 0 0 -62px; }
}
@media (prefers-reduced-motion: reduce) {
  .fj-ov, .fj-ov *, .fj-ov *::before { animation: none !important; }
  .fj-confeti, .fj-onda { display: none; }
}
