/* ══════════════ MENU REDESIGN v2 — strict pixel UI ══════════════ */
/* Applied only to #screen-menu (the shell); game/background untouched.  */

:root {
  --m2-ink:   #1a1230;
  --m2-panel: #241a3e;
  --m2-hi:    #3a2c5e;
  --m2-lo:    #160f28;
  --m2-gold:  #ffcf1f;
}

#screen-menu { image-rendering: pixelated; }
#screen-menu * { border-radius: 0 !important; }   /* no smooth corners anywhere */

/* ---- top bar ---- */
.m2-top {
  position: fixed; top: 12px; left: 12px; right: 12px; z-index: 8;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.m2-pill {
  display: flex; align-items: center; gap: 6px; color: #fff;
  font-family: 'Press Start 2P', monospace; font-size: 11px; padding: 7px 10px;
  background: var(--m2-panel);
  box-shadow: 0 0 0 3px var(--m2-ink), inset 2px 2px 0 var(--m2-hi), inset -2px -2px 0 var(--m2-lo);
}
.m2-coin { color: var(--m2-gold); }
.m2-coin canvas { image-rendering: pixelated; width: 15px !important; height: 15px !important; }
/* Keep the lang switcher INSIDE the top bar (the pinned-corner rule forced it
   to fixed top-left, where it overlapped the coin pill = the "double frame"). */
.m2-lang { display: flex; gap: 6px; position: static !important; top: auto !important; left: auto !important;
  background: none !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; backdrop-filter: none !important; }
.m2-lang .lang-btn {
  font-family: 'Press Start 2P', monospace; font-size: 10px; color: rgba(255,255,255,.6);
  padding: 7px 8px; background: var(--m2-panel); border: 0 !important; cursor: pointer;
  box-shadow: 0 0 0 3px var(--m2-ink), inset 2px 2px 0 var(--m2-hi), inset -2px -2px 0 var(--m2-lo);
}
.m2-lang .lang-btn.active { background: var(--m2-panel); color: var(--m2-gold); box-shadow: 0 0 0 3px var(--m2-gold), inset 2px 2px 0 var(--m2-hi), inset -2px -2px 0 var(--m2-lo); }
.m2-lang .lang-btn.active { color: var(--m2-gold); box-shadow: 0 0 0 3px var(--m2-gold), inset 2px 2px 0 var(--m2-hi), inset -2px -2px 0 var(--m2-lo); }

/* ---- content column ---- */
.menu-content.m2 { margin-top: 66px; gap: 0; padding: 0 16px 40px; }
.m2-hero { text-align: center; margin-bottom: 6px; }
.m2-hero .logo-wrap { margin-bottom: 0; }
/* BEST chip — matched to the rank chip (.m2-rank): same padding, height, radius, frame. */
.m2-best {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; min-height: 20px;
  font-family: 'Press Start 2P', monospace; font-size: 12px; color: var(--m2-gold);
  padding: 6px 12px; background: var(--m2-panel);
  box-shadow: 0 0 0 3px var(--m2-ink), inset 2px 2px 0 var(--m2-hi), inset -2px -2px 0 var(--m2-lo);
}
.m2-best span[data-i18n] { color: #fff; }

/* ---- pixel buttons (flat fill + hard stepped bevel, square) ---- */
.m2-btn {
  width: 100%; max-width: 300px; margin: 14px auto 0; display: block;
  border: 0; cursor: pointer; color: #fff;
  font-family: 'Press Start 2P', monospace; font-size: 22px; letter-spacing: 1px; padding: 22px 0;
  position: relative; transition: transform .05s;
}
.m2-btn span { position: relative; }
.m2-btn { overflow: hidden; }
/* diagonal shine sweep across the buttons */
.m2-btn::before {
  content: ''; position: absolute; top: -20%; left: -60%; width: 40%; height: 140%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); pointer-events: none;
  animation: m2shine 3.2s ease-in-out infinite;
}
.m2-batl::before { animation-delay: .8s; }
@keyframes m2shine { 0%,100% { left: -60%; } 45%,100% { left: 130%; } }
.m2-play {
  background: #73bf2e; color: #123300;
  box-shadow: 0 0 0 5px #1a3d0a, inset 5px 5px 0 #a5f050, inset -5px -5px 0 #4d8a1f, 0 10px 0 #123300;
  animation: m2breathe 1.5s ease-in-out infinite;
}
.m2-batl {
  background: #e0432b;
  box-shadow: 0 0 0 5px #6e1c0e, inset 5px 5px 0 #ff7a5c, inset -5px -5px 0 #a82f18, 0 10px 0 #4a1208;
}
.m2-play:active { transform: translateY(6px) scale(1); box-shadow: 0 0 0 5px #1a3d0a, inset 5px 5px 0 #a5f050, inset -5px -5px 0 #4d8a1f, 0 4px 0 #123300; animation: none; }
.m2-batl:active { transform: translateY(6px); box-shadow: 0 0 0 5px #6e1c0e, inset 5px 5px 0 #ff7a5c, inset -5px -5px 0 #a82f18, 0 4px 0 #4a1208; }
@keyframes m2breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }
/* hero bird bob */
#logo-bird-canvas { animation: m2bob 2.6s ease-in-out infinite; }
@keyframes m2bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---- tile grid ---- */
.m2-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  width: 100%; max-width: 300px; margin: 18px auto 0;
}
.m2-tile {
  border: 0; cursor: pointer; position: relative; aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: var(--m2-panel); padding: 6px 2px; text-align: center;
  box-shadow: 0 0 0 3px var(--m2-ink), inset 3px 3px 0 var(--m2-hi), inset -3px -3px 0 var(--m2-lo);
  transition: transform .06s;
}
/* image icons (Higgsfield pixel-art set) */
img.m2-ic { width: 42px !important; height: 42px !important; margin: 0 !important; display: block;
  image-rendering: auto; object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.35));
  animation: m2iconfloat 2.8s ease-in-out infinite; }
