/* styles.css — Type a Way */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  width: 100vw; height: 100vh;
  overflow: hidden;
}

#gameCanvas {
  cursor: default;
  outline: none;
  display: block;
  /* crisp pixel rendering across all browsers */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}

/* typed-wrap error flash */
#typed-wrap.error {
  border-color: #ff4444 !important;
  background: rgba(255, 68, 68, .12) !important;
}
#typed-wrap.error #typed-text {
  color: #ff6666;
}

/* shake animation on error */
@keyframes shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-5px); }
  40%  { transform: translateX( 5px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX( 4px); }
  100% { transform: translateX(0); }
}
#typed-wrap.shake {
  animation: shake 0.28s ease;
}

/* cursor blink */
@keyframes blink { 0%,49%{opacity:1} 50%,100%{opacity:0} }
#typed-cursor { animation: blink 1s step-start infinite; }

/* language bar colour states */
#lang-bar.low  { background: #ef4444; }
#lang-bar.mid  { background: #f59e0b; }
#lang-bar.high { background: #22c55e; }
