/* ================= NEON DUEL ARENA — UI ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05070f;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #eaf6ff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#game { position: fixed; inset: 0; display: block; }

.hidden { display: none !important; }

kbd {
  display: inline-block;
  min-width: 26px;
  padding: 3px 7px;
  margin: 1px;
  font: 700 12px Consolas, monospace;
  text-align: center;
  color: #dff6ff;
  background: rgba(90, 230, 255, 0.08);
  border: 1px solid rgba(90, 230, 255, 0.45);
  border-bottom-width: 3px;
  border-radius: 6px;
}

/* ---------- overlays ---------- */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(6, 10, 24, 0.62) 0%, rgba(3, 5, 12, 0.9) 100%);
  z-index: 20;
  animation: ovIn 0.25s ease;
}
@keyframes ovIn { from { opacity: 0; } to { opacity: 1; } }

.menuBox {
  background: linear-gradient(165deg, rgba(15, 21, 40, 0.97), rgba(9, 12, 26, 0.97));
  border: 1px solid rgba(88, 230, 255, 0.32);
  border-radius: 18px;
  padding: 40px 52px;
  text-align: center;
  box-shadow:
    0 0 80px rgba(64, 200, 255, 0.13),
    inset 0 0 46px rgba(88, 230, 255, 0.05);
  max-width: 640px;
  width: min(94vw, 640px);
  max-height: 92vh;
  overflow-y: auto;
}
.menuBox.small { max-width: 460px; }
.menuBox.wide { max-width: 720px; }
.menuBox.matchEnd { border-color: rgba(255, 209, 102, 0.4); }

.title {
  font-size: clamp(28px, 4.8vw, 46px);
  font-weight: 800;
  letter-spacing: 3px;
  line-height: 1.05;
  color: #eaf6ff;
  text-shadow: 0 0 26px rgba(88, 230, 255, 0.55);
  white-space: nowrap;
}
.title span {
  color: #ff4fd8;
  text-shadow: 0 0 30px rgba(255, 79, 216, 0.85);
}

.subtitle {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 6px;
  color: #8fa8d8;
  text-transform: uppercase;
}

