* { margin:0; padding:0; box-sizing:border-box; }
html,body { height:100%; overflow:hidden; background:#06222e; color:#dceef2;
  font-family: ui-rounded, "Avenir Next", "Segoe UI", system-ui, sans-serif; }
#app { position:fixed; inset:0; }
#app canvas { display:block; }
#hud { position:absolute; inset:0; pointer-events:none; }
#topbar { position:absolute; top:10px; left:12px; right:12px; display:flex; gap:14px; flex-wrap:wrap; }
.stat { background:rgba(4,26,36,.72); border:1px solid rgba(94,220,230,.35); border-radius:9px;
  padding:6px 12px; display:flex; flex-direction:column; min-width:74px; }
.lbl { font-size:10px; letter-spacing:.14em; color:#6fd8e0; }
.stat span:last-child { font-size:19px; font-weight:700; }
.bar-wrap { position:absolute; top:74px; left:12px; width:210px; display:flex; flex-direction:column; gap:6px; }
.bar-row { display:flex; align-items:center; gap:8px; }
.bar-label { width:34px; font-size:11px; letter-spacing:.1em; color:#8fd8de; }
.bar { flex:1; height:11px; background:rgba(3,20,28,.8); border-radius:6px; overflow:hidden;
  border:1px solid rgba(120,220,225,.3); }
.bar div { height:100%; width:100%; border-radius:5px; transition:width .15s linear; }
#o2bar { background:linear-gradient(90deg,#23c4d8,#9df2ff); }
#hullbar { background:linear-gradient(90deg,#ff9c3f,#ffd27a); }
#toast { position:absolute; left:50%; top:16%; transform:translateX(-50%);
  font-size:22px; font-weight:800; color:#8fffe0; text-shadow:0 0 18px #17c9a4;
  opacity:0; transition:opacity .4s; letter-spacing:.06em; }
#flash { position:absolute; inset:0; background:radial-gradient(circle,transparent 45%,rgba(255,60,40,.55));
  opacity:0; transition:opacity .25s; }
.overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background:rgba(3,18,26,.82); backdrop-filter:blur(3px); z-index:5; }
.overlay.hidden { display:none; }
.panel { max-width:560px; margin:16px; padding:26px 30px; text-align:center;
  background:linear-gradient(160deg,rgba(10,40,52,.95),rgba(6,26,36,.95));
  border:1px solid rgba(90,220,230,.4); border-radius:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.55); }
.panel h1 { font-size:34px; letter-spacing:.18em; color:#a9f3ff;
  text-shadow:0 0 26px rgba(53,214,192,.55); margin-bottom:12px; }
.panel h2 { font-size:30px; letter-spacing:.12em; margin-bottom:10px; color:#a9f3ff; }
.panel p { font-size:15px; line-height:1.55; color:#c8e6ec; margin-bottom:14px; }
.keys { list-style:none; margin:0 0 18px; font-size:13.5px; color:#9fd4dc; line-height:1.9; }
.keys b { color:#ffe3a1; }
.cta { font:inherit; font-weight:800; font-size:18px; letter-spacing:.1em; cursor:pointer;
  color:#053039; background:linear-gradient(120deg,#67e8c9,#3fc9e8); border:none;
  border-radius:12px; padding:13px 34px; box-shadow:0 0 30px rgba(63,201,232,.45); }
.cta:hover { transform:translateY(-2px); }
.ghostlink { display:inline-block; margin-top:14px; color:#7fd4de; text-decoration:underline; }
#touch { position:absolute; inset:auto 0 0 0; display:none; z-index:4; }
@media (hover:none) and (pointer:coarse) { #touch { display:block; } }
.tbtn { position:absolute; border:1px solid rgba(140,230,235,.5); background:rgba(9,42,54,.55);
  color:#cfeef2; border-radius:50%; width:62px; height:62px; font-size:13px; font-weight:700;
  touch-action:none; user-select:none; -webkit-user-select:none; }
.tbtn.on { background:rgba(70,190,210,.6); }
.t-thrust{ left:24px; bottom:120px; } .t-brake{ left:24px; bottom:44px; }
.t-left  { left:100px; bottom:44px; } .t-right{ left:176px; bottom:44px; }
.t-up    { right:176px; bottom:120px; } .t-down{ right:176px; bottom:44px; }
.t-boost { right:96px; bottom:44px; border-radius:14px; width:70px; }
.t-scan  { right:20px; bottom:104px; width:76px; height:76px; background:rgba(24,92,84,.6); }
