/* =========================================================
   station7Path.css
   תחנה 7, חלק ג' - נתיב האור האחרון. 7 מוקדים על גבי station7-floor-
   path.png, 9 קשתות-משחק פעילות (קו מתכתי-כחלחל ברור), 3 חישורים
   מוחלשים חזותית (קישוט בלבד, לא ניתנים למעבר). ארבע מהמוקדים הם
   מנסרות מסתובבות - גדולות ובולטות בבירור משלושת המוקדים הקבועים.
   ========================================================= */

.path-screen-grid {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  row-gap: clamp(8px, 1.4vh, 16px);
  padding: clamp(10px, 2vh, 20px) clamp(12px, 3vw, 40px);
}

.path-header-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: min(1000px, 98%);
  margin: 0 auto;
}

.path-stage-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.path-main-instruction {
  margin: 0;
  align-self: center;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1rem, 1.55vw, 1.28rem);
  line-height: 1.5;
  color: #fff8ea;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 14px rgba(0, 0, 0, 0.6);
  background: rgba(8, 6, 3, 0.6);
  border: 1px solid rgba(232, 194, 122, 0.4);
  border-radius: 10px;
  padding: 8px 20px;
  width: fit-content;
  max-width: 96%;
  margin-inline: auto;
}

.path-intro-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.path-intro-checklist li {
  font-family: var(--font-body);
  font-size: clamp(0.82rem, 1vw, 0.92rem);
  color: var(--color-parchment-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(232, 194, 122, 0.2);
  border-radius: 6px;
  padding: 6px 12px;
  text-align: start;
}

.path-table-wrap {
  position: relative;
  width: clamp(300px, 50vh, 560px);
  aspect-ratio: 1 / 1;
  max-width: 94%;
  max-height: 100%;
}

.path-table-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.5));
}

#path-stage {
  position: absolute;
  inset: 0;
}

#path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* *** קשתות-משחק פעילות: כבויות לגמרי בזמן תכנון (עמעום קבוע, לא
   מגיבות לריחוף/מנסרות) - נדלקות רק בפועל, קטע-קטע, כשמפעילים את
   קרן האור (fireBeam). ***/
.path-edge-line {
  stroke: url(#path-active-edge-grad);
  stroke-width: 0.7;
  stroke-linecap: round;
  opacity: 0.3;
  transition: opacity 350ms ease, filter 350ms ease, stroke-width 350ms ease;
}

.path-edge-line.is-lit {
  opacity: 1;
  stroke-width: 0.95;
  filter: drop-shadow(0 0 5px rgba(255, 220, 140, 0.9));
}

/* *** חץ-כיוון קבוע וגלוי מההתחלה (3) אל היציאה הראשונה הקבועה (2) -
   חלש אך תמידי, לא מוצמד ל-is-lit ואינו זז - "לא חוק נסתר". ***/
.path-start-arrow {
  stroke: #e8c47a;
  stroke-width: 0.55;
  stroke-linecap: round;
  opacity: 0.5;
}

/* *** זרועות המנסרות (3 בכל מנסרה): עבות וארוכות דיו כדי לבלוט
   בבירור מחוץ לגוף המנסרה. שתיים מחוברות/בולטות (זהב עז, זוהר),
   אחת מנותקת - כהה יותר אך עדיין נראית בבירור (לא כמעט-שקופה). קו
   "קשר" מעוגל בין שתי הזרועות הפעילות ממחיש שהן מחוברות זו לזו.
   לעולם לא ירוק, לעולם לא רומזות נכון/לא-נכון. ***/
.path-prism-hub {
  fill: rgba(20, 16, 10, 0.92);
  stroke: rgba(232, 194, 122, 0.6);
  stroke-width: 0.4;
}

.path-prism-arm {
  stroke-linecap: round;
  transition: stroke 250ms ease, stroke-width 250ms ease, opacity 250ms ease;
}

.path-prism-arm.is-active-arm {
  stroke: #ffce6e;
  stroke-width: 2.9;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(255, 206, 110, 1));
}

.path-prism-arm.is-inert-arm {
  stroke: rgba(150, 155, 160, 0.7);
  stroke-width: 1.3;
  opacity: 0.7;
}

.path-prism-link {
  fill: none;
  stroke: #ffce6e;
  stroke-width: 1.9;
  opacity: 0.95;
  filter: drop-shadow(0 0 4px rgba(255, 206, 110, 0.75));
}

/* *** קשתות מוחלשות (קישוט בלבד, לא ניתנות למעבר) - כהות ומטושטשות
   בבירור, כדי שלא יתבלבלו עם הקווים הפעילים העבים והבהירים. ***/
.path-muted-edge {
  position: absolute;
  height: 2.4%;
  transform-origin: 0 50%;
  background: rgba(12, 10, 7, 0.78);
  filter: blur(3px);
  border-radius: 4px;
  pointer-events: none;
}

.pathnode {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(183, 169, 140, 0.5);
  background: radial-gradient(circle, rgba(60, 50, 35, 0.85) 0%, rgba(25, 20, 14, 0.85) 100%);
  z-index: 2;
  transition: box-shadow 250ms ease, border-color 250ms ease, background 250ms ease;
}

/* *** מוקד קבוע (0/3/5) - עיגול פשוט וקטן, בלי סמל סיבוב, בלי hover,
   ובלי מראה "לחיץ" - כדי להיבדל בבירור מארבע המנסרות. ***/
.pathnode-fixed {
  width: clamp(22px, 4.6%, 34px);
  height: clamp(22px, 4.6%, 34px);
}

.pathnode-fixed:disabled {
  opacity: 1;
  cursor: default;
}

