/* 📖 album · ⭐ medals · 🤗 cuddle corner · 🎮 gamepad focus (see src/ui/extras.js, src/engine/gamepad.js) */

/* title screen: album + medals in the top-right corner */
.title-extras { position: absolute; right: max(14px, env(safe-area-inset-right)); top: max(14px, env(safe-area-inset-top)); display: flex; gap: 10px; }
.title-extras button { font-size: 30px; padding: 8px 14px; display: flex; flex-direction: column; align-items: center; }

/* 🎟️ secret codes */
.code-in { font: inherit; font-size: 22px; font-weight: 800; width: min(420px, 80vw); padding: 12px 16px; border-radius: 18px; border: 3px solid #c9a77a; background: white; color: #3b2a1a; text-align: center; }
.code-in:focus { outline: none; border-color: #f5b82e; }
.code-gifts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.code-gift { width: 150px; background: white; border-radius: 18px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 3px 0 rgba(59, 42, 26, 0.15); font-size: 14px; text-align: center; }
.code-gift img { width: 84px; height: 84px; }
.code-gift img.glow { filter: drop-shadow(0 0 8px gold); }

/* album */
.album-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.album-card { width: 112px; background: white; border-radius: 18px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 0 rgba(59, 42, 26, 0.15); font-size: 14px; text-align: center; }
.album-card img { width: 64px; height: 64px; }
.album-card img.ghost { filter: brightness(0); opacity: 0.22; }
.album-card.missing { background: #efe3cc; }
.album-card .lbl { font-size: 11px; }
.album-gens { display: flex; gap: 3px; }
.album-gens i { font-style: normal; font-size: 11px; font-weight: 900; padding: 0 5px; border-radius: 8px; background: #e9dcc5; color: #b8a585; }
.album-gens i.on { background: linear-gradient(135deg, #ffd43b, #cc5de8); color: white; }
.album-chip { display: flex; align-items: center; gap: 6px; background: white; border-radius: 14px; padding: 4px 10px; font-weight: 800; font-size: 14px; box-shadow: 0 2px 0 rgba(59, 42, 26, 0.15); }
.album-chip.missing { background: #efe3cc; color: #b8a585; }
.swatch { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #d8c8a8; background: #e9dcc5; }

/* medals */
.medal-row.got { background: #fff3bf; }
.medal-bar { height: 10px; min-width: 120px; flex: none; width: 100%; margin-top: 4px; }
.medal-prize { display: flex; flex-direction: column; align-items: center; min-width: 86px; text-align: center; }
.medal-row:not(.got) .medal-prize { opacity: 0.5; }
.ping-dot { position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; border-radius: 50%; background: #ff6b6b; border: 3px solid white; }

/* ⭐ medal popup (floats over game and menus) */
.medal-pop {
  position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 60; pointer-events: none;
  display: flex; align-items: center; gap: 12px; background: #fff3bf; border: 4px solid #fcc419; border-radius: 24px; padding: 10px 20px;
  box-shadow: 0 8px 0 rgba(59, 42, 26, 0.25); font-family: var(--font); color: var(--ink); animation: medalpop 4.2s ease forwards; white-space: nowrap;
}
.medal-pop b { display: block; font-size: 22px; }
.medal-pop span { font-size: 15px; font-weight: 800; opacity: 0.85; }
.medal-pop-icon { font-size: 40px; }
@keyframes medalpop { 0% { transform: translateX(-50%) translateY(-120%); } 10%, 85% { transform: translateX(-50%) translateY(0); opacity: 1; } 100% { transform: translateX(-50%) translateY(-120%); opacity: 0; } }

/* names on hamster tiles */
.ham-nick { font-size: 12px !important; opacity: 1 !important; color: #c2255c; }

/* 🤗 pet card */
.pet-stage { position: relative; width: 200px; height: 200px; display: grid; place-items: center; background: radial-gradient(#fff, #ffe3ec); border-radius: 50%; }
.pet-img { width: 180px; height: 180px; }
.pet-img.glow { filter: drop-shadow(0 0 10px rgba(255, 212, 59, 0.9)); }
.pet-img.wiggle { animation: wiggle 0.7s ease; }
@keyframes wiggle { 0% { transform: scale(1); } 20% { transform: scale(1.12, 0.88) rotate(-8deg); } 40% { transform: scale(0.92, 1.1) rotate(7deg); } 60% { transform: scale(1.06, 0.95) rotate(-4deg); } 80% { transform: rotate(2deg); } 100% { transform: none; } }
.pet-hearts { position: absolute; inset: 0; pointer-events: none; }
.pet-hearts span { position: absolute; bottom: 30%; font-size: 34px; animation: heartup 1.3s ease-out forwards; opacity: 0; }
@keyframes heartup { 0% { transform: translateY(0) scale(0.4); opacity: 0; } 20% { opacity: 1; transform: translateY(-20px) scale(1.1); } 100% { transform: translateY(-150px) scale(0.9); opacity: 0; } }
.pet-name { font-size: 30px; font-weight: 900; }

/* 🎮 gamepad focus ring in menus */
button.pad-focus, .pad-focus { outline: 5px solid #4dabf7 !important; outline-offset: 3px; transform: scale(1.06); }

@media (max-height: 460px) {
  .title-extras button { font-size: 22px; padding: 6px 10px; }
  .pet-stage { width: 140px; height: 140px; }
  .pet-img { width: 124px; height: 124px; }
  .medal-pop b { font-size: 18px; }
}
