/* ===== ELSA GAMBLING — stile neon/casino ===== */
:root {
  --bg: #0a0512;
  --bg2: #140a26;
  --panel: rgba(24, 12, 46, 0.72);
  --gold: #ffd23f;
  --gold-2: #ff9e00;
  --pink: #ff2e88;
  --cyan: #00e5ff;
  --green: #29e08a;
  --red: #ff3b5c;
  --text: #f3e9ff;
  --muted: #9c86b8;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: radial-gradient(1200px 700px at 50% -10%, #2a1150 0%, var(--bg) 60%),
    var(--bg);
  color: var(--text);
  font-family: "Bebas Neue", system-ui, sans-serif;
  overflow: hidden;
}

#bg3d {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}
#confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 60;
  pointer-events: none;
}

#app {
  position: relative;
  z-index: 10;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 18px;
  gap: 12px;
}

/* ===== Topbar ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Anton", sans-serif;
  font-size: clamp(26px, 4vw, 52px);
  letter-spacing: 2px;
}
.brand-emoji {
  font-size: 0.8em;
  filter: drop-shadow(0 0 10px var(--gold));
}
.neon-gold {
  color: var(--gold);
  text-shadow: 0 0 6px var(--gold), 0 0 22px var(--gold-2), 0 0 40px var(--gold-2);
}
.neon-pink {
  color: var(--pink);
  text-shadow: 0 0 6px var(--pink), 0 0 22px var(--pink), 0 0 42px #ff007b;
}
.hud {
  display: flex;
  gap: 12px;
}
.hud-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 16px;
  background: var(--panel);
  border: 1px solid rgba(255, 210, 63, 0.35);
  border-radius: 12px;
  box-shadow: inset 0 0 18px rgba(255, 46, 136, 0.12);
}
.hud-label {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--muted);
}
.hud-value {
  font-family: "Orbitron", monospace;
  font-weight: 900;
  font-size: 26px;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}
.hud-value.led {
  color: var(--gold);
  text-shadow: 0 0 12px var(--gold-2);
}

/* ===== Stage layout ===== */
.stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 16px;
  padding: 12px 14px;
  backdrop-filter: blur(6px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.panel-title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  letter-spacing: 2px;
  font-size: 20px;
  margin: 4px 0 10px;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold-2);
}
.bet-panel .panel-title {
  margin-top: 12px;
}

/* ===== Rooms board ===== */
.rooms-board {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.room-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.15));
  transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
}
.room-card.gender-F {
  border-left: 4px solid var(--pink);
}
.room-card.gender-M {
  border-left: 4px solid var(--cyan);
}
.room-card.jacuzzi {
  box-shadow: 0 0 14px rgba(255, 210, 63, 0.25);
}
.room-card.hot {
  border-color: var(--gold);
  box-shadow: 0 0 22px var(--gold-2);
  transform: scale(1.02);
}
.room-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.room-name {
  font-family: "Anton", sans-serif;
  font-size: 18px;
  letter-spacing: 1px;
}
.room-cap {
  font-family: "Orbitron", monospace;
  font-size: 13px;
  color: var(--muted);
}
.room-occupants {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  min-height: 6px;
}
.occ-chip {
  font-family: "Bebas Neue", sans-serif;
  font-size: 15px;
  letter-spacing: 0.5px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.16);
  border: 1px solid rgba(0, 229, 255, 0.4);
  animation: pop 0.5s ease;
}
.gender-F .occ-chip {
  background: rgba(255, 46, 136, 0.16);
  border-color: rgba(255, 46, 136, 0.45);
}
.occ-slot-empty {
  width: 42px;
  height: 20px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
}
@keyframes pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== Slot machine ===== */
.machine {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 0;
}
.marquee {
  display: flex;
  gap: 10px;
  padding: 6px;
}
.marquee .bulb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-2), 0 0 18px var(--gold-2);
  animation: chase 1s infinite;
}
@keyframes chase {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}
.now-playing {
  text-align: center;
}
.np-label {
  display: block;
  font-size: 14px;
  letter-spacing: 5px;
  color: var(--muted);
}
.np-name {
  font-family: "Anton", sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  color: var(--text);
  text-shadow: 0 0 16px var(--pink);
}

