* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #ff3b3b;
  --gold: #ffd200;
  --blue: #3aa0ff;
  --ink: #07060c;
}

body {
  min-height: 100vh;
  color: #fff;
  font-family: 'Bebas Neue', Impact, sans-serif;
  background: var(--ink);
  overflow-x: hidden;
}

.hidden { display: none !important; }

.screen {
  min-height: 100vh;
  width: 100%;
  padding: 1rem;
}

/* ——— MENU ——— */
.menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 60, 60, 0.25), transparent 50%),
    linear-gradient(180deg, #1a0a14 0%, #07060c 100%);
}
.eyebrow {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: #aaa;
  margin-bottom: 0.8rem;
}
.menu h1 {
  font-size: clamp(3rem, 12vw, 6.5rem);
  line-height: 0.9;
  color: var(--red);
  text-shadow:
    4px 4px 0 #000,
    0 0 30px rgba(255, 60, 60, 0.55);
  letter-spacing: 0.04em;
}
.lead {
  margin: 0.8rem 0 1.6rem;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
  color: var(--gold);
}
.btn-main {
  display: block;
  width: min(320px, 90%);
  margin: 0.45rem auto;
  padding: 0.95rem 1.4rem;
  font-family: inherit;
  font-size: 1.55rem;
  letter-spacing: 0.12em;
  border: 3px solid #fff;
  background: linear-gradient(180deg, #ff5a3a, #c20);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 0 #400, 0 0 24px rgba(255, 60, 60, 0.35);
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #400, 0 0 30px rgba(255, 200, 0, 0.4);
}
.btn-main:active { transform: translateY(2px); box-shadow: 0 2px 0 #400; }
.controls {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: #999;
  flex-wrap: wrap;
  justify-content: center;
  text-align: left;
}
.controls strong { color: #fff; letter-spacing: 0.08em; }

/* ——— SELECT SCREEN ——— */
.select {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem 1.25rem;
  overflow: hidden;
}
.select-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(40, 80, 180, 0.18), transparent 30%, transparent 70%, rgba(180, 40, 40, 0.18)),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.02) 3px, rgba(255,255,255,0.02) 4px),
    radial-gradient(ellipse at center, #241028 0%, #0a0812 70%);
  z-index: 0;
}
.select > *:not(.select-bg) { position: relative; z-index: 1; }

.select-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.select-title {
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  letter-spacing: 0.14em;
  color: var(--gold);
  text-shadow: 3px 3px 0 #000, 0 0 18px rgba(255, 210, 0, 0.45);
  text-align: center;
}
.blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }

