* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0a0e14; font-family: system-ui, sans-serif; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#hud { position: fixed; inset: 0; pointer-events: none; }

#topbar {
  position: absolute; top: 12px; left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: flex-start;
}
#mission {
  background: rgba(10, 14, 20, 0.65); border-left: 3px solid #e8b13a;
  padding: 8px 14px; color: #e8e2d0; backdrop-filter: blur(4px);
}
#mission-title { display: block; font-weight: 700; font-size: 14px; letter-spacing: 1px; color: #e8b13a; text-transform: uppercase; }
#mission-desc { display: block; font-size: 12px; margin-top: 2px; }
#stats {
  background: rgba(10, 14, 20, 0.65); padding: 8px 14px; color: #e8e2d0;
  font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600;
}
#center-notice {
  position: absolute; top: 30%; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 16px; font-weight: 700; text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8); opacity: 0; transition: opacity .3s;
}
#center-notice.show { opacity: 1; }

/* touch controls */
#touch-ui { position: absolute; inset: 0; }
#touch-ui.show { pointer-events: auto; }
#joystick {
  position: absolute; bottom: 40px; left: 36px; width: 130px; height: 130px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08); touch-action: none;
}
#stick {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px;
  border-radius: 50%; background: rgba(255,255,255,0.4);
  transform: translate(-50%,-50%);
}
#touch-buttons { position: absolute; bottom: 40px; right: 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-end; }
#touch-buttons button {
  width: 76px; height: 76px; border-radius: 50%;
  border: 2px solid rgba(232,177,58,0.7); background: rgba(232,177,58,0.22);
  color: #e8b13a; font-weight: 800; font-size: 13px; letter-spacing: 1px;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
#btn-jump { width: 60px !important; height: 60px !important; }

/* start overlay */
#start-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(180deg, rgba(8,10,16,0.88), rgba(8,10,16,0.95));
  pointer-events: auto; color: #e8e2d0;
}
#start-overlay h1 { font-size: 42px; letter-spacing: 6px; color: #e8b13a; }
#start-overlay p { font-size: 14px; color: #b9b29c; }
#btn-start {
  margin-top: 10px; padding: 12px 48px; font-size: 18px; font-weight: 800;
  letter-spacing: 3px; background: #e8b13a; color: #14110a; border: none; cursor: pointer;
}
#btn-start:hover { background: #f5c654; }
.hint { max-width: 440px; text-align: center; line-height: 1.5; }

#hp-bar {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  width: 220px; height: 10px; background: rgba(10,14,20,0.7);
  border: 1px solid rgba(255,255,255,0.3);
}
#hp-fill {
  height: 100%; width: 100%; background: linear-gradient(90deg, #b01818, #e8b13a);
  transition: width .25s;
}
