/* Where Is SabioRex? hidden-object game (BKL-621).
   Relies on pi_dan_style.css for the shared header/footer; everything below is
   scoped to .wis-* so it does not affect other pages. */

.wis-page {
  --wis-cyan: #00e5ff;
  --wis-magenta: #ff2dd6;
  --wis-green: #35f283;
  --wis-ink: #eaf7ff;
  --wis-muted: #cfe8f4;
  color: var(--wis-ink);
  background:
    radial-gradient(circle at 16% 6%, rgba(0, 229, 255, 0.16), transparent 34%),
    radial-gradient(circle at 84% 14%, rgba(255, 45, 214, 0.12), transparent 32%),
    linear-gradient(180deg, #030610 0%, #08111f 48%, #05070d 100%);
  min-height: 70vh;
  padding-bottom: 56px;
}

.wis-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ---------- Hero ---------- */
.wis-hero {
  box-sizing: border-box;
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px 28px;
}
.wis-eyebrow {
  font-size: 0.9em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wis-cyan);
  margin: 0 0 10px;
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.45);
}
.wis-hero h1 {
  font-size: 2.8em;
  margin: 0 0 14px;
  color: #f7fbff;
  text-shadow: 0 0 18px rgba(0, 229, 255, 0.5), 0 0 32px rgba(255, 45, 214, 0.26);
}
.wis-lede {
  max-width: 760px;
  margin: 0 auto 26px;
  font-size: 1.15em;
  line-height: 1.6;
  color: var(--wis-muted);
}
.wis-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0;
}
.wis-stats > div {
  min-width: 130px;
  padding: 16px 22px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(9, 20, 40, 0.92), rgba(5, 9, 18, 0.92));
  border: 1px solid rgba(0, 229, 255, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.wis-stats dt {
  font-size: 2em;
  font-weight: 800;
  color: var(--wis-green);
  text-shadow: 0 0 14px rgba(53, 242, 131, 0.4);
}
.wis-stats dd {
  margin: 4px 0 0;
  font-size: 0.85em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wis-muted);
}

/* ---------- Game surface ---------- */
.wis-game-surface {
  box-sizing: border-box;
  max-width: 1040px;
  margin: 18px auto 0;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(9, 20, 40, 0.78), rgba(5, 9, 18, 0.82));
  border: 1px solid rgba(0, 229, 255, 0.28);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.wis-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.wis-puzzle-label {
  margin: 0;
  text-align: center;
  font-weight: 700;
  color: #f7fbff;
}
.wis-puzzle-location {
  display: block;
  font-weight: 500;
  font-size: 0.9em;
  color: var(--wis-cyan);
  margin-top: 2px;
}
.wis-nav-btn,
.wis-submit-btn,
.wis-reset-btn {
  font-family: inherit;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 255, 0.42);
  padding: 11px 18px;
  font-size: 1em;
  font-weight: 700;
  color: var(--wis-ink);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(255, 45, 214, 0.1));
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.wis-nav-btn:hover:not(:disabled),
.wis-submit-btn:hover:not(:disabled),
.wis-reset-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(255, 45, 214, 0.6);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 22px rgba(0, 229, 255, 0.22);
}
.wis-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.wis-submit-btn {
  border-color: rgba(53, 242, 131, 0.6);
  background: linear-gradient(135deg, rgba(53, 242, 131, 0.22), rgba(0, 229, 255, 0.12));
  color: #eafff4;
}
.wis-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- Stage (image + overlays) ---------- */
.wis-stage {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #05070d;
  line-height: 0;
  touch-action: none;          /* let pointer drags control the magnifier, not page scroll */
  user-select: none;
  cursor: crosshair;
}
.wis-image {
  display: block;
  width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
}
.wis-magnifier {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  border: 3px solid rgba(0, 229, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(5, 7, 13, 0.55), 0 0 18px rgba(0, 229, 255, 0.6), inset 0 0 22px rgba(0, 229, 255, 0.18);
  background: radial-gradient(circle, rgba(0, 229, 255, 0.06), rgba(0, 229, 255, 0) 60%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
}
.wis-magnifier-cross::before,
.wis-magnifier-cross::after {
  content: "";
  position: absolute;
  background: rgba(0, 229, 255, 0.85);
}
.wis-magnifier-cross::before {
  left: 50%; top: 20%; bottom: 20%;
  width: 1px; transform: translateX(-50%);
}
.wis-magnifier-cross::after {
  top: 50%; left: 20%; right: 20%;
  height: 1px; transform: translateY(-50%);
}
.wis-reveal {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  border: 3px dashed var(--wis-green);
  box-shadow: 0 0 0 2px rgba(5, 7, 13, 0.55), 0 0 22px rgba(53, 242, 131, 0.6);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 4;
}
.wis-reveal-label {
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  font-size: 0.8em;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #062414;
  background: var(--wis-green);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.3;
}
.wis-stage.wis-locked {
  cursor: default;
}
.wis-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--wis-muted);
  font-size: 1.1em;
  line-height: 1.4;
}
.wis-loading[hidden] {
  display: none;  /* class display:flex would otherwise override the [hidden] attribute */
}

/* ---------- Result + actions ---------- */
.wis-result {
  min-height: 1.6em;
  margin: 16px 0 6px;
  text-align: center;
  font-size: 1.25em;
  font-weight: 800;
}
.wis-result.wis-found { color: var(--wis-green); text-shadow: 0 0 16px rgba(53, 242, 131, 0.45); }
.wis-result.wis-missed { color: #ff6b8b; text-shadow: 0 0 16px rgba(255, 107, 139, 0.4); }
.wis-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.wis-hint {
  text-align: center;
  color: var(--wis-muted);
  font-size: 0.9em;
  margin: 14px 0 0;
}

/* ---------- Results panel ---------- */
.wis-results-panel {
  box-sizing: border-box;
  max-width: 720px;
  margin: 28px auto 0;
  padding: 34px 28px;
  text-align: center;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.14), rgba(255, 45, 214, 0.1)),
              linear-gradient(180deg, rgba(9, 20, 40, 0.94), rgba(5, 9, 18, 0.94));
  border: 1px solid rgba(53, 242, 131, 0.5);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 42px rgba(0, 229, 255, 0.16);
}
.wis-results-panel h2 {
  font-size: 2.2em;
  margin: 6px 0 12px;
  color: #f7fbff;
}
.wis-results-rank {
  font-size: 1.3em;
  margin: 0 0 10px;
}
.wis-results-rank strong { color: var(--wis-green); }
.wis-results-detail {
  color: var(--wis-muted);
  margin: 0 0 22px;
  line-height: 1.6;
}

/* ---------- About ---------- */
.wis-about {
  max-width: 1040px;
  margin: 34px auto 0;
  padding: 22px 24px;
  border-radius: 16px;
  background: rgba(5, 9, 18, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.2);
}
.wis-about h2 {
  margin: 0 0 10px;
  font-size: 1.2em;
  color: #f7fbff;
}
.wis-about p {
  margin: 0;
  color: var(--wis-muted);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .wis-hero h1 { font-size: 2.1em; }
  .wis-game-surface { padding: 16px; }
  .wis-nav-btn, .wis-submit-btn, .wis-reset-btn { padding: 10px 14px; font-size: 0.95em; }
  .wis-result { font-size: 1.1em; }
}
