html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #07091a;
  overflow: hidden;
  font-family: "Segoe UI", system-ui, sans-serif;
}

#wrap {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

canvas {
  display: block;
  background: #0b0e24;
  box-shadow: 0 0 40px rgba(60, 120, 255, 0.25);
  border-radius: 6px;
}

/* Menu over het canvas: zelfde neon-stijl als het spel */
#menu {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 20, 0.62);
  overflow-y: auto;
}
#menu[hidden], #menu [hidden] { display: none !important; }
#menu .box {
  width: min(420px, calc(100vw - 32px));
  box-sizing: border-box;
  margin: 16px 0;
  padding: 24px 24px 18px;
  background: rgba(6, 8, 26, 0.95);
  border: 2px solid #3d7bff;
  border-radius: 12px;
  color: #e8ecff;
  text-align: center;
  box-shadow: 0 0 40px rgba(60, 120, 255, 0.3), inset 0 0 24px rgba(60, 120, 255, 0.08);
}
#menu[data-screen="help"] .box, #menu[data-screen="scores"] .box { width: min(480px, calc(100vw - 32px)); }

#menu .logo {
  margin: 0 0 4px;
  font-size: 34px;
  letter-spacing: 2px;
  color: #ffe45c;
  text-shadow: 0 0 12px rgba(255, 228, 92, 0.55);
}
#menu .logo span { color: #7cf0ff; text-shadow: 0 0 12px rgba(124, 240, 255, 0.6); }
#menu h2 { margin: 0 0 16px; color: #ffe45c; font-size: 24px; letter-spacing: 1px; text-shadow: 0 0 10px rgba(255, 228, 92, 0.4); }
#menu canvas.hero { display: block; width: 100%; height: 56px; margin: 6px 0 16px; background: transparent; box-shadow: none; }

#menu .or { margin: 14px 0 8px; color: #8a93c4; font-size: 13px; }
#menu .row { display: flex; gap: 8px; margin-top: 8px; }
#menu .row > * { flex: 1; }
#menu .code { font-size: 44px; font-weight: bold; letter-spacing: 10px; color: #ffd23f; margin: 4px 0 8px; text-shadow: 0 0 12px rgba(255, 210, 63, 0.45); }

#menu input {
  min-width: 0;
  padding: 9px 10px;
  background: #0b0e24;
  border: 1px solid #3d7bff;
  border-radius: 6px;
  color: #e8ecff;
  font: inherit;
  font-size: 15px;
}
#menu input:focus { outline: none; box-shadow: 0 0 0 2px rgba(124, 240, 255, 0.5); }
#menu-code { text-transform: uppercase; letter-spacing: 6px; text-align: center; font-weight: bold; }
#menu-name { text-align: center; font-weight: bold; }
#menu .cap { display: block; margin: 0 0 4px; color: #8a93c4; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
#menu input.nick { display: block; width: 100%; box-sizing: border-box; margin-bottom: 4px; text-align: center; font-weight: bold; color: #ffd23f; }
#menu input.nick::placeholder { color: #8a93c4; font-weight: normal; }

#menu button {
  padding: 9px 14px;
  background: #121a4a;
  border: 1px solid #3d7bff;
  border-radius: 6px;
  color: #e8ecff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.12s, box-shadow 0.12s, transform 0.12s;
}
#menu button:hover, #menu button:focus-visible { background: #1d2a6e; outline: none; box-shadow: 0 0 14px rgba(61, 123, 255, 0.55); }
#menu button:disabled { opacity: 0.5; cursor: default; }
#menu button.primary { background: #3d7bff; font-weight: bold; }
#menu button.primary:hover, #menu button.primary:focus-visible { background: #5b8fff; }
#menu > .box > div > button.primary, #menu button.big { display: block; width: 100%; }
#menu button.big { margin-top: 10px; padding: 12px 14px; font-size: 17px; font-weight: bold; }
#menu button.big small { display: block; margin-top: 2px; font-size: 12px; font-weight: normal; opacity: 0.75; }
#menu button.big:focus-visible { transform: scale(1.02); }
#menu button.close { display: block; width: 100%; margin-top: 14px; background: transparent; border-color: #2a2f55; color: #8a93c4; }
#menu #menu-msg { min-height: 18px; margin: 12px 0 0; color: #ff9aa5; font-size: 13px; }
#menu #menu-msg:empty { margin: 0; min-height: 0; }
#menu #menu-msg.info { color: #8a93c4; }

/* Speluitleg */
#menu .help { list-style: none; margin: 0; padding: 0; text-align: left; }
#menu .help li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid #1a2150; }
#menu .help canvas { flex: none; width: 44px; height: 44px; background: transparent; box-shadow: none; }
#menu .help canvas.wide { width: 120px; }
#menu .help p { margin: 0; font-size: 14px; line-height: 1.4; }
#menu .yellow { color: #ffd23f; }
#menu .blue { color: #7cf0ff; }
#menu .pink { color: #ff5c8a; }
#menu .keys { margin: 14px 0 0; color: #8a93c4; font-size: 13px; line-height: 1.7; }
#menu kbd {
  padding: 1px 6px;
  border: 1px solid #3d7bff;
  border-radius: 4px;
  background: #0b0e24;
  color: #e8ecff;
  font: inherit;
  font-size: 12px;
}

/* Scorebord */
#menu table.scores { width: 100%; border-collapse: collapse; font-size: 15px; }
#menu .scores th { padding: 4px 6px; color: #8a93c4; font-size: 11px; font-weight: normal; text-align: left; letter-spacing: 1px; }
#menu .scores td { padding: 6px; border-top: 1px solid #1a2150; text-align: left; }
#menu .scores td:nth-child(1) { width: 24px; color: #8a93c4; }
#menu .scores td:nth-child(2) { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#menu .scores td:nth-child(3) { color: #ffd66b; font-weight: bold; }
#menu .scores td.mode { color: #8a93c4; font-size: 11px; text-align: right; }
#menu .scores tr:nth-child(1) td:nth-child(1) { color: #ffe45c; }
#menu .scores tr.me td { background: rgba(255, 210, 63, 0.12); }
#menu .scores tr.me td:nth-child(2) { color: #ffd23f; font-weight: bold; }
