* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #1b2430; overflow: hidden; font-family: "Segoe UI", system-ui, sans-serif; }
#stage { position: fixed; inset: 0; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#ui { position: absolute; left: 14px; top: 14px; z-index: 5; color: #f4f7fb; user-select: none; }
#panel { background: rgba(16, 22, 30, .62); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 10px 14px; min-width: 232px; }
.brand { font-size: 15px; letter-spacing: 2px; font-weight: 700; color: #ffd27a; margin-bottom: 8px; }
.row { display: flex; justify-content: space-between; font-size: 14px; margin: 3px 0; }
.row.small { font-size: 12px; color: #b9c4d2; margin-top: 6px; }
.lbl { color: #8f9db0; }
.bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); margin-top: 8px; overflow: hidden; }
#fuelbar { height: 100%; width: 100%; background: linear-gradient(90deg, #7fd07f, #ffd27a); transition: width .2s linear; }

#hint { margin-top: 10px; font-size: 12px; color: #c2cdd9; background: rgba(16,22,30,.45); border-radius: 8px; padding: 8px 10px; line-height: 1.6; }
#hint b { color: #ffd27a; }

#topbtns { position: absolute; top: 14px; right: 14px; z-index: 6; display: flex; gap: 8px; }
#soundbtn, #garagebtn {
  cursor: pointer;
  background: rgba(16,22,30,.62); color: #f4f7fb; border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px; padding: 8px 12px; font-size: 12px; letter-spacing: 1px;
}


#pedals { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 6; display: flex; justify-content: space-between; padding: 0 16px; pointer-events: none; }
.pedal { pointer-events: auto; cursor: pointer; font-size: 13px; letter-spacing: 1px; padding: 12px 18px; border-radius: 12px;
  background: rgba(16,22,30,.55); color: #f4f7fb; border: 1px solid rgba(255,255,255,.18); }
.pedal.active { background: #ffd27a; color: #1b2430; }

#overlay { position: absolute; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; background: rgba(10,14,20,.45); }
#overlay.hidden, #garage.hidden { display: none; }
#card, #gcard { background: rgba(20,27,36,.92); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 22px 26px; text-align: center; color: #f4f7fb; min-width: 300px; }
#card h1, #gcard h1 { margin: 0 0 8px; font-size: 22px; color: #ffd27a; }
#card p, #gcard p { margin: 0 0 14px; color: #b9c4d2; font-size: 13px; }
#mainbtn, #garageclose { cursor: pointer; background: #ffd27a; border: 0; border-radius: 8px; padding: 9px 16px; font-size: 14px; }
#upgrades { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.upg { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 10px 12px; font-size: 12px; cursor: pointer; color: #f4f7fb; }
.upg:disabled { opacity: .55; cursor: default; }
.upg span { display: block; color: #ffd27a; margin-top: 4px; }

#debug {
  position: absolute; right: 14px; bottom: 70px; z-index: 6;
  font: 11px/1.5 monospace; color: #9fb0c2; background: rgba(12,17,24,.55);
  border: 1px solid rgba(255,255,255,.12); border-radius: 6px; padding: 6px 8px;
  max-width: 250px; pointer-events: none;
}
