/*! Copyright (c) 2026 BamByte (bambyte.net). All rights reserved.
 * Proprietary code: no copying, redistribution, or use to train or prompt
 * AI / machine-learning systems without written permission from BamByte. */
/* BAMBARD start menu (index.html).
   Built on the shared panel/button art every game's menu uses
   (/assets/shared/games_menu/).

   The accent is the shell-glow gold. Keep it in step with
   --game-accent in game.css. */

:root {
  --bmd-accent: #ffcf3f;
  --bmd-accent-rgb: 255, 207, 63;
}

html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* The backdrop art paints in the body's own box, BELOW the site header (a
   background on <html> stops the body's spreading under the fixed nav). */
html { background: #000; }

/* BAMBARD's backdrop art (assets/img/bambard_backdrop.webp, owner
   2026-11-10) behind the panel exactly as painted -- no overlay. */
body {
  background: url("../assets/img/bambard_backdrop.webp") center / cover no-repeat, #3a7bd5;
}

.bmd-menu-page {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}


/* The game's logo over the panel, the way Bubblitz! has it (owner,
   2026-11-10: the backdrop art has no logo painted in). */
.bmd-menu-wordmark {
  display: block;
  width: min(440px, 88vw);
  max-height: min(22vh, 180px);
  object-fit: contain;
  margin: 0 auto 14px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5));
  user-select: none;
  pointer-events: none;
}
.bmd-menu-page { flex-direction: column; }

.bmd-menu-panel {
  position: relative;
  /* Height hugs the title + 2 buttons (BAMO's panel); the third width term
     keeps the whole panel on screen on short viewports. */
  width: min(440px, 92vw, calc((100dvh - 48px - min(24vh, 200px)) / 0.722));
  aspect-ratio: 1 / 0.722;
  border-radius: 32px;
  border: 6px solid #1c1c1c;
  outline: 2px solid rgba(255, 255, 255, 0.08);
  outline-offset: -8px;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 0 0 2px rgba(var(--bmd-accent-rgb), 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background: #3a3a3a url("/assets/shared/PK_menu_gray.png") center / cover no-repeat;
}

.bmd-menu-home {
  position: absolute;
  top: 8.1%;
  left: 5%;
  width: 11%;
  z-index: 5;
  display: block;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.bmd-menu-home img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.bmd-menu-home:hover,
.bmd-menu-home:focus-visible {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

.bmd-menu-logo {
  position: absolute;
  top: 6.2%;
  left: 50%;
  width: 62%;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

.bmd-menu-buttons {
  position: absolute;
  inset: 0;
}

/* Same panel, pill thickness and placing as BoomBug's three buttons. */
.bmd-menu-btn {
  box-sizing: border-box;
  position: absolute;
  left: 50%;
  height: 17.5%;
  width: auto;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.bmd-menu-btn--online   { top: 37.4%; }
.bmd-menu-btn--single   { top: 56.3%; }
.bmd-menu-btn--freeplay { top: 75.2%; }

.bmd-menu-btn:hover,
.bmd-menu-btn:focus-visible {
  filter: brightness(1.18) drop-shadow(0 0 10px rgba(var(--bmd-accent-rgb), 0.55));
  transform: translateX(-50%) translateY(-1px);
}

.bmd-menu-btn:active {
  transform: translateX(-50%) translateY(0);
  filter: brightness(0.95);
}

.bmd-menu-btn:focus-visible {
  outline: 2px solid var(--bmd-accent);
  outline-offset: 3px;
}

.bmd-menu-btn-art {
  display: block;
  height: 100%;
  width: auto;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  user-select: none;
}

/* Touch screens: pad the small Home icon's hit area past 44px. */
@media (pointer: coarse) {
  .bmd-menu-home::after {
    content: "";
    position: absolute;
    inset: -8px;
  }
}

/* The mode buttons are <button>s here (Single-Player opens a dialog). */
button.bmd-menu-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
}
.bmd-menu-btn:disabled {
  cursor: var(--bmd-cursor, default);
  filter: grayscale(0.85) brightness(0.7);
}
.bmd-menu-btn:disabled:hover { transform: translateX(-50%); filter: grayscale(0.85) brightness(0.7); }
.bmd-menu-soon {
  position: absolute;
  right: -6%;
  top: -14%;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bmd-accent);
  color: #1a1030;
  font: 900 12px/1.2 "Arial Black", Arial, sans-serif;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transform: rotate(6deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.bmd-menu-fallback { position: absolute; z-index: -1; color: white; font-weight: 900; font-size: 18px; }
