/* =========================================================
   feel.css — האפקטים: חלקיקים, רצף, הבזקים ו"קפיצות"
   ---------------------------------------------------------
   כאן רק תחושה. הפריסה והצבעים הראשיים נמצאים ב־style.css,
   והקוד שמפעיל את כל זה נמצא ב־js/feel.js.
   כל תנועה כאן משנה רק transform (או scale/translate/rotate)
   ו־opacity: את אלה כרטיס המסך מצייר לבד, וזה הכי חסכוני לסוללה.
   בסוף הקובץ: מי שביקש במכשיר "פחות תנועה" מקבל גרסה שקטה.
   ========================================================= */

/* ---------- לחיצות מהירות ---------- */
/* בלי סימון טקסט ובלי תפריט של לחיצה ארוכה (בלי זום בלחיצה כפולה: touch-action ב־platform.css) */
.stage,.stage *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
[data-r]{display:inline-block}            /* כדי שהמונים יוכלו "לפעום" */
#year{transform-origin:100% 70%}

/* הליבה "נושמת" לאט כשלא נוגעים בה, ונמעכת מלמטה כשלוחצים */
.core .pic:not(.fire-pic){transform-origin:50% 80%;animation:fx-breathe 3.4s ease-in-out infinite}
@keyframes fx-breathe{0%,100%{scale:1}50%{scale:1.035}}

/* חפץ מכוסה שכבר אפשר לגלות: הבד מתנדנד קצת, כאילו משהו זז מתחתיו */
.covered:has(.tag.can) .cloth:not(.drop){transform-origin:50% 100%;animation:fx-wobble 2.8s ease-in-out infinite}
@keyframes fx-wobble{0%,64%,100%{rotate:0deg}70%{rotate:-5deg}76%{rotate:4deg}82%{rotate:-2.5deg}88%{rotate:1deg}}

/* ---------- טבעת הרצף סביב הליבה ---------- */
/* הצבע (color) נקבע ב־feel.js לפי הפרק, וכאן משתמשים בו כ־currentColor */
.fx-glow{position:absolute;z-index:2;pointer-events:none;border-radius:50%;opacity:0;
  background:radial-gradient(circle,currentColor 0%,transparent 62%);will-change:transform,opacity}
