/* =========================================================
   station5ShadowCipher.css
   תחנה 5, שלב ב' - צופן הצללים. תריס תותקן ליד כל מנורה (אותם
   מיקומי עמודים מ-station5OilLogic.css), הפסיפס (station5-floor-
   mosaic.png) במרכז הרחבה - ריבועי, ארבעה אזורי מטרה עגולים
   (צפון/מזרח/דרום/מערב) בתוכו, נמדדו ישירות מתוך התמונה.
   ========================================================= */

.oil-lit-order-display {
  /* ממוקם קרוב יותר לראש המסך כאן (אין רמזים תחתיו בשלב ב') */
}

/* ===================== הפסיפס ===================== */

.mosaic-wrap {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  width: clamp(220px, 30vw, 400px);
}

.mosaic-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.55));
}

.mosaic-zone {
  position: absolute;
  width: 19%;
  height: 19%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.4s ease, background 0.4s ease;
}

.mosaic-zone[data-direction="N"] { left: 50%; top: 24%; transform: translate(-50%, -50%); }
.mosaic-zone[data-direction="E"] { left: 78%; top: 50%; transform: translate(-50%, -50%); }
.mosaic-zone[data-direction="S"] { left: 50%; top: 76%; transform: translate(-50%, -50%); }
.mosaic-zone[data-direction="W"] { left: 22%; top: 50%; transform: translate(-50%, -50%); }

.mosaic-zone.is-correct {
  background: radial-gradient(circle, rgba(255, 214, 130, 0.35) 0%, rgba(255, 214, 130, 0) 72%);
  box-shadow: 0 0 22px rgba(255, 214, 130, 0.55);
}

.mosaic-shadow-shape {
  width: 46%;
  height: 46%;
  color: var(--color-gold);
  opacity: 0.35;
  transition: opacity 0.4s ease, color 0.4s ease, filter 0.4s ease;
}

.mosaic-zone.is-correct .mosaic-shadow-shape {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 214, 130, 0.85));
}

.mosaic-shadow-shape svg {
  width: 100%;
  height: 100%;
}

/* ===================== תריסים (אותם מיקומי עמוד כמו שלב א') ===================== */

.shutter-wrap {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: clamp(58px, 6.4vw, 96px);
}

.shutter-wrap[data-direction="N"] { left: 28%; top: 44%; }
.shutter-wrap[data-direction="E"] { left: 72%; top: 44%; }
.shutter-wrap[data-direction="S"] { left: 90%; top: 60%; }
.shutter-wrap[data-direction="W"] { left: 10%; top: 60%; }

.shutter-lamp-icon {
  position: absolute;
  left: 50%;
  bottom: 96%;
  transform: translateX(-50%);
  width: 55%;
  height: auto;
  filter: brightness(1.08) saturate(1.1) drop-shadow(0 0 16px rgba(255, 200, 120, 0.6));
  pointer-events: none;
  z-index: 1;
}

.shutter-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.shutter-img {
  width: 100%;
  height: auto;
  display: block;
  transform: rotate(var(--shutter-rotation, 0deg));
  transition: transform 320ms ease;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .shutter-img {
    transition: transform 1ms linear;
  }
}

.shutter-btn:hover .shutter-img,
.shutter-btn:focus-visible .shutter-img {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 14px rgba(232, 194, 122, 0.5));
}

/* המצב הנוכחי כבר נכון (מזדגג בפסיפס) - הדגשה עדינה על התריס עצמו. */
.shutter-wrap.is-current-correct .shutter-btn {
  filter: drop-shadow(0 0 10px rgba(255, 214, 130, 0.75));
}

/* ===================== שכבת רמזים ===================== */

.shutter-wrap.is-hint-target .shutter-img {
  animation: shutterHintPulse 1300ms ease-in-out infinite;
}

@keyframes shutterHintPulse {
  0%, 100% { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(232, 194, 122, 0.5)); }
  50% { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(232, 194, 122, 0.9)); }
}

@media (prefers-reduced-motion: reduce) {
  .shutter-wrap.is-hint-target .shutter-img {
    animation: none !important;
  }
}

.shutter-light-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 6px;
  transform-origin: 0% 50%;
  pointer-events: none;
  z-index: 3;
}

.shutter-light-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 8px;
  background: #8fc7ff;
  border-radius: 3px;
  filter: drop-shadow(0 0 6px rgba(143, 199, 255, 0.8));
}

.shutter-light-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%) rotate(45deg);
  clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
  background: #8fc7ff;
  filter: drop-shadow(0 0 6px rgba(143, 199, 255, 0.8));
}

.shutter-candidate-tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 6px rgba(232, 194, 122, 0.9);
  transform-origin: 0 0;
  pointer-events: none;
  z-index: 3;
}

.shutter-ghost-preview {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.5;
  animation: shutterGhostPulse 1600ms ease-in-out infinite;
}

.shutter-ghost-preview img {
  width: 100%;
  height: auto;
  filter: brightness(1.3) saturate(0.4) drop-shadow(0 0 10px rgba(232, 194, 122, 0.7));
}

@keyframes shutterGhostPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  .shutter-ghost-preview {
    animation: none !important;
  }
}
