  * { margin:0; padding:0; box-sizing:border-box; }
  body {
    background: #0a0a12;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    touch-action: none;
    user-select: none;
  }
  #gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
  }
  canvas {
    display: block;
    width: 100%;
    height: 100%;
  }
  #hud {
    position: absolute;
    top: 0; left: 0; width: 100%;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 16px;
    text-shadow: 0 0 6px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 10;
  }
  #levelBadge {
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
    transition: background 0.3s, color 0.3s;
  }
  #timeBar {
    position: absolute;
    top: 0; left: 0;
    height: 5px;
    background: linear-gradient(90deg, #00ffcc, #ff2e6c);
    width: 0%;
    z-index: 11;
  }
  #overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5,5,15,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    z-index: 20;
    gap: 16px;
    padding: 20px;
  }
  #overlay.hidden { display: none; }
  #overlay h1 {
    font-size: clamp(24px, 6vw, 42px);
    letter-spacing: 2px;
  }
  #overlay p { font-size: 14px; color: #aaa; max-width: 420px; line-height: 1.5; }
  #overlay button {
    margin-top: 10px;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: bold;
    background: linear-gradient(135deg, #00ffcc, #00b8ff);
    border: none;
    border-radius: 8px;
    color: #001018;
    cursor: pointer;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(0,255,204,0.4);
    transition: opacity 0.2s;
  }
  #overlay button:active { transform: scale(0.96); }
  @keyframes pulseWaiting {
    0%, 100% { box-shadow: 0 0 18px rgba(255,204,0,0.35); transform: scale(1); }
    50% { box-shadow: 0 0 34px rgba(255,204,0,0.75); transform: scale(1.015); }
  }
  #overlay button.btn-waiting {
    background: linear-gradient(135deg, #ffcc00, #ff8800) !important;
    color: #1a1200 !important;
    animation: pulseWaiting 1.4s ease-in-out infinite;
    cursor: default;
  }
  #overlay button.btn-secondary {
    background: transparent;
    border: 1px solid #333;
    color: #999;
    font-size: 12px;
    font-weight: normal;
    padding: 10px 20px;
    box-shadow: none;
    letter-spacing: 0.5px;
  }
  #overlay button.btn-secondary:active { transform: scale(0.97); }
  .statRow { display:flex; gap: 30px; font-size: 15px; margin-top: 4px; }
  .statRow span b { color:#00ffcc; }
  #tapHint {
    position: absolute;
    bottom: 30px; left: 0; width: 100%;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    z-index: 10;
    pointer-events: none;
  }