.fx-ring{position:absolute;z-index:6;pointer-events:none;overflow:visible;opacity:0;transition:opacity .35s}
.fx-ring.on{opacity:1}
.fx-ring rect{fill:currentColor;opacity:.14;transition:opacity .12s}
.fx-ring rect.on{opacity:1}
.fx-ring.hot rect.on{fill:#fff}
.fx-ring.hot{filter:drop-shadow(0 0 5px currentColor);animation:fx-hot .45s ease-in-out infinite alternate}
@keyframes fx-hot{from{opacity:.7}to{opacity:1}}
/* התווית יושבת על הכיתוב של הליבה ומסתירה אותו בזמן רצף */
.fx-mult{position:absolute;z-index:7;pointer-events:none;translate:-50% -50%;display:flex;align-items:center;justify-content:center;gap:6px;line-height:1;
  white-space:nowrap;background:#0B0F15;border:1px solid currentColor;border-radius:999px;padding:3px 10px;opacity:0;transition:opacity .3s}
.fx-mult.on{opacity:1}
/* רק תווית אחת בכל רגע: בזמן רצף הכיתוב של הליבה נעלם מיד, וכשהרצף נגמר הוא חוזר
   רק אחרי שתווית הרצף כבר דהתה (delay של .25s). בלי זה שתי התוויות נראו זו על זו, כמו ג׳יבריש */
.core-lbl{transition:opacity .2s .25s}
.stage:has(.fx-mult.on) .core-lbl{opacity:0;transition:opacity .12s}
.fx-mult small{font-size:12px;color:var(--muted)}
.fx-mult b{font-size:15px;font-weight:600;color:inherit}
.fx-mult.hot{animation:fx-throb .45s ease-in-out infinite alternate}
.fx-mult.hot b{color:#fff;text-shadow:0 0 10px currentColor}
@keyframes fx-throb{from{scale:1}to{scale:1.12}}
/* "תלחץ כאן": טבעת שפועמת עד הלחיצה הראשונה במשחק */
.fx-cue{position:absolute;z-index:6;pointer-events:none;border-radius:50%;border:2px solid rgba(255,200,87,.75);box-shadow:0 0 18px rgba(255,200,87,.4);opacity:0;animation:fx-cue 1.8s ease-out infinite}
@keyframes fx-cue{0%{scale:.6;opacity:0}30%{opacity:.9}100%{scale:1.05;opacity:0}}

/* ---------- שכבת האפקטים (מעל המפה ומסך הפרק, מתחת לחלונות. לא תופסת לחיצות) ---------- */
.fx-layer{position:fixed;inset:0;pointer-events:none;z-index:55;overflow:hidden;contain:strict}
.fx-layer > *{position:absolute;left:0;top:0;pointer-events:none}
/* חלקיק: נקודה קטנה שזוהרת בצבע שלה */
.fx-p{width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;background:currentColor;box-shadow:0 0 8px 1px currentColor;opacity:0}
/* מספר צף */
.fx-pop{opacity:0;direction:ltr;white-space:nowrap;font-family:var(--mono);font-weight:600;font-size:16px;color:var(--accent);
  text-shadow:0 1px 2px rgba(0,0,0,.9),0 0 12px rgba(0,0,0,.6)}
.fx-pop.heat{color:var(--flame)}
.fx-pop.hot{color:#fff;font-size:18px;text-shadow:0 0 10px var(--accent),0 1px 2px #000}
.fx-pop.mini{font-size:12px;font-weight:500;color:rgba(125,211,160,.9)}
.fx-pop.rate{font-size:13px;color:var(--good)}
.fx-pop.crit{text-align:center;font-size:22px;color:#FFE08A;text-shadow:0 0 16px rgba(255,200,87,.9),0 2px 2px #000}
.fx-pop.crit b{display:block;direction:rtl;font-family:var(--display);font-size:50px;line-height:.85;font-weight:700;color:#fff}
/* טבעת שמתרחבת, הבזק, ואייקון שעף */
.fx-wave{width:60px;height:60px;margin:-30px 0 0 -30px;border-radius:50%;border:3px solid currentColor;box-shadow:0 0 16px currentColor,inset 0 0 12px currentColor;opacity:0}
.fx-layer > .fx-flash{width:100%;height:100%;opacity:0}
.fx-fly{width:30px;height:30px;margin:-15px 0 0 -15px;filter:drop-shadow(0 0 8px rgba(255,200,87,.85))}
.fx-fly img{width:100%;height:100%;display:block}

/* ---------- מונים ---------- */
.fx-gold{color:#FFE08A!important;text-shadow:0 0 14px rgba(255,200,87,.8)}
.fx-glowtxt{text-shadow:0 0 18px var(--accent),0 0 4px var(--accent)}

/* ---------- קנייה: הכפתור קופץ ומבזיק ---------- */
.fx-bought{position:relative;animation:fx-bought .45s cubic-bezier(.2,1.6,.4,1)}
@keyframes fx-bought{0%{scale:.95}40%{scale:1.035}100%{scale:1}}
.fx-bought::after{content:'';position:absolute;inset:-1px;border-radius:inherit;border:2px solid #FFD76A;pointer-events:none;
  box-shadow:0 0 18px rgba(255,200,87,.5),inset 0 0 14px rgba(255,200,87,.25);opacity:0;animation:fx-fade .7s ease-out}
@keyframes fx-fade{from{opacity:1}to{opacity:0}}
.fx-bought .own{animation:fx-numpop .5s cubic-bezier(.2,1.6,.4,1)}
@keyframes fx-numpop{0%{scale:1}35%{scale:1.45}100%{scale:1}}

/* ---------- טוסט מיוחד ---------- */
.toast.toast-gold{border-color:#FFD76A;color:#FFF3C4;box-shadow:0 0 22px rgba(255,200,87,.35)}

/* ---------- מתגים בהגדרות: צלילים, מוזיקה, רטט ---------- */
.fx-toggles{display:grid;grid-template-columns:repeat(auto-fit,minmax(72px,1fr));gap:8px}
.fx-tg{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;background:var(--night);border:1px solid var(--line);
  border-radius:var(--r-md);min-height:78px;padding:10px 6px;color:var(--text);font-size:14px}
.fx-tg small{font-size:11px;color:var(--faint);line-height:1}
.fx-tg[aria-checked="true"]{border-color:var(--accent)}
.fx-tg[aria-checked="true"] small{color:var(--accent)}
.fx-sw{position:relative;width:42px;height:24px;border-radius:999px;background:var(--panel-hi);border:1px solid var(--line)}
.fx-sw::after{content:'';position:absolute;top:2px;right:2px;width:18px;height:18px;border-radius:50%;background:var(--muted)}
.fx-tg[aria-checked="true"] .fx-sw{background:var(--accent);border-color:var(--accent)}
.fx-tg[aria-checked="true"] .fx-sw::after{translate:-18px 0;background:#081018}

/* ---------- פחות תנועה ---------- */
@media (prefers-reduced-motion:reduce){
  .core .pic,.fx-cue,.fx-ring.hot,.fx-mult.hot,.covered .cloth,.fx-bought,.fx-bought .own{animation:none!important}
  .fx-cue{opacity:.7}
}
