* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { font-family: "Segoe UI", system-ui, sans-serif; color: #ffe9c9;
  background: #1c1f4a; }
#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

#hud { position: fixed; top: 10px; left: 12px; right: 12px; z-index: 5;
  pointer-events: none; }
.hud-row { display: flex; gap: 10px; }
.hud-chip { background: rgba(20,16,44,.72); border: 1px solid rgba(255,180,90,.35);
  border-radius: 999px; padding: 6px 14px; font-size: 15px; font-weight: 600;
  letter-spacing: .5px; text-shadow: 0 1px 2px #000; }
#hud-prog-wrap { margin-top: 8px; width: 120px; height: 7px; border-radius: 4px;
  background: rgba(20,16,44,.6); border: 1px solid rgba(255,180,90,.3); }
#hud-progress { height: 100%; width: 0%; border-radius: 4px;
  background: linear-gradient(90deg, #2fbfa8, #ffd23e); }

#touch-controls { position: fixed; inset: auto 0 0 0; z-index: 6; display: flex;
  justify-content: space-between; align-items: flex-end; padding: 18px 22px;
  pointer-events: none; }
#joy-pad { pointer-events: auto; width: 118px; height: 118px; border-radius: 50%;
  background: rgba(20,16,44,.45); border: 2px solid rgba(255,180,90,.4);
  touch-action: none; position: relative; }
#joy-knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd97a, #ff7a45 70%);
  border: 2px solid rgba(255,220,150,.7); }
#btn-jump { pointer-events: auto; width: 92px; height: 92px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(47,191,168,.28); border: 2px solid rgba(83,224,200,.7);
  font-weight: 800; font-size: 15px; letter-spacing: 1px; color: #d8fff4;
  touch-action: none; user-select: none; }

#btn-mute { position: fixed; top: 10px; right: 12px; z-index: 8; width: 40px;
  height: 40px; border-radius: 50%; border: 1px solid rgba(255,180,90,.45);
  background: rgba(20,16,44,.7); color: #ffe9c9; font-size: 18px; cursor: pointer; }
#btn-mute.muted { opacity: .45; text-decoration: line-through; }

.overlay { position: fixed; inset: 0; z-index: 10; display: flex;
  align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 35%, rgba(58,47,110,.82), rgba(12,10,30,.9)); }
.panel { text-align: center; padding: 34px 30px; max-width: 560px;
  background: rgba(18,15,40,.85); border: 1px solid rgba(255,180,90,.35);
  border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.panel h1 { font-size: clamp(30px, 7vw, 52px); letter-spacing: 3px; color: #ffd97a;
  text-shadow: 0 0 24px rgba(255,150,60,.55); }
.panel h1 span { color: #2fbfa8; }
.panel .tag { margin: 10px 0 18px; font-size: 15px; color: #e8cfa8; }
.keys { text-align: left; display: grid; gap: 7px; font-size: 13.5px;
  color: #d9c39a; margin-bottom: 20px; }
.keys b { color: #ffd97a; background: rgba(255,180,90,.12); padding: 1px 7px;
  border-radius: 6px; border: 1px solid rgba(255,180,90,.3); }
.keys span { color: #a897b8; }
.btn { font-size: 19px; font-weight: 800; letter-spacing: 1px; padding: 14px 42px;
  border-radius: 999px; border: none; cursor: pointer; color: #24143a;
  background: linear-gradient(135deg, #ffd23e, #ff7a45);
  box-shadow: 0 6px 24px rgba(255,140,60,.45); }
.btn:active { transform: translateY(2px); }
.win-t { color: #ffd23e !important; }
.lose-t { color: #ff7a65 !important; }
@media (max-width: 640px) { .keys { font-size: 12px; } .panel { margin: 12px; } }
