/* games.css — auto-split from styles.css */
/* ===== HEARTS REWARD (5/5) ===== */
.hearts-reward {
  position: fixed;
  inset: 0;
  z-index: 16000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 7, 5, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.hearts-reward.show {
  display: flex;
  animation: fadeIn 0.5s ease;
}
.hearts-reward-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hearts-reward-burst span {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 14px;
  color: var(--gold);
  opacity: 0;
  animation: heartBurst 1.8s ease-out forwards;
  filter: drop-shadow(0 0 6px rgba(232, 204, 150, 0.5));
}
@keyframes heartBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--bx)), calc(-50% + var(--by))) scale(1.1); }
}
.hearts-reward-card {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  padding: 40px 28px 32px;
  text-align: center;
  border-radius: 28px;
  border: 1px solid rgba(232, 204, 150, 0.35);
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 204, 150, 0.16), transparent 50%),
    linear-gradient(160deg, #221e18, #14110e);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 50px rgba(232, 204, 150, 0.1);
  animation: rewardCardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes rewardCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}
.hearts-reward-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232, 204, 150, 0.35);
  background: rgba(232, 204, 150, 0.1);
  margin-bottom: 18px;
}
.hearts-reward-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #f5e6c0, #d4af77);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(232, 204, 150, 0.45));
  animation: softPulse 2s ease-in-out infinite;
  font-family: Georgia, serif;
}
.hearts-reward-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  font-weight: 500;
  color: #fffaf0;
  margin: 0 0 16px;
}
.hearts-reward-text {
  font-size: 1rem;
  line-height: 1.75;
  color: #ebe4d6;
  margin: 0 0 14px;
}
.hearts-reward-soft {
  color: #d4c4a8;
  font-size: 0.95rem;
}
.hearts-reward-sign {
  font-family: 'Playfair Display', serif;
  color: var(--muted);
  margin: 18px 0 22px;
  font-size: 1.05rem;
}
.hearts-reward-btn {
  border: none;
  border-radius: 999px;
  padding: 14px 32px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #e8c070, #d4a040 50%, #c49030);
  box-shadow: 0 10px 28px rgba(196, 146, 58, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hearts-reward-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(196, 146, 58, 0.45);
}
.secret-unlocked {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}


/* ===== FINDABLES ===== */
.findable {
  position: absolute;
  z-index: 5;
  border: 0;
  background: transparent;
  color: rgba(232, 204, 150, 0.22);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 10px;
  margin: 0;
  line-height: 1;
  transition: color 0.3s, transform 0.3s, filter 0.3s, opacity 0.4s;
  text-shadow: 0 0 8px rgba(232, 204, 150, 0.15);
}
.findable:hover {
  color: rgba(232, 204, 150, 0.7);
  transform: scale(1.25);
  filter: drop-shadow(0 0 10px rgba(232, 204, 150, 0.5));
}
.findable.found {
  opacity: 0.06;
  pointer-events: none;
  transform: scale(0.8);
}
.findable--moon { font-size: 1.15rem; }
.findable--spark { font-size: 1.1rem; }
.findable--note { font-size: 1.2rem; }
.findable--dot { font-size: 1.4rem; }

.find-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(12px);
  z-index: 15000;
  max-width: min(420px, 90vw);
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid rgba(232, 204, 150, 0.35);
  background: linear-gradient(155deg, rgba(36, 32, 26, 0.96), rgba(22, 19, 15, 0.96));
  color: #f5efe3;
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 30px rgba(232, 204, 150, 0.1);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.find-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.find-burst {
  position: fixed;
  z-index: 14900;
  pointer-events: none;
  width: 0;
  height: 0;
}
.find-burst span {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-size: 12px;
  opacity: 0;
  animation: findSpark 0.9s ease-out forwards;
  filter: drop-shadow(0 0 6px rgba(232, 204, 150, 0.55));
}
@keyframes findSpark {
  0% { opacity: 0; transform: translate(0,0) scale(0.4); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--fx), var(--fy)) scale(1); }
}

.finds-progress {
  margin-top: 6px;
  opacity: 0.85;
}

@media (max-width: 700px) {
  .findable {
    color: rgba(232, 204, 150, 0.28);
    padding: 12px;
  }
  .find-toast {
    bottom: 100px;
    font-size: 0.9rem;
  }
}



