@import url('https://fonts.googleapis.com/css2?family=Pirata+One&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #07080d; --panel: #10121c; --panel2: #141724; --line: #2a2d3f;
  --teal: #2de8e8; --mag: #ff2ed0; --chrome: #cfd6e4;
  --gold: #ffd23e; --red: #ff4a3a; --green: #39d353;
  --txt: #e8ecf4; --dim: #8a92a8;
}
body {
  background: var(--bg); color: var(--txt);
  font-family: "Courier New", ui-monospace, monospace;
  min-height: 100vh;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 3px);
}
.goth { font-family: 'Pirata One', 'Courier New', cursive; font-weight: 400; letter-spacing: 2px; }

/* ---- top banner bar (all screens) ---- */
.topbar {
  display: flex; justify-content: center; align-items: center; position: relative;
  padding: 6px 18px; background: #0b0e1a;
  border-bottom: 1px solid var(--teal);
  box-shadow: 0 0 18px rgba(45, 232, 232, 0.25), 0 2px 24px rgba(255, 46, 208, 0.12);
}
.topbar-logo { height: 56px; display: block; image-rendering: auto; }
#sound-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.chip {
  background: var(--panel); color: var(--txt); border: 1px solid var(--line);
  font-family: inherit; font-weight: 700; font-size: 11px; padding: 6px 10px; cursor: pointer;
}
.chip:hover { border-color: var(--teal); color: var(--teal); }

.screen { display: none; }
.screen.active { display: block; }

