* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #111;
  color: #fff;
  font-family: "Segoe UI", system-ui, sans-serif;
  user-select: none;
}

#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#hud {
  position: fixed;
  top: 18px;
  left: 3vw;
  right: 3vw;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  pointer-events: none;
}

.side { flex: 1; display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.side.right { flex-direction: row-reverse; }
.side-main { flex: 1; min-width: 0; }

/* retrato na ponta de fora da barra de vida */
.face {
  flex: none;
  width: 72px;
  height: 72px;
  object-fit: cover;
  background: radial-gradient(circle at 50% 40%, #6b3a22, #1a0f0a 75%);
  border: 3px solid #f4ead2;
  border-radius: 6px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .35);
}

.bar {
  position: relative;
  height: 24px;
  background: #2a1414;
  border: 3px solid #f4ead2;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .35);
}
.bar .ghost, .bar .fill { position: absolute; top: 0; bottom: 0; width: 100%; }
.bar .ghost { background: #e03a2f; }
.bar .fill { background: linear-gradient(#ffe06a, #f0a818); }
.left .bar .ghost, .left .bar .fill { left: 0; }    /* a vida esvazia do centro (tempo) para fora */
.right .bar .ghost, .right .bar .fill { right: 0; }

.row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.name {
  font-weight: 900;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 #000;
}
.pips { display: flex; gap: 6px; }
.pips i {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid #f4ead2;
  background: rgba(0, 0, 0, .4);
}
.pips i.on { background: #ffd23f; box-shadow: 0 0 8px #ffd23f; }

#timer {
  min-width: 70px;
  text-align: center;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  padding: 2px 6px 6px;
  background: rgba(0, 0, 0, .55);
  border: 3px solid #f4ead2;
  border-radius: 6px;
  text-shadow: 2px 2px 0 #000;
}

.combo {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 900;
  font-style: italic;
  color: #ffd23f;
  text-shadow: 3px 3px 0 #7a1d10;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .15s, transform .15s;
}
.right .combo { text-align: right; }
.combo.show { opacity: 1; transform: scale(1); }

#center {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#banner {
  font-size: clamp(48px, 9vw, 120px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 4px;
  color: #fff4d0;
  -webkit-text-stroke: 3px #7a1d10;
  text-shadow: 6px 6px 0 rgba(0, 0, 0, .45);
  opacity: 0;
  transform: scale(1.4);
  transition: opacity .12s, transform .12s;
}
#banner.show { opacity: 1; transform: scale(1); }
#sub { margin-top: 12px; font-size: 20px; font-weight: 700; text-shadow: 2px 2px 0 #000; }

#help {
  position: fixed;
  left: 12px;
  bottom: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .9);
  text-shadow: 1px 1px 2px #000;
  pointer-events: none;
}
#status { color: #ffd23f; }

/* ---- barra de Fúria (super) */
.meter {
  position: relative;
  width: 62%;
  height: 12px;
  margin-top: 6px;
  background: rgba(20, 10, 6, .75);
  border: 2px solid #f4ead2;
  border-radius: 3px;
  overflow: hidden;
}
.right .meter { margin-left: auto; }
.meter .mfill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: linear-gradient(#ffb347, #d9661c); }
.right .meter .mfill { left: auto; right: 0; }
.meter b {
  position: absolute; inset: 0;
  display: none; place-items: center;
  font-size: 10px; letter-spacing: 3px; color: #2a1206;
}
.meter.full { border-color: #ffd23f; box-shadow: 0 0 10px #ffb347; animation: furia .5s infinite alternate; }
.meter.full b { display: grid; }
.meter.full .mfill { background: linear-gradient(#ffe39a, #ffb347); }
@keyframes furia { to { box-shadow: 0 0 18px #ffd23f; } }

/* ---- super: tela escurece com brilho âmbar e o nome do golpe */
#superfx {
  position: fixed; inset: 0; z-index: 4; pointer-events: none;
  opacity: 0;
  display: flex; align-items: center;
}
#superfx.show { animation: superfx .9s ease-out forwards; }
#superfx.side0 { justify-content: flex-start; background: radial-gradient(circle at 30% 60%, rgba(255, 170, 60, .35), rgba(10, 4, 0, .75) 60%); }
#superfx.side1 { justify-content: flex-end; background: radial-gradient(circle at 70% 60%, rgba(255, 170, 60, .35), rgba(10, 4, 0, .75) 60%); }

@keyframes superfx {
  0% { opacity: 0; }
  12% { opacity: 1; }
  65% { opacity: 1; }
  100% { opacity: 0; }
}

/* arte do lutador entrando de lado no super; o nome do golpe vai para o outro lado */
#superfx img {
  position: absolute; bottom: 0;
  height: 92vh; max-width: 60vw; object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(255, 140, 0, .55));
}
#superfx.side0 img { left: 2vw; }
#superfx.side1 img { right: 2vw; transform: scaleX(-1); }
#superfx.side0 { justify-content: flex-end; }
#superfx.side1 { justify-content: flex-start; }
#superfx.show.side0 img { animation: cutin0 .9s ease-out forwards; }
#superfx.show.side1 img { animation: cutin1 .9s ease-out forwards; }
@keyframes cutin0 { 0% { transform: translateX(-40vw); } 18% { transform: translateX(0); } 70% { transform: translateX(2vw); } 100% { transform: translateX(6vw); } }
@keyframes cutin1 { 0% { transform: translateX(40vw) scaleX(-1); } 18% { transform: translateX(0) scaleX(-1); } 70% { transform: translateX(-2vw) scaleX(-1); } 100% { transform: translateX(-6vw) scaleX(-1); } }

/* nome do super: letra de quadrinho, fogo, contorno grosso, entra "batendo" com marcas de garra */
#superfx .sname { position: relative; margin: 0 5vw; text-align: center; transform: rotate(-6deg); }
#superfx .sname b {
  position: relative; display: block;
  font-family: Bangers, Anton, Impact, sans-serif; font-weight: 400;
  font-size: clamp(56px, 13vw, 150px); line-height: .85; letter-spacing: 3px;
  background: linear-gradient(#fff6c2 0%, #ffd23f 30%, #ff8a00 62%, #c62a12 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 3px #1a0700;
  filter: drop-shadow(5px 6px 0 #1a0700) drop-shadow(0 0 22px rgba(255, 110, 0, .8));
}
#superfx .sname small { display: block; font-size: .45em; letter-spacing: 10px; margin-bottom: .05em; }
/* três riscos de garra rasgando atrás do nome */
#superfx .claw, #superfx .claw::before, #superfx .claw::after {
  position: absolute; left: -8%; width: 116%; height: 10%;
  background: linear-gradient(90deg, transparent, #ffb347 20%, #fff2c0 50%, #ffb347 80%, transparent);
  border-radius: 50%; transform: rotate(-14deg); opacity: .85;
}
#superfx .claw { top: 40%; }
#superfx .claw::before, #superfx .claw::after { content: ''; left: 0; width: 100%; height: 100%; }
#superfx .claw::before { top: -180%; }
#superfx .claw::after { top: 180%; }
#superfx.show .sname b { animation: slam .9s cubic-bezier(.2, 1.6, .4, 1) forwards; }
#superfx.show .claw { animation: claw .9s ease-out forwards; }
@keyframes slam {
  0% { transform: scale(2.8); opacity: 0; }
  14% { transform: scale(.92); opacity: 1; }
  20% { transform: scale(1.06) translate(4px, -3px); }
  26% { transform: scale(1) translate(-4px, 2px); }
  32% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.04); }
}
@keyframes claw { 0%, 10% { clip-path: inset(0 100% 0 0); } 28% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 0); } }

/* tudo entra pelo mesmo lado: faixa diagonal + arte + nome colado nela */
#superfx::before {
  content: ''; position: absolute; left: -10vw; right: -10vw; top: 30%; height: 44%;
  background: linear-gradient(90deg, rgba(255, 150, 40, .0), rgba(255, 150, 40, .55) 30%, rgba(255, 210, 63, .35) 70%, rgba(255, 150, 40, 0));
  transform: skewY(-6deg);
  border-top: 3px solid rgba(255, 220, 120, .8); border-bottom: 3px solid rgba(255, 220, 120, .8);
}
#superfx.side0, #superfx.side1 { justify-content: flex-start; }
#superfx .sname { position: absolute; top: 50%; margin: 0; }
#superfx.side0 .sname { left: 36vw; transform: translateY(-50%) rotate(-6deg); }
#superfx.side1 .sname { right: 36vw; transform: translateY(-50%) rotate(6deg); }
#superfx.show.side0::before { animation: band0 .9s ease-out forwards; }
#superfx.show.side1::before { animation: band1 .9s ease-out forwards; transform: skewY(6deg); }
#superfx.show.side0 .sname { animation: name0 .9s ease-out forwards; }
#superfx.show.side1 .sname { animation: name1 .9s ease-out forwards; }
@keyframes band0 { 0% { clip-path: inset(0 100% 0 0); } 16% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 0); } }
@keyframes band1 { 0% { clip-path: inset(0 0 0 100%); } 16% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 0); } }
@keyframes name0 { 0% { translate: -70vw 0; } 20% { translate: 0 0; } 100% { translate: 3vw 0; } }
@keyframes name1 { 0% { translate: 70vw 0; } 20% { translate: 0 0; } 100% { translate: -3vw 0; } }
