/* ═══════════════════════════════════════════════════════════
   BLITZ: LAST STAND — Main Menu HTML Overlay
   Sits fixed above the game canvas (z-index 5), below intro
   video (z-index 10). Shown/hidden by game.js _refreshOverlay().
   ═══════════════════════════════════════════════════════════ */

#menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: none; /* game.js sets to 'flex' when in MENU/main state */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  --font-h: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --font-b: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  --font-m: 'Roboto Mono', 'Courier New', monospace;
  --red:    #CC1111;
  --text2:  #8A8678;
}

/* ── Video background ──────────────────────────────────── */
#menu-overlay .mo-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* ── Dark gradient overlay (exact website values) ────── */
#menu-overlay .mo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6,7,8,0.75)  0%,
    rgba(6,7,8,0.35) 40%,
    rgba(6,7,8,0.55) 80%,
    rgba(6,7,8,0.95) 100%
  );
  z-index: 1;
}

/* ── Content stack ───────────────────────────────────── */
#menu-overlay .mo-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

/* ── Eyebrow (exact website .hero-eyebrow) ───────────── */
#menu-overlay .mo-eyebrow {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 6px;
  color: var(--red);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
#menu-overlay .mo-eyebrow::before,
#menu-overlay .mo-eyebrow::after {
  content: '';
  display: inline-block;
  width: 40px; height: 1px;
  background: var(--red);
}

/* ── Title (exact website .hero-title) ───────────────── */
#menu-overlay .mo-title {
  font-family: var(--font-h);
  font-size: clamp(56px, 10vw, 120px);
  letter-spacing: 6px;
  color: var(--red);
  line-height: 0.9;
  text-shadow: 0 0 60px rgba(204,17,17,0.55);
  margin-bottom: 8px;
  text-align: center;
  user-select: none;
}
#menu-overlay .mo-title-the {
  font-size: clamp(26px, 4.5vw, 54px);
  color: #fff;
  letter-spacing: 14px;
}

/* ── Tagline (exact website .hero-tagline) ───────────── */
#menu-overlay .mo-tagline {
  font-family: var(--font-b);
  font-size: clamp(13px, 1.8vw, 16px);
  color: var(--text2);
  letter-spacing: 3px;
  margin: 20px 0 28px;
  text-transform: uppercase;
  user-select: none;
}

/* ── Website URL ─────────────────────────────────────── */
#menu-overlay .mo-website {
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.38);
  letter-spacing: 1.5px;
  text-align: center;
  margin-top: 14px;
  user-select: none;
}

/* ── Menu panel ──────────────────────────────────────── */
#menu-overlay .mo-panel {
  width: clamp(380px, 40vw, 500px);
  background: rgba(4,5,8,0.96);
  border: 1.5px solid rgba(180,10,10,0.90);
  position: relative;
  flex-shrink: 0;
}
/* Red top bar */
#menu-overlay .mo-panel::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: var(--red);
  z-index: 2;
}
/* Red bottom bar */
#menu-overlay .mo-panel::after {
  content: '';
  position: absolute;
  bottom: -1px; left: -1px; right: -1px;
  height: 3px;
  background: rgba(180,10,10,0.80);
  z-index: 2;
}

/* ── Button row ──────────────────────────────────────── */
#menu-overlay .mrow {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(35,40,50,0.90);
  position: relative;
  cursor: pointer;
  user-select: none;
  gap: 14px;
  transition: background 0.12s ease;
}
#menu-overlay .mrow:last-child { border-bottom: none; }

/* Hover — full red gradient + relief */
#menu-overlay .mrow:not(.dim):hover {
  background: linear-gradient(to right,
    rgba(175,8,8,1.00)   0%,
    rgba(140,4,4,0.97)  40%,
    rgba(90,2,2,0.94)   75%,
    rgba(50,1,1,0.90)  100%
  );
  border-bottom: none;
}
#menu-overlay .mrow:not(.dim):hover::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(220,30,30,0.55);
}
#menu-overlay .mrow:not(.dim):hover::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    58deg,
    transparent 0px, transparent 4px,
    rgba(255,60,60,0.04) 4px, rgba(255,60,60,0.04) 5px
  );
  pointer-events: none;
}
#menu-overlay .mrow:not(.dim):hover .mrow-label { color: #fff; }
#menu-overlay .mrow:not(.dim):hover .mrow-icon  { color: #fff; }
#menu-overlay .mrow:not(.dim):hover .mrow-chev  { color: rgba(255,255,255,0.90); }

/* Active — full red gradient + relief (click or keyboard/gamepad) */
#menu-overlay .mrow.active {
  background: linear-gradient(to right,
    rgba(175,8,8,1.00)   0%,
    rgba(140,4,4,0.97)  40%,
    rgba(90,2,2,0.94)   75%,
    rgba(50,1,1,0.90)  100%
  );
  border-bottom: none;
}
#menu-overlay .mrow.active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(220,30,30,0.55);
}
#menu-overlay .mrow.active::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    58deg,
    transparent 0px, transparent 4px,
    rgba(255,60,60,0.04) 4px, rgba(255,60,60,0.04) 5px
  );
  pointer-events: none;
}
#menu-overlay .mrow.active .mrow-label { color: #fff; }
#menu-overlay .mrow.active .mrow-icon  { color: #fff; }
#menu-overlay .mrow.active .mrow-chev  { color: rgba(255,255,255,0.90); }

/* Dim / locked row */
#menu-overlay .mrow.dim { opacity: 0.38; cursor: default; }

/* ── Icon ────────────────────────────────────────────── */
#menu-overlay .mrow-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: rgba(180,175,168,0.75);
}
#menu-overlay .mrow-icon svg { width: 18px; height: 18px; display: block; }

/* ── Label ───────────────────────────────────────────── */
#menu-overlay .mrow-label {
  flex: 1;
  font-family: var(--font-h);
  font-size: 17px;
  letter-spacing: 2px;
  color: rgba(220,215,208,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Chevron ─────────────────────────────────────────── */
#menu-overlay .mrow-chev {
  flex-shrink: 0;
  color: rgba(255,255,255,0.40);
}
#menu-overlay .mrow-chev svg { width: 13px; height: 13px; display: block; }

/* ── Electron-only: EXIT GAME row hidden by default ─── */
#menu-overlay .mrow-electron { display: none; }
