  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { width: 100%; height: 100%; overflow: hidden; background: #0b1020; font-family: -apple-system, system-ui, sans-serif; color: #e8ecff; }
  #game { position: fixed; inset: 0; }
  #hud {
    position: fixed; top: 16px; left: 16px;
    background: rgba(10, 14, 32, 0.55);
    border: 1px solid rgba(140, 160, 255, 0.25);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    letter-spacing: 0.5px;
    pointer-events: none;
    backdrop-filter: blur(6px);
    display: none;
  }
  #hud.show { display: block; }
  #hud b { color: #9ab6ff; }
  #menu-btn {
    position: fixed; top: 16px; right: 16px;
    background: rgba(10, 14, 32, 0.6);
    border: 1px solid rgba(140, 160, 255, 0.3);
    color: #e8ecff;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    display: none;
    z-index: 5;
  }
  #menu-btn.show { display: block; }
  #menu-btn:hover { background: rgba(30, 40, 80, 0.8); }

  .overlay {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at center, rgba(20,30,70,0.9), rgba(5,8,20,0.97));
    z-index: 10;
    transition: opacity 0.3s;
  }
  .overlay.hidden { opacity: 0; pointer-events: none; }

  .card {
    text-align: center;
    padding: 40px 56px;
    border: 1px solid rgba(140, 160, 255, 0.3);
    border-radius: 14px;
    background: rgba(15, 20, 45, 0.75);
    box-shadow: 0 10px 60px rgba(0,0,0,0.5);
    max-width: 640px;
  }
  .card h1 { font-size: 44px; margin-bottom: 8px; color: #c8d4ff; letter-spacing: 3px; }
  .card h2 { font-size: 28px; margin-bottom: 14px; color: #c8d4ff; letter-spacing: 2px; }
  .card p { font-size: 14px; color: #9ab6ff; margin: 6px 0; }

  .level-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin: 28px 0 12px;
  }
  .level-btn {
    position: relative;
    aspect-ratio: 1;
    border-radius: 18px;
    background: linear-gradient(145deg, #2a3568, #1a2244);
    border: 2px solid rgba(140, 160, 255, 0.35);
    font-size: 34px;
    font-weight: bold;
    color: #e8ecff;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .level-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(120, 150, 255, 0.3);
    border-color: #9ab6ff;
  }
  .level-btn.locked {
    background: linear-gradient(145deg, #1a1e30, #12151f);
    color: #455;
    border-color: rgba(80, 90, 120, 0.4);
    cursor: not-allowed;
  }
  .level-btn.locked:hover { transform: none; box-shadow: none; border-color: rgba(80, 90, 120, 0.4); }
  .level-btn.locked .num { opacity: 0.25; }
  .lock-icon {
    position: absolute;
    font-size: 26px;
    display: none;
  }
  .level-btn.locked .lock-icon { display: block; }
  .level-btn .check {
    position: absolute;
    top: 6px; right: 10px;
    font-size: 14px;
    color: #6eff9a;
  }

  .btn {
    display: inline-block;
    padding: 12px 28px;
    margin: 8px 6px 0;
    border-radius: 10px;
    background: linear-gradient(145deg, #3448a0, #253780);
    border: 1px solid rgba(180, 200, 255, 0.4);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1.5px;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.1s, box-shadow 0.1s;
  }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(100, 130, 255, 0.3); }
  .btn.ghost { background: transparent; border: 1px solid rgba(180, 200, 255, 0.35); }

  #crosshair {
    position: fixed; left: 50%; top: 50%;
    width: 6px; height: 6px;
    border: 1px solid #fff;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: none;
    box-shadow: 0 0 4px rgba(0,0,0,0.8);
    z-index: 4;
  }
  #crosshair.show { display: block; }
  #prompt {
    position: fixed; left: 50%; top: 56%;
    transform: translate(-50%, 0);
    background: rgba(10, 14, 32, 0.8);
    border: 1px solid rgba(180, 200, 255, 0.5);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    letter-spacing: 1.5px;
    color: #e8ecff;
    pointer-events: none;
    display: none;
    z-index: 4;
    text-transform: uppercase;
  }
  #prompt.show { display: block; }
  #prompt.locked { color: #ff8888; border-color: #aa3333; }
  #compass {
    position: fixed;
    right: 20px; bottom: 20px;
    width: 100px; height: 100px;
    background: rgba(10, 14, 32, 0.7);
    border: 2px solid rgba(140, 160, 255, 0.4);
    border-radius: 50%;
    display: none;
    z-index: 4;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 18px rgba(0,0,0,0.5);
  }
  #compass.show { display: block; }
  #compass svg { display: block; width: 100%; height: 100%; }
  #compass-rot { transition: transform 0.08s linear; }
  #keys-hud {
    display: flex;
    gap: 6px;
    margin-top: 4px;
  }
  .key-slot {
    width: 18px; height: 10px;
    border: 1px solid rgba(140,160,255,0.4);
    border-radius: 3px;
    opacity: 0.3;
  }
  .key-slot.got { opacity: 1; box-shadow: 0 0 6px currentColor; }
  kbd {
    display: inline-block;
    background: #222844;
    border: 1px solid #4a5590;
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 2px 8px;
    font-family: monospace;
    font-size: 12px;
    color: #e8ecff;
    margin: 0 2px;
  }