.btn-tiny, .ghost, .restart {
  font-family: inherit;
  letter-spacing: 0.08em;
  cursor: pointer;
  border: 2px solid #666;
  background: transparent;
  color: #ddd;
  padding: 0.45rem 0.8rem;
  font-size: 1rem;
}
.btn-tiny { justify-self: start; }
.btn-tiny:hover, .ghost:hover { border-color: #fff; color: #fff; }
.mode-pill {
  justify-self: end;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  padding: 0.45rem 0.7rem;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.select-stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr minmax(160px, 240px);
  gap: 0.75rem;
  align-items: stretch;
  min-height: 0;
}
@media (max-width: 900px) {
  .select-stage {
    grid-template-columns: 1fr;
  }
  .fighter-panel { order: 2; }
  .select-center { order: 1; }
  .fighter-panel.p2 { order: 3; }
  .select-stage .fighter-panel {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.75rem;
  }
  .fighter-panel canvas { width: 110px; height: 150px; }
  .panel-banner { grid-column: 1 / -1; }
}

.fighter-panel {
  border: 3px solid rgba(255,255,255,0.2);
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(20,10,30,0.75));
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}
.fighter-panel.p1 { border-color: var(--blue); box-shadow: 0 0 24px rgba(58,160,255,0.25), inset 0 0 40px rgba(0,0,0,0.5); }
.fighter-panel.p2 { border-color: var(--red); box-shadow: 0 0 24px rgba(255,60,60,0.25), inset 0 0 40px rgba(0,0,0,0.5); }
.fighter-panel.active-pick {
  animation: panelPulse 0.8s ease-in-out infinite;
}
@keyframes panelPulse {
  50% { filter: brightness(1.15); }
}
.panel-banner {
  width: 100%;
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 0.16em;
  padding: 0.2rem;
  margin-bottom: 0.35rem;
  background: #111;
}
.fighter-panel.p1 .panel-banner { color: var(--blue); }
.fighter-panel.p2 .panel-banner { color: var(--red); }
.fighter-panel canvas {
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 220 / 300;
  image-rendering: auto;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(255,255,255,0.08), transparent 55%),
    linear-gradient(180deg, #1a1428, #0d0a14);
}
.panel-meta { width: 100%; text-align: center; margin-top: 0.4rem; }
.fighter-name {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.1em;
  line-height: 1;
}
.fighter-panel.p1 .fighter-name { color: var(--blue); text-shadow: 0 0 12px rgba(58,160,255,0.5); }
.fighter-panel.p2 .fighter-name { color: var(--red); text-shadow: 0 0 12px rgba(255,60,60,0.5); }
.fighter-tag {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: #bbb;
  margin: 0.2rem 0 0.5rem;
}
.stat-bars {
  display: grid;
  gap: 0.28rem;
  text-align: left;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  color: #ccc;
}
.stat-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 0.35rem;
}
.stat-track {
  height: 8px;
  background: #222;
  border: 1px solid #555;
  overflow: hidden;
}
.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--red));
  width: 0;
  transition: width 0.2s ease;
}

