/* =========================================================
   station7Beams.css
   תחנה 7, חלק ב' - מנגנון האור המאוחד. שש טבעות סביב שולחן
   החותמות, קרני-אור SVG למרכז, עדשה מרכזית שמתמלאת עם ההתקדמות.
   ========================================================= */

.beams-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);
}

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

/* *** דרישה מפורשת: ההוראה והודעת-המצב היו קטנות מדי ונבלעות ברקע -
   הגדלה ייעודית למסך חלק ב' בלבד (לא נוגעת בשאר התחנות, שם הגדלים
   הקיימים כבר אושרו). ***/
.beams-header-row .station6-phase-instruction {
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  font-weight: 700;
  color: #fff8ea;
  background: rgba(8, 6, 3, 0.55);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  padding: 7px 18px;
}

.beams-header-row .wind-phase-subinstruction {
  font-size: clamp(0.86rem, 1.1vw, 1rem);
  color: #f0e6d2;
}

.beams-header-row .station6-status-message {
  font-size: clamp(0.92rem, 1.2vw, 1.08rem);
  font-style: normal;
  font-weight: 700;
  color: #fff3d6;
  background: rgba(10, 8, 4, 0.8);
  border-color: rgba(232, 194, 122, 0.5);
}

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

.beams-table-wrap {
  position: relative;
  width: clamp(320px, 46vh, 560px);
  aspect-ratio: 1 / 1;
  max-width: 94vw;
  max-height: 100%;
}

.beams-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));
}

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

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

.beam-main-line {
  stroke: #ffe9b0;
  stroke-width: 0.6;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 350ms ease;
  filter: drop-shadow(0 0 3px rgba(255, 220, 140, 0.9));
}

.beam-stub-line {
  stroke: #8a6a3a;
  stroke-width: 0.6;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 250ms ease;
}

.beam-ring-wrap {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(64px, 13%, 96px);
  height: clamp(64px, 13%, 96px);
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
}

.beam-ring-wrap:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.beam-seal-img,
.beam-ring-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.beam-seal-img {
  border-radius: 50%;
  object-fit: cover;
  padding: 14%;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
}

.beam-ring-img {
  transition: transform 400ms cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* *** שלוש תחנות-זווית קבועות לכל טבעת - כל אחת מסתובבת פעם אחת
   (קבוע, ב-JS) לאחת משלוש הזוויות האפשריות ונשארת שם; לא מגיבות
   למצב הנוכחי. משמעות חזותית אחת בלבד לכל הרכיבים כאן: "המחוג
   הזהוב (הנע) צריך לחפוף לחריץ הכחול (הקבוע)" - לא "להצביע אל
   המרכז" (ה-TARGET אינו אחיד בין הטבעות, ולכן "מרכז" לא היה יכול
   להיות נכון לכל שש הטבעות בו-זמנית; זה בדיוק מה שיצר את הסתירה
   החזותית שדווחה - קו-אור נפרד שתמיד מצויר עד המרכז, לצד מחוג
   שמסתובב לזווית לא-קשורה). חריץ-היעד (is-target) גדול, כחול
   מובהק (לא זהב, לא "כחול-זהוב" מעורפל) ובאותו רדיוס-בדיוק כמו קצה
   המחוג - כך שכשהמצב הלוגי תואם ל-TARGET, המחוג הזהוב חופף פיזית
   את חריץ היעד הכחול, לא רק "מסתובב לאיזור כללי דומה". שתי התחנות
   הלא-יעד נשארות נקודות אפורות עמומות מאוד - רק כדי לרמוז "יש כאן
   שלושה מצבים אפשריים", בלי להתחרות חזותית עם היעד. ***/
.beam-angle-station {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.beam-angle-station::after {
  content: "";
  position: absolute;
  top: -12%;
  left: 50%;
  width: 10%;
  height: 10%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(180, 190, 205, 0.35);
}

.beam-angle-station.is-target {
  z-index: 2;
}

.beam-angle-station.is-target::after {
  width: 30%;
  height: 13%;
  border-radius: 999px;
  background: linear-gradient(180deg, #bfe3ff 0%, #4fa8f0 55%, #1f6fc4 100%);
  box-shadow: 0 0 12px 3px rgba(79, 168, 240, 0.9), inset 0 1px 2px rgba(255, 255, 255, 0.75);
}

/* *** המחוג המסתובב - הסימן החזותי החד-משמעי היחיד לכיוון הנוכחי
   (הטבעת עצמה סימטרית-3 ולכן כמעט בלתי-נראית בסיבוב לבדה). משולש
   זהוב בולט, מונפש בכל שינוי מצב (300-400ms) כך שגם הטבעת שנבחרה
   וגם שכנתה נראות "זזות" בפועל. אותו רדיוס-בדיוק (top:-12%) כמו
   חריץ-היעד למעלה - זו הדרישה המרכזית: חפיפה פיזית, לא רק זוויתית
   מקורבת. ***/
.beam-pointer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  transition: transform 350ms cubic-bezier(0.34, 1.4, 0.64, 1);
}

.beam-pointer::after {
  content: "";
  position: absolute;
  top: -12%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 15px solid #ffd76a;
  filter: drop-shadow(0 0 4px rgba(255, 215, 106, 0.95)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.beam-ring-img {
  position: relative;
  z-index: 2;
}

.beam-ring-wrap.is-selected .beam-ring-img {
  filter: drop-shadow(0 0 10px rgba(255, 220, 140, 0.95));
}

.beam-ring-wrap.is-aligned .beam-ring-img {
  filter: drop-shadow(0 0 8px rgba(150, 220, 255, 0.85));
}

.beam-ring-wrap.is-hint-focus {
  animation: station6BadgePulse 1000ms ease-in-out infinite;
}

.beam-ring-wrap.preview-cw .beam-ring-img,
.beam-ring-wrap.preview-ccw .beam-ring-img {
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9));
}

.beam-ring-wrap.is-inert {
  cursor: default;
  pointer-events: none;
}

.beam-center-lens {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(70px, 15%, 110px);
  height: clamp(70px, 15%, 110px);
  --lit-fraction: 0;
}

.beam-center-lens img {
  width: 100%;
  height: 100%;
  filter: brightness(calc(0.7 + var(--lit-fraction) * 0.9)) drop-shadow(0 0 calc(4px + var(--lit-fraction) * 18px) rgba(255, 225, 160, calc(0.3 + var(--lit-fraction) * 0.7)));
  transition: filter 400ms ease;
}

.beam-center-lens.is-full img {
  animation: station6BadgePulse 1400ms ease-in-out infinite;
}

.beams-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  width: min(860px, 96%);
  margin: 0 auto;
}

.beam-move-counter {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.82rem, 1vw, 0.94rem);
  color: #fff8ea;
  background: rgba(8, 6, 3, 0.7);
  border-radius: 8px;
  padding: 6px 14px;
}

@media (prefers-reduced-motion: reduce) {
  .beam-ring-wrap.is-hint-focus,
  .beam-center-lens.is-full img {
    animation: none !important;
  }
  .beam-ring-img,
  .beam-pointer {
    transition: none !important;
  }
}
