/* =========================================================
   station6.css
   תחנה 6 - "סוכת שבעת הכוכבים": מסך פתיחה, רקע משותף לשלושת
   השלבים, פאנל-מידע עליון *אחד* (כותרת+הוראה+הודעת-מצב+כפתור
   "איך משחקים?" יחד בזרימת flex אחת - לא absolute נפרד לכל שורה,
   כנדרש במפורש הסבב הזה), ומסכי הסיום/הפרס (מבוססים על מחלקות
   קיימות משותפות - reward.css/station5.css).

   *** הרקע הפעיל היחיד לכל מסכי תחנה 6:
   station6-jerusalem-rooftop-night-background-v2.png ***
   ========================================================= */

/* ===================== מסך פתיחת תחנה 6 ===================== */

.station6-intro-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 60% 50% at 50% 35%, rgba(210, 170, 110, 0.1) 0%, rgba(210, 170, 110, 0) 65%),
    url("../assets/station6/station6-jerusalem-rooftop-night-background-v2.png");
  background-size: cover;
  background-position: center 40%;
  filter: brightness(0.5) saturate(0.95);
  transition: filter 900ms ease;
}

.station6-intro-bg.is-revealed {
  filter: brightness(0.62) saturate(1.02);
}

.station6-intro-dim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(10, 8, 4, 0.32) 0%, rgba(8, 6, 3, 0.8) 78%);
}

/* משב-רוח קצר וענן קל בכניסה - עדין, לא פס אור החוצה את המסך. */
.station6-intro-gust {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 40%, rgba(220, 225, 230, 0.06) 50%, rgba(255, 255, 255, 0) 60%);
  opacity: 0;
}

.station6-intro-gust.is-active {
  animation: station6GustSweep 1400ms ease-out;
}

@keyframes station6GustSweep {
  0% { opacity: 0; transform: translateX(-8%); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateX(8%); }
}

.station6-intro-content {
  position: relative;
  z-index: 2;
}

/* בד-הסוכה הקטן שמופיע בעדינות במסך הפתיחה (רעד קל) */
.station6-intro-cloth {
  position: absolute;
  z-index: 1;
  bottom: 6%;
  left: 50%;
  width: min(120px, 14vw);
  height: min(70px, 9vh);
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(120, 70, 40, 0.28), rgba(80, 46, 26, 0.1));
  border-radius: 4px 4px 12px 12px;
  opacity: 0;
  transform-origin: top center;
}

.station6-intro-cloth.is-active {
  animation: station6ClothTremble 1600ms ease-out;
}

@keyframes station6ClothTremble {
  0% { opacity: 0; transform: translateX(-50%) rotate(0deg); }
  15% { opacity: 0.8; }
  30% { transform: translateX(-50%) rotate(-2deg); }
  50% { transform: translateX(-50%) rotate(2deg); }
  70% { transform: translateX(-50%) rotate(-1deg); }
  100% { opacity: 0.55; transform: translateX(-50%) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .station6-intro-gust.is-active,
  .station6-intro-cloth.is-active {
    animation: none !important;
    opacity: 0 !important;
  }
}

/* ===================== שכבת רקע משותפת לשלושת השלבים ===================== */

.station6-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../assets/station6/station6-jerusalem-rooftop-night-background-v2.png");
  background-size: cover;
  background-position: center 40%;
}

.station6-dim-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 34% 50% at 8% 55%, rgba(10, 8, 4, 0.4) 0%, rgba(10, 8, 4, 0) 70%),
    radial-gradient(ellipse 40% 36% at 50% 96%, rgba(10, 8, 4, 0.34) 0%, rgba(10, 8, 4, 0) 72%),
    radial-gradient(ellipse 30% 50% at 92% 55%, rgba(10, 8, 4, 0.4) 0%, rgba(10, 8, 4, 0) 70%);
}

/* ===================== פאנל מידע עליון אחד (כותרת+הוראה+הודעה+"איך משחקים?") ===================== */
/* *** דרישה מפורשת הסבב הזה: לא position:absolute נפרד לכל שורה -
   הכול בתוך עטיפת flex אחת, כדי שלא תיתכן חפיפה בין כותרת/הוראה/
   הודעה/כפתורים. רק העטיפה החיצונית עצמה ממוקמת (absolute, פעם
   אחת). ***/

.station6-header-panel {
  position: absolute;
  z-index: 3;
  top: clamp(8px, 1.6vh, 16px);
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, 94%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.station6-header-top-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
}

.station6-phase-title {
  margin: 0;
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.7vw, 1.5rem);
  color: var(--color-gold);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 16px rgba(220, 180, 110, 0.25);
}