.h2 {
  font-size: 30px;
  letter-spacing: 5px;
  margin-bottom: 16px;
}
.h2.cyan { color: #58e6ff; text-shadow: 0 0 22px rgba(88, 230, 255, 0.6); }

.btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 13px 28px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #eaf6ff;
  background: rgba(88, 230, 255, 0.07);
  border: 1px solid rgba(88, 230, 255, 0.42);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover {
  background: rgba(88, 230, 255, 0.16);
  box-shadow: 0 0 22px rgba(88, 230, 255, 0.35);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn.primary {
  background: linear-gradient(160deg, rgba(88, 230, 255, 0.22), rgba(88, 230, 255, 0.06));
  border-color: rgba(120, 240, 255, 0.75);
  box-shadow: 0 0 18px rgba(88, 230, 255, 0.25);
}
.btn.big { font-size: 20px; padding: 16px; }

.enterHint {
  margin-top: 14px;
  font-size: 11.5px;
  letter-spacing: 1px;
  color: #7e93bd;
}

.gold { color: #ffd166; }

/* ---------- how to play ---------- */
.howGrid { display: flex; gap: 14px; margin-bottom: 14px; }
.howCol {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  background: rgba(10, 16, 32, 0.7);
}
.howCol.p1col { border: 1px solid rgba(88, 230, 255, 0.35); }
.howCol.p2col { border: 1px solid rgba(255, 79, 216, 0.35); }
.howCol h3 {
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.p1col h3 { color: #58e6ff; }
.p2col h3 { color: #ff4fd8; }
.keys { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.keys td { padding: 5px 4px; text-align: left; color: #c6d6ef; }
.keys td:first-child { white-space: nowrap; width: 1%; }

.howTips {
  text-align: left;
  font-size: 12.5px;
  line-height: 1.55;
  color: #b7c8e6;
  background: rgba(8, 12, 26, 0.6);
  border: 1px solid rgba(140, 160, 220, 0.15);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.howTips p { margin: 3px 0; }
.howTips b { color: #fff; }

/* ---------- settings ---------- */
.setRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0;
  font-size: 13px;
  letter-spacing: 2px;
  color: #b7c8e6;
}
.setRow input[type="range"] { width: 190px; accent-color: #58e6ff; cursor: pointer; }
.tglBtn {
  min-width: 76px;
  padding: 7px 14px;
  font: 700 13px "Segoe UI", sans-serif;
  letter-spacing: 2px;
  color: #05131c;
  background: #58e6ff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(88, 230, 255, 0.45);
}
.tglBtn.off {
  color: #c6d6ef;
  background: rgba(120, 140, 180, 0.18);
  box-shadow: none;
}

.volMini { display: flex; gap: 18px; justify-content: center; margin-top: 16px; font-size: 11px; color: #8fa8d8; }
.volMini input { width: 92px; vertical-align: middle; accent-color: #58e6ff; }

.creditsBody { font-size: 13.5px; line-height: 1.7; color: #b7c8e6; margin-bottom: 10px; }
.credTitle { font-size: 17px; letter-spacing: 4px; color: #58e6ff; margin-bottom: 8px; }
.dim { color: #66799c; font-size: 11.5px; letter-spacing: 2px; }

.pauseScore { font: 700 30px Consolas, monospace; letter-spacing: 6px; margin-bottom: 14px; color: #ffd166; }

/* ---------- map select ---------- */
.menuBox.mapSelect {
  max-width: 980px;
  width: min(96vw, 980px);
  max-height: min(96vh, 96dvh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 22px 28px 14px;
  gap: 0;
  justify-content: center;
}

.mapLayout {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 4px;
  flex: 1 1 auto;
  min-height: 0;
}

.mapCards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1 1 46%;
  align-content: start;
  min-height: 0;
}
.mapCard {
  position: relative;
  padding: 10px 12px 9px;
  text-align: left;
  background: rgba(10, 16, 32, 0.72);
  border: 1px solid rgba(120, 150, 220, 0.25);
  border-radius: 10px;
  cursor: pointer;
  color: #eaf6ff;
  font-family: inherit;
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.mapCard:hover { transform: translateY(-2px); border-color: rgba(160, 200, 255, 0.55); }
.mapCard .mcName { font-size: 13.5px; font-weight: 800; letter-spacing: 1.5px; margin-bottom: 2px; }
.mapCard .mcTag { font-size: 10px; color: #9fb3d9; line-height: 1.3; }
.mapCard .mcTrait { display: inline-block; margin-top: 5px; font-size: 8.5px; letter-spacing: 1.2px; color: #cfe6ff; background: rgba(120,180,255,0.10); border: 1px solid rgba(120,180,255,0.22); border-radius: 5px; padding: 2px 6px; }
.mapCard .mcKey { position: absolute; top: 8px; right: 10px; font: 700 11px Consolas, monospace; color: #7e93bd; }
.mapCard.selected {
  border-color: var(--ac, #58e6ff);
  box-shadow: 0 0 22px var(--acGlow, rgba(88, 230, 255, 0.35)), inset 0 0 18px var(--acGlow, rgba(88, 230, 255, 0.08));
  background: rgba(16, 26, 48, 0.85);
}
.mapCard.selected::after {
  content: '\2713';
  position: absolute;
  bottom: 8px; right: 10px;
  font: 800 14px "Segoe UI", sans-serif;
  color: var(--ac, #58e6ff);
}

.mapPreviewPanel {
  flex: 1 1 54%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(120, 150, 220, 0.25);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(6, 9, 18, 0.8);
  min-height: 0;
  max-height: 100%;
}
#mapPreview { width: 100%; height: auto; max-height: 34vh; object-fit: contain; display: block; flex: 1 1 auto; min-height: 0; }
.mapMeta { padding: 8px 12px 9px; text-align: left; flex: 0 0 auto; }
.mapName { font-size: 15px; font-weight: 800; letter-spacing: 2.5px; color: #fff; text-shadow: 0 0 14px var(--acGlow, rgba(88,230,255,0.5)); }
.mapTrait { font-size: 9px; letter-spacing: 1.6px; color: #8fd8ff; margin: 2px 0 4px; }
.mapDesc { font-size: 11px; color: #b7c8e6; line-height: 1.35; }

.mapBtnRow { display: flex; gap: 8px; margin-top: 8px; }
.mapBtnRow .btn { margin-top: 0; font-size: 15px; padding: 11px 18px; }
.mapBtnRow .btn.primary { flex: 2; }
.mapBtnRow .btn:not(.primary) { flex: 1; }

.menuBox.mapSelect .h2 { font-size: 22px; letter-spacing: 4px; margin-bottom: 10px; }
.menuBox.mapSelect .enterHint { margin-top: 8px; font-size: 10.5px; letter-spacing: 0.8px; }

#tutDemo, #tutSurgeDemo {
  width: 100%;
  height: auto;
  display: block;
  background: rgba(6, 9, 18, 0.85);
  border: 1px solid rgba(120, 150, 220, 0.22);
  border-radius: 12px;
  margin-bottom: 12px;
}

/* ---------- 7-page tutorial styles ---------- */
.howtoBox {
  max-width: 760px;
  width: min(95vw, 760px);
  padding: 28px 36px;
}
.tutHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(120, 150, 220, 0.2);
  padding-bottom: 10px;
}
.tutHeader .h2 { margin-bottom: 0; font-size: 24px; color: #58e6ff; text-shadow: 0 0 16px rgba(88, 230, 255, 0.5); }
.tutPillRow { display: flex; gap: 6px; }
.tutPill {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(120, 150, 220, 0.4);
  background: rgba(6, 10, 22, 0.7);
  color: #8fa8d8;
  font: 700 11px Consolas, monospace;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.tutPill:hover { background: rgba(88, 230, 255, 0.2); color: #fff; border-color: #58e6ff; }
.tutPill.active {
  background: #58e6ff;
  color: #060912;
  border-color: #58e6ff;
  box-shadow: 0 0 12px #58e6ff;
  font-weight: 800;
}
.tutSub {
  font-size: 13px;
  line-height: 1.5;
  color: #b7c8e6;
  margin-bottom: 14px;
  text-align: left;
}
.tutTipBar {
  margin-top: 14px;
  padding: 8px 14px;
  background: rgba(88, 230, 255, 0.08);
  border: 1px solid rgba(88, 230, 255, 0.35);
  border-radius: 8px;
  font-size: 12px;
  color: #d0e8ff;
  text-align: left;
}
.tutTipBar.goldBar {
  background: rgba(255, 209, 102, 0.1);
  border-color: rgba(255, 209, 102, 0.45);
  color: #ffe8a3;
}
.tutNavRow {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.tutNavRow .btn { margin-top: 0; flex: 1; }

/* compare cards (Page 2) */
.compareGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; }
.compareCard {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(10, 18, 36, 0.75);
  border: 1px solid rgba(88, 230, 255, 0.35);
}
.compareCard.goldCard {
  background: rgba(26, 22, 10, 0.75);
  border-color: rgba(255, 209, 102, 0.6);
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.15);
}
.cyanTitle { color: #58e6ff; font-size: 14px; letter-spacing: 2px; margin-bottom: 4px; }
.goldTitle { color: #ffd166; font-size: 14px; letter-spacing: 2px; margin-bottom: 4px; text-shadow: 0 0 10px #ffd166; }
.compareCard p { font-size: 12px; color: #8fa8d8; margin-bottom: 8px; }
.tutList { list-style: none; padding: 0; margin: 0; font-size: 12px; color: #eaf6ff; }
.tutList li { margin-bottom: 4px; padding-left: 14px; position: relative; }
.tutList li::before { content: "•"; position: absolute; left: 0; color: #58e6ff; }
.goldCard .tutList li::before { color: #ffd166; }

/* power cards (Page 3) */
.powerCardsGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: left;
}
.powerCardMini {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(10, 18, 36, 0.75);
  border: 1px solid var(--pc, rgba(88,230,255,0.4));
  box-shadow: inset 0 0 12px rgba(0,0,0,0.5), 0 0 10px rgba(0,0,0,0.3);
}
.pcHead { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; color: var(--pc, #fff); margin-bottom: 4px; }
.pcIcon { margin-right: 4px; }
.pcDesc { font-size: 11px; color: #b7c8e6; line-height: 1.35; }

/* surge cards (Page 4) */
.surgeGainGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
  margin-top: 10px;
}
.surgeGainCard {
  padding: 10px 8px;
  border-radius: 8px;
  background: rgba(10, 22, 38, 0.75);
  border: 1px solid rgba(255, 209, 102, 0.4);
}
.surgeGainCard.drainCard {
  background: rgba(30, 12, 18, 0.75);
  border-color: rgba(255, 82, 82, 0.4);
}
.sgTitle { font: 800 12px Consolas, monospace; color: #ffd166; margin-bottom: 3px; }
.drainCard .sgTitle { color: #ff5252; }
.sgDesc { font-size: 10.5px; color: #b7c8e6; }

/* event cards (Page 5) */
.eventCardsGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
}
.eventCardMini {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(8, 14, 28, 0.8);
  border: 1px solid var(--ec, #58e6ff);
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
}
.ecArena { font: 700 9px "Segoe UI", sans-serif; letter-spacing: 2px; color: #7e93bd; }
.ecTitle { font: 800 13px "Segoe UI", sans-serif; letter-spacing: 2px; color: var(--ec, #fff); margin: 2px 0 4px; }
.ecDesc { font-size: 11px; color: #b7c8e6; line-height: 1.35; }

/* mutator cards (Page 6) */
.mutatorGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  text-align: left;
}
.mutatorCard {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(12, 18, 34, 0.8);
  border: 1px solid rgba(170, 195, 235, 0.3);
}
.mcTitle { font: 800 11.5px "Segoe UI", sans-serif; letter-spacing: 1px; color: #ffd166; margin-bottom: 3px; }
.mcDesc { font-size: 10.5px; color: #b7c8e6; line-height: 1.35; }

/* summary recap (Page 7) */
.summaryRecap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
  margin-top: 10px;
}
.recapItem {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(10, 20, 40, 0.8);
  border: 1px solid rgba(88, 230, 255, 0.3);
  font-size: 12px;
  color: #d0e8ff;
  line-height: 1.4;
}
.recapTag { font-weight: 800; color: #58e6ff; display: block; margin-bottom: 2px; }

/* ---------- contextual in-game toast hint ---------- */
.toastHint {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  pointer-events: none;
  background: rgba(6, 12, 28, 0.92);
  border: 1px solid #ffd166;
  border-radius: 10px;
  padding: 8px 22px;
  text-align: center;
  box-shadow: 0 0 24px rgba(255, 209, 102, 0.35), inset 0 0 16px rgba(255, 209, 102, 0.08);
  animation: toastSlideIn 0.3s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.toastHint.out { animation: toastSlideOut 0.3s ease both; }
.toastTitle { font: 800 12px "Segoe UI", sans-serif; letter-spacing: 3px; color: #ffd166; text-transform: uppercase; }
.toastDesc { font: 600 11px "Segoe UI", sans-serif; letter-spacing: 1.5px; color: #eaf6ff; margin-top: 2px; }
@keyframes toastSlideIn { from { opacity: 0; transform: translate(-50%, -18px) scale(0.92); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes toastSlideOut { to { opacity: 0; transform: translate(-50%, -14px) scale(0.95); } }

/* ---------- match end ---------- */
.winnerTxt {
  font-size: clamp(28px, 5.4vw, 44px);
  font-weight: 800;
  letter-spacing: 5px;
  animation: winPulse 1s ease infinite alternate;
}
.winnerTxt.w1 { color: #58e6ff; text-shadow: 0 0 34px rgba(88, 230, 255, 0.8); }
.winnerTxt.w2 { color: #ff4fd8; text-shadow: 0 0 34px rgba(255, 79, 216, 0.8); }
@keyframes winPulse { from { transform: scale(1); } to { transform: scale(1.045); } }

.matchScore {
  font: 800 54px Consolas, monospace;
  letter-spacing: 10px;
  margin: 10px 0 2px;
  color: #ffd166;
  text-shadow: 0 0 24px rgba(255, 209, 102, 0.4);
}
.matchSub { font-size: 12px; letter-spacing: 4px; color: #8fa8d8; margin-bottom: 18px; text-transform: uppercase; }

/* ---------- HUD ---------- */
#hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: max(10px, env(safe-area-inset-top)) 16px 0;
}

.hudSide { width: min(340px, 34vw); }
.hudSide.p2 { text-align: right; }

.hudName {
  font-size: clamp(11px, 1.3vw, 14px);
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 4px;
  text-shadow: 0 0 12px currentColor;
}
.hudName .pip { margin-right: 7px; }
.hudName.right .pip { margin: 0 0 0 7px; }

.pip {
  display: inline-block;
  width: 10px; height: 10px;
  transform: rotate(45deg);
  vertical-align: 1px;
}
.pip.p1pip { background: #37e6ff; box-shadow: 0 0 10px #37e6ff; }
.pip.p2pip { background: #ff4fd8; box-shadow: 0 0 10px #ff4fd8; }

.hpTrack {
  position: relative;
  height: 20px;
  border: 1px solid rgba(160, 200, 255, 0.35);
  border-radius: 6px;
  background: rgba(6, 10, 22, 0.72);
  overflow: hidden;
}
.hpTrack.flip { transform: scaleX(-1); }
.hpTrack.flip .hpNum { transform: scaleX(-1); }

.hpGhost, .hpFill {
  position: absolute;
  top: 1px; left: 1px; bottom: 1px;
  border-radius: 5px;
}
.hpGhost { transition: width 0.7s ease 0.25s; opacity: 0.55; }
.g1 { background: #ff5a7a; box-shadow: 0 0 12px #ff5a7a; }
.g2 { background: #ff5a7a; box-shadow: 0 0 12px #ff5a7a; }
.hpFill { transition: width 0.12s ease; z-index: 1; }
.f1 { background: linear-gradient(90deg, #1488cc, #37e6ff); box-shadow: 0 0 14px rgba(55, 230, 255, 0.8); }
.f2 { background: linear-gradient(90deg, #a1148c, #ff4fd8); box-shadow: 0 0 14px rgba(255, 79, 216, 0.8); }
.hpFill.low { filter: saturate(1.4) brightness(1.25); animation: hpLow 0.55s ease infinite alternate; }
@keyframes hpLow { from { opacity: 1; } to { opacity: 0.62; } }

.hpNum {
  position: absolute;
  right: 7px;
  top: 50%;
  translate: 0 -50%;
  font: 800 12px Consolas, monospace;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  z-index: 2;
}

.hudRow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.hudRow.right { justify-content: flex-end; }

.cdWidget { display: flex; align-items: center; gap: 5px; }
.cdWidget label { font: 700 9px "Segoe UI", sans-serif; letter-spacing: 1px; color: #7e93bd; }
.cdTrack {
  width: 54px; height: 7px;
  border: 1px solid rgba(160, 200, 255, 0.3);
  border-radius: 4px;
  background: rgba(6, 10, 22, 0.7);
  overflow: hidden;
}
.cdFill { height: 100%; width: 100%; transition: width 0.08s linear; }
.c1 { background: linear-gradient(90deg, #1488cc, #58e6ff); }
.c2 { background: linear-gradient(90deg, #a1148c, #ff6fe0); }
.cdFill.ready { box-shadow: 0 0 8px currentColor; }

.surgeWidget { display: flex; align-items: center; gap: 5px; }
.surgeWidget label { font: 700 9px "Segoe UI", sans-serif; letter-spacing: 1px; color: #ffd166; }
.surgeTrack {
  width: 58px; height: 7px;
  border: 1px solid rgba(255, 209, 102, 0.4);
  border-radius: 4px;
  background: rgba(6, 10, 22, 0.7);
  overflow: hidden;
}
.surgeFill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #ff9e00, #ffd166);
  transition: width 0.1s linear;
}
.surgeFill.ready {
  box-shadow: 0 0 10px #ffd166;
  animation: surgeReadyPulse 0.6s ease infinite alternate;
}
@keyframes surgeReadyPulse { from { opacity: 0.85; filter: brightness(1); } to { opacity: 1; filter: brightness(1.35); } }

.powerBadge {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font: 800 10px "Segoe UI", system-ui, sans-serif;
  letter-spacing: 1.5px;
  color: #fff;
  background: rgba(10, 20, 38, 0.85);
  border: 1px solid rgba(88, 230, 255, 0.55);
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(88, 230, 255, 0.25);
  animation: badgeIn 0.25s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.powerBadge.right { float: right; }
@keyframes badgeIn { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.scorePips { display: flex; gap: 7px; }
.scorePips s {
  width: 13px; height: 13px;
  transform: rotate(45deg);
  text-decoration: none;
  border: 1px solid rgba(170, 195, 235, 0.5);
  background: transparent;
}
.p1 .scorePips s.won { background: #37e6ff; border-color: #bff5ff; box-shadow: 0 0 12px #37e6ff; animation: pipPop 0.4s ease; }
.p2 .scorePips s.won { background: #ff4fd8; border-color: #ffd0f4; box-shadow: 0 0 12px #ff4fd8; animation: pipPop 0.4s ease; }
@keyframes pipPop { 0% { transform: rotate(45deg) scale(2.1); } 100% { transform: rotate(45deg) scale(1); } }

.hudCenter { text-align: center; padding-top: 2px; min-width: 130px; }
.roundLabel {
  font-size: clamp(13px, 1.6vw, 17px);
  font-weight: 800;
  letter-spacing: 5px;
  color: #ffd166;
  text-shadow: 0 0 16px rgba(255, 209, 102, 0.55);
}
.roundClock {
  font: 700 12px Consolas, monospace;
  letter-spacing: 2px;
  color: #8fa8d8;
  margin-top: 2px;
}
.roundClock.hot { color: #ff7a5c; text-shadow: 0 0 10px rgba(255, 100, 80, 0.7); }

/* ---------- banner ---------- */
#bannerWrap {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.banner {
  font-size: clamp(44px, 9vw, 96px);
  font-weight: 900;
  letter-spacing: 12px;
  text-align: center;
  line-height: 1;
  text-shadow: 0 0 40px currentColor;
  animation: bannerIn 0.38s cubic-bezier(0.2, 1.6, 0.35, 1) both;
}
.bannerSub {
  margin-top: 14px;
  font-size: clamp(12px, 1.8vw, 17px);
  letter-spacing: 5px;
  color: #b7c8e6;
  text-transform: uppercase;
  animation: subIn 0.5s ease 0.12s both;
}
.banner.out { animation: bannerOut 0.3s ease both; }
.bannerSub.out { animation: bannerOut 0.25s ease both; }
@keyframes bannerIn {
  from { transform: scale(2.4); opacity: 0; filter: blur(6px); }
  to { transform: scale(1); opacity: 1; filter: blur(0); }
}
@keyframes subIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bannerOut { to { opacity: 0; transform: scale(0.86); } }

@media (max-height: 560px) {
  .menuBox { padding: 22px 34px; }
  .title { font-size: clamp(26px, 5vw, 40px); }
  .btn { padding: 10px 20px; font-size: 14px; margin-top: 8px; }
  .howTips { font-size: 11.5px; }
}

/* arena select — no-scroll compact scaling for Y8 embed heights */
@media (max-height: 800px) {
  .menuBox.mapSelect { padding: 18px 24px 12px; max-height: 96vh; overflow: hidden; }
  .menuBox.mapSelect .h2 { font-size: 20px; margin-bottom: 8px; }
  #mapPreview { max-height: 30vh; }
  .mapMeta { padding: 6px 10px 8px; }
  .mapBtnRow .btn { padding: 10px 16px; font-size: 14px; }
}
@media (max-height: 720px) {
  .menuBox.mapSelect { padding: 14px 20px 10px; gap: 0; }
  .menuBox.mapSelect .h2 { font-size: 18px; margin-bottom: 6px; letter-spacing: 3px; }
  .mapLayout { gap: 10px; }
  .mapCards { gap: 6px; }
  .mapCard { padding: 8px 10px 7px; }
  .mapCard .mcName { font-size: 12px; }
  .mapPreviewPanel { border-radius: 8px; }
  #mapPreview { max-height: 26vh; }
  .mapName { font-size: 14px; }
  .mapDesc { font-size: 10px; }
  .mapBtnRow { margin-top: 6px; gap: 6px; }
  .mapBtnRow .btn { padding: 9px 14px; font-size: 13px; }
  .menuBox.mapSelect .enterHint { margin-top: 6px; font-size: 10px; }
}
@media (max-height: 640px) {
  .menuBox.mapSelect { padding: 12px 18px 8px; }
  .menuBox.mapSelect .h2 { font-size: 16px; margin-bottom: 4px; }
  #mapPreview { max-height: 22vh; }
  .mapMeta { padding: 5px 8px 6px; }
  .mapBtnRow .btn { padding: 8px 12px; font-size: 12px; }
}

/* narrow / portrait: stack map layout, single-column cards */
@media (max-width: 860px) {
  .mapLayout { flex-direction: column; }
  .mapCards { grid-template-columns: 1fr 1fr; }
  .menuBox.mapSelect { max-height: 94vh; }
}
@media (max-width: 560px) {
  .mapCards { grid-template-columns: 1fr; }
}