.slot {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #2a0e4e, #150725);
  border: 3px solid var(--gold);
  box-shadow: 0 0 30px rgba(255, 158, 0, 0.5),
    inset 0 0 40px rgba(0, 0, 0, 0.6);
  transform-origin: center center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}
/* zoom in avanti durante lo spin */
.slot.zoom {
  transform: scale(1.14);
  box-shadow: 0 0 70px rgba(255, 158, 0, 0.85), 0 0 120px rgba(255, 46, 136, 0.35),
    inset 0 0 40px rgba(0, 0, 0, 0.6);
  z-index: 20;
}
/* tremolio mantenendo lo zoom (le keyframe tengono scale(1.14)) */
.slot.zoom.shake {
  animation: slotShake 0.22s linear infinite;
}
@keyframes slotShake {
  0%, 100% { transform: scale(1.14) translate(0, 0) rotate(0deg); }
  20% { transform: scale(1.14) translate(-7px, 4px) rotate(-0.5deg); }
  40% { transform: scale(1.14) translate(7px, -5px) rotate(0.5deg); }
  60% { transform: scale(1.14) translate(-5px, 6px) rotate(-0.4deg); }
  80% { transform: scale(1.14) translate(6px, -4px) rotate(0.4deg); }
}
.slot-side {
  width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reel-window {
  position: relative;
  width: min(46vw, 460px);
  height: 264px;
  overflow: hidden;
  border-radius: 12px;
  background: #05020a;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
}
/* tre colonne affiancate dentro la finestra */
.reels {
  display: flex;
  height: 100%;
}
.reel-col {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.reel-col + .reel-col {
  border-left: 2px solid rgba(255, 255, 255, 0.08);
}
.reel-strip {
  will-change: transform;
}
.reel-item {
  height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 6px;
  text-align: center;
  font-family: "Anton", sans-serif;
  font-size: 22px;
  line-height: 0.98;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  overflow: hidden;
}
.reel-item.jz {
  color: var(--gold);
  text-shadow: 0 0 12px var(--gold-2);
}
.reel-item .jz-badge {
  font-size: 15px;
  line-height: 1;
}
/* le stanze fantasma sono identiche alle reali (indistinguibili) */
/* caption con il nome della stanza risultante */
.reel-result {
  min-height: 34px;
  font-family: "Anton", sans-serif;
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--gold);
  text-shadow: 0 0 14px var(--gold-2);
}
.reel-result b {
  font-weight: 400;
}
.payline {
  position: absolute;
  left: 0;
  right: 0;
  top: 88px;
  height: 88px;
  border-top: 2px solid rgba(255, 210, 63, 0.7);
  border-bottom: 2px solid rgba(255, 210, 63, 0.7);
  box-shadow: 0 0 26px rgba(255, 210, 63, 0.4);
  pointer-events: none;
  z-index: 3;
}
.reel-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 88px;
  z-index: 2;
  pointer-events: none;
}
.reel-fade.top {
  top: 0;
  background: linear-gradient(180deg, #05020a, transparent);
}
.reel-fade.bottom {
  bottom: 0;
  background: linear-gradient(0deg, #05020a, transparent);
}

/* leva */
.lever {
  width: 14px;
  height: 130px;
  background: linear-gradient(90deg, #7a7a85, #d7d7e0, #7a7a85);
  border-radius: 8px;
  position: relative;
  transform-origin: bottom center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  touch-action: none;
}
/* area di presa invisibile piu' ampia (facile da afferrare/toccare) */
.lever::before {
  content: "";
  position: absolute;
  left: -22px;
  right: -22px;
  top: -22px;
  bottom: -10px;
}
.lever.armed {
  cursor: grab;
  animation: leverBob 1.1s ease-in-out infinite;
}
.lever.armed .lever-knob {
  box-shadow: 0 0 16px var(--red), 0 0 30px var(--red), 0 0 46px #ff004c;
  animation: knobPulse 1.1s ease-in-out infinite;
}
@keyframes leverBob {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-5deg); }
}
@keyframes knobPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
}
.lever.pull {
  transform: rotate(28deg);
  animation: none;
}
.lever-knob {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8ab0, var(--red) 60%, #8b0022);
  box-shadow: 0 0 16px var(--red);
}