.select-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-width: 0;
}
.vs-badge {
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: var(--gold);
  text-shadow: 4px 4px 0 #000, 0 0 20px rgba(255,210,0,0.55);
  letter-spacing: 0.08em;
  animation: vsPop 1.4s ease-in-out infinite;
}
@keyframes vsPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.roster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  width: min(520px, 100%);
}
.char-card {
  position: relative;
  border: 3px solid #444;
  background: linear-gradient(180deg, #1a1424, #0c0a12);
  padding: 0.35rem 0.25rem 0.4rem;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: transform 0.1s, border-color 0.1s, box-shadow 0.1s;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.char-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.65));
  pointer-events: none;
}
.char-card img {
  width: 90%;
  height: auto;
  max-height: 78%;
  image-rendering: auto;
  object-fit: contain;
  object-position: center bottom;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.65));
  background: transparent;
}
.char-card span {
  position: relative;
  z-index: 1;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.char-card:hover { transform: translateY(-3px); border-color: #aaa; }
.char-card.cursor {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px #000, 0 0 18px rgba(255, 210, 0, 0.65);
  transform: scale(1.05);
  z-index: 2;
}
.char-card.selected-p1 {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
}
.char-card.selected-p2 {
  outline: 3px solid var(--red);
  outline-offset: -3px;
}
.char-card.selected-p1.selected-p2 {
  outline-color: var(--gold);
}
.char-card .corner {
  position: absolute;
  top: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 2;
  padding: 0 3px;
  background: #000;
}
.char-card .corner.p1 { left: 3px; color: var(--blue); }
.char-card .corner.p2 { right: 3px; color: var(--red); }

.select-hint {
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: #bbb;
  text-align: center;
  min-height: 1.3em;
}
.btn-fight {
  font-family: inherit;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.2em;
  padding: 0.55rem 2.2rem;
  border: 4px solid #fff;
  background: linear-gradient(180deg, #ffd200, #ff6a00);
  color: #1a0a00;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(255, 180, 0, 0.45);
  transition: transform 0.1s, opacity 0.2s, filter 0.2s;
}
.btn-fight:disabled {
  opacity: 0.35;
  filter: grayscale(0.6);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-fight:not(:disabled) {
  animation: fightPulse 0.7s ease-in-out infinite;
}
@keyframes fightPulse {
  50% { transform: scale(1.06); filter: brightness(1.1); }
}

/* ——— GAME ——— */
.game {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #050508;
}
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  width: min(960px, 100%);
}
.hud-name {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  min-width: 4.5rem;
}
.hud-name.left { text-align: left; color: var(--gold); }
.hud-name.right { text-align: right; color: var(--blue); }
.health-bar {
  flex: 1;
  height: 22px;
  background: #333;
  border: 2px solid #fff;
  overflow: hidden;
}
.health-bar .fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ffcc00, #ff4d4d);
  transition: width 0.15s linear;
}
#hp2 {
  background: linear-gradient(90deg, #4d79ff, #994dff);
  float: right;
}
.timer {
  font-size: 2rem;
  font-weight: 800;
  width: 70px;
  text-align: center;
}
.special-hud {
  display: flex;
  justify-content: space-between;
  width: min(960px, 100%);
  margin: 0 0 0.35rem;
  font-family: 'Bebas Neue', Impact, sans-serif;
  letter-spacing: 0.08em;
}
.sp-pill {
  font-size: 0.95rem;
  padding: 0.2rem 0.65rem;
  border: 2px solid #555;
  color: #888;
  background: rgba(0,0,0,0.45);
}
.sp-pill.ready {
  color: #ffd200;
  border-color: #ffd200;
  box-shadow: 0 0 12px rgba(255, 210, 0, 0.35);
  animation: fightPulse 1.2s ease-in-out infinite;
}
.controls em { color: #ffd200; font-style: normal; }
#stage {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16/9;
  background: #111;
  border: 3px solid #fff;
  box-shadow: 0 0 30px rgba(255, 77, 77, 0.2);
}
.game { position: relative; }
.message {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  letter-spacing: 0.08em;
  text-shadow: 0 0 20px #000, 4px 4px 0 #000;
  color: var(--gold);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}
.message.show { opacity: 1; }
.game-actions { margin-top: 0.8rem; display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.restart {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}
.restart:hover { filter: brightness(1.1); }
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #ff3b3b;
  --gold: #ffd200;
  --blue: #3aa0ff;
  --ink: #07060c;
}

body {
  min-height: 100vh;
  color: #fff;
  font-family: 'Bebas Neue', Impact, sans-serif;
  background: var(--ink);
  overflow-x: hidden;
}

.hidden { display: none !important; }

.screen {
  min-height: 100vh;
  width: 100%;
  padding: 1rem;
}

/* ——— MENU ——— */
.menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 60, 60, 0.25), transparent 50%),
    linear-gradient(180deg, #1a0a14 0%, #07060c 100%);
}
.eyebrow {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: #aaa;
  margin-bottom: 0.8rem;
}
.menu h1 {
  font-size: clamp(3rem, 12vw, 6.5rem);
  line-height: 0.9;
  color: var(--red);
  text-shadow:
    4px 4px 0 #000,
    0 0 30px rgba(255, 60, 60, 0.55);
  letter-spacing: 0.04em;
}
.lead {
  margin: 0.8rem 0 1.6rem;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
  color: var(--gold);
}
.btn-main {
  display: block;
  width: min(320px, 90%);
  margin: 0.45rem auto;
  padding: 0.95rem 1.4rem;
  font-family: inherit;
  font-size: 1.55rem;
  letter-spacing: 0.12em;
  border: 3px solid #fff;
  background: linear-gradient(180deg, #ff5a3a, #c20);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 0 #400, 0 0 24px rgba(255, 60, 60, 0.35);
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #400, 0 0 30px rgba(255, 200, 0, 0.4);
}
.btn-main:active { transform: translateY(2px); box-shadow: 0 2px 0 #400; }
.controls {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: #999;
  flex-wrap: wrap;
  justify-content: center;
  text-align: left;
}
.controls strong { color: #fff; letter-spacing: 0.08em; }

/* ——— SELECT SCREEN ——— */
.select {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem 1.25rem;
  overflow: hidden;
}
.select-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(40, 80, 180, 0.18), transparent 30%, transparent 70%, rgba(180, 40, 40, 0.18)),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.02) 3px, rgba(255,255,255,0.02) 4px),
    radial-gradient(ellipse at center, #241028 0%, #0a0812 70%);
  z-index: 0;
}
.select > *:not(.select-bg) { position: relative; z-index: 1; }

