/* Telas / menus (título, menu principal, seleção, pausa, fim de partida) */

:root {
  --cream: #f4ead2;
  --gold: #ffd23f;
  --blood: #7a1d10;
  --ink: #1a0f0a;
  --p1: #3aa0ff;
  --p2: #ff4b3a;
  --display: "Anton", "Impact", "Arial Black", sans-serif;
}

/* HUD só aparece durante a luta */
body:not(.fighting) #hud,
body:not(.fighting) #center,
body:not(.fighting) #help { display: none; }

#menu { position: fixed; inset: 0; display: none; }
#menu.open { display: block; }

.screen { position: absolute; inset: 0; display: flex; }
.hint { margin-top: 22px; font-size: 13px; letter-spacing: 1px; color: rgba(244, 234, 210, .75); }

/* ---- título */
.title-screen {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 9vh;
  cursor: pointer;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 30%, rgba(20, 8, 4, .75) 100%);
}
.logo {
  font-family: var(--display);
  font-size: clamp(64px, 13vw, 190px);
  line-height: 1;
  letter-spacing: 4px;
  transform: skewX(-8deg);
  filter: drop-shadow(8px 8px 0 rgba(0, 0, 0, .45));
}
.logo span {
  background: linear-gradient(#fff6c8 10%, var(--gold) 45%, #e0701c 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 3px var(--blood);
}
.logo-sub {
  margin-top: 10px;
  padding: 4px 18px;
  font-weight: 800;
  letter-spacing: 6px;
  font-size: clamp(12px, 1.6vw, 18px);
  background: var(--blood);
  transform: skewX(-12deg);
}
.press {
  position: absolute;
  bottom: 16%;
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 32px);
  letter-spacing: 4px;
  text-shadow: 3px 3px 0 #000;
}
.blink { animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.version { position: absolute; right: 16px; bottom: 12px; font-size: 12px; opacity: .6; }

/* ---- listas (menu principal, pausa, fim de partida) */
.list-screen { align-items: center; justify-content: center; background: rgba(15, 6, 3, .55); }
.main-menu {
  justify-content: flex-start;
  background: linear-gradient(90deg, rgba(15, 6, 3, .85) 0%, rgba(15, 6, 3, .5) 45%, rgba(0, 0, 0, 0) 70%);
}
.main-menu .panel { margin-left: 8vw; background: none; border: none; box-shadow: none; }
.result-menu { align-items: flex-end; background: linear-gradient(0deg, rgba(15, 6, 3, .8), rgba(0, 0, 0, 0) 55%); }
.result-menu .panel { margin-bottom: 7vh; }

.panel {
  min-width: min(420px, 92vw);
  padding: 28px 34px;
  background: rgba(26, 15, 10, .88);
  border: 3px solid var(--cream);
  border-radius: 6px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .4);
}
.panel.wide { min-width: min(640px, 94vw); }
.panel-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 44px;
  letter-spacing: 3px;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--blood);
  transform: skewX(-8deg);
  margin-bottom: 14px;
}
.panel-sub { margin-top: 10px; font-size: 14px; color: rgba(244, 234, 210, .85); }