/* *** מנסרה לחיצה (1/2/4/6) - גדולה בבירור (כ-35% יותר) מהמוקד
   הקבוע, עם מסגרת משושה מסתובבת, סמל סיבוב קבוע וזוהר-hover ברור. ***/
.pathnode-prism {
  width: clamp(48px, 10.2%, 76px);
  height: clamp(48px, 10.2%, 76px);
  cursor: pointer;
  overflow: visible;
}

.pathnode-prism:hover:not(:disabled),
.pathnode-prism:focus-visible:not(:disabled) {
  border-color: rgba(232, 194, 122, 0.9);
  box-shadow: 0 0 16px rgba(232, 194, 122, 0.55);
}

.pathnode-prism:disabled {
  cursor: default;
}

.prism-frame {
  position: absolute;
  inset: 6%;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  border: 2px solid rgba(232, 194, 122, 0.55);
  background: rgba(232, 194, 122, 0.07);
  transform-origin: 50% 50%;
  transition: transform 300ms ease;
  pointer-events: none;
}

.prism-rotate-icon {
  position: absolute;
  left: -8%;
  top: -8%;
  width: 36%;
  height: 36%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 62%;
  line-height: 1;
  color: var(--color-gold);
  background: rgba(10, 8, 4, 0.88);
  border: 1px solid rgba(232, 194, 122, 0.65);
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
}

.prism-first-hint {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  color: #241a0c;
  background: rgba(232, 194, 122, 0.95);
  padding: 3px 10px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 4;
  animation: pathFirstHintPulse 1400ms ease-in-out infinite;
}

@keyframes pathFirstHintPulse {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}

.pathnode.is-locked {
  border-color: rgba(150, 200, 170, 0.75);
  box-shadow: 0 0 10px rgba(150, 200, 170, 0.4);
}

.pathnode.is-lit {
  background: radial-gradient(circle, #ffe9b0 0%, #c98b4a 100%);
  border-color: var(--color-gold);
  box-shadow: 0 0 10px rgba(255, 220, 140, 0.8);
}

.pathnode.is-fail-flash {
  animation: pathFailFlash 550ms ease-in-out 2;
}

.pathnode.is-hint-focus {
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.95);
}

.pathnode.is-start-marker,
.pathnode.is-gate-marker {
  border-width: 3px;
}

@keyframes pathFailFlash {
  0%, 100% { box-shadow: 0 0 8px rgba(210, 90, 70, 0.6); border-color: rgba(210, 90, 70, 0.8); }
  50% { box-shadow: 0 0 16px rgba(230, 120, 90, 0.9); border-color: rgba(230, 140, 110, 0.95); }
}

.pathnode-tag {
  position: absolute;
  transform: translate(-50%, -185%);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.72rem, 0.95vw, 0.86rem);
  color: #fff8ea;
  background: rgba(8, 6, 3, 0.85);
  border: 1px solid rgba(232, 194, 122, 0.5);
  padding: 4px 12px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* *** הדרכה חד-פעמית על הלוח: מחשיכים מעט את שאר הלוח (עיגול שקוף-
   כהה מעל path-table-wrap), מרימים z-index רק של המנסרה המודגשת כדי
   שתישאר לחיצה וברורה מעל השכבה הכהה, וחוסמים לחיצות על כל השאר. ***/
.path-onboarding-dim {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(6, 4, 2, 0.62);
  border-radius: 50%;
  pointer-events: auto;
}

.pathnode.is-onboarding-focus {
  z-index: 6;
  box-shadow: 0 0 0 6px rgba(232, 194, 122, 0.3), 0 0 22px rgba(232, 194, 122, 0.9);
}

.path-onboarding-caption {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  margin: 0;
  width: min(420px, 88%);
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.86rem, 1.1vw, 1rem);
  color: #fff8ea;
  background: rgba(8, 6, 3, 0.94);
  border: 1px solid rgba(232, 194, 122, 0.55);
  border-radius: 10px;
  padding: 10px 16px;
  pointer-events: none;
}

.path-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* *** הדגמת מנסרה ניטרלית בכרטיס ההסבר - עצמאית מהפאזל האמיתי,
   מוגדלת בבירור (פי 2-3 מהמנסרות שעל הלוח), מדגימה לחיצה בודדת
   ומפורשת: "ימין מחובר לשמאל" -> לחיצה מודגמת -> "שמאל מחובר למטה". ***/
.path-intro-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.path-intro-demo-frame-wrap {
  position: relative;
  width: min(190px, 52%);
  aspect-ratio: 1 / 1;
}

.path-intro-demo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.path-intro-demo-frame {
  position: absolute;
  inset: 8%;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  border: 3px solid rgba(232, 194, 122, 0.55);
  background: rgba(232, 194, 122, 0.07);
  transform-origin: 50% 50%;
  transition: transform 300ms ease;
}

.path-intro-demo-click {
  position: absolute;
  top: 50%;
  left: 76%;
  transform: translate(-50%, -50%) scale(1);
  font-size: 1.9rem;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.path-intro-demo-click.is-clicking {
  opacity: 1;
  transform: translate(-50%, -50%) scale(0.82);
}

.path-intro-demo-caption {
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.8rem, 1vw, 0.92rem);
  color: #fff8ea;
  min-height: 2.4em;
}

@media (prefers-reduced-motion: reduce) {
  .pathnode.is-fail-flash {
    animation: none !important;
    box-shadow: 0 0 12px rgba(210, 90, 70, 0.85);
    border-color: rgba(210, 90, 70, 0.9);
  }

  .prism-first-hint {
    animation: none !important;
  }

  .prism-frame,
  .path-intro-demo-frame {
    transition: none !important;
  }
}
