/* ═══════════════════════════════════════════════════════════════
   secret-space.css — שכבת SECRET SPACE, עצמאית לחלוטין
   ───────────────────────────────────────────────────────────────
   כל הכללים כאן ממוסגרים תחת שורש יחיד: .np-secret-space
   (או .np-ss-modal / .np-ss-badge שהם אחים שלו). אין כאן אף
   סלקטור גלובלי, ואף כלל לא נכנס לרשימות משותפות קיימות של
   האפליקציה המארחת — כדי שהפיצ'ר לא ייפול לתוך cascade קיים
   ולא ישפיע עליו.

   הסגנון: הכרטיסייה כולה בגרדיאן הקשת של כפתור האפליקציה, עם
   הלוגו על דיסק לבן — כמו בקובץ האייקון המקורי. זהה בכל אפליקציה
   מארחת, ובמכוון שונה מהפלטה של האפליקציה שמסביבו.
   ═══════════════════════════════════════════════════════════════ */

.np-secret-space {
  --ss-ink:  #ffffff;
  --ss-dim:  rgba(255,255,255,.9);
  /* לוח הקשת נדגם מכפתור הגרדיאן של האפליקציה (PLAY7) */
  --ss-rainbow: #28E2F0, #34B5FD, #5882FD, #835BFC, #AE40FD, #DB34F9, #F730D0,
                #FD3698, #FE506F, #FE724B, #FF9725, #FEAF08, #FDDE04, #BBED2E, #28E2F0;

  position: relative;
  margin: 18px 0 4px;
  padding: 20px 16px 18px;
  border-radius: 22px;
  border: 0;
  /* הכרטיסייה כולה היא הגרדיאן. שכבת הכהות העדינה מעליו קיימת רק
     כדי שטקסט לבן יישאר קריא גם מעל הצהוב והירוק שבקשת. */
  background:
    linear-gradient(rgba(0,0,0,.20), rgba(0,0,0,.20)),
    linear-gradient(135deg, var(--ss-rainbow));
  background-size: 100% 100%, 220% 220%;
  box-shadow: 0 10px 30px rgba(80, 40, 160, .30), inset 0 1px 0 rgba(255,255,255,.30);
  color: var(--ss-ink);
  text-align: center;
  overflow: hidden;
}

/* ── כיווניות (Lea, 23/09/2026) ──────────────────────────────────────
   כאן היה `direction: rtl` קשיח, גם על הכרטיסייה וגם על המודל — שריד
   מ-EyeFocus, שם עברית הייתה השפה היחידה שנלקחה בחשבון. ה-JS כן הגדיר
   dir="ltr" נכון לכל שפה אחרת, אבל תכונת dir היא רמז מצגתי בעדיפות
   נמוכה, וכלל CSS גובר עליה. התוצאה: כל מתאמנת שאינה קוראת עברית ראתה
   את השערים בסדר הפוך (III, II, I) ואת הנקודה בתחילת המשפט במקום בסופו.
   עכשיו ה-CSS קורא את התכונה שה-JS כבר טורח להגדיר, במקום לדרוס אותה.
   גם זה טעון העתקה חזרה ל-EyeFocus. */
.np-secret-space[dir="rtl"], .np-ss-modal[dir="rtl"] { direction: rtl; }
.np-secret-space[dir="ltr"], .np-ss-modal[dir="ltr"] { direction: ltr; }

.np-secret-space.np-ss-open {
  cursor: pointer;
  animation: np-ss-shift 14s ease-in-out infinite;
}
@keyframes np-ss-shift {
  0%, 100% { background-position: 0% 50%, 0% 50%; }
  50%      { background-position: 0% 50%, 100% 50%; }
}