.station6-howto-btn {
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: clamp(0.74rem, 0.9vw, 0.84rem);
  color: var(--color-bronze-light);
  background: rgba(10, 8, 4, 0.55);
  border: 1px solid rgba(210, 170, 110, 0.4);
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.station6-howto-btn:hover,
.station6-howto-btn:focus-visible {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.station6-phase-instruction {
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 1vw, 0.94rem);
  line-height: 1.45;
  color: var(--color-parchment-dim);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  padding: 3px 14px;
  border-radius: 10px;
  background: radial-gradient(ellipse 92% 160% at 50% 50%, rgba(10, 8, 4, 0.4) 0%, rgba(10, 8, 4, 0) 74%);
}

.station6-status-message[hidden] {
  display: none;
}

.station6-status-message {
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-style: italic;
  color: var(--color-bronze-light);
  font-size: clamp(0.78rem, 0.96vw, 0.9rem);
  line-height: 1.45;
  background: rgba(10, 8, 4, 0.62);
  border: 1px solid rgba(210, 170, 110, 0.25);
  padding: 7px 16px;
  border-radius: 8px;
}

/* ===================== שורת פעולות תחתונה אחת (משותפת לשלושת השלבים) ===================== */

.station6-actions-row {
  position: absolute;
  z-index: 3;
  bottom: clamp(10px, 2vh, 20px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  width: min(760px, 94%);
}

.station6-action-btn {
  padding: 9px 22px;
  font-family: var(--font-heading);
  font-size: clamp(0.82rem, 1vw, 0.94rem);
  font-weight: 700;
  color: var(--color-gold);
  background: rgba(169, 102, 47, 0.4);
  border: 1.5px solid rgba(216, 164, 91, 0.65);
  border-radius: 6px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.station6-action-btn:hover:not(:disabled),
.station6-action-btn:focus-visible:not(:disabled) {
  border-color: var(--color-gold);
  box-shadow: 0 0 14px rgba(232, 194, 122, 0.45);
}

.station6-action-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.station6-action-btn-muted {
  color: var(--color-parchment-dim);
  background: rgba(60, 50, 34, 0.35);
  border-color: rgba(183, 169, 140, 0.4);
}

/* ===================== חלונית "איך משחקים?" (עטיפה - התוכן משתמש
   ב-station4-intro-card/title/text/close-btn הקיימים) =====================
   *** לא-מודאלי (אובחן ותוקן בבדיקה חיה - אותו באג בדיוק שתוקן בתחנה 5
   חשבון המנורות): elementFromPoint() מעל לוחות/רצועות/כפתורים כשהחלונית
   פתוחה החזיר בעבר את station4-intro-backdrop החוסם מסך-מלא. אין backdrop
   יותר בתחנה 6 - העטיפה עצמה pointer-events:none כדי שלעולם לא תיירט שום
   לחיצה על המשחק שמתחתיה, ורק הכרטיס (ותוכנו) מקבל pointer-events:auto. ***/

.station6-intro-overlay[hidden] {
  display: none;
}

.station6-intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.station6-intro-overlay .station4-intro-card {
  pointer-events: auto;
}

/* ===================== מסכי סיום/פרס תחנה 6 ===================== */

/* *** תוקן: היה רקע-גג-לילה מטושטש כאן (לא עקבי עם שאר מסכי
   התגמול) - עכשיו אותו רקע כחול-עמוק+זהב המשותף לכל שש מסכי
   התגמול (ראו ההערה המרכזית ב-reward.css). *** */
.station6-finale-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 65% 55% at 50% 28%, rgba(232, 194, 122, 0.16) 0%, rgba(232, 194, 122, 0) 60%),
    radial-gradient(ellipse 130% 100% at 50% 112%, rgba(16, 30, 58, 0.95) 0%, rgba(5, 8, 18, 1) 70%),
    linear-gradient(165deg, #101d38 0%, #070c18 55%, #04060d 100%);
}

.station6-seal-badge[hidden] {
  display: none;
}

.station6-seal-badge {
  width: clamp(120px, 9vw, 160px);
  height: clamp(120px, 9vw, 160px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(220, 180, 110, 0.28) 0%, rgba(220, 180, 110, 0.1) 55%, rgba(220, 180, 110, 0) 78%);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.55));
  animation: station6SealBadgeIn 900ms ease;
}

.station6-seal-badge img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}

@keyframes station6SealBadgeIn {
  0% { opacity: 0; transform: scale(0.7); }
  60% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .station6-seal-badge {
    animation: none !important;
  }
}

/* ===================== תגי חיבור/סמל משותפים (עיגול/משולש/ריבוע,
   מנורה/קשת/גפן/כוכב) - SVG נקי, לא טקסט בתוך תמונה ===================== */

.station6-shape-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(22px, 2.2vw, 32px);
  height: clamp(22px, 2.2vw, 32px);
  border-radius: 50%;
  color: #f0e6d2;
  background: rgba(10, 8, 4, 0.7);
  border: 1.5px solid rgba(210, 170, 110, 0.55);
  flex: 0 0 auto;
}

.station6-shape-badge.is-empty {
  background: rgba(10, 8, 4, 0.3);
  border-style: dashed;
  color: transparent;
}

.station6-shape-badge svg {
  width: 62%;
  height: 62%;
}

.station6-shape-badge.is-error {
  border-color: #ff8c78;
  box-shadow: 0 0 10px rgba(255, 120, 100, 0.6);
  animation: station6BadgePulse 900ms ease-in-out infinite;
}

.station6-shape-badge.is-hint-focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 10px rgba(232, 194, 122, 0.6);
  animation: station6BadgePulse 1200ms ease-in-out infinite;
}

@keyframes station6BadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

@media (prefers-reduced-motion: reduce) {
  .station6-shape-badge.is-error,
  .station6-shape-badge.is-hint-focus {
    animation: none !important;
  }
}
