/* Monster Bus Rescue: friendly, centered arcade menu inspired by the
   restored Snake Ladder Kingdom 3D menu (July 9 version).
   Visual-only: all existing data-actions, game screens, HUD and gameplay stay intact. */

#screen-menu {
  padding: max(12px, env(safe-area-inset-top, 0px))
           max(12px, env(safe-area-inset-right, 0px))
           max(12px, env(safe-area-inset-bottom, 0px))
           max(12px, env(safe-area-inset-left, 0px));
  background:
    radial-gradient(ellipse at 50% 9%, rgba(255, 191, 103, .27), transparent 55%),
    linear-gradient(180deg, rgba(16, 44, 53, .73), rgba(4, 11, 24, .91));
  backdrop-filter: blur(5px);
}

#screen-menu .panel {
  width: min(480px, 100%);
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: clamp(18px, 4vw, 30px);
  border-radius: 26px;
  text-align: center;
  background: linear-gradient(165deg, rgba(20, 49, 61, .96), rgba(11, 23, 39, .96) 70%);
  border: 1px solid rgba(255, 231, 173, .30);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .65), 0 0 48px rgba(255, 165, 91, .13);
}

#screen-menu .eyebrow {
  margin-bottom: 10px;
  color: #96efd8;
  letter-spacing: .18em;
}

#screen-menu h1 {
  font-size: clamp(2.35rem, 9vw, 4rem);
  line-height: .91;
  letter-spacing: -.055em;
  background: linear-gradient(135deg, #ffe58f 5%, #ff9974 52%, #a1e8de 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#screen-menu h1 span { display: block; }

#screen-menu .subtitle {
  margin: 14px auto 0;
  max-width: 39ch;
  color: #d7e7e6;
  font-size: .91rem;
  line-height: 1.48;
}

#screen-menu .stat-strip {
  justify-content: center;
  gap: 7px;
  margin: 15px 0 0;
}

#screen-menu .stat-strip span {
  padding: .43rem .67rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #e6f2ee;
  font-size: .77rem;
}

#screen-menu .stat-strip b { color: #ffe18c; }

#screen-menu .menu-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 17px;
}

#screen-menu .menu-actions button {
  min-height: 48px;
  padding: .65rem .9rem;
  border-radius: 14px;
  font: 800 .92rem/1.2 'Segoe UI', system-ui, sans-serif;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #f1f8f5;
  transition: background .15s ease, transform .15s ease;
}

#screen-menu .menu-actions button.primary {
  min-height: 54px;
  color: #23202c;
  background: linear-gradient(135deg, #ffe28c, #ff9876);
  border-color: rgba(255, 245, 207, .6);
  box-shadow: 0 9px 24px rgba(255, 129, 89, .22);
}

#screen-menu .menu-actions button:hover {
  background: rgba(255, 255, 255, .14);
  transform: translateY(-1px);
}

#screen-menu .menu-actions button.primary:hover {
  background: linear-gradient(135deg, #fff0b3, #ffad8f);
}

#screen-menu button:focus-visible {
  outline: 3px solid #a8f4e2;
  outline-offset: 3px;
}

@media (max-width: 560px) {
  #screen-menu .panel { padding: 18px 16px; border-radius: 22px; }
  #screen-menu .subtitle { font-size: .84rem; margin-top: 11px; }
  #screen-menu .stat-strip { gap: 6px; margin-top: 12px; }
  #screen-menu .stat-strip span { font-size: .72rem; padding: .4rem .58rem; }
  #screen-menu .menu-actions { gap: 8px; margin-top: 14px; }
  #screen-menu .menu-actions button { min-height: 46px; }
}

@media (max-height: 600px) {
  #screen-menu .panel { padding-top: 15px; padding-bottom: 15px; }
  #screen-menu .subtitle { margin-top: 9px; }
  #screen-menu .stat-strip { margin-top: 10px; }
  #screen-menu .menu-actions { margin-top: 11px; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  #screen-menu .menu-actions button { transition: none; }
}
