/* =====================================================================
   SANDBOX — a testing panel, not part of the game's look.
   ===================================================================== */
.sandbox-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(22rem, 92vw);
  z-index: 13000;
  overflow-y: auto;
  padding: 1rem;
  background: #0b0d12;
  border-left: 2px solid #22e3ff;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.7);
  font-family: 'Orbitron', sans-serif;
}
.sandbox-panel[hidden] { display: none !important; }

.sandbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.sandbox-head h3 { color: #22e3ff; letter-spacing: 0.14em; font-size: 0.95rem; }
.sandbox-close {
  background: none;
  border: none;
  color: #7f8b96;
  font-size: 1.1rem;
  cursor: pointer;
}
.sandbox-close:hover { color: #fff; }

.sandbox-note {
  font-size: 0.66rem;
  color: #7f8b96;
  margin: 0.7rem 0 0.4rem;
  line-height: 1.5;
  font-family: system-ui, sans-serif;
}
.sandbox-note b { color: #ffd94d; }

.sandbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr));
  gap: 5px;
}

.sandbox-btn {
  padding: 7px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.62rem;
  font-family: inherit;
  cursor: pointer;
  color: #cfe9ef;
  background: #16202b;
  border: 1px solid #2c3d4d;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.sandbox-btn:hover { background: #1e2c3a; border-color: #22e3ff; }
.sandbox-btn.sym {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.sandbox-btn.sym img { width: 26px; height: 26px; object-fit: contain; }
.sandbox-btn.primary {
  width: 100%;
  margin-top: 0.5rem;
  background: #0e6d88;
  border-color: #22e3ff;
  color: #fff;
}
.sandbox-btn.danger {
  width: 100%;
  margin-top: 1rem;
  background: #3a1116;
  border-color: #8a2530;
  color: #ffb3b3;
}

.sandbox-input {
  width: 100%;
  padding: 9px;
  border-radius: var(--radius-xs);
  background: #05080c;
  border: 1px solid #2c3d4d;
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
}

/* The server read-back panel. Monospace on purpose: these are values to
   be compared exactly, not read as prose. */
.sandbox-stored {
  display: grid;
  gap: 2px;
  margin: 0.5rem 0 0.8rem;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  background: #05080c;
  border: 1px solid #1d3243;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.62rem;
  color: #7f8b96;
}
.sandbox-stored b {
  color: #22e3ff;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
}
.sandbox-stored i { color: #eafffe; font-style: normal; }

/* The right-hand payline arrow is the same asset mirrored, so the pair
   point at each other across the paying row rather than both pointing
   the same way. */
.line-indicator img.arrow-flipped { transform: scaleX(-1); }

/* =====================================================================
   DAILY GIFT AS A CHEST
   Same treatment as a level-up chest: it has to be opened, it bursts,
   and only then does it say what was inside.
   ===================================================================== */
.gift-chest {
  position: relative;
  display: block;
  margin: 0.6rem auto 1rem;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  width: min(15rem, 56vw);
}
.gift-chest-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.75))
          drop-shadow(0 0 26px rgba(123, 243, 255, 0.45));
  transition: transform 0.2s ease;
}
.gift-chest:hover .gift-chest-img { transform: scale(1.04); }

@keyframes giftShake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-5deg) scale(1.03); }
  40% { transform: rotate(5deg) scale(1.05); }
  60% { transform: rotate(-4deg) scale(1.04); }
  80% { transform: rotate(4deg) scale(1.02); }
}
.gift-chest.shaking .gift-chest-img { animation: giftShake 700ms ease-in-out; }

@keyframes giftBurst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(4.2); }
}
.gift-chest-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, #fff 0%, rgba(123,243,255,0.85) 35%, transparent 70%);
}
.gift-chest.opened .gift-chest-burst { animation: giftBurst 900ms ease-out forwards; }

/* Once opened the chest settles back and lets the rewards take over. */
.gift-chest.opened .gift-chest-img {
  transform: scale(0.82);
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.7)) drop-shadow(0 0 40px rgba(123,243,255,0.8));
}
.gift-mote {
  background: #a8f4ff;
  box-shadow: 0 0 10px 3px rgba(123, 243, 255, 0.95);
}

/* The reward tiles arrive after the burst rather than sitting there
   from the start. */
@keyframes giftIconsIn {
  0%   { opacity: 0; transform: translateY(16px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.daily-gift-modal.gift-opened .daily-gift-icons {
  animation: giftIconsIn 420ms 120ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.daily-gift-icons[hidden] { display: none !important; }

/* 3D banner text, matching the shop title's treatment. */
.daily-gift-banner-text {
  text-shadow:
    0 1px 0 #8a1f26, 0 2px 0 #771b21, 0 3px 0 #64171c,
    0 4px 0 #511217, 0 6px 10px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(255, 120, 120, 0.6);
}
.daily-gift-headline strong {
  text-shadow: 0 2px 0 rgba(0,0,0,0.5), 0 0 20px rgba(255, 217, 77, 0.75);
}

@media (prefers-reduced-motion: reduce) {
  .gift-chest.shaking .gift-chest-img,
  .gift-chest.opened .gift-chest-burst,
  .daily-gift-modal.gift-opened .daily-gift-icons { animation: none; }
}