.select-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.select-title {
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  letter-spacing: 0.14em;
  color: var(--gold);
  text-shadow: 3px 3px 0 #000, 0 0 18px rgba(255, 210, 0, 0.45);
  text-align: center;
}
.blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }

.btn-tiny, .ghost, .restart {
  font-family: inherit;
  letter-spacing: 0.08em;
  cursor: pointer;
  border: 2px solid #666;
  background: transparent;
  color: #ddd;
  padding: 0.45rem 0.8rem;
  font-size: 1rem;
}
.btn-tiny { justify-self: start; }
.btn-tiny:hover, .ghost:hover { border-color: #fff; color: #fff; }
.mode-pill {
  justify-self: end;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  padding: 0.45rem 0.7rem;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.select-stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr minmax(160px, 240px);
  gap: 0.75rem;
  align-items: stretch;
  min-height: 0;
}
@media (max-width: 900px) {
  .select-stage {
    grid-template-columns: 1fr;
  }
  .fighter-panel { order: 2; }
  .select-center { order: 1; }
  .fighter-panel.p2 { order: 3; }
  .select-stage .fighter-panel {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.75rem;
  }
  .fighter-panel canvas { width: 110px; height: 150px; }
  .panel-banner { grid-column: 1 / -1; }
}

.fighter-panel {
  border: 3px solid rgba(255,255,255,0.2);
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(20,10,30,0.75));
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}
.fighter-panel.p1 { border-color: var(--blue); box-shadow: 0 0 24px rgba(58,160,255,0.25), inset 0 0 40px rgba(0,0,0,0.5); }
.fighter-panel.p2 { border-color: var(--red); box-shadow: 0 0 24px rgba(255,60,60,0.25), inset 0 0 40px rgba(0,0,0,0.5); }
.fighter-panel.active-pick {
  animation: panelPulse 0.8s ease-in-out infinite;
}
@keyframes panelPulse {
  50% { filter: brightness(1.15); }
}
.panel-banner {
  width: 100%;
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 0.16em;
  padding: 0.2rem;
  margin-bottom: 0.35rem;
  background: #111;
}
.fighter-panel.p1 .panel-banner { color: var(--blue); }
.fighter-panel.p2 .panel-banner { color: var(--red); }
.fighter-panel canvas {
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 220 / 300;
  image-rendering: auto;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(255,255,255,0.08), transparent 55%),
    linear-gradient(180deg, #1a1428, #0d0a14);
}
.panel-meta { width: 100%; text-align: center; margin-top: 0.4rem; }
.fighter-name {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.1em;
  line-height: 1;
}
.fighter-panel.p1 .fighter-name { color: var(--blue); text-shadow: 0 0 12px rgba(58,160,255,0.5); }
.fighter-panel.p2 .fighter-name { color: var(--red); text-shadow: 0 0 12px rgba(255,60,60,0.5); }
.fighter-tag {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: #bbb;
  margin: 0.2rem 0 0.5rem;
}
.stat-bars {
  display: grid;
  gap: 0.28rem;
  text-align: left;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  color: #ccc;
}
.stat-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 0.35rem;
}
.stat-track {
  height: 8px;
  background: #222;
  border: 1px solid #555;
  overflow: hidden;
}
.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--red));
  width: 0;
  transition: width 0.2s ease;
}