/* effetto "gaslighting" sulla SINGOLA colonna che finge di fermarsi sbagliata */
.reel-col.teasing {
  animation: teaseShake 0.1s linear infinite;
  z-index: 2;
}
.reel-col.teasing::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 34px rgba(255, 59, 92, 0.6);
  pointer-events: none;
}
@keyframes teaseShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.mc-line {
  min-height: 26px;
  text-align: center;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* ===== Controlli ===== */
.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  font-family: "Anton", sans-serif;
  letter-spacing: 2px;
  font-size: 20px;
  padding: 10px 22px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  color: #1a0a2e;
  transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
}
.btn:active {
  transform: translateY(2px) scale(0.98);
}
.btn:disabled {
  filter: grayscale(0.7) brightness(0.6);
  cursor: not-allowed;
}
.btn-gold {
  background: linear-gradient(180deg, #ffe98a, var(--gold) 45%, var(--gold-2));
  box-shadow: 0 6px 0 #b36b00, 0 0 24px rgba(255, 158, 0, 0.6);
}
.btn-gold:active {
  box-shadow: 0 2px 0 #b36b00, 0 0 24px rgba(255, 158, 0, 0.6);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: none;
}
.btn-ghost.active {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 14px rgba(41, 224, 138, 0.5);
}

/* ===== Scommesse ===== */
.odds {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 32%;
  overflow-y: auto;
}
.odd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}
.odd-row:hover {
  border-color: var(--gold);
}
.odd-row.picked {
  border-color: var(--green);
  box-shadow: 0 0 14px rgba(41, 224, 138, 0.45);
}
.odd-row.disabled {
  opacity: 0.4;
  pointer-events: none;
}
.odd-name {
  font-size: 17px;
  letter-spacing: 0.5px;
}
.odd-mult {
  font-family: "Orbitron", monospace;
  font-weight: 700;
  color: var(--gold);
}
.bet-hint {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 1px;
  margin: 2px 0 4px;
}

/* ===== Leaderboard ===== */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lb-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 17px;
  transition: background 0.3s;
}
.lb-row.you {
  background: rgba(255, 210, 63, 0.14);
  color: var(--gold);
}
.lb-chips {
  font-family: "Orbitron", monospace;
  font-weight: 700;
}

/* ===== Log ===== */
.log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
  font-size: 15px;
  letter-spacing: 0.4px;
  color: var(--text);
}
.log-entry {
  padding: 2px 6px;
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  opacity: 0.9;
}
.log-entry.win {
  border-color: var(--green);
}
.log-entry.jackpot {
  border-color: var(--gold);
  color: var(--gold);
}

