/* Hazine avı (components/hunt.js): parıltı, 🗝️ düğmesi, açılış penceresi */

/* Parıltı: hafif ama fark edilir — kartın sol üst köşesinde yavaşça yanıp söner */
.hunt-spark {
  position: absolute; top: 8px; left: 8px; z-index: 6;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 19px; line-height: 1; cursor: pointer; user-select: none;
  background: rgba(255, 250, 238, 0.92); border: 1.5px solid rgba(214, 170, 80, 0.9);       /* fotoğraf üstünde de seçilsin */
  box-shadow: 0 0 14px 4px rgba(255, 210, 120, 0.55);
  animation: hunt-twinkle 2.6s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.hunt-spark:focus-visible { outline: 2px solid var(--accent, #B8956A); outline-offset: 2px; }
.hunt-spark.found { width: 26px; height: 26px; font-size: 14px; background: rgba(255, 255, 255, 0.85); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); animation: none; }
.hunt-spark.page { position: fixed; top: auto; left: auto; right: 18px; bottom: 96px; width: 40px; height: 40px; font-size: 22px; }
@keyframes hunt-twinkle {                    /* yalnızca ışık ve saydamlık: dokunma hedefi yerinden oynamaz */
  0%, 100% { opacity: 0.75; box-shadow: 0 0 6px 1px rgba(255, 210, 120, 0.4); }
  50% { opacity: 1; box-shadow: 0 0 18px 6px rgba(255, 210, 120, 0.75); }
}

/* 🗝️ düğmesi */
.hunt-chip {
  position: fixed; left: 16px; bottom: 22px; z-index: 900;
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--border, #e5ddd0); background: var(--bg-card, #fff); color: var(--text-primary, #222);
  font-size: 1.05rem; box-shadow: var(--shadow-md, 0 6px 18px rgba(0,0,0,.15)); cursor: pointer;
}
.hunt-chip b { font-size: 0.75rem; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; background: var(--accent, #B8956A); color: #fff; text-align: center; padding: 0 5px; }
.hunt-chip.fresh { animation: hunt-nudge 1.6s ease-in-out infinite; }
@keyframes hunt-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (max-width: 768px) {
  .hunt-chip { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .hunt-spark.page { bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }
}

/* Pencere */
.hunt-modal {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 14, 24, 0.62); animation: hunt-fade 250ms ease-out;
}
.hunt-box { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); display: grid; }
.hunt-card {
  position: relative; overflow: auto; max-height: calc(100vh - 32px);
  background: var(--bg-card, #fffaf3); color: var(--text-primary, #222);
  border-radius: 20px; padding: 26px 22px 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.hunt-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--bg-secondary, #f2ece2); color: inherit; cursor: pointer; font-size: 0.95rem; }
.hunt-from { font-family: var(--font-heading, Georgia, serif); font-size: 1.35rem; margin-right: 34px; }
.hunt-where { color: var(--text-muted, #8c8c87); font-size: 0.82rem; margin: 4px 0 14px; }
.hunt-media { margin: 0 0 14px; border-radius: 12px; overflow: hidden; background: #000; }
.hunt-media img, .hunt-media video { display: block; width: 100%; max-height: 52vh; object-fit: contain; max-width: none; }
.hunt-body { font-size: 1.02rem; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
.hunt-time { margin-top: 14px; font-size: 0.78rem; color: var(--text-muted, #8c8c87); }
.hunt-next { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--bg-secondary, #f2ece2); }
.hunt-next p { margin: 6px 0 12px; }
.hunt-go { border: none; border-radius: 999px; padding: 9px 16px; background: var(--accent, #B8956A); color: #fff; font: inherit; cursor: pointer; }
.hunt-done { margin-top: 16px; text-align: center; font-size: 1.2rem; font-weight: 600; }
.hunt-panel h3 { margin: 0 34px 8px 0; font-family: var(--font-heading, Georgia, serif); font-size: 1.35rem; }
.hunt-panel h4 { margin: 16px 0 8px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted, #8c8c87); }
.hunt-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hunt-clues li { padding: 12px 14px; border-radius: 12px; background: var(--bg-secondary, #f2ece2); }
.hunt-clues .who { font-size: 0.8rem; color: var(--text-secondary, #666); }
.hunt-clues p { margin: 4px 0 0; }
.hunt-found button { width: 100%; text-align: left; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-light, #eee); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.hunt-found small { color: var(--text-muted, #8c8c87); font-size: 0.75rem; }
.hunt-muted { color: var(--text-muted, #8c8c87); }

/* Açılış: hediye kutusu sallanır, açılır; kart yukarı doğru çıkar */
.hunt-gift { position: absolute; left: 50%; top: 50%; font-size: 84px; transform: translate(-50%, -50%); animation: hunt-gift 900ms ease-in-out forwards; pointer-events: none; z-index: 1; }
.hunt-modal.gift .hunt-card { animation: hunt-rise 650ms var(--ease-spring, cubic-bezier(.34,1.56,.64,1)) 750ms both; }
@keyframes hunt-gift {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  35% { transform: translate(-50%, -50%) rotate(-12deg); }
  50% { transform: translate(-50%, -50%) rotate(12deg); }
  65% { transform: translate(-50%, -50%) rotate(-8deg); }
  80% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}
@keyframes hunt-rise { from { transform: translateY(60px) scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hunt-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 560px) {
  .hunt-modal { padding: 0; place-items: end stretch; }
  .hunt-box, .hunt-card { width: 100%; max-height: 92vh; }
  .hunt-card { border-radius: 20px 20px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .hunt-spark, .hunt-chip.fresh, .hunt-modal, .hunt-modal.gift .hunt-card { animation: none; }
}
/* Kilitli not */
.hunt-lock-form { display: flex; gap: 8px; margin-top: 12px; }
.hunt-lock-in { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border, #ddd); background: var(--bg-primary, #fff); color: inherit; font: inherit; font-size: 1.05rem; letter-spacing: 0.08em; text-transform: uppercase; }
.hunt-lock-msg { min-height: 1.3em; margin: 10px 0 0; color: #C0392B; font-size: 0.9rem; }
.hunt-lock.shake { animation: hunt-shake 400ms ease-in-out; }
@keyframes hunt-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
/* İlkin ayrıntı penceresinde: kapat düğmesiyle çakışmasın diye sol üstte, fotoğrafın üstünde */
.fi-dlg > .hunt-spark { top: 12px; left: 12px; }
.hunt-tip { font-size: 0.8rem; margin: 10px 0 0; }