.select-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-width: 0;
}
.vs-badge {
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: var(--gold);
  text-shadow: 4px 4px 0 #000, 0 0 20px rgba(255,210,0,0.55);
  letter-spacing: 0.08em;
  animation: vsPop 1.4s ease-in-out infinite;
}
@keyframes vsPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.roster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  width: min(520px, 100%);
}
.char-card {
  position: relative;
  border: 3px solid #444;
  background: linear-gradient(180deg, #1a1424, #0c0a12);
  padding: 0.35rem 0.25rem 0.4rem;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: transform 0.1s, border-color 0.1s, box-shadow 0.1s;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.char-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.65));
  pointer-events: none;
}
.char-card img {
  width: 90%;
  height: auto;
  max-height: 78%;
  image-rendering: auto;
  object-fit: contain;
  object-position: center bottom;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.65));
  background: transparent;
}
.char-card span {
  position: relative;
  z-index: 1;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.char-card:hover { transform: translateY(-3px); border-color: #aaa; }
.char-card.cursor {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px #000, 0 0 18px rgba(255, 210, 0, 0.65);
  transform: scale(1.05);
  z-index: 2;
}
.char-card.selected-p1 {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
}
.char-card.selected-p2 {
  outline: 3px solid var(--red);
  outline-offset: -3px;
}
.char-card.selected-p1.selected-p2 {
  outline-color: var(--gold);
}
.char-card .corner {
  position: absolute;
  top: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 2;
  padding: 0 3px;
  background: #000;
}
.char-card .corner.p1 { left: 3px; color: var(--blue); }
.char-card .corner.p2 { right: 3px; color: var(--red); }

.select-hint {
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: #bbb;
  text-align: center;
  min-height: 1.3em;
}
.btn-fight {
  font-family: inherit;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.2em;
  padding: 0.55rem 2.2rem;
  border: 4px solid #fff;
  background: linear-gradient(180deg, #ffd200, #ff6a00);
  color: #1a0a00;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(255, 180, 0, 0.45);
  transition: transform 0.1s, opacity 0.2s, filter 0.2s;
}
.btn-fight:disabled {
  opacity: 0.35;
  filter: grayscale(0.6);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-fight:not(:disabled) {
  animation: fightPulse 0.7s ease-in-out infinite;
}
@keyframes fightPulse {
  50% { transform: scale(1.06); filter: brightness(1.1); }
}

/* ——— GAME ——— */
.game {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #050508;
}
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  width: min(960px, 100%);
}
.hud-name {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  min-width: 4.5rem;
}
.hud-name.left { text-align: left; color: var(--gold); }
.hud-name.right { text-align: right; color: var(--blue); }
.health-bar {
  flex: 1;
  height: 22px;
  background: #333;
  border: 2px solid #fff;
  overflow: hidden;
}
.health-bar .fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ffcc00, #ff4d4d);
  transition: width 0.15s linear;
}
#hp2 {
  background: linear-gradient(90deg, #4d79ff, #994dff);
  float: right;
}
.timer {
  font-size: 2rem;
  font-weight: 800;
  width: 70px;
  text-align: center;
}
.special-hud {
  display: flex;
  justify-content: space-between;
  width: min(960px, 100%);
  margin: 0 0 0.35rem;
  font-family: 'Bebas Neue', Impact, sans-serif;
  letter-spacing: 0.08em;
}
.sp-pill {
  font-size: 0.95rem;
  padding: 0.2rem 0.65rem;
  border: 2px solid #555;
  color: #888;
  background: rgba(0,0,0,0.45);
}
.sp-pill.ready {
  color: #ffd200;
  border-color: #ffd200;
  box-shadow: 0 0 12px rgba(255, 210, 0, 0.35);
  animation: fightPulse 1.2s ease-in-out infinite;
}
.controls em { color: #ffd200; font-style: normal; }
#stage {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16/9;
  background: #111;
  border: 3px solid #fff;
  box-shadow: 0 0 30px rgba(255, 77, 77, 0.2);
}
.game { position: relative; }
.message {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  letter-spacing: 0.08em;
  text-shadow: 0 0 20px #000, 4px 4px 0 #000;
  color: var(--gold);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}
.message.show { opacity: 1; }
.game-actions { margin-top: 0.8rem; display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.restart {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}
.restart:hover { filter: brightness(1.1); }