/* ===== FX ===== */
.shake {
  animation: shake 0.5s;
}
@keyframes shake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-8px, 4px);
  }
  40% {
    transform: translate(8px, -6px);
  }
  60% {
    transform: translate(-6px, 6px);
  }
  80% {
    transform: translate(6px, -4px);
  }
}
.flash {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 210, 63, 0.55), transparent 60%);
  opacity: 0;
}
.flash.go {
  animation: flash 0.6s ease;
}
@keyframes flash {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ===== NESSUN MATCH: effetto pazzo ===== */
.strobe {
  position: fixed;
  inset: 0;
  z-index: 58;
  pointer-events: none;
  opacity: 0;
}
.strobe.go {
  animation: strobe 1s linear;
}
@keyframes strobe {
  0%, 100% { opacity: 0; }
  8% { opacity: 1; background: rgba(255, 0, 60, 0.45); }
  16% { opacity: 1; background: rgba(0, 229, 255, 0.4); }
  24% { opacity: 1; background: rgba(255, 210, 63, 0.4); }
  40% { opacity: 1; background: rgba(255, 0, 60, 0.4); }
  56% { opacity: 1; background: rgba(0, 229, 255, 0.38); }
  72% { opacity: 1; background: rgba(255, 46, 136, 0.4); }
  88% { opacity: 1; background: rgba(255, 0, 60, 0.35); }
}
.reel-window.glitch {
  animation: glitch 0.08s steps(2) infinite;
}
@keyframes glitch {
  0% { transform: translate(0, 0) skewX(0); filter: hue-rotate(0deg); }
  25% { transform: translate(-7px, 3px) skewX(4deg); filter: hue-rotate(90deg); }
  50% { transform: translate(6px, -4px) skewX(-4deg); filter: hue-rotate(200deg); }
  75% { transform: translate(-5px, 5px) skewX(3deg); filter: hue-rotate(300deg); }
  100% { transform: translate(0, 0) skewX(0); filter: hue-rotate(0deg); }
}
.nomatch-stamp {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 59;
  pointer-events: none;
}
.nomatch-stamp span {
  font-family: "Anton", sans-serif;
  font-size: clamp(44px, 10vw, 140px);
  letter-spacing: 3px;
  color: var(--red);
  text-shadow: 0 0 30px var(--red), 0 0 70px #ff004c;
  transform: rotate(-8deg) scale(0.3);
  opacity: 0;
  animation: stampIn 1.3s ease;
}
@keyframes stampIn {
  0% { opacity: 0; transform: rotate(-8deg) scale(0.3); }
  15% { opacity: 1; transform: rotate(-8deg) scale(1.15); }
  28% { transform: rotate(-8deg) scale(1); }
  82% { opacity: 1; transform: rotate(-8deg) scale(1); }
  100% { opacity: 0; transform: rotate(-8deg) scale(1.05); }
}
.rr-nomatch {
  color: var(--red);
  text-shadow: 0 0 16px var(--red);
}

/* ===== Effetto SHALOM (vittoria stanze con idromassaggio) ===== */
.shalom-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  overflow: hidden;
  background: rgba(4, 2, 9, 0.94);
}
.shalom-overlay.on {
  display: block;
  animation: shalomBang 0.5s ease; /* flashbang bianco iniziale */
}
@keyframes shalomBang {
  0% { background: #fff; }
  35% { background: #fff; }
  100% { background: rgba(4, 2, 9, 0.94); }
}
.shalom-skip {
  position: absolute;
  bottom: 16px;
  right: 22px;
  z-index: 3;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 2px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.55);
}

/* canvas del fuoco a particelle (falò vero, disegnato in JS) */
.shalom-fire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* dietro al leone (z-index 2) */
  opacity: 0;
  pointer-events: none;
}
.shalom-overlay.mode-fire .shalom-fire {
  opacity: 1;
}

/* fuoco che lambisce il bordo inferiore: lingue di fiamma animate.
   Ora fanno solo da base morbida sotto le particelle canvas. */
