/* ============================================================
   משחקי מגדל האור · עולם 7 (במספור של הילד) · 🆕 19.10.2026
   אלומת האור והסירות (beam-boats)
   🔴 המילים תמיד כהות על משטח בהיר, כמו בכל הקורס
   ============================================================ */

.bb-scene {
  position: relative; width: min(100%, 620px); aspect-ratio: 16 / 9; margin: 4px 0 8px; overflow: hidden;
  border-radius: 22px; box-shadow: 0 0 0 2px var(--steel), 0 0 0 4px rgba(25, 211, 197, .3);
  background: url(../assets/img/light/sea.jpg) 50% 50% / cover no-repeat, var(--graphite-2);
}
.bb-scene::after { content: ''; position: absolute; inset: 0; background: rgba(8, 10, 30, .3); transition: background 1.2s; pointer-events: none; }
.bb-scene.is-lit::after { background: rgba(255, 246, 194, .1); }

/* קומות המגדל: חלונות לאורך המגדל שבצד שמאל של התמונה, נדלקים מלמטה למעלה */
.bb-tower { position: absolute; left: 5%; top: 30%; width: 3.6%; height: 26%; z-index: 2;
  display: flex; flex-direction: column-reverse; justify-content: space-between; align-items: center; pointer-events: none; }
.bb-floor { width: 70%; aspect-ratio: 1 / 1.4; border-radius: 40% 40% 4px 4px; background: rgba(30, 36, 60, .85);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); transition: background .4s, box-shadow .4s; }
.bb-floor.is-on { background: #fff6c2; box-shadow: 0 0 10px #fff6c2, 0 0 22px rgba(255, 210, 63, .7); }

/* המנורה בראש המגדל, ועליה המילה */
.bb-lamp { position: absolute; left: 16%; top: 5%; z-index: 3; padding: 8px 16px; border-radius: 16px;
  background: linear-gradient(180deg, #fffbea, #f5ecd2); box-shadow: 0 0 0 3px #ffd23f, 0 0 26px rgba(255, 210, 63, .65); }
.bb-word { display: flex; gap: 1px; color: var(--ink); font-family: 'Andika', 'Trebuchet MS', sans-serif;
  font-size: clamp(26px, 5.6vw, 40px); font-weight: 700; line-height: 1.1; }
.bb-word .is-pair { color: #c98500; }

/* אלומת האור: קרן מהמנורה אל הסירה. אורכה וזוויתה מחושבים ב-JS (--len, --ang) */
.bb-beam { position: absolute; left: 9.5%; top: 14%; z-index: 1; height: 70px; width: var(--len, 0); margin-top: -35px;
  transform-origin: 0 50%; transform: rotate(var(--ang, 0deg)); pointer-events: none; opacity: 0; transition: opacity .3s;
  background: linear-gradient(90deg, rgba(255, 246, 194, .85), rgba(255, 246, 194, .15));
  clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%); }
.bb-scene.is-beam .bb-beam { opacity: 1; }
.bb-scene.is-beam .bb-boat.is-right { box-shadow: 0 0 0 4px #ffd23f, 0 0 40px 14px rgba(255, 246, 194, .75); }

/* הסירות בים */
.bb-boats { position: absolute; left: 22%; right: 3%; bottom: 5%; z-index: 2; display: flex; justify-content: space-around; align-items: flex-end; }
.bb-boat { position: relative; width: 28%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; touch-action: manipulation;
  animation: bb-bob 2.4s ease-in-out infinite alternate; transition: transform 1s ease-in, opacity 1s, box-shadow .3s; }
.bb-boat:nth-child(2) { animation-delay: -.8s; }
.bb-boat:nth-child(3) { animation-delay: -1.6s; }
.bb-boat .art { position: relative; z-index: 1; width: 72%; height: auto; aspect-ratio: 1; border-radius: 14px;
  box-shadow: 0 0 0 3px var(--white), 0 4px 10px rgba(0, 0, 0, .4); margin-bottom: -18%; }
.bb-hull { position: relative; z-index: 2; width: 100%; height: auto; display: block; order: 2; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .4)); }
.bb-boat.is-wrong { animation: shake .3s; }
.bb-boat.is-wrong .art { box-shadow: 0 0 0 3px var(--err); }
.bb-boat.is-docked { transform: translateX(-60%) scale(.6); opacity: 0; }
@keyframes bb-bob { to { transform: translateY(-5px) rotate(-1.5deg); } }

@media (prefers-reduced-motion: reduce) { .bb-boat { animation: none; } }
@media (max-width: 600px) {
  .bb-word { font-size: 24px; }
  .bb-boat .art { width: 80%; }
  .bb-boats { left: 26%; }
  .bb-lamp { padding: 6px 10px; }
}
