/* secrets — styles for js/features/secrets.js: the Secrets sheet, the moon's tap target and the painted effects. */

/* ---------- The sheet ---------- */
.secrets-summary { display: flex; flex-direction: column; gap: var(--sp-2); }
.secrets-summary__text { font-weight: 600; }
.secrets-list { list-style: none; margin: 0; padding: 0; }
.secrets-item { align-items: flex-start; padding: var(--sp-3); border: 1px solid transparent; }
.secrets-item[data-found="true"] { background: var(--reward-wash); border-color: var(--reward); }
.secrets-item[data-found="false"] .bf-row__title { color: var(--text-2); }
.secrets-item[data-found="false"] .bf-row__desc { color: var(--text); font-style: italic; }
.secrets-item__reward { font-size: var(--fs-14); line-height: 20px; font-weight: 600; color: var(--reward); }
.secrets-item__tag { flex: none; padding: 2px var(--sp-2); border-radius: var(--r-chip); background: var(--surface-2); border: 1px solid var(--live-line);
  color: var(--live); font-size: var(--fs-13); font-weight: 700; white-space: nowrap; }
.secrets-done { padding: var(--sp-4); border-radius: var(--r-row); background: var(--reward-wash); border: 1px solid var(--reward); color: var(--reward); font-weight: 600; text-align: center; }

/* ---------- The moon: a see-through button over the painted moon (same place as .scene__moon) ---------- */
.secrets-moon { position: fixed; z-index: calc(var(--z-content) + 1); top: calc(9% + var(--sat)); right: 12%; width: 84px; height: 84px; padding: 0; border: 0; border-radius: 50%;
  background: none; cursor: default; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.secrets-moon:focus-visible { border-radius: 50%; }
html.arena-open .secrets-moon { display: none; }
.secrets-moon--tap { animation: secrets-moonglow 520ms ease-out; }
@keyframes secrets-moonglow { from { box-shadow: 0 0 0 0 var(--candle-300); } to { box-shadow: 0 0 0 24px transparent; } }

/* ---------- A shooting star (painted in the takeover) ---------- */
.secrets-star { position: absolute; top: 6%; left: 100%; width: 170px; height: 3px; border-radius: var(--r-chip);
  background: linear-gradient(90deg, var(--snow-50), var(--ice-300) 30%, transparent); transform-origin: left center;
  animation: secrets-streak 1.2s ease-in both; }
.secrets-star::before { content: ""; position: absolute; left: -4px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--snow-50);
  box-shadow: var(--glow-star), 0 0 6px var(--snow-50); }
@keyframes secrets-streak {
  from { transform: translate(0, 0) rotate(-19deg); opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  to { transform: translate(-140vw, 48vw) rotate(-19deg); opacity: 0; }
}
.secrets-star--still { top: 16%; left: 24%; transform: rotate(-19deg); animation: none; }

/* ---------- A little bat (painted in the takeover) ---------- */
.secrets-bat { position: absolute; top: 30%; left: -110px; width: 96px; height: 60px; animation: secrets-cross 4.2s linear both; }
.secrets-bat__bob { position: absolute; inset: 0; filter: drop-shadow(0 0 1px var(--ice-300)) drop-shadow(0 0 7px var(--ice-300)); animation: secrets-bob 700ms ease-in-out infinite alternate; }
.secrets-bat__bob > i { position: absolute; display: block; }
.secrets-bat__body { left: 34px; top: 20px; width: 28px; height: 28px; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 42%, var(--candle-300) 0 2.5px, transparent 3px),
    radial-gradient(circle at 66% 42%, var(--candle-300) 0 2.5px, transparent 3px),
    radial-gradient(circle at 50% 66%, var(--berry-400) 0 2px, transparent 2.5px),
    var(--night-950); }
.secrets-bat__body::before, .secrets-bat__body::after { content: ""; position: absolute; top: -7px; width: 11px; height: 12px; background: var(--night-950); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.secrets-bat__body::before { left: 1px; }
.secrets-bat__body::after { right: 1px; }
.secrets-bat__wing { top: 18px; width: 38px; height: 26px; background: var(--night-950);
  clip-path: polygon(100% 30%, 62% 0, 0 12%, 14% 46%, 30% 40%, 42% 72%, 60% 62%, 72% 92%, 100% 78%); }
.secrets-bat__wing--l { left: 0; transform-origin: 100% 50%; animation: secrets-flap-l 170ms ease-in-out infinite alternate; }
.secrets-bat__wing--r { right: 0; transform-origin: 0 50%; clip-path: polygon(0 30%, 38% 0, 100% 12%, 86% 46%, 70% 40%, 58% 72%, 40% 62%, 28% 92%, 0 78%);
  animation: secrets-flap-r 170ms ease-in-out infinite alternate; }
/* His Christmas hat: a red cone with a snowy brim. */
.secrets-bat__hat { left: 41px; top: 5px; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 14px solid var(--berry-500); transform: rotate(10deg); }
.secrets-bat__hat::before { content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--snow-50); }
.secrets-bat__hat::after { content: ""; position: absolute; left: -10px; top: 12px; width: 20px; height: 4px; border-radius: var(--r-chip); background: var(--snow-50); }
@keyframes secrets-cross { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 220px)); } }
@keyframes secrets-bob { from { transform: translateY(-16px); } to { transform: translateY(16px); } }
@keyframes secrets-flap-l { from { transform: rotate(24deg) scaleY(1); } to { transform: rotate(-28deg) scaleY(.7); } }
@keyframes secrets-flap-r { from { transform: rotate(-24deg) scaleY(1); } to { transform: rotate(28deg) scaleY(.7); } }
.secrets-bat--still { top: 22%; left: calc(50% - 48px); animation: none; }
.secrets-bat--still .secrets-bat__bob, .secrets-bat--still .secrets-bat__wing { animation: none; }

/* Calm mode and reduced motion: nothing streaks or flaps (the script paints the still versions). */
html.calm .secrets-moon--tap { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .secrets-moon--tap, .secrets-bat, .secrets-bat__bob, .secrets-bat__wing { animation: none; }
  .secrets-star { animation: none; }
}
