/* ══════════════════════════════════════════════════════
   MENU VIEW — Moco [Upgraded]
   ══════════════════════════════════════════════════════ */

/* Fix: html needs the bg too, otherwise white strip appears
   at the bottom when the viewport is taller than body. */
html {
  background: var(--bg);
  min-height: 100%;
  min-height: 100dvh;
}

#menu-view {
  min-height: 100vh;
  min-height: 100dvh;              /* kills the mobile URL-bar gap */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Asymmetric padding biases content UP so the top doesn't
     feel empty, while still keeping the reel visually centered. */
  padding: clamp(40px, 7vh, 72px) 16px clamp(96px, 18vh, 180px);
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(0,255,65, 0.08) 0%, transparent 55%),
    var(--bg);
}

/* ── Frame corners: removed (were the "4 ugly edges") ── */
.frame-corner { display: none !important; }

/* ── HUD: subtle Moco lines instead of naked white ──── */
.hud {
  position: fixed;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 56px;
  font-size: var(--fs-min);
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--fg-ghost);
  pointer-events: none;
  z-index: 50;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.25);
}
.hud-top { top: 20px; }
.hud-bottom { bottom: 20px; }
.hud .mid { color: var(--fg-faint); }
.hud .live {
  color: var(--moco-aqua);
  text-shadow: 0 0 8px rgba(125, 249, 255, 0.7);
}
.hud .live::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 8px;
  background: var(--moco-aqua);
  box-shadow: 0 0 8px var(--moco-aqua);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ── Cover ───────────────────────────────────────────── */
.cover {
  width: min(580px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  z-index: 10;
}
.cover-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.eyebrow {
  font-size: var(--fs-min);
  font-weight: 800;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--moco-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.45);
}
.brand {
  font-size: clamp(32px, 8vw, 52px);
  font-weight: 900;
  letter-spacing: 12px;
  text-indent: 12px;
  text-transform: uppercase;
  color: var(--moco-cyan);
  line-height: 1;
  text-shadow:
    0 0 18px rgba(0, 240, 255, 0.65),
    0 0 42px rgba(0, 240, 255, 0.30);
}

/* ── Divider rule: cyan → coder green ─────────────────────── */
.rule {
  width: min(360px, 80vw);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--moco-cyan) 25%,
    var(--coder-green) 75%,
    transparent
  );
  position: relative;
  margin-top: 4px;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}
.rule::before,
.rule::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px; height: 6px;
  transform: translateY(-50%) rotate(45deg);
}
.rule::before {
  left: 18%;
  background: var(--moco-cyan);
  box-shadow: 0 0 8px var(--moco-cyan);
}
.rule::after {
  right: 18%;
  background: var(--coder-green);
  box-shadow: 0 0 8px var(--coder-green);
}

/* ── Reel ────────────────────────────────────────────── */
.reel {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 36px;
}
.reel-marker {
  position: absolute;
  top: 50%;
  width: 16px; height: 28px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.7));
}
.reel-marker.left {
  left: 0;
  border-left: 2px solid var(--moco-cyan);
  border-top: 2px solid var(--moco-cyan);
  border-bottom: 2px solid var(--moco-cyan);
  clip-path: polygon(0 0, 100% 15%, 100% 85%, 0 100%);
}
.reel-marker.right {
  right: 0;
  border-right: 2px solid var(--coder-green);
  border-top: 2px solid var(--coder-green);
  border-bottom: 2px solid var(--coder-green);
  clip-path: polygon(0 15%, 100% 0, 100% 100%, 0 85%);
}
.reel::before {
  content: "";
  position: absolute;
  left: 22px; right: 22px;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 240, 255, 0.20) 20%,
    rgba(0, 240, 255, 0.45) 50%,
    rgba(0, 240, 255, 0.20) 80%,
    transparent
  );
  z-index: 0;
}
.menu {
  position: relative;
  width: 100%;
  height: var(--reel-h);
  padding: calc((var(--reel-h) - var(--item-h)) / 2) 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  perspective: 1100px;
  z-index: 1;
  scrollbar-width: none;
}
.menu::-webkit-scrollbar { display: none; }

/* Fade top/bottom of reel into the bg (was hardcoded #000) */
.reel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, var(--bg) 0%, transparent 18%),
    linear-gradient(to top,    var(--bg) 0%, transparent 18%);
  z-index: 5;
}

/* ── Menu items: glass + Moco glow ───────────────────── */
.item {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  width: 52%;
  margin: 0 auto;
  height: var(--item-h);
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  border: 0;
  cursor: pointer;
  background: var(--glass);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  contain: layout paint;
  outline: none;
  clip-path: polygon(
    var(--cut) 0,
    calc(100% - var(--cut-sm)) 0,
    100% var(--cut-sm),
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    var(--cut-sm) 100%,
    0 calc(100% - var(--cut-sm)),
    0 var(--cut)
  );
  transition: background 0.18s var(--ease), box-shadow 0.18s var(--ease);
  box-shadow: inset 0 1px 0 rgba(0, 240, 255, 0.08);
  -webkit-tap-highlight-color: transparent;
}
.item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08) 0%, transparent 45%);
  pointer-events: none;
}
.item > * { position: relative; z-index: 3; }

.num {
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--moco-cyan);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.5);
  border: 0;
  transition: 0.18s var(--ease);
}
.label {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px 0 10px;
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fg-mute);
  transition: color 0.18s var(--ease);
}
.label::after {
  content: "▸";
  font-size: 12px;
  opacity: 0;
  transform: translateX(-6px);
  transition: 0.15s;
}
.item:hover {
  background: var(--glass-2);
  box-shadow:
    inset 0 1px 0 rgba(0, 240, 255, 0.15),
    0 0 14px rgba(0, 240, 255, 0.12);
}
.item:hover .num { color: var(--moco-aqua); text-shadow: 0 0 8px rgba(125, 249, 255, 0.7); }
.item:hover .label { color: var(--fg); }

.item.active {
  background: rgba(0, 240, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(0, 240, 255, 0.25),
    0 0 20px rgba(0, 240, 255, 0.30);
}
.item.active .num {
  color: var(--moco-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.9);
}
.item.active .label {
  color: var(--moco-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
}
.item.active .label::after { opacity: 1; transform: none; }

/* ── Cover foot ──────────────────────────────────────── */
.cover-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: var(--fs-min);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.cover-foot .dot {
  width: 4px; height: 4px;
  background: var(--moco-cyan);
  box-shadow: 0 0 6px var(--moco-cyan);
  transform: rotate(45deg);
}

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 720px) {
  :root { --item-h: 42px; --gap: 8px; --reel-h: 380px; }

  #menu-view { padding: 32px 16px 100px; }

  .hud { padding: 0 36px; font-size: 9px; }
  .hud .mid { display: none; }

  .item { width: 78%; }
  .num { flex: 0 0 36px; }
  .brand { letter-spacing: 8px; text-indent: 8px; }
}