/* ===== FINDS REWARD OVERLAY ===== */
.finds-reward {
  position: fixed;
  inset: 0;
  z-index: 16500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.finds-reward.show {
  display: flex;
}
.finds-reward-bg {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 4, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: fadeIn 0.45s ease;
}
.finds-reward-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.finds-reward-burst span {
  position: absolute;
  left: 50%;
  top: 45%;
  color: var(--gold);
  opacity: 0;
  animation: findsRain 2.2s ease-out forwards;
  filter: drop-shadow(0 0 8px rgba(232, 204, 150, 0.55));
}
@keyframes findsRain {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(0deg); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--rx)), calc(-50% + var(--ry))) scale(1) rotate(var(--rot)); }
}
.finds-reward-card {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  padding: 40px 28px 32px;
  text-align: center;
  border-radius: 28px;
  border: 1px solid rgba(232, 204, 150, 0.4);
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 204, 150, 0.2), transparent 55%),
    linear-gradient(160deg, #2a241c, #12100c);
  box-shadow:
    0 30px 90px rgba(0,0,0,0.55),
    0 0 60px rgba(232, 204, 150, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.08);
  animation: rewardCardIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.finds-reward-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232, 204, 150, 0.4);
  background: rgba(232, 204, 150, 0.12);
  margin-bottom: 18px;
  animation: badgeIn 0.6s ease 0.2s both;
}
.finds-reward-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 1.35rem;
  color: var(--gold);
  filter: drop-shadow(0 0 12px rgba(232, 204, 150, 0.45));
}
.finds-reward-icons span {
  display: inline-block;
  animation: iconPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.finds-reward-icons span:nth-child(1) { animation-delay: 0.15s; }
.finds-reward-icons span:nth-child(2) { animation-delay: 0.25s; }
.finds-reward-icons span:nth-child(3) { animation-delay: 0.35s; }
.finds-reward-icons span:nth-child(4) { animation-delay: 0.45s; }
.finds-reward-icons span:nth-child(5) { animation-delay: 0.55s; }
@keyframes iconPop {
  from { opacity: 0; transform: scale(0.4) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.finds-reward-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.65rem, 5vw, 2.2rem);
  font-weight: 500;
  color: #fffaf0;
  margin: 0 0 14px;
}
.finds-reward-text {
  font-size: 1rem;
  line-height: 1.75;
  color: #ebe4d6;
  margin: 0 0 12px;
}
.finds-reward-soft {
  color: #d4c4a8;
  font-size: 0.95rem;
}
.finds-reward-sign {
  font-family: 'Playfair Display', serif;
  color: var(--muted);
  margin: 16px 0 22px;
  font-size: 1.05rem;
}
.finds-reward-btn {
  border: none;
  border-radius: 999px;
  padding: 14px 32px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #e8c070, #d4a040 50%, #c49030);
  box-shadow: 0 10px 28px rgba(196, 146, 58, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.finds-reward-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(196, 146, 58, 0.45);
}

@media (max-width: 700px) {
  .finds-reward-bg {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .finds-reward-card {
    padding: 28px 18px 24px;
  }
}



/* ===== MINI GAMES ===== */
.game-block {
  width: min(440px, 100%);
  margin-top: 36px;
  padding: 24px 18px 28px;
  border-radius: 22px;
  border: 1px solid rgba(224, 192, 138, 0.25);
  background: linear-gradient(155deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  box-shadow: 0 16px 40px rgba(0,0,0,0.2);
  text-align: center;
}
.game-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  color: #fffaf0;
  margin: 0 0 6px;
}
.game-sub {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--muted);
}
.game-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  margin-top: 14px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  background: linear-gradient(135deg, #e8c070, #d4a040 50%, #c49030);
  box-shadow: 0 8px 24px rgba(196, 146, 58, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.game-btn:hover { transform: translateY(-2px); }
.game-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.game-btn--ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(224, 192, 138, 0.35);
  box-shadow: none;
}
.game-result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(224, 192, 138, 0.28);
  background: rgba(0,0,0,0.2);
  color: #f5efe3;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.55;
  animation: moodIn 0.45s ease both;
}

/* Wheel */
.wheel-wrap {
  position: relative;
  width: min(320px, 85vw);
  margin: 0 auto 8px;
}
#fortuneCanvas {
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 0 4px rgba(224, 192, 138, 0.2);
}
.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 18px solid #e8c070;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* Safe */
.safe-box { margin-top: 8px; }
.safe-display {
  font-size: 1.6rem;
  letter-spacing: 0.45em;
  color: var(--gold);
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(224, 192, 138, 0.25);
  font-variant-numeric: tabular-nums;
}
.safe-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 240px;
  margin: 0 auto;
}
.safe-key {
  border: 1px solid rgba(224, 192, 138, 0.25);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: #f5efe3;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 0;
  cursor: pointer;
  font-family: inherit;
  margin: 0;
  transition: background 0.15s, border-color 0.15s;
}
.safe-key:hover {
  border-color: rgba(224, 192, 138, 0.5);
  background: rgba(224, 192, 138, 0.12);
}
.safe-key--ok {
  background: linear-gradient(135deg, rgba(232, 192, 112, 0.35), rgba(196, 146, 58, 0.25));
  color: #fffaf0;
}
.safe-key--ghost { color: var(--muted); }
.safe-hint {
  margin-top: 12px;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--muted);
}
.safe-unlocked { margin-top: 16px; animation: moodIn 0.5s ease both; }
.safe-letter {
  text-align: left;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(224, 192, 138, 0.3);
  background: rgba(0,0,0,0.22);
}
.safe-letter-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.safe-letter p { margin: 0 0 10px; line-height: 1.65; color: #ebe4d6; }
.safe-sign { font-family: 'Playfair Display', serif; color: var(--muted); }

/* Puzzle */
.puzzle-board {
  width: min(300px, 82vw);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  background: rgba(0,0,0,0.35);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(224, 192, 138, 0.25);
  touch-action: manipulation;
}
.puzzle-tile {
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background-image: var(--puzzle-img);
  background-size: 300% 300%;
  border-radius: 2px;
  transition: transform 0.15s ease, opacity 0.15s;
}
.puzzle-tile:not(.empty):active { transform: scale(0.96); }
.puzzle-tile.empty {
  background: rgba(0,0,0,0.35);
  cursor: default;
  opacity: 0.35;
}
.puzzle-tile.selected {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
  z-index: 1;
}
.puzzle-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.puzzle-status {
  font-size: 0.88rem;
  color: var(--muted);
}
.puzzle-status.win {
  color: var(--gold);
  font-weight: 600;
}

@media (max-width: 700px) {
  .game-block { padding: 20px 14px 24px; margin-top: 28px; }
  .safe-key { padding: 12px 0; }
}


/* ===== QUESTIONS REDESIGN ===== */
.q-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 22px;
  width: min(520px, 100%);
}
.q-draw {
  width: min(480px, 100%);
  margin-top: 22px;
  padding: 22px 20px;
  border-radius: 20px;
  border: 1px solid rgba(224, 192, 138, 0.3);
  background: linear-gradient(155deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
  animation: moodIn 0.45s ease both;
}
.q-draw-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
}
.q-draw-text {
  margin: 0 0 16px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.15rem, 3.5vw, 1.4rem);
  line-height: 1.55;
  color: #fffaf0;
}
.q-grid {
  width: min(560px, 100%);
  margin: 28px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.q-card {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(224, 192, 138, 0.22);
  background: rgba(255,255,255,0.04);
  animation: moodIn 0.4s ease both;
}
.q-card:hover {
  border-color: rgba(224, 192, 138, 0.4);
  background: rgba(224, 192, 138, 0.08);
}
.q-num {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 600;
}
.q-card p {
  margin: 0 !important;
  text-align: left !important;
  font-size: 1.02rem !important;
  line-height: 1.55 !important;
  color: #f0e8d8 !important;
  max-width: none !important;
}
#questions {
  width: 100%;
  max-width: 600px;
  margin-top: 8px;
}
#questions .soft-end {
  text-align: center;
  margin-top: 22px;
  color: var(--muted);
}
@media (max-width: 700px) {
  .q-actions { flex-direction: column; align-items: stretch; }
  .q-actions .game-btn { width: 100%; }
}


