* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #2a1f3d;
  font-family: ui-rounded, "Segoe UI", system-ui, sans-serif; color: #fff7ea; }
#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#hud { position: fixed; top: 10px; left: 12px; right: 12px; pointer-events: none;
  display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.hud-row { display: flex; gap: 10px; font-weight: 800; font-size: 17px;
  text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.hud-row span { background: rgba(42,25,60,.55); border: 1px solid rgba(255,200,120,.4);
  border-radius: 8px; padding: 4px 10px; }
#hud-speed { font-size: 26px; font-weight: 900; color: #ffd27a;
  text-shadow: 0 2px 8px rgba(0,0,0,.7); }
#minimap { position: fixed; right: 12px; bottom: 12px; border-radius: 12px;
  border: 1px solid rgba(255,200,120,.45); }
#toast { position: fixed; top: 20%; left: 50%; transform: translateX(-50%);
  font-size: 42px; font-weight: 900; color: #ffe9b0; opacity: 0;
  transition: opacity .4s; text-shadow: 0 4px 18px rgba(120,40,20,.9); }

#touch-controls { position: fixed; left: 10px; right: 10px; bottom: 10px;
  display: flex; justify-content: space-between; z-index: 6;
  pointer-events: none; }
.tcol { display: flex; gap: 10px; align-items: flex-end; pointer-events: auto; }
.tbtn { width: 64px; height: 64px; border-radius: 16px; border: 1px solid rgba(255,200,120,.5);
  background: rgba(42,25,60,.55); color: #ffe9b0; font-size: 22px; font-weight: 800;
  touch-action: none; user-select: none; -webkit-user-select: none; }
.tbtn.on { background: rgba(255,150,60,.7); }
.tbtn-big { width: 78px; height: 88px; background: rgba(200,60,30,.55); font-size: 18px; }
.tbtn-small { height: 44px; font-size: 14px; }

#start-screen, #end-screen { position: fixed; inset: 0; display: flex;
  align-items: center; justify-content: center; z-index: 10;
  background: radial-gradient(ellipse at 50% 30%, rgba(90,40,90,.85), rgba(25,12,40,.94)); }
#end-screen { display: none; }
.panel { max-width: 520px; margin: 16px; text-align: center; }
.panel h1 { font-size: 40px; letter-spacing: 1px; color: #ffd27a; }
.panel h1 span { color: #ff7a5c; }
.panel h2 { font-size: 34px; color: #ffd27a; margin-bottom: 8px; }
.panel p { font-size: 15px; line-height: 1.5; margin: 10px 0; color: #f2e6d2; }
.keys { list-style: none; margin: 12px 0; font-size: 14px; color: #cfe6ff; }
.keys li { margin: 3px 0; }
.tiny { font-size: 11px; color: #b9a98f; }
.cta { display: inline-block; margin-top: 10px; padding: 14px 30px;
  font-size: 17px; font-weight: 900; letter-spacing: 1px; color: #2a1410;
  background: linear-gradient(135deg, #ffd27a, #ff8a4c);
  border: none; border-radius: 999px; cursor: pointer;
  box-shadow: 0 6px 24px rgba(255,140,60,.45); }
.cta:hover { transform: translateY(-2px); }
