 :root{
    --bg1:#0f1724;
    --bg2:#081425;
    --accent:#7dd3fc;
    --accent2:#60a5fa;
    --panel: rgba(255,255,255,0.06);
    --glass: rgba(255,255,255,0.04);
  }
  html,body{
    height:100%;
    margin:0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    -webkit-user-select:none; user-select:none;
    -webkit-tap-highlight-color: transparent;
    background: radial-gradient(1200px 600px at 10% 10%, rgba(96,165,250,0.06), transparent),
                radial-gradient(1000px 500px at 90% 90%, rgba(125,211,252,0.04), transparent),
                linear-gradient(180deg,var(--bg1),var(--bg2));
    color: #e6f0ff;
    display:flex;
    align-items: center;
    justify-content: center;
    padding:16px;
    box-sizing:border-box;
  }

  .game-wrap{
    width:100%;
    max-width:1000px;
    height:calc(100vh - 32px);
    max-height:800px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border-radius:16px;
    box-shadow: 0 10px 40px rgba(2,6,23,0.6);
    overflow:hidden;
    position:relative;
    display:flex;
  }

  canvas{
    display:block;
    width:100%;
    height:100%;
    touch-action:none;
    -ms-touch-action:none;
  }

  .hud{
    position:absolute;
    left:12px;
    top:12px;
    z-index:10;
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
  }
  .hud .pill{
    background:var(--panel);
    padding:8px 12px;
    border-radius:999px;
    font-weight:600;
    font-size:14px;
    backdrop-filter: blur(6px);
  }

  .controls{
    position:absolute;
    right:12px;
    top:12px;
    z-index:10;
    display:flex;
    gap:8px;
  }
  button {
    background: linear-gradient(180deg,var(--accent),var(--accent2));
    border:none;
    padding:8px 12px;
    border-radius:10px;
    color:#032033;
    font-weight:700;
    cursor:pointer;
    box-shadow: 0 6px 18px rgba(96,165,250,0.12), inset 0 -2px 0 rgba(0,0,0,0.06);
  }
  button.secondary{
    background:transparent;
    border:1px solid rgba(255,255,255,0.06);
    color: #dff1ff;
    box-shadow:none;
    font-weight:600;
  }

  .overlay{
    position:absolute;
    inset:0;
    z-index:9;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(180deg, rgba(2,6,23,0.35), rgba(2,6,23,0.6));
    color:white;
    text-align:center;
    padding:20px;
    gap:12px;
    flex-direction:column;
  }
  .overlay .title{
    font-size:26px;
    font-weight:800;
    letter-spacing:0.6px;
  }
  .overlay .sub{
    font-size:14px;
    opacity:0.85;
  }
  .smallHint{
    position:absolute;
    bottom:12px;
    left:12px;
    z-index:10;
    background:var(--glass);
    padding:8px 12px;
    border-radius:8px;
    font-size:13px;
    opacity:0.95;
  }

  @media (max-width:600px){
    .hud .pill { font-size:13px; padding:7px 10px; }
    button { padding:7px 10px; font-size:14px; }
    .overlay .title { font-size:20px; }
  }