.shalom-flames {
  position: absolute;
  bottom: 0;
  height: 40vh;
  width: 52vw;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  z-index: 1;
}
.shalom-flames.left {
  left: 0;
}
.shalom-flames.right {
  right: 0;
  transform: scaleX(-1); /* specchia così le due metà non sono identiche */
}
.shalom-flames::before,
.shalom-flames::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: bottom center;
  background-repeat: no-repeat;
  background-position: bottom;
  filter: blur(5px) contrast(1.5) brightness(1.08);
  -webkit-mask: linear-gradient(0deg, #000 20%, rgba(0, 0, 0, 0.55) 55%, transparent 88%);
  mask: linear-gradient(0deg, #000 20%, rgba(0, 0, 0, 0.55) 55%, transparent 88%);
}
.shalom-flames::before {
  background-image:
    radial-gradient(22% 58% at 18% 100%, rgba(255, 244, 190, 0.95), rgba(255, 120, 0, 0.55) 46%, transparent 72%),
    radial-gradient(26% 74% at 42% 100%, rgba(255, 224, 130, 0.9), rgba(255, 80, 0, 0.5) 50%, transparent 74%),
    radial-gradient(20% 60% at 66% 100%, rgba(255, 240, 170, 0.92), rgba(255, 100, 0, 0.52) 46%, transparent 72%),
    radial-gradient(24% 76% at 86% 100%, rgba(255, 214, 110, 0.9), rgba(255, 70, 0, 0.5) 50%, transparent 74%);
}
.shalom-flames::after {
  background-image:
    radial-gradient(17% 70% at 30% 100%, rgba(255, 250, 210, 0.95), rgba(255, 140, 0, 0.55) 44%, transparent 70%),
    radial-gradient(21% 84% at 54% 100%, rgba(255, 232, 150, 0.9), rgba(255, 90, 0, 0.5) 48%, transparent 72%),
    radial-gradient(17% 66% at 78% 100%, rgba(255, 244, 180, 0.92), rgba(255, 110, 0, 0.52) 44%, transparent 70%);
}
.shalom-overlay.mode-fire .shalom-flames {
  opacity: 0.5; /* base morbida: le particelle canvas fanno il grosso */
}
.shalom-overlay.mode-fire .shalom-flames::before {
  animation: flameA 0.42s infinite alternate;
}
.shalom-overlay.mode-fire .shalom-flames::after {
  animation: flameB 0.31s infinite alternate;
}
@keyframes flameA {
  0% { transform: scaleY(0.94) scaleX(1.02) translateY(0); opacity: 0.85; }
  100% { transform: scaleY(1.2) scaleX(0.97) translateY(-3%); opacity: 1; }
}
@keyframes flameB {
  0% { transform: scaleY(1.14) translateX(-1.5%); opacity: 0.7; }
  100% { transform: scaleY(0.9) translateX(2%); opacity: 1; }
}

/* leone che irrompe */
.shalom-lion {
  position: absolute;
  top: 48%;
  left: 50%;
  width: min(52vw, 580px);
  z-index: 2;
  /* sfuma i bordi dell'immagine così il fuoco si fonde col nero invece di
     mostrare un riquadro rettangolare netto */
  -webkit-mask: radial-gradient(ellipse 66% 66% at 50% 45%, #000 44%, transparent 74%);
  mask: radial-gradient(ellipse 66% 66% at 50% 45%, #000 44%, transparent 74%);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  filter: drop-shadow(0 0 55px #ff6a00);
}
.shalom-overlay.mode-fire .shalom-lion {
  animation: lionSlam 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) forwards,
    lionPulse 1.1s 0.6s infinite;
}
@keyframes lionSlam {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-7deg); }
  60% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(2deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}
@keyframes lionPulse {
  0%, 100% { filter: drop-shadow(0 0 40px #ff6a00); }
  50% { filter: drop-shadow(0 0 75px #ff2e00); }
}

/* video a schermo intero */
.shalom-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.shalom-overlay.mode-video .shalom-flames,
.shalom-overlay.mode-video .shalom-lion {
  display: none;
}
.shalom-overlay.mode-video .shalom-video {
  opacity: 1;
}

/* effetto GESÙ: raggi di luce + immagine che scende dall'alto */
.shalom-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180vmax;
  height: 180vmax;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 240, 200, 0) 0deg,
    rgba(255, 240, 200, 0.3) 3.5deg,
    rgba(255, 240, 200, 0) 7deg
  );
  -webkit-mask: radial-gradient(closest-side, #000 26%, transparent 72%);
  mask: radial-gradient(closest-side, #000 26%, transparent 72%);
}
.shalom-overlay.mode-gesu .shalom-rays {
  opacity: 1;
  animation: shalomRays 26s linear infinite;
}
@keyframes shalomRays {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.shalom-gesu {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(42vw, 460px);
  border-radius: 14px;
  transform: translate(-50%, -160%);
  opacity: 0;
  filter: drop-shadow(0 0 55px rgba(255, 240, 180, 0.9));
}
.shalom-overlay.mode-gesu .shalom-gesu {
  animation: gesuDescend 1.7s cubic-bezier(0.16, 0.8, 0.3, 1) forwards,
    gesuFloat 4.5s 1.7s ease-in-out infinite;
}
@keyframes gesuDescend {
  0% { opacity: 0; transform: translate(-50%, -160%) scale(0.9); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes gesuFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-14px); }
}
/* mostra solo gli elementi giusti per ciascuna modalità */
.shalom-overlay.mode-fire .shalom-rays,
.shalom-overlay.mode-fire .shalom-gesu,
.shalom-overlay.mode-video .shalom-rays,
.shalom-overlay.mode-video .shalom-gesu {
  display: none;
}
.shalom-overlay.mode-gesu .shalom-flames,
.shalom-overlay.mode-gesu .shalom-lion,
.shalom-overlay.mode-gesu .shalom-video {
  display: none;
}

@media (max-width: 980px) {
  .stage {
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    overflow-y: auto;
  }
  body {
    overflow: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
  }
}
