/*! 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. */
/* Brick Blast start menu (index.html).
   Built on the shared panel/button art every game's menu uses
   (/assets/shared/games_menu/), at BAMO's menu proportions cut down to one
   button: the panel ends the same margin below Single-Player that BAMO's
   ends below its last button.

   The accent is Brick Blast's own electric blue, sampled from the BamByte
   skin's paddle and walls (their most common saturated pixels sit around
   rgb(0,120,240)). Keep it in step with --game-accent in game.css. */

:root {
  --bkb-accent: #1e88ff;
  --bkb-accent-rgb: 30, 136, 255;
}

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:
   with no background on <html>, the body's would spread to the whole
   window and the fixed nav would cover the top of the art. (Owner,
   2026-11-10.) */
html { background: #000; }

/* Brick Blast's backdrop art (assets/img/brickblast_backdrop.webp) fills the
   whole screen behind the panel, the way Dyna-Mole's menu does: a light
   vignette so the panel still reads, and the art's deep blue underneath for any
   viewport `cover` can't reach. The background lives on <body> only (none on
   <html>) so it propagates to the whole viewport. */
body {
  background:
    url("../assets/img/brickblast_backdrop.webp") center / cover no-repeat,
    #0a3f9e;
}

.bkb-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). */
.bkb-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;
}
.bkb-menu-page { flex-direction: column; }

.bkb-menu-panel {
  position: relative;
  /* Height hugs the title + 1 button; the third width term keeps the whole
     panel on screen on short viewports. */
  width: min(440px, calc(var(--bb-screen-w, 100vw) * 0.92),
               calc((var(--bb-screen-h, 100dvh) - 48px - min(24vh, 200px)) / 0.554));
  aspect-ratio: 1 / 0.554;
  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(--bkb-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;
}

.bkb-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;
}

.bkb-menu-home img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.bkb-menu-home:hover,
.bkb-menu-home:focus-visible {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

.bkb-menu-logo {
  position: absolute;
  top: 8.1%;
  left: 50%;
  width: 62%;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

.bkb-menu-buttons {
  position: absolute;
  inset: 0;
}

/* Same pill thickness as BAMO's buttons (21.6% of its taller panel). */
.bkb-menu-btn {
  box-sizing: border-box;
  position: absolute;
  left: 50%;
  top: 60.1%;
  height: 28.2%;
  width: auto;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.bkb-menu-btn:hover,
.bkb-menu-btn:focus-visible {
  filter: brightness(1.18) drop-shadow(0 0 10px rgba(var(--bkb-accent-rgb), 0.55));
  transform: translateX(-50%) translateY(-1px);
}

.bkb-menu-btn:active {
  transform: translateX(-50%) translateY(0);
  filter: brightness(0.95);
}

.bkb-menu-btn:focus-visible {
  outline: 2px solid var(--bkb-accent);
  outline-offset: 3px;
}

.bkb-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) {
  .bkb-menu-home::after {
    content: "";
    position: absolute;
    inset: -8px;
  }
}
