html, body {
  background-color: #18191a !important;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior-x: none;
  /* Prefer bundled Poppins faces first; fall back to Nunito if not present */
  font-family:
    'Poppins',
    'NunitoSans',
    'Nunito Sans',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Helvetica,
    Arial,
    'Noto Sans',
    'Liberation Sans',
    Ubuntu,
    Cantarell,
    'Apple Color Emoji',
    'Segoe UI Emoji',
    'Segoe UI Symbol',
    sans-serif;
}

canvas {
  display: block;
  image-rendering: crisp-edges;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@font-face {
  font-family: 'Poppins';
  src: url('Poppins-ExtraLight.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('Poppins-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('Poppins-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Nunito Sans: only 700–800 are used */
@font-face {
  font-family: 'NunitoSans';
  /* Prefer installed variable font if available, then use bundled WOFF2 */
  src: url('NunitoSans.woff2') format('woff2');
  font-weight: 400 700 800;
  font-style: normal;
  font-display: swap;
}

/* Provide standard Google Fonts family name as well, pointing to the same WOFF2 */
@font-face {
  font-family: 'Nunito Sans';
  src: url('NunitoSans.woff2') format('woff2');
  font-weight: 400 700 800;
  font-style: normal;
  font-display: swap;
}

/* Manrope Variable Font - used for HUD score and moves display */
@font-face {
  font-family: 'Manrope-SemiBold';
  src: url('Manrope-VariableFont.woff2') format('woff2-variations');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope-ExtraBold';
  src: url('Manrope-VariableFont.woff2') format('woff2-variations');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Optional: invisible prewarm class for Nunito to avoid preload-unused warnings
   Usage (only if you restore preload): add a hidden span with this class once on load */
.font-prewarm-nunito {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: 'NunitoSans', 'Nunito Sans', sans-serif;
  font-weight: 700;
}
