html,body{margin:0;overflow:hidden;touch-action:none;-webkit-user-select:none;user-select:none;height:100%;background:#04121a;}
*{box-sizing:border-box;}
#game{position:fixed;inset:0;width:100%;height:100%;display:block;background:#04121a;}

.hidden{display:none!important;}

body,button,.headline,.subtext,.result,.best-line{
  font-family:'Courier New',Courier,monospace;
}

#hud{
  position:fixed;top:0;left:0;right:0;
  display:flex;justify-content:space-between;align-items:center;
  padding:14px 20px;color:#00f0ff;pointer-events:none;z-index:5;
  text-shadow:0 0 8px rgba(0,240,255,.8);
}
#score{font-size:30px;font-weight:900;}
#stats{display:flex;flex-direction:column;align-items:flex-end;font-size:12px;color:#9dfcff;gap:2px;font-weight:700;}

.screen{
  position:fixed;inset:0;z-index:10;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:18px;padding:24px;text-align:center;
  background:radial-gradient(circle at 50% 45%, #082430 0%, #04121a 70%);
}

.headline{
  font-size:clamp(28px,13vw,88px);
  color:#00f0ff;
  margin:0;
  font-weight:900;
  letter-spacing:3px;
  text-shadow:0 0 20px rgba(0,240,255,.7), 4px 4px 0 #001820;
}
.headline.small{font-size:clamp(24px,11vw,72px);color:#ffd400;text-shadow:0 0 20px rgba(255,212,0,.6),4px 4px 0 #201800;}

.subtext{color:#cdeff2;font-size:15px;max-width:min(80vw,640px);margin:0;}

.best-line{color:#00f0ff;font-size:13px;font-weight:700;margin:0;letter-spacing:1px;}

.result{color:#fff;font-size:16px;margin:0;font-weight:700;opacity:.8;}

.roast{color:rgba(255,255,255,.55);font-size:13px;margin:0;font-weight:700;font-style:italic;}

.cta{
  font-family:'Courier New',Courier,monospace;
  font-weight:900;
  font-size:22px;
  letter-spacing:1px;
  color:#04121a;
  background:#00f0ff;
  border:none;
  border-radius:10px;
  padding:18px 36px;
  box-shadow:0 6px 0 #007580, 4px 4px 0 rgba(0,0,0,.4);
  cursor:pointer;
  touch-action:manipulation;
}
.cta:active{transform:translateY(4px);box-shadow:0 2px 0 #007580;}

.pulse{animation:pulse 1.4s ease-in-out infinite;}
@keyframes pulse{
  0%,100%{transform:scale(1);}
  50%{transform:scale(1.06);}
}

/* result headline pop-in -- character for an abstract game lives in motion */
.headline.pop{animation:headlinePop .35s cubic-bezier(.34,1.56,.64,1);}
@keyframes headlinePop{
  0%{transform:scale(.55);}
  65%{transform:scale(1.14);}
  100%{transform:scale(1);}
}

/* bad-miss shake on the result screen itself -- the "impact" of a rough tap */
.screen.shake{animation:screenShake .32s ease-in-out;}
@keyframes screenShake{
  0%,100%{transform:translateX(0);}
  20%{transform:translateX(-7px);}
  40%{transform:translateX(6px);}
  60%{transform:translateX(-5px);}
  80%{transform:translateX(3px);}
}

/* confetti burst for a perfect tap / streak milestone */
.bit{
  position:absolute;
  left:50%;top:38%;
  width:6px;height:6px;
  margin:-3px 0 0 -3px;
  pointer-events:none;
  will-change:transform,opacity;
  animation:bitFly .55s ease-out forwards;
}
@keyframes bitFly{
  0%{transform:translate(0,0) scale(1);opacity:1;}
  100%{transform:translate(var(--dx),var(--dy)) scale(.3);opacity:0;}
}

/* --- desktop keyboard hint (PC support, additive) --- */
.kbd-hint{display:none;}
@media (hover: hover) and (pointer: fine){
  .kbd-hint{display:block;}
}
.kbd-hint{color:#7fd6e8;font-size:12px;letter-spacing:1px;margin:0;opacity:.8;}
