/* ============================================================
   משחקי מגדל ההמראה · עולם 10 (במספור של הילד) · 🆕 22.10.2026
   באמצע או בסוף (ai-ay-rush) · אורות המסלול (runway-lights) · ממלאים דלק (fuel-up) · ההמראה (takeoff)
   🔴 המילים תמיד כהות על משטח בהיר, כמו בכל הקורס
   ============================================================ */

/* --- באמצע או בסוף: הכלל --- */
.ar-rule { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 4px 0 10px; }
.ar-rule-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 16px 12px; border: 0; border-radius: 20px; cursor: pointer;
  background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 2px var(--steel); transition: box-shadow .2s; }
.ar-rule-card.is-heard { box-shadow: 0 0 0 3px var(--teal), 0 0 18px var(--teal-glow); }
.ar-rule-card .art { border-radius: 14px; background: var(--white); }
.ar-rule-label { color: var(--white); font-weight: 700; font-size: 1.05rem; }
.ar-word { padding: 4px 14px; border-radius: 12px; background: #fffbea; color: var(--ink);
  font-family: 'Andika', 'Trebuchet MS', sans-serif; font-size: 36px; font-weight: 700; line-height: 1.2; }
.ar-pair { color: var(--pink-deep); }
.ar-go-row { display: flex; justify-content: center; margin-top: 6px; }