.m2-tile:nth-child(1) img.m2-ic{animation-delay:.0s}.m2-tile:nth-child(2) img.m2-ic{animation-delay:.35s}
.m2-tile:nth-child(3) img.m2-ic{animation-delay:.7s}.m2-tile:nth-child(4) img.m2-ic{animation-delay:.2s}
.m2-tile:nth-child(5) img.m2-ic{animation-delay:.55s}.m2-tile:nth-child(6) img.m2-ic{animation-delay:.9s}
.m2-tile:nth-child(7) img.m2-ic{animation-delay:.45s}.m2-tile:nth-child(8) img.m2-ic{animation-delay:.15s}
@keyframes m2iconfloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
#btn-wheel img.m2-ic { animation: m2spin 7s linear infinite; }
@keyframes m2spin { to { transform: rotate(360deg); } }
.m2-tl { font-size: 6.5px !important; }
.m2-tile:active { transform: translateY(3px); }
/* staggered pop-in on menu load */
.m2-tile { animation: m2pop .4s cubic-bezier(.2,1.3,.4,1) backwards; }
.m2-tile:nth-child(1){animation-delay:.04s}.m2-tile:nth-child(2){animation-delay:.09s}.m2-tile:nth-child(3){animation-delay:.14s}.m2-tile:nth-child(4){animation-delay:.19s}
.m2-tile:nth-child(5){animation-delay:.24s}.m2-tile:nth-child(6){animation-delay:.29s}.m2-tile:nth-child(7){animation-delay:.34s}.m2-tile:nth-child(8){animation-delay:.39s}
@keyframes m2pop { from { transform: translateY(16px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.m2-ic { image-rendering: pixelated; display: block; margin: 0 auto 8px; }
.m2-tl { font-family: 'Press Start 2P', monospace; font-size: 8px; color: #fff; letter-spacing: .5px; }
.m2-tile .free-dot, .m2-tile .daily-btn-dot {
  position: absolute; top: -6px; right: -6px; width: 15px; height: 15px;
  background: #ff2e55; box-shadow: 0 0 0 3px #fff; border: 0; border-radius: 0 !important;
  animation: m2dot 1s ease-in-out infinite;
}
@keyframes m2dot { 0%,100% { transform: scale(1); } 50% { transform: scale(1.2); } }

/* ---- event strip + season ---- */
.menu-content.m2 .event-banner {
  margin: 16px auto 0; width: 100%; max-width: 300px; background: #2a2050; border: 0;
  box-shadow: 0 0 0 4px var(--m2-ink), inset 3px 3px 0 #443066, inset -3px -3px 0 #1a1030;
  color: #fff; font-size: 8px; letter-spacing: 1px; padding: 10px; line-height: 1.6;
}
.menu-content.m2 .event-banner b { color: var(--m2-gold); }
.menu-content.m2 .menu-season {
  margin: 12px auto 0; width: 100%; max-width: 300px; background: var(--m2-panel); padding: 12px 10px 14px;
  box-shadow: 0 0 0 4px var(--m2-ink), inset 3px 3px 0 var(--m2-hi), inset -3px -3px 0 var(--m2-lo);
}

/* floating reward buttons: square pixel frames */
#screen-menu .daily-btn {
  box-shadow: 0 0 0 4px var(--m2-ink), inset 3px 3px 0 var(--m2-hi), inset -3px -3px 0 var(--m2-lo);
  background: var(--m2-panel) !important;
}