/* ---- panels / setup ---- */
.panel { max-width: 660px; margin: 20px auto; padding: 26px; }
.panel.center { text-align: center; }
.hero-logo { display: block; margin: 0 auto 4px; width: min(330px, 70vw); filter: drop-shadow(0 0 24px rgba(45,232,232,0.25)); }
.tagline {
  text-align: center; color: var(--chrome); margin: 4px 0 6px;
  font-family: 'Pirata One', cursive; font-size: 22px; letter-spacing: 3px;
  text-shadow: 0 0 12px rgba(255, 46, 208, 0.5);
}
.tagline-sub { text-align: center; color: var(--dim); font-size: 12px; margin-bottom: 20px; }
.lbl {
  display: block; font-family: 'Pirata One', cursive; font-size: 17px; letter-spacing: 3px;
  color: var(--teal); margin: 18px 0 6px; text-shadow: 0 0 10px rgba(45,232,232,0.45);
}
.mini { background: none; border: none; color: var(--mag); font-family: inherit; font-size: 11px; cursor: pointer; text-decoration: underline; }
input {
  width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--txt);
  font-family: inherit; font-size: 14px; padding: 10px 11px; outline: none;
}
input:focus { border-color: var(--mag); box-shadow: 0 0 10px rgba(255,46,208,0.3); }
.size-row { display: flex; flex-wrap: wrap; gap: 6px; }
.size-btn {
  width: 44px; height: 36px; background: var(--panel); border: 1px solid var(--line);
  color: var(--txt); font-family: inherit; font-weight: 900; cursor: pointer;
}
.size-btn:hover { border-color: var(--teal); }
.size-btn.sel { background: var(--mag); color: #14040f; border-color: var(--mag); box-shadow: 0 0 12px rgba(255,46,208,0.6); }
.managers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.err { color: var(--red); font-size: 12px; min-height: 16px; margin-top: 8px; font-weight: 700; }
.big-btn {
  width: 100%; margin-top: 16px; padding: 14px; font-family: 'Pirata One', cursive;
  font-size: 24px; letter-spacing: 4px;
  background: linear-gradient(180deg, #ff41d9, #c9139e); color: #fff; border: 1px solid #ff7ae4;
  cursor: pointer; text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  box-shadow: 0 0 18px rgba(255,46,208,0.5), inset 0 1px 0 rgba(255,255,255,0.35);
}
.big-btn:hover { box-shadow: 0 0 28px rgba(255,46,208,0.8), inset 0 1px 0 rgba(255,255,255,0.35); }
.big-btn:active { transform: translateY(2px); }
.big-btn.slim { width: auto; padding: 10px 20px; font-size: 18px; }
.big-btn.alt {
  background: linear-gradient(180deg, #35f0f0, #12a8a8); color: #04201f; border-color: #8af5f5;
  box-shadow: 0 0 18px rgba(45,232,232,0.5), inset 0 1px 0 rgba(255,255,255,0.4);
}
.big-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.ghost-btn {
  background: none; border: 1px solid var(--line); color: var(--dim); font-family: inherit;
  font-weight: 700; padding: 8px 14px; margin: 10px 4px 0; cursor: pointer; font-size: 12px;
}
.ghost-btn:hover { border-color: var(--teal); color: var(--teal); }
.fine { color: var(--dim); font-size: 11px; text-align: center; margin-top: 14px; }

/* ---- stadium art backdrop on menu screens ---- */
#screen-select.active, #screen-results.active, #screen-replay.active {
  background:
    linear-gradient(rgba(5, 6, 11, 0.88), rgba(5, 6, 11, 0.94)),
    url('assets/stadium_corner.png') center / cover no-repeat;
  min-height: calc(100vh - 70px);
}

/* ---- character select ---- */
.select-wrap { max-width: 1000px; margin: 18px auto; padding: 0 16px; }
.select-head { text-align: center; margin-bottom: 12px; }
.select-title {
  font-family: 'Pirata One', cursive; color: var(--chrome); letter-spacing: 5px; font-size: 34px;
  text-shadow: 0 0 14px rgba(45,232,232,0.6), 3px 3px 0 #000;
}
.select-hint { color: var(--mag); font-size: 13px; font-weight: 700; margin-top: 4px; min-height: 18px; }
.select-body { display: flex; gap: 14px; align-items: flex-start; }
.select-managers { width: 210px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; }
.sel-mgr {
  display: flex; justify-content: space-between; gap: 6px; padding: 7px 9px; cursor: pointer;
  background: rgba(16, 18, 28, 0.9); border: 1px solid var(--line); font-size: 12px; font-weight: 700;
}
.sel-mgr.active { border-color: var(--mag); background: #1d1226; box-shadow: 0 0 10px rgba(255,46,208,0.35); }
.sel-mgr.done .sel-mgr-char { color: var(--teal); }
.sel-mgr-char { color: var(--dim); font-style: italic; text-align: right; }
.char-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.char-card {
  background: rgba(16, 18, 28, 0.92); border: 1px solid var(--line); cursor: pointer; text-align: center;
  padding: 6px 4px 8px; position: relative; transition: transform 0.08s;
}
.char-card:hover { border-color: var(--mag); transform: translateY(-2px); box-shadow: 0 0 12px rgba(255,46,208,0.35); }
.char-card.taken { border-color: var(--teal); box-shadow: 0 0 8px rgba(45,232,232,0.3); }
.char-card canvas { image-rendering: pixelated; width: 96px; height: 78px; }
.char-name { font-weight: 900; font-size: 11px; letter-spacing: 1px; }
.char-kit { color: var(--teal); font-size: 10px; font-style: italic; }
.char-badge { color: var(--teal); font-size: 9px; font-weight: 700; min-height: 11px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .select-body { flex-direction: column; } .select-managers { width: 100%; flex-direction: row; flex-wrap: wrap; } }

/* ---- fight stage ---- */
.stage { position: relative; max-width: 1100px; margin: 10px auto; }
#game {
  width: 100%; display: block;
  border: 1px solid var(--line); background: #07080d;
  box-shadow: 0 0 30px rgba(45, 232, 232, 0.12);
}
#fullscreen-btn {
  position: absolute; right: 10px; bottom: 10px; z-index: 5;
  background: rgba(8, 10, 20, 0.7); color: var(--txt); border: 1px solid var(--line);
  font-size: 18px; width: 40px; height: 36px; cursor: pointer; line-height: 1;
}
#fullscreen-btn:hover { border-color: var(--mag); color: var(--mag); }
.stage:fullscreen {
  display: flex; align-items: center; justify-content: center;
  background: #000; width: 100vw; height: 100vh; max-width: none; margin: 0;
}
.stage:fullscreen #game { width: min(100vw, calc(100vh * 16 / 9)); height: auto; border: none; }

#intro-card {
  position: absolute; top: 12%; left: 0; right: 0; display: flex; flex-direction: column;
  align-items: center; text-align: center; pointer-events: none;
  animation: introPop 0.9s ease;
}
#intro-card > * { background: rgba(5, 6, 12, 0.8); padding: 2px 22px; }
#intro-card.hidden { display: none; }
@keyframes introPop {
  0% { opacity: 0; } 12% { opacity: 1; }
  0% { transform: scale(0.9); } 15% { transform: scale(1.04); } 25% { transform: scale(1); }
}
.intro-now { color: var(--teal); letter-spacing: 5px; font-weight: 900; font-size: 14px; text-shadow: 0 0 8px rgba(45,232,232,0.7); }
.intro-portrait { image-rendering: pixelated; margin: 6px 0 2px; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.6)); }
.intro-name { font-family: 'Pirata One', cursive; color: #fff; font-size: 42px; letter-spacing: 4px; text-shadow: 0 0 16px rgba(255,46,208,0.7), 3px 3px 0 #000; }
.intro-arch { color: var(--mag); font-size: 16px; font-weight: 900; letter-spacing: 4px; text-shadow: 0 0 8px rgba(255,46,208,0.6); }

#banner {
  position: absolute; top: 34%; left: 0; right: 0; text-align: center; pointer-events: none;
  transition: opacity 0.4s;
}
#banner.hidden { opacity: 0; }
#banner.shown { opacity: 1; animation: bannerIn 0.35s ease; }
@keyframes bannerIn { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.banner-main {
  font-family: 'Pirata One', cursive; font-size: 66px; letter-spacing: 7px; color: var(--chrome);
  text-shadow: 0 0 24px rgba(255, 46, 208, 0.8), 0 0 40px rgba(45, 232, 232, 0.4), 4px 4px 0 #000;
}
.banner-sub { font-size: 15px; font-weight: 900; color: var(--teal); letter-spacing: 3px; text-shadow: 2px 2px 0 #000, 0 0 10px rgba(45,232,232,0.6); }

#feed {
  position: absolute; right: 8px; top: 88px; width: 320px; pointer-events: none;
  display: flex; flex-direction: column; gap: 4px;
}
.feed-line {
  background: rgba(6, 8, 16, 0.8); border-left: 3px solid var(--dim);
  color: var(--txt); font-size: 11px; font-weight: 700; padding: 5px 8px;
  animation: feedIn 0.25s ease; transition: opacity 0.8s;
}
.feed-line.fade { opacity: 0; }
.feed-line.feed-combo { border-left-color: var(--gold); color: var(--gold); }
.feed-line.feed-super { border-left-color: var(--teal); color: var(--teal); }
.feed-line.feed-elim { border-left-color: var(--mag); color: #ffb0ec; }
@keyframes feedIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- results ---- */
.results-kicker {
  font-family: 'Pirata One', cursive; color: var(--teal); font-size: 24px; letter-spacing: 6px;
  margin-top: 10px; text-shadow: 0 0 12px rgba(45,232,232,0.6);
}
.replay-league { font-family: 'Pirata One', cursive; font-size: 34px; margin: 6px 0; letter-spacing: 3px; text-shadow: 0 0 14px rgba(255,46,208,0.5); }
#results-list { margin: 18px auto; max-width: 480px; text-align: left; }
.pick-row {
  display: flex; align-items: center; gap: 12px; background: rgba(16, 18, 28, 0.92);
  border: 1px solid var(--line); padding: 10px 14px; margin-bottom: 6px;
  animation: pickIn 0.4s ease backwards;
}
.pick-row.first { border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 210, 62, 0.3); }
.pick-row.first .pick-name { color: var(--gold); }
.pick-row.r2 { border-color: #c9d0dc; }
.pick-row.r3 { border-color: #d9853a; }
.pick-row.r4 { border-color: #4a6ae8; }
.pick-row.r5 { border-color: #a86af2; }
@keyframes pickIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.pick-num { color: var(--mag); font-weight: 900; font-size: 12px; letter-spacing: 1px; width: 64px; }
.pick-name { font-weight: 900; font-size: 17px; flex: 1; letter-spacing: 1px; }
.pick-arch { color: var(--dim); font-size: 12px; font-style: italic; }
.btn-row { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }

@media (max-width: 700px) {
  .managers { grid-template-columns: 1fr; }
  .intro-name { font-size: 30px; }
  .banner-main { font-size: 40px; }
  #feed { width: 220px; }
  .topbar-logo { height: 42px; }
}