/* --- באמצע או בסוף: המסוע --- */
.ar-scene { position: relative; width: min(100%, 620px); margin: 4px auto 10px; padding: 14px 12px 18px; border-radius: 22px;
  background: linear-gradient(180deg, #1b2233, #232b3d); box-shadow: 0 0 0 2px var(--steel), 0 0 0 4px rgba(25, 211, 197, .3); }
.ar-lights { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.ar-light { width: 16px; height: 16px; border-radius: 50%; background: rgba(30, 36, 60, .85); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); transition: background .4s, box-shadow .4s; }
.ar-light.is-on { background: var(--teal); box-shadow: 0 0 8px var(--teal), 0 0 18px var(--teal-glow); }
.ar-scene.is-lit { box-shadow: 0 0 0 3px var(--teal), 0 0 30px var(--teal-glow); }
.ar-belt { position: relative; height: 96px; border-radius: 16px; overflow: hidden;
  background: repeating-linear-gradient(90deg, #39424f 0 22px, #2e3541 22px 44px); box-shadow: inset 0 -8px 0 #20262f;
  animation: ar-belt 1s linear infinite; }
@keyframes ar-belt { to { background-position: 44px 0; } }
.ar-start, .ar-end { position: absolute; top: 0; bottom: 0; width: 6px; z-index: 1; }
.ar-start { left: 0; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.ar-end { right: 0; background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.ar-card { position: absolute; left: 0; top: 12px; z-index: 2; display: flex; align-items: center; padding: 6px 16px; border-radius: 16px;
  background: #fffbea; color: var(--ink); font-family: 'Andika', 'Trebuchet MS', sans-serif; font-size: 40px; font-weight: 700; line-height: 1.2;
  box-shadow: 0 0 0 3px var(--teal), 0 6px 14px rgba(0, 0, 0, .45); will-change: transform; transition: opacity .3s, box-shadow .2s; }
.ar-card.is-splash { opacity: .2; }
.ar-card.is-right { box-shadow: 0 0 0 4px var(--pink), 0 0 30px var(--pink-glow); }
.ar-gap { display: inline-block; min-width: 52px; height: 46px; margin: 0 3px; border-radius: 10px; border: 3px dashed var(--pink); }
.ar-gap.is-filled { border: 0; background: linear-gradient(180deg, #ffe1f0, #ffa3d3); color: var(--pink-dark); text-align: center; min-width: 0; padding: 0 4px; height: auto; }
.ar-btns { display: flex; justify-content: center; gap: 22px; }
.ar-btn { min-width: 120px; padding: 10px 24px; border: 0; border-radius: 20px; cursor: pointer; background: #fffbea; color: var(--ink);
  font-family: 'Andika', 'Trebuchet MS', sans-serif; font-size: 44px; font-weight: 700;
  box-shadow: 0 0 0 3px var(--pink), 0 7px 0 var(--pink-dark); transition: transform .1s; touch-action: manipulation; }
.ar-btn:active { transform: translateY(4px); box-shadow: 0 0 0 3px var(--pink), 0 3px 0 var(--pink-dark); }
.ar-btn.is-wrong { box-shadow: 0 0 0 3px var(--err), 0 7px 0 #8a2530; animation: shake .3s; }

/* --- אורות המסלול --- */
.rw-scene { position: relative; width: min(100%, 640px); aspect-ratio: 16 / 10; margin: 4px auto 8px; overflow: hidden; border-radius: 22px;
  background: url(../assets/img/tower/runway.jpg) 50% 50% / cover no-repeat, linear-gradient(180deg, #1a1f45 0%, #2b2552 45%, #2b313c 46%, #1d222b 100%);
  box-shadow: 0 0 0 2px var(--steel), 0 0 0 4px rgba(25, 211, 197, .3); }
.rw-scene::after { content: ''; position: absolute; inset: 0; background: rgba(8, 10, 30, .2); pointer-events: none; }
.rw-target { position: absolute; left: 50%; top: 3%; z-index: 3; transform: translateX(-50%); padding: 5px; border-radius: 16px; background: var(--white); cursor: pointer;
  box-shadow: 0 0 0 3px var(--pink), 0 0 24px var(--pink-glow); }
.rw-target:empty { display: none; }
.rw-target .art { display: block; border-radius: 12px; }
.rw-lanes { position: absolute; left: 0; right: 0; top: 38%; height: 44%; z-index: 2; }
.rw-word { position: absolute; left: 0; padding: 6px 14px; border: 0; border-radius: 16px; background: #fffbea; color: var(--ink); cursor: pointer;
  font-family: 'Andika', 'Trebuchet MS', sans-serif; font-size: clamp(22px, 4.4vw, 32px); font-weight: 700; line-height: 1.1; white-space: nowrap;
  box-shadow: 0 0 0 3px var(--teal), 0 6px 14px rgba(0, 0, 0, .45); touch-action: manipulation; will-change: transform; transition: opacity .3s, box-shadow .2s; }
.rw-word::after { content: ''; position: absolute; right: 100%; top: 50%; width: 34px; height: 4px; margin-top: -2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(25, 211, 197, .8)); }
.rw-word.is-wrong { box-shadow: 0 0 0 3px var(--err), 0 6px 14px rgba(0, 0, 0, .45); animation: shake .3s; }
.rw-word.is-right { box-shadow: 0 0 0 4px var(--pink), 0 0 30px var(--pink-glow); }
.rw-word.is-gone { opacity: 0; }
.rw-strip { position: absolute; left: 4%; right: 4%; bottom: 6%; z-index: 2; display: flex; justify-content: space-between; align-items: center;
  height: 22px; padding: 0 10px; border-radius: 11px; background: rgba(20, 24, 32, .8); }
.rw-light { width: 14px; height: 14px; border-radius: 50%; background: #3a4150; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); transition: background .4s, box-shadow .4s; }
.rw-light.is-on { background: #fff6c2; box-shadow: 0 0 8px #fff6c2, 0 0 18px rgba(255, 210, 63, .8); }
/* בסוף: הרובוט נוסע על המסלול המואר ויוצא מימין */
.rw-jet { position: absolute; left: -24%; bottom: 10%; z-index: 3; opacity: 0; pointer-events: none; }
.rw-scene.is-lit .rw-jet { opacity: 1; animation: rw-jet 2.2s cubic-bezier(.5, 0, .7, 1) .2s forwards; }
@keyframes rw-jet { 0% { transform: translateX(0); } 100% { transform: translateX(780px) translateY(-60px) rotate(-8deg); } }

/* --- ממלאים דלק --- */
.fu-wrap { display: flex; justify-content: center; align-items: stretch; gap: 22px; margin: 4px 0 8px; }
.fu-tank { display: flex; flex-direction: column; gap: 4px; width: 46px; padding: 6px; border-radius: 16px; background: rgba(20, 24, 32, .85);
  box-shadow: 0 0 0 2px var(--steel); }
.fu-cell { flex: 1; min-height: 16px; border-radius: 6px; background: #313847; transition: background .4s, box-shadow .4s; }
.fu-cell.is-on { background: linear-gradient(180deg, #ffd23f, #ff8a3d); box-shadow: 0 0 10px rgba(255, 170, 60, .7); }
.fu-main { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fu-gauge { width: min(320px, 60vw); height: 16px; border-radius: 8px; overflow: hidden; background: #313847; box-shadow: 0 0 0 2px var(--steel); }
.fu-gauge-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-deep), var(--teal)); transform-origin: left center; }
.fu-gauge-fill.is-low { background: linear-gradient(90deg, #d1197f, var(--err)); }
.fu-pic { padding: 5px; border-radius: 16px; background: var(--white); box-shadow: 0 0 0 3px var(--pink), 0 0 24px var(--pink-glow); }
.fu-pic .art { display: block; border-radius: 12px; }
.fu-opts { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.fu-opt { min-width: 104px; padding: 8px 16px; border: 0; border-radius: 16px; cursor: pointer; background: #fffbea; color: var(--ink);
  font-family: 'Andika', 'Trebuchet MS', sans-serif; font-size: 34px; font-weight: 700;
  box-shadow: 0 0 0 3px var(--teal), 0 6px 0 var(--teal-dark); touch-action: manipulation; transition: transform .1s; }
.fu-opt:active { transform: translateY(3px); }
.fu-opt.is-wrong { box-shadow: 0 0 0 3px var(--err), 0 6px 0 #8a2530; animation: shake .3s; }
.fu-opt.is-right { box-shadow: 0 0 0 4px var(--pink), 0 0 26px var(--pink-glow); }

/* --- ההמראה --- */
.to-scene { position: relative; width: min(100%, 560px); aspect-ratio: 4 / 3; margin: 0 auto 8px; overflow: hidden; border-radius: 22px;
  background: radial-gradient(ellipse at 50% 120%, #4a2a6a 0%, #1a1f45 55%, #0b0e22 100%);
  box-shadow: 0 0 0 2px var(--steel), 0 0 0 4px rgba(25, 211, 197, .3); }
.to-stars { position: absolute; inset: 0; background:
  radial-gradient(1.5px 1.5px at 12% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 30% 60%, #fff, transparent),
  radial-gradient(2px 2px at 55% 15%, #fff6c2, transparent), radial-gradient(1.5px 1.5px at 75% 40%, #fff, transparent),
  radial-gradient(2px 2px at 88% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 66% 70%, #fff, transparent);
  animation: to-twinkle 2.4s ease-in-out infinite alternate; }
@keyframes to-twinkle { to { opacity: .5; } }
.to-tin { position: absolute; left: 50%; bottom: 14%; z-index: 2; transform: translateX(-50%); transition: transform 2.2s cubic-bezier(.55, 0, .8, .4); }
.to-flame { position: absolute; left: 50%; top: 92%; width: 46px; height: 0; margin-left: -23px; border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  background: linear-gradient(180deg, #fff6c2, #ffd23f 30%, #ff8a3d 65%, rgba(255, 62, 165, 0)); filter: blur(1px); transition: height .4s; }
.to-pad { position: absolute; left: 30%; right: 30%; bottom: 8%; height: 14px; border-radius: 7px; background: var(--steel);
  box-shadow: 0 0 0 2px rgba(25, 211, 197, .5), 0 0 16px var(--teal-glow); }
.to-count { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none;
  font-family: 'Rubik', sans-serif; font-size: 120px; font-weight: 900; color: var(--white); text-shadow: 0 0 20px var(--pink), 0 0 40px var(--pink-glow); }
.to-scene.is-up .to-flame { height: 90px; animation: to-flicker .12s linear infinite alternate; }
.to-scene.is-up .to-tin { transform: translateX(-50%) translateY(-150%); }
@keyframes to-flicker { to { transform: scaleY(1.15) scaleX(.9); } }
.to-end { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 4px; text-align: center; }
.to-end-title { margin: 6px 0 2px; font-family: 'Rubik', sans-serif; font-size: 1.9rem; font-weight: 900; color: var(--white); text-shadow: 0 0 14px var(--pink-glow); }
.to-end-line { color: var(--text-soft); font-weight: 700; font-size: 1.1rem; }
.to-soon { margin-top: 10px; padding: 12px 22px; border-radius: 18px; background: rgba(25, 211, 197, .1); box-shadow: 0 0 0 2px var(--teal), 0 0 22px var(--teal-glow); color: var(--white); }
.to-soon-title { font-family: 'Rubik', sans-serif; font-size: 1.3rem; font-weight: 900; color: var(--teal); margin-bottom: 4px; }

@media (max-width: 600px) {
  .ar-card { font-size: 32px; }
  .ar-btn { min-width: 100px; font-size: 36px; }
  .rw-target .art, .fu-pic .art { width: 72px; height: 72px; }
  .fu-opt { min-width: 84px; font-size: 28px; }
  .to-count { font-size: 90px; }
}