.menu-list { list-style: none; }
.menu-list li {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 6px 0;
  padding: 6px 18px 6px 14px;
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: 2px;
  color: var(--cream);
  text-shadow: 2px 2px 0 #000;
  cursor: pointer;
  transform: skewX(-10deg);
  transition: transform .08s, background .08s;
}
.menu-list li span { flex: 1; }
.menu-list li em { font-style: normal; font-size: .6em; opacity: .7; }
.menu-list li.active {
  background: linear-gradient(90deg, var(--gold), #f0a818 70%, rgba(240, 168, 24, 0));
  color: var(--ink);
  text-shadow: none;
  transform: skewX(-10deg) translateX(10px);
}
.menu-list li.active::before { content: "▶"; font-size: .6em; }

/* ---- controles */
.controls { border-collapse: collapse; width: 100%; font-size: 15px; }
.controls th { text-align: left; padding: 6px 10px; color: var(--gold); letter-spacing: 1px; }
.controls td { padding: 7px 10px; border-top: 1px solid rgba(244, 234, 210, .15); }
kbd {
  display: inline-block;
  min-width: 26px;
  padding: 1px 7px;
  text-align: center;
  font: 700 13px/1.6 "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  border-radius: 4px;
  box-shadow: 0 3px 0 #a8987a;
}

/* ---- seleção de lutador */
.select-screen {
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, rgba(15, 6, 3, .7) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 62%, rgba(15, 6, 3, .85) 100%);
}
.select-title {
  margin-top: 3vh;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 54px);
  letter-spacing: 4px;
  color: var(--gold);
  text-shadow: 4px 4px 0 var(--blood);
  transform: skewX(-8deg);
}
.select-info {
  position: absolute;
  top: 15vh;
  width: min(24vw, 330px);
  padding: 16px 20px;
  background: rgba(26, 15, 10, .82);
  border-top: 4px solid var(--side);
  transition: opacity .2s;
}
.select-info.side0 { left: 3vw; --side: var(--p1); }
.select-info.side1 { right: 3vw; --side: var(--p2); text-align: right; }
.select-info.dim { opacity: .45; }
.select-info .who { font-weight: 800; letter-spacing: 3px; font-size: 13px; color: var(--side); }
.select-info .big-name {
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.15;
  letter-spacing: 3px;
  color: var(--cream);
  text-shadow: 4px 4px 0 var(--c);
}
.select-info .arch { font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.select-info .bio { font-size: 13px; line-height: 1.45; color: rgba(244, 234, 210, .85); min-height: 3.6em; }
.stats { margin-top: 10px; }
.stat { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; margin: 4px 0; }
.side1 .stat { flex-direction: row-reverse; }
.pips5 { display: flex; gap: 3px; }
.pips5 i { width: 18px; height: 8px; background: rgba(244, 234, 210, .18); transform: skewX(-20deg); }
.pips5 i.on { background: var(--gold); }
.select-info .state {
  margin-top: 12px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 2px;
  color: rgba(244, 234, 210, .6);
}
.select-info .state.ready { color: var(--gold); text-shadow: 2px 2px 0 var(--blood); }

.cards { position: absolute; bottom: 9vh; display: flex; gap: 14px; }
.card {
  position: relative;
  width: clamp(84px, 9vw, 120px);
  height: clamp(104px, 11vw, 148px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--c, #555) 0%, var(--d, #222) 100%);
  border: 3px solid rgba(244, 234, 210, .5);
  transform: skewX(-8deg);
  cursor: pointer;
  transition: transform .1s, border-color .1s;
}
.card.random { --c: #555; --d: #1d1d1d; }
.card b {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 5vw, 66px);
  line-height: 1.1;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, .4);
}
.card span { font-weight: 800; letter-spacing: 2px; font-size: 13px; }
.card.sel0, .card.sel1 { transform: skewX(-8deg) translateY(-8px); }
.card.sel0 { border-color: var(--p1); box-shadow: 0 0 0 3px var(--p1); }
.card.sel1 { border-color: var(--p2); box-shadow: 0 0 0 3px var(--p2); }
.card.sel0.sel1 { box-shadow: 0 0 0 3px var(--p1), 0 0 0 7px var(--p2); }
.card.locked0, .card.locked1 { filter: brightness(1.25); }
.cur {
  position: absolute;
  top: -26px;
  padding: 1px 7px;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
  display: none;
}
.cur.on { display: block; }
.cur.c0 { left: -4px; background: var(--p1); }
.cur.c1 { right: -4px; background: var(--p2); }
.select-screen .hint, .stage-screen .hint { position: absolute; bottom: 3vh; }
.select-flash {
  position: absolute;
  pointer-events: none; /* invisível até confirmar: não pode roubar o toque dos cards */
  top: 38%;
  font-family: var(--display);
  font-size: clamp(60px, 10vw, 140px);
  letter-spacing: 6px;
  color: #fff4d0;
  -webkit-text-stroke: 3px var(--blood);
  text-shadow: 6px 6px 0 rgba(0, 0, 0, .45);
  opacity: 0;
  transform: scale(1.6) skewX(-8deg);
  transition: opacity .15s, transform .15s;
}
.select-flash.show { opacity: 1; transform: scale(1) skewX(-8deg); }

/* tela estreita: painéis de info menores */
@media (max-width: 760px) {
  .select-info { top: auto; bottom: calc(9vh + 150px); width: 44vw; padding: 10px 12px; }
  .select-info .bio, .stats { display: none; }
  .main-menu .panel { margin-left: 4vw; }
}

/* avisos grandes somem quando há menu por cima da luta */
body.paused #center { display: none; }

/* ---- seleção de cenário */
.stage-screen {
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, rgba(15, 6, 3, .65) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 55%, rgba(15, 6, 3, .85) 100%);
}
.stage-cards { position: absolute; bottom: 10vh; display: flex; gap: 18px; }
.stage-card {
  width: clamp(150px, 17vw, 240px);
  padding: 8px 8px 12px;
  background: rgba(26, 15, 10, .9);
  border: 3px solid rgba(244, 234, 210, .45);
  transform: skewX(-6deg);
  cursor: pointer;
  transition: transform .1s, border-color .1s, box-shadow .1s;
}
.stage-art {
  height: clamp(70px, 8vw, 110px);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 54px;
  background: linear-gradient(180deg, var(--sky, #444) 0 58%, var(--ground, #222) 58% 100%);
}
.stage-card.random .stage-art { background: linear-gradient(160deg, #555, #1d1d1d); }
.stage-card b { display: block; font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: 2px; }
.stage-card span { font-size: 12px; color: rgba(244, 234, 210, .75); }
.stage-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold), 8px 8px 0 rgba(0, 0, 0, .4);
  transform: skewX(-6deg) translateY(-10px);
}
.stage-card.active b { color: var(--gold); }