.np-ss-title {
  font-size: 15px; font-weight: 900; letter-spacing: .5px;
  margin-bottom: 10px;
  color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.np-ss-desc {
  font-size: 12.5px; line-height: 1.7; color: var(--ss-dim);
  text-shadow: 0 1px 5px rgba(0,0,0,.30);
  max-width: 30em; margin: 10px auto 0;
}

/* ── שורת השערים ── */
.np-ss-gates { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.np-ss-gate {
  /* inline-flex, כמו ב-EyeFocus: האייקון יושב לצד התווית ולא מעליה. */
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 800; padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45); color: #fff;
  background: rgba(255,255,255,.16); white-space: nowrap;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.np-ss-gate.is-open {
  color: #1b1f3a; border-color: #fff; background: rgba(255,255,255,.92);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
/* ── אייקון המנעול — SVG בסגנון אמוג'י, מועתק מ-EyeFocus (23/09/2026) ──
   ה-SVG צבוע בתוך עצמו (זהב #F8C040 + חום #403868 + קשת אפורה), לא
   currentColor, ולכן הוא נראה אותו דבר על התג הכהה ועל התג הפתוח הבהיר
   ואין צורך בשני קבצים או בפילטר. */
.np-ss-lock-ic { flex: 0 0 auto; }

.np-ss-gate.is-final {
  color: #1b1f3a; border-color: #fff; background: #fff;
  box-shadow: 0 3px 14px rgba(0,0,0,.22);
}

/* ── הלוגו: ארבע שכבות על דיסק לבן, כמו בקובץ המקורי ── */
.np-ss-logo {
  position: relative; margin: 0 auto; width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #ffffff 72%, #f4f6fb 100%);
  box-shadow: 0 6px 20px rgba(60, 30, 120, .28), 0 0 0 1px rgba(255,255,255,.7);
}
.np-ss-logo .np-ss-l {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block;
  transition: filter .9s ease, opacity .9s ease, transform .9s ease;
}
.np-ss-badge .np-ss-logo { width: 100%; height: 100%; box-shadow: none; }
.np-ss-modal .np-ss-logo { width: 172px; height: 172px; }

/* חשיפה פר-שכבה. כל שכבה נשלטת בנפרד — לכן אין כאן מסנן גלובלי אחד
   על כל הלוגו, שהיה חושף או מטשטש את הכול יחד. */
.np-ss-logo[data-logo-gate="0"] .np-ss-l-outer,
.np-ss-logo[data-logo-gate="0"] .np-ss-l-inner,
.np-ss-logo[data-logo-gate="0"] .np-ss-l-figure { filter: blur(14px) grayscale(100%); opacity: .28; }
.np-ss-logo[data-logo-gate="0"] .np-ss-l-spark  { opacity: 0; }

.np-ss-logo[data-logo-gate="1"] .np-ss-l-outer  { filter: none; opacity: 1; }
.np-ss-logo[data-logo-gate="1"] .np-ss-l-inner,
.np-ss-logo[data-logo-gate="1"] .np-ss-l-figure { filter: blur(14px) grayscale(100%); opacity: .28; }
.np-ss-logo[data-logo-gate="1"] .np-ss-l-spark  { opacity: 0; }

.np-ss-logo[data-logo-gate="2"] .np-ss-l-outer,
.np-ss-logo[data-logo-gate="2"] .np-ss-l-inner,
.np-ss-logo[data-logo-gate="2"] .np-ss-l-figure { filter: none; opacity: 1; }
.np-ss-logo[data-logo-gate="2"] .np-ss-l-spark  { opacity: 0; }

.np-ss-logo[data-logo-gate="3"] .np-ss-l-outer,
.np-ss-logo[data-logo-gate="3"] .np-ss-l-inner,
.np-ss-logo[data-logo-gate="3"] .np-ss-l-figure { filter: none; opacity: 1; }
.np-ss-logo[data-logo-gate="3"] .np-ss-l-spark  {
  opacity: 1; animation: np-ss-breathe 3.4s ease-in-out infinite;
}
@keyframes np-ss-breathe {
  0%, 100% { opacity: .72; transform: scale(.94); }
  50%      { opacity: 1;   transform: scale(1.06); }
}

/* ── מד התקדמות ── */
.np-ss-track {
  height: 6px; border-radius: 999px; background: rgba(255,255,255,.30);
  overflow: hidden; margin: 14px auto 6px; max-width: 260px;
}
.np-ss-fill {
  height: 100%; border-radius: 999px; transition: width .8s ease;
  background: #fff;
}
.np-ss-count { font-size: 11.5px; font-weight: 800; color: #fff; text-shadow: 0 1px 5px rgba(0,0,0,.32); }

/* ── התג הקטן במסכי האימון ── */
.np-ss-badge {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid transparent;
  background:
    radial-gradient(circle at 50% 42%, #fff 0%, #fff 74%, #f4f6fb 100%) padding-box,
    linear-gradient(135deg, var(--ss-rainbow)) border-box;
  box-shadow: 0 3px 12px rgba(60, 30, 120, .28);
  cursor: pointer; padding: 0; flex: 0 0 auto;
}

/* ── מודל חגיגת פתיחת שער ── */
.np-ss-modal {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(6, 8, 22, .82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .5s ease;
}
.np-ss-modal.is-in { opacity: 1; }
.np-ss-modal-card {
  /* position/overflow added 15/09/2026: the confetti is absolutely positioned
     inside this card and must be able to spill past its rounded edge. */
  position: relative;
  overflow: visible;
  max-width: 340px; width: 100%; text-align: center;
  padding: 26px 22px; border-radius: 24px;
  border: 0;
  background:
    linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.18)),
    linear-gradient(135deg, #28E2F0, #34B5FD, #5882FD, #835BFC, #AE40FD, #DB34F9,
                    #F730D0, #FD3698, #FE506F, #FE724B, #FF9725, #FEAF08, #FDDE04, #BBED2E);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
  color: #fff;
}

/* ── מנעול-פתוח קטן, במקום הלוגו המקונן שגרם לאליפסה ──
   מה שהיה שבור: המודל הציג את הלוגו פעמיים — פעם למעלה, ופעם מקוננת
   בתוך .np-ss-badge ממש מעל הכפתור. שני הכללים
   `.np-ss-badge .np-ss-logo` ו-`.np-ss-modal .np-ss-logo` שווים
   בספציפיות, והמאוחר בקובץ ניצח — כך שהלוגו הפנימי קפץ מ-46px ל-172px
   בתוך מיכל קטן, דלף החוצה, ונראה כאליפסה לבנה שמתמזגת עם הכפתור. */
.np-ss-unlock {
  font-size: 32px; line-height: 1;
  margin: 2px auto 16px;
  text-align: center;
  animation: np-ss-pop .55s cubic-bezier(.34,1.56,.64,1);
}
/* ה-SVG צבעוני בעצמו; צל קל כדי שיבלוט על הגרדיאנט. */
.np-ss-unlock svg { display: block; margin: 0 auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
@keyframes np-ss-pop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); }
}

/* ── קונפטי — פרץ נקודות צבע קצר בפתיחת שער ── */
.np-ss-confetti {
  position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 5;
}
.np-ss-confetti-p {
  position: absolute; top: 46%; left: 50%;
  width: 7px; height: 7px; border-radius: 2px;
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg);
  animation: np-ss-confetti-fly .9s ease-out forwards;
}
@keyframes np-ss-confetti-fly {
  0%   { transform: translate(-50%, -50%) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)); opacity: 0; }
}
.np-ss-burst {
  font-size: 12px; font-weight: 900; letter-spacing: 2px;
  color: #fff; margin-bottom: 10px; text-shadow: 0 1px 8px rgba(0,0,0,.4);
  animation: np-ss-crack 1.6s ease-out;
}
@keyframes np-ss-crack {
  0%   { opacity: 0; transform: scale(.6); filter: blur(6px); }
  40%  { opacity: 1; transform: scale(1.15); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); }
}
.np-ss-modal-txt { font-size: 13.5px; line-height: 1.7; margin: 14px 0 18px;
  color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.np-ss-modal-sub { font-size: 11px; color: rgba(255,255,255,.9); margin-top: -8px; margin-bottom: 12px; }
.np-ss-btn {
  width: 100%; padding: 12px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 900; color: #2a1a5e;
  background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.22);
}

@media (prefers-reduced-motion: reduce) {
  .np-ss-logo[data-logo-gate="3"] .np-ss-l-spark { animation: none; }
  .np-ss-burst { animation: none; }
  .np-ss-unlock { animation: none; }
  .np-ss-confetti { display: none; }
  .np-ss-l-outer, .np-ss-l-inner, .np-ss-l-figure, .np-ss-l-spark,
  .np-ss-fill, .np-ss-modal { transition: none; }
}
