/* Shared layout: keeps the footer at the bottom of the page, below the content */
body { display: flex; flex-direction: column; }
.page { flex: 1 0 auto; width: 100%; min-height: 0; }
/* Centre the quote box in the space between the nav and the footer */
.page { justify-content: center; }

.site-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding: 22px 24px 26px;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

/* Toast notifications (replace blocking alert() popups) */
#toastHost { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { background: #111; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 0.95rem; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,0.25); animation: toastIn 0.25s ease; text-align: center; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* Mobile browsers: use the real visible height so the centring holds with the address bar showing */
body { min-height: 100vh; min-height: 100dvh; }

/* Equal space above and below so the whole group (quote box plus the buttons or counters under it) is exactly centred */
.page:has(.quote-box) { padding-block: 44px; }

/* ── Gameplay: collection link, favourite star, NEW tag ── */
.quote-box { position: relative; }
.bottom-buttons .coll-link { grid-column: 1 / -1; display: block; text-align: center; text-decoration: none; background: var(--tan); color: var(--white); padding: 14px 16px; border-radius: 14px; font-size: 0.97rem; font-weight: 600; box-shadow: 0 4px 12px rgba(194,161,115,0.28); transition: background-color 0.22s, transform 0.15s; }
.bottom-buttons .coll-link:hover { background: var(--tan-dark); }
.bottom-buttons .coll-link:active { transform: scale(0.97); }
.fav-btn { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: inherit; padding: 4px 8px; border-radius: 8px; transition: transform 0.15s; }
.fav-btn:hover { transform: scale(1.2); }
.fav-btn[hidden] { display: none; }
.new-tag { display: inline-block; background: #ffd54f; color: #111; font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 10px; vertical-align: middle; letter-spacing: 0.5px; }

/* ── Stats / achievements panel bits ── */
.big-num { font-size: 1.05rem; margin-bottom: 8px; }
.big-num strong { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; letter-spacing: 1px; }
.stat-val { text-align: right; max-width: 60%; }
.ach-sec { font-family: 'Bebas Neue', sans-serif; letter-spacing: 2px; font-size: 1.05rem; color: var(--tan-dark); margin: 14px 0 2px; }
.sub { font-size: 0.8rem; opacity: 0.6; }

/* ── Rarity reveal ── */
@keyframes glowMythic { 0% { box-shadow: 0 0 0 0 rgba(160,32,240,0.95); } 100% { box-shadow: 0 0 0 36px rgba(160,32,240,0); } }
@keyframes glowLegendary { 0% { box-shadow: 0 0 0 0 rgba(33,150,243,0.95), 0 0 40px 10px rgba(33,150,243,0.7); } 100% { box-shadow: 0 0 0 44px rgba(33,150,243,0), 0 12px 40px rgba(0,0,0,0.25); } }
@keyframes glowDarwin { 0% { box-shadow: 0 0 0 0 rgba(244,67,54,1), 0 0 60px 18px rgba(255,214,79,0.9); transform: scale(1.04); } 100% { box-shadow: 0 0 0 56px rgba(244,67,54,0), 0 12px 40px rgba(0,0,0,0.25); transform: scale(1); } }
.fx-Mythic { animation: glowMythic 1.1s ease-out; }
.fx-Legendary { animation: glowLegendary 1.3s ease-out; }
.fx-Darwin { animation: glowDarwin 1.6s ease-out; }
.confetti-host { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 10001; }
.confetti-host i { position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px; animation: confettiFall 2s ease-in forwards; }
@keyframes confettiFall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: 0.9; } }
.screen-flash { position: fixed; inset: 0; background: #fff; pointer-events: none; z-index: 10002; animation: flash 0.7s ease-out forwards; }
@keyframes flash { 0% { opacity: 0.9; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fx-Mythic, .fx-Legendary, .fx-Darwin { animation: none; } .confetti-host, .screen-flash { display: none; } }
