/* game.css - Eggball's look around the field on the game and replay pages: the night-stadium
   backdrop, Leave button, sound controls, chat, the Esc scoreboard, the report dialog and the
   replay bars. The field itself is tools/build-textures.py's art; eggball.js draws the HUD. */
:root { --ink: #0C0820; --night: #18123A; --panel: #241B57; --panel2: #2A2063; --shell: #FFF3D6; --yolk: #FFC21A; --red: #E83A2F; --blue: #2F64F0; --muted: #C9BFEA; }
body.game-page { background: var(--night) !important; background-image: none !important; color: var(--shell); }
body.game-page::before, body.game-page::after {
  content: ""; position: fixed; top: -5vh; width: 34vw; height: 115vh; background: var(--shell); opacity: .05; pointer-events: none; z-index: 0;
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
}
body.game-page::before { left: 2vw; transform: rotate(16deg); }
body.game-page::after { right: 2vw; transform: rotate(-16deg); }
.game #viewport { position: relative; z-index: 1; }
/* everything that sits over the field has to be above the canvas */
.game .exitContainer, .game #sound, .game #lastGameToggleContainer, .game #chatHistory, .game input#chat,
.game #loadingMessage, .game .message, .game .replayBar { z-index: 30; }
.game #postgame-container { z-index: 40; }
.game #options { max-height: 90vh; overflow: auto; width: 900px; }
.game #kick, .game #sendToPreferred { z-index: 60; }

/* Leave */
.game .exitContainer { position: fixed !important; top: 10px; right: 212px; left: auto; z-index: 60 !important; }
.game #exit {
  display: inline-block; margin: 0; padding: 3px 16px 4px; background: var(--panel); color: var(--shell) !important; text-decoration: none; text-shadow: none;
  border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: skewX(-10deg);
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 800; font-style: italic; font-size: 21px; line-height: 1.2;
}
.game #exit::before { content: "\2039"; margin-right: 6px; color: var(--yolk); }
.game #exit:hover, .game #exit:focus-visible { background: var(--yolk); color: var(--night) !important; outline: none; }
.game #exit:hover::before, .game #exit:focus-visible::before { color: var(--night); }
.game #lastGameToggleContainer { color: var(--yolk); position: fixed; top: 60px; right: 14px; left: auto; }
.game svg { fill: var(--yolk); }

/* sound: two switches and a slider in one chip */
.game div#sound {
  position: fixed !important; top: 10px; right: 12px; width: 190px; z-index: 60 !important; box-sizing: border-box; justify-content: space-between; display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: var(--panel); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.game div#sound > div { margin: 0; float: none; width: 26px; height: 26px; background-size: contain !important; cursor: pointer; }
.game div#soundEffects { background-image: url(/R-62bb0909b74c-z/eggball/soundon.png) !important; }
.game div#soundEffects.off { background-image: url(/R-62bb0909b74c-z/eggball/soundoff.png) !important; }
.game div#soundMusic { background-image: url(/R-62bb0909b74c-z/eggball/musicon.png) !important; }
.game div#soundMusic.off { background-image: url(/R-62bb0909b74c-z/eggball/musicoff.png) !important; }
.game #volumeSlider { -webkit-appearance: none; appearance: none; position: static; display: block; width: 92px; height: 8px; margin: 0; background: var(--ink); border: 0; outline: none; }
.game #volumeSlider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 20px; background: var(--yolk); border: 3px solid var(--ink); cursor: pointer; }
.game #volumeSlider::-moz-range-thumb { width: 10px; height: 16px; background: var(--yolk); border: 3px solid var(--ink); border-radius: 0; cursor: pointer; }
.game #volumeSlider::-moz-range-track { background: var(--ink); height: 8px; }

/* loading */
.game #loadingMessage {
  font-family: 'Titan One', system-ui, sans-serif; font-size: 34px; color: var(--yolk); text-shadow: none;
  -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill;
}

/* chat */
.game #chatHistory {
  font-family: 'Barlow Condensed', system-ui, sans-serif !important; font-weight: 700 !important; font-size: 17px !important; line-height: 1.15;
  text-shadow: 1px 1px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink), 0 2px 0 var(--ink);
}
.game #chatHistory > div > .auth { color: var(--yolk); }
.game input#chat {
  background: rgba(12, 8, 32, .92); color: var(--shell); border: 3px solid var(--yolk); border-radius: 0; padding: 4px 10px; box-shadow: 4px 4px 0 var(--ink);
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 700; font-size: 18px;
}

/* the scoreboard (Esc) */
.game #options {
  background: rgba(36, 27, 87, .97); border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); border-radius: 0; color: var(--shell);
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 600; font-size: 18px; padding: 18px 22px 20px; max-width: min(1100px, 96vw);
}
.game .eb-sb-head { display: flex; align-items: baseline; gap: 18px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 3px solid var(--ink); }
.game .eb-sb-title { font-family: 'Titan One', system-ui, sans-serif; font-size: 32px; line-height: 1; color: var(--shell); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.game #options #mapInfo { position: static; display: block !important; flex: 1; font-weight: 700; font-style: italic; color: var(--muted); font-size: 18px; }
.game .eb-sb-hint { font-weight: 700; color: var(--muted); font-size: 16px; }
.game #options #flairInfo:empty, .game #options #musicInfo:empty, .game #options #gameSocket { display: none; }
.game #options #musicInfo { color: var(--muted); font-size: 15px; margin-top: 8px; }
.game #options table { font-size: 18px; width: 100%; margin: 0; }
.game div#options table th, .game div#options table thead tr { background: var(--night) !important; }
.game div#options table th { font-weight: 800; color: var(--muted); border-bottom: 3px solid var(--ink); padding: 6px 10px; text-align: center; }
.game div#options table th[data-column="player"] { text-align: left; }
.game div#options .table.table-stripped tbody tr { background: rgba(24, 18, 58, .85); border-bottom: 2px solid var(--ink); }
.game div#options .table.table-stripped tbody tr:nth-child(2n) { background: rgba(42, 32, 99, .85); }
.game div#options table tbody td { border-right: 2px solid var(--ink); padding: 6px 10px; text-align: center; font-weight: 700; }
.game div#options table tbody td[data-column="player"] { text-align: left; }
.game div#options .table.table-stripped .scoreName { font-weight: 800; font-style: italic; }
.game div#options .table.table-stripped .scoreName.team-red { color: #FF9C93; }
.game div#options .table.table-stripped .scoreName.team-blue { color: #9DB8FF; }
.game div#options .table.table-stripped .scoreAuth { color: var(--yolk); }
.game div#options .table.table-stripped td[data-column="score"] { background-color: var(--yolk); color: var(--night); opacity: 1; font-weight: 900; }
.game div#options .kick.link { color: var(--muted); font-size: 15px; text-decoration: underline; cursor: pointer; }
.game div#options .kick.link:hover { color: var(--yolk); }
.game #options .form-options { display: flex; flex-wrap: wrap; gap: 16px 28px; margin-top: 16px; }
.game #options .form-options > div { float: none; width: auto; margin: 0; }
.game #options label { display: block; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.game #options .form-control, .game #options select, .game #options input {
  background: #120D30; color: var(--shell); border: 3px solid var(--ink); border-radius: 0; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 18px; height: auto; padding: 4px 10px; box-shadow: none;
}
.game .eb-sb-actions { display: flex; gap: 14px; margin-top: 16px; }
.game #options #switchButton, .game #options #tutorialButton, .game #kick .eb-kick-actions a {
  display: inline-block; float: none; margin: 0; padding: 4px 18px; background: var(--yolk); color: var(--night); text-decoration: none; text-shadow: none;
  border: 3px solid var(--ink); border-radius: 0; box-shadow: 4px 4px 0 var(--ink); transform: skewX(-8deg); font-weight: 800; font-style: italic; font-size: 18px;
}
.game #options #tutorialButton, .game #kick #kickCancelButton, .game #kick #personalMuteButton { background: var(--panel2); color: var(--shell); }
.game #options #switchButton:hover, .game #options #tutorialButton:hover, .game #kick .eb-kick-actions a:hover { background: #FFD54F; color: var(--night); }
.game #options a { color: var(--yolk); }

/* report / mute */
.game #kick {
  background: var(--panel); border: 4px solid var(--ink); border-radius: 0; box-shadow: 10px 10px 0 var(--ink); color: var(--shell); padding: 20px 24px; width: 420px; max-width: 94vw;
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 600; font-size: 18px; text-align: left;
}
.game #kick h3 { font-family: 'Titan One', system-ui, sans-serif; font-size: 28px; margin: 0 0 8px; color: var(--shell); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.game #kick p { color: var(--muted); margin: 0 0 14px; font-size: 17px; line-height: 1.25; }
.game #kick label { display: block; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.game #kick select { width: 100%; background: #120D30; color: var(--shell); border: 3px solid var(--ink); border-radius: 0; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 18px; height: auto; padding: 5px 8px; }
.game #kick .eb-kick-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.game #sendToPreferred { background: var(--panel); border: 4px solid var(--ink); border-radius: 0; box-shadow: 8px 8px 0 var(--ink); color: var(--shell); font-family: 'Barlow Condensed', system-ui, sans-serif; }

/* the scoreboard bar (eggball.js) */
#eb-hud {
  position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 50; pointer-events: none;
  display: flex; align-items: stretch; filter: drop-shadow(5px 5px 0 var(--ink));
  font-family: 'Barlow Condensed', system-ui, sans-serif; color: var(--shell);
}
#eb-hud .t { display: flex; align-items: center; gap: 10px; padding: 4px 18px; border: 4px solid var(--ink); min-width: 120px; }
#eb-hud .t.r { background: var(--red); justify-content: flex-end; transform: skewX(-12deg); border-right: none; }
#eb-hud .t.b { background: var(--blue); justify-content: flex-start; transform: skewX(12deg); border-left: none; }
#eb-hud .sc { font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: 40px; line-height: 1; min-width: 1.1em; text-align: center; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
#eb-hud .nm { font-weight: 800; font-style: italic; font-size: 18px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#eb-hud .clock { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px 20px; background: var(--night); border: 4px solid var(--ink); min-width: 130px; }
#eb-hud .clock b { font-weight: 900; font-style: italic; font-size: 32px; line-height: 1; color: var(--yolk); }
#eb-hud .clock small { font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
#eb-hud .egg { display: none; width: 20px; height: 27px; background: url(/R-62bb0909b74c-z/eggball/egg.png) center / contain no-repeat; }
#eb-hud.red-egg .r .egg, #eb-hud.blue-egg .b .egg { display: inline-block; }

/* replay bars */
.replay-page .replayBar { background: rgba(36, 27, 87, .97); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); color: var(--shell); font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 700; font-size: 17px; border-radius: 0; }
.replay-page .replayBar .handle { background: var(--panel2); color: var(--muted); border-color: var(--ink); border-radius: 0; }
.replay-page .replayBar i.fa { color: var(--shell); cursor: pointer; padding: 2px 5px; }
.replay-page .replayBar i.fa:hover { color: var(--yolk); }
.replay-page #replayClock { font-weight: 900; font-style: italic; color: var(--yolk); font-size: 20px; }
.replay-page #replaySeekBar { accent-color: var(--yolk); }
.replay-page #replaySpeed { background: var(--yolk); color: var(--night); border: 3px solid var(--ink); border-radius: 0; font-weight: 800; padding: 1px 10px; }
.replay-page .dropdown-menu { background: var(--panel); border: 3px solid var(--ink); border-radius: 0; }
.replay-page .dropdown-menu a { color: var(--shell) !important; font-weight: 700; cursor: pointer; }
.replay-page .dropdown-menu a:hover { background: var(--yolk) !important; color: var(--night) !important; }
.replay-page .playerList { font-weight: 800; }
.replay-page #team1Players { color: #FF9C93; }
.replay-page #team2Players { color: #9DB8FF; }
.replay-page #toggles p { color: var(--muted); margin: 8px 0 4px; }
.replay-page #toggles label { display: flex; gap: 6px; align-items: center; font-weight: 700; }
.replay-page #toggles input { accent-color: var(--yolk); }
.replay-page .modal-content { background: var(--panel); border: 4px solid var(--ink); border-radius: 0; box-shadow: 10px 10px 0 var(--ink); color: var(--shell); font-family: 'Barlow Condensed', system-ui, sans-serif; font-size: 18px; }
.replay-page .modal-header, .replay-page .modal-footer { border-color: var(--ink); }
.replay-page .modal-title { font-family: 'Titan One', system-ui, sans-serif; font-size: 26px; }
.replay-page .modal-content .form-control { background: #120D30; color: var(--shell); border: 3px solid var(--ink); border-radius: 0; }
.replay-page .modal-content .btn { background: var(--yolk); color: var(--night); border: 3px solid var(--ink); border-radius: 0; font-weight: 800; }
.replay-page .eb-share-ts { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-weight: 700; }

@media (max-width: 700px) {
  #eb-hud { transform: translateX(-50%) scale(.75); transform-origin: bottom center; }
  .game #volumeSlider { width: 60px; }
}
@media (prefers-reduced-motion: reduce) { .game * { transition: none !important; } }

/* the big huddle countdown (hud.js) */
.eb-hud-big { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 70; pointer-events: none; opacity: 0;
  font-family: 'Titan One', system-ui, sans-serif; font-size: 64px; color: var(--shell); -webkit-text-stroke: 10px var(--ink); paint-order: stroke fill; letter-spacing: .02em; white-space: nowrap; }
.eb-hud-big.on { opacity: 1; }
.eb-hud-big.count { font-size: 120px; color: var(--yolk); }
.eb-hud-big.go { font-size: 110px; color: var(--turf, #2FBF71); }
.eb-hud-big.pop { animation: eb-hud-pop .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes eb-hud-pop { from { transform: translate(-50%, -50%) scale(.4); } to { transform: translate(-50%, -50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .eb-hud-big.pop { animation: none; } }
/* chat lines get a soft backing so they read over the field */
.game #chatHistory > div { background: rgba(12, 8, 32, .5); padding: 1px 8px; margin-top: 2px; width: fit-content; max-width: 100%; }

/* the score difference under the scoreboard bar (options.js "scoreDiff") */
#eb-hud { flex-wrap: wrap; justify-content: center; }
#eb-hud .eb-diff { position: absolute; left: 50%; top: -30px; min-width: 40px; text-align: center; font-size: 20px !important; line-height: 26px !important; transform: translateX(-50%) skewX(-10deg); padding: 0 10px; background: var(--ink); color: var(--shell); font-weight: 900; font-style: italic; font-size: 17px; line-height: 22px; }
#eb-hud .eb-diff.up { color: #5BE39A; }
#eb-hud .eb-diff.down { color: #FF8A80; }
#eb-hud .eb-diff.even { color: var(--yolk); }

/* FPS and ping */
#eb-perf { position: fixed; right: 12px; bottom: 12px; z-index: 60; pointer-events: none; padding: 2px 10px; background: rgba(12, 8, 32, .72); border: 2px solid var(--ink); color: var(--muted); font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 700; font-size: 15px; }
#eb-perf b { color: var(--shell); font-weight: 900; }
#eb-perf b.meh { color: var(--yolk); }
#eb-perf b.bad { color: #FF8A80; }

/* small calls ("Raptor Boat +2", "Interception") near the top, never more than two */
#eb-calls { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 55; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.eb-call { display: flex; align-items: baseline; gap: 10px; padding: 4px 16px; background: var(--panel); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: skewX(-10deg); font-family: 'Barlow Condensed', system-ui, sans-serif; color: var(--shell); animation: eb-call-in .18s ease-out; transition: opacity .35s, transform .35s; }
.eb-call b { font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: 20px; }
.eb-call i { font-weight: 900; font-size: 18px; color: var(--yolk); }
.eb-call.boat { background: var(--turf); color: var(--ink); }
.eb-call.boat b { font-size: 26px; color: var(--shell); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.eb-call.boat i { color: var(--ink); font-size: 22px; }
.eb-call.out { opacity: 0; transform: skewX(-10deg) translateY(-8px); }
@keyframes eb-call-in { from { opacity: 0; transform: skewX(-10deg) scale(.85); } }
@media (prefers-reduced-motion: reduce) { .eb-call { animation: none; transition: none; } }

/* ---- Eggball's scoreboard (board.js): Esc ---- */
.game #options { display: none !important; } /* TagPro's scoreboard: replaced */
.eb-board { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(12, 8, 32, .55); font-family: 'Barlow Condensed', system-ui, sans-serif; color: var(--shell); }
.eb-board[hidden] { display: none; }
.bd-panel { width: min(900px, 94vw); max-height: 88vh; overflow: auto; background: var(--panel); border: 4px solid var(--ink); box-shadow: 12px 12px 0 var(--ink); padding: 18px 22px 14px; display: flex; flex-direction: column; gap: 14px; }
.bd-team header { display: flex; align-items: center; justify-content: space-between; padding: 4px 14px; border: 3px solid var(--ink); transform: skewX(-8deg); margin-bottom: 6px; }
.bd-team.red header { background: var(--red); }
.bd-team.blue header { background: var(--blue); }
.bd-team header b { font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: 24px; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; transform: skewX(8deg); }
.bd-team header .sc { font-family: 'Titan One', system-ui, sans-serif; font-size: 30px; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; transform: skewX(8deg); }
.bd-team table { width: 100%; border-collapse: collapse; }
.bd-team th { font-weight: 800; font-size: 15px; color: var(--muted); text-align: right; padding: 2px 8px; }
.bd-team th.nm { text-align: left; }
.bd-team td { padding: 3px 8px; border-top: 2px solid rgba(12, 8, 32, .5); font-size: 20px; font-weight: 800; }
.bd-team td.n { text-align: right; font-variant-numeric: tabular-nums; width: 70px; color: var(--shell); }
.bd-team td.pts { color: var(--yolk); font-weight: 900; }
.bd-team tr.me td { background: rgba(255, 194, 26, .14); }
.bd-team td.nm button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; max-width: 100%; }
.bd-team td.nm button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.bd-team td.nm button:hover span, .bd-team td.nm button:focus-visible span { color: var(--yolk); text-decoration: underline; text-underline-offset: 3px; }
.bd-team td.nm svg { flex: none; }
.bd-ball { width: 22px; height: 22px; flex: none; }
.bd-tag { font-style: normal; font-size: 13px; font-weight: 900; padding: 0 6px; background: var(--panel2); color: var(--muted); border: 2px solid var(--ink); }
.bd-empty { color: var(--muted); font-weight: 700; }
.bd-panel footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-weight: 700; font-size: 16px; }
.bd-panel footer b { color: var(--shell); }
.bd-btn { display: inline-block; padding: 5px 14px; background: var(--yolk); color: var(--night) !important; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 900; font-style: italic; font-size: 17px; cursor: pointer; text-decoration: none !important; transform: skewX(-8deg); }
.bd-btn:hover { background: #FFD54F; }
.bd-btn.danger { background: var(--red); color: var(--shell) !important; }

/* the player card */
.eb-card { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 100001; width: min(400px, 92vw); background: var(--night); border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); padding: 16px 18px; color: var(--shell); font-family: 'Barlow Condensed', system-ui, sans-serif; display: flex; flex-direction: column; gap: 12px; }
.cd-top { display: flex; align-items: center; gap: 12px; }
.cd-top .bd-ball { width: 46px; height: 46px; }
.cd-top > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cd-name { font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: 28px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-rank { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--muted); font-size: 18px; }
.cd-x { all: unset; cursor: pointer; font-size: 30px; line-height: 1; padding: 0 6px; color: var(--muted); }
.cd-x:hover { color: var(--shell); }
.cd-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cd-stats span { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; background: var(--panel); border: 2px solid var(--ink); font-size: 13px; font-weight: 800; color: var(--muted); }
.cd-stats b { font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: 22px; color: var(--yolk); }
.cd-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cd-report { display: flex; flex-direction: column; gap: 8px; }
.cd-report label { display: flex; flex-direction: column; gap: 4px; font-weight: 800; color: var(--muted); }
.cd-report select { background: #120D30; color: var(--shell); border: 3px solid var(--ink); font-family: inherit; font-weight: 700; font-size: 17px; padding: 4px 6px; }
.cd-report .bd-btn { align-self: flex-start; }
.cd-sent { color: #5BE39A; font-weight: 800; }

/* ---- matchday.js ---- */
/* banners (overtime) */
.eb-banner { position: fixed; left: 50%; top: 34%; transform: translate(-50%, -50%) skewX(-8deg); z-index: 58; pointer-events: none; display: flex; flex-direction: column; align-items: center; padding: 10px 46px 14px; background: var(--red); border: 5px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); animation: eb-banner-in .35s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .35s, transform .35s; }
.eb-banner b { font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: 64px; line-height: 1; color: var(--shell); -webkit-text-stroke: 9px var(--ink); paint-order: stroke fill; }
.eb-banner span { font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 900; font-style: italic; font-size: 26px; color: var(--yolk); }
.eb-banner.out { opacity: 0; transform: translate(-50%, -60%) skewX(-8deg); }
@keyframes eb-banner-in { from { opacity: 0; transform: translate(-50%, -50%) skewX(-8deg) scale(.6); } }
body.eb-ot #eb-hud .clock { background: var(--red); animation: eb-ot 1s ease-in-out infinite alternate; }
body.eb-ot #eb-hud .clock b { color: var(--shell); }
@keyframes eb-ot { to { filter: brightness(1.25); } }

/* the team intro */
.eb-intro { position: fixed; inset: 0; z-index: 66; display: grid; grid-template-columns: minmax(0, 340px) auto minmax(0, 340px); justify-content: center; align-items: center; gap: 28px; padding: 0 4vw; background: rgba(12, 8, 32, .62); font-family: 'Barlow Condensed', system-ui, sans-serif; color: var(--shell); transition: opacity .3s; }
.eb-intro.out { opacity: 0; }
.eb-intro .ti h2 { margin: 0 0 10px; font-family: 'Titan One', system-ui, sans-serif; font-weight: 400; font-size: 44px; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; }
.eb-intro .ti.red { text-align: right; } .eb-intro .ti.red h2 { color: #FF8A80; } .eb-intro .ti.blue h2 { color: #8FB0FF; }
.eb-intro ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.eb-intro li { display: flex; align-items: center; gap: 8px; padding: 4px 14px; border: 3px solid var(--ink); font-size: 24px; font-weight: 800; opacity: 0; animation: eb-ti-in .3s calc(var(--i) * 60ms) ease-out forwards; }
.eb-intro .red li { justify-content: flex-end; background: color-mix(in srgb, var(--red) 75%, var(--night)); transform: skewX(-8deg); --from: -40px; }
.eb-intro .blue li { background: color-mix(in srgb, var(--blue) 75%, var(--night)); transform: skewX(8deg); --from: 40px; }
.eb-intro li.me { outline: 3px solid var(--yolk); }
.eb-intro li i { font-style: normal; font-size: 13px; padding: 0 6px; background: var(--ink); color: var(--muted); }
@keyframes eb-ti-in { from { opacity: 0; translate: var(--from) 0; } to { opacity: 1; translate: 0 0; } }
.ti-vs { font-family: 'Titan One', system-ui, sans-serif; font-size: 72px; color: var(--yolk); -webkit-text-stroke: 10px var(--ink); paint-order: stroke fill; }

/* the quick chat wheel (hold V) */
.eb-wheel { position: fixed; inset: 0; z-index: 64; pointer-events: none; display: grid; place-items: center; }
.eb-wheel[hidden] { display: none; }
.wh-ring { position: relative; width: 0; height: 0; }
.wh-ring::before { content: ""; position: absolute; left: -205px; top: -205px; width: 410px; height: 410px; border-radius: 50%; background: radial-gradient(circle, rgba(12, 8, 32, .78) 0 30%, rgba(12, 8, 32, .5) 31% 100%); border: 3px solid rgba(12, 8, 32, .8); }
.wh-mid { position: absolute; transform: translate(-50%, -50%); font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 900; font-style: italic; color: var(--muted); font-size: 16px; white-space: nowrap; }
.wh-opt { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; padding: 4px 10px; min-width: 96px; background: var(--panel); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 900; font-size: 18px; color: var(--shell); white-space: nowrap; }
.wh-opt i { font-style: normal; font-size: 12px; color: var(--muted); }
.wh-opt small { font-size: 12px; color: var(--muted); font-weight: 700; }
.wh-opt.on { background: var(--yolk); color: var(--night); }
.wh-opt.on i, .wh-opt.on small { color: var(--night); }

/* "C Celebrate" */
#eb-celebrate-hint { position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 55; pointer-events: none; display: flex; align-items: center; gap: 8px; padding: 4px 14px; background: var(--panel); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 900; font-style: italic; font-size: 18px; color: var(--shell); transition: opacity .4s; }
#eb-celebrate-hint.out { opacity: 0; }
#eb-celebrate-hint .eb-key { font-style: normal; padding: 0 7px; background: var(--shell); color: var(--night); border: 2px solid var(--ink); }
@media (prefers-reduced-motion: reduce) { .eb-banner, .eb-intro li { animation: none; opacity: 1; } }

body.eb-intro-on .eb-hud-big { opacity: 0 !important; } /* the line-up has the screen for a moment */

/* ranked: what the game is worth to you (until kickoff) */
#eb-stakes { position: fixed; left: 50%; top: 14px; transform: translateX(-50%) skewX(-8deg); z-index: 57; pointer-events: none; display: flex; align-items: center; gap: 14px; padding: 5px 18px; background: var(--panel); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 800; font-size: 20px; color: var(--muted); transition: opacity .4s; }
#eb-stakes.out, .eb-intro .ti-stakes.out { opacity: 0; }
#eb-stakes b, .ti-stakes b { font-weight: 900; font-style: italic; }
#eb-stakes .up, .ti-stakes .up { color: #5BE39A; }
#eb-stakes .down, .ti-stakes .down { color: #FF8A80; }
.eb-intro .ti-stakes { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); font-size: 30px; font-weight: 800; color: var(--shell); white-space: nowrap; }
.eb-pad-toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 4px; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; background: #1B1442; color: #FFF3D6; border: 4px solid #0C0820; box-shadow: 6px 6px 0 #0C0820; font: 600 17px/1.35 "Barlow Condensed", Arial, sans-serif; transition: opacity .35s, transform .35s; }
.eb-pad-toast b { font: 22px "Titan One", Arial, sans-serif; color: #FFC21A; font-weight: normal; }
.eb-pad-toast.out { opacity: 0; transform: translate(-50%, -12px); }

/* ---- replays: Eggball's bar (replay.js); TagPro's bars stay hidden and do the work ---- */
.replay-page.ebr-on .replayBar { display: none !important; }
.replay-page.ebr-on #eb-hud { bottom: 118px; transition: bottom .25s; }
.replay-page.ebr-on.ebr-tucked #eb-hud { bottom: 12px; }
.ebr { position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 60; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 12px;
  background: rgba(27, 20, 66, .96); border: 4px solid var(--ink, #0C0820); box-shadow: 6px 6px 0 var(--ink, #0C0820); color: var(--shell, #FFF3D6);
  font: 700 18px/1 "Barlow Condensed", system-ui, sans-serif; transition: transform .3s, opacity .3s; }
.ebr.tucked { transform: translateY(calc(100% + 24px)); opacity: 0; }
.ebr-track { position: relative; height: 22px; }
.ebr-track::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 6px; background: #0C0820; }
.ebr-fill { position: absolute; left: 0; top: 8px; height: 6px; width: 0; background: var(--yolk, #FFC21A); pointer-events: none; }
.ebr-seek { position: absolute; inset: 0; width: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ebr-marks { position: absolute; inset: 0; pointer-events: none; }
.ebr-mark { position: absolute; top: 1px; width: 12px; height: 20px; margin-left: -6px; padding: 0; border: 3px solid #0C0820; pointer-events: auto; cursor: pointer; z-index: 2; transform: skewX(-12deg); }
.ebr-mark.t1 { background: #FF6A5E; } .ebr-mark.t2 { background: #6F98FF; }
.ebr-mark.boat { width: 16px; margin-left: -8px; box-shadow: inset 0 -6px 0 var(--yolk, #FFC21A); }
.ebr-mark:hover, .ebr-mark:focus-visible { transform: skewX(-12deg) scale(1.25); outline: none; }
.ebr-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ebr-b { min-width: 46px; height: 36px; padding: 0 10px; background: #2E2470; color: var(--shell, #FFF3D6); border: 3px solid #0C0820; font: inherit; cursor: pointer; }
.ebr-b:hover, .ebr-b:focus-visible { background: var(--yolk, #FFC21A); color: #0C0820; outline: none; }
.ebr-play { width: 52px; background: var(--yolk, #FFC21A); }
.ebr-play svg { width: 20px; height: 20px; fill: #0C0820; display: block; margin: auto; }
.ebr-play .i-play, .ebr.paused .ebr-play .i-pause { display: none; }
.ebr.paused .ebr-play .i-play { display: inline; }
.ebr-clock { min-width: 86px; text-align: center; font: 24px "Titan One", system-ui, sans-serif; color: var(--yolk, #FFC21A); font-variant-numeric: tabular-nums; }
.ebr-gap { flex: 1; }
.ebr-sel { display: inline-flex; align-items: center; gap: 6px; color: #C9BFEA; }
.ebr-sel select { height: 36px; background: #2E2470; color: var(--shell, #FFF3D6); border: 3px solid #0C0820; font: inherit; padding: 0 6px; cursor: pointer; max-width: 200px; }
.ebr-share { min-width: 100px; }
@media (max-width: 720px) {
  .ebr { left: 8px; right: 8px; bottom: 8px; font-size: 16px; }
  .ebr-sel span { display: none; }
  .ebr-b[data-skip="-15"], .ebr-b[data-skip="15"], .ebr-step { display: none; }
  .replay-page.ebr-on #eb-hud { bottom: 130px; }
}
.replay-page.ebr-on #chatHistory { transform: translateY(-104px); transition: transform .25s; }
.replay-page.ebr-on.ebr-tucked #chatHistory { transform: none; }

/* ---- field themes: the stadium around the field follows the field's look ---- */
body.game-page.eb-theme-night { background: #0A0820 !important; }
body.game-page.eb-theme-night::before, body.game-page.eb-theme-night::after { opacity: .08 !important; }
body.game-page.eb-theme-snow { background: #1D2550 !important; }
body.game-page.eb-theme-neon { background: #12052A !important; }
body.game-page.eb-theme-neon::before, body.game-page.eb-theme-neon::after { background: #FF3DC8 !important; opacity: .06 !important; }
body.game-page.eb-theme-dusk { background: #2A1440 !important; }
body.game-page.eb-theme-dusk::before, body.game-page.eb-theme-dusk::after { background: #FFB27A !important; opacity: .06 !important; }

/* ---- a guest's first game: keep it? ---- */
.eb-save { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; background: rgba(12, 8, 32, .62); padding: 16px; }
.eb-save-card { max-width: 620px; display: flex; flex-direction: column; gap: 14px; padding: 26px 30px; background: #241B57; border: 4px solid #0C0820; box-shadow: 10px 10px 0 #0C0820; color: #FFF3D6; font: 600 21px/1.35 "Barlow Condensed", system-ui, sans-serif; }
.eb-save-card .eb-display { font-size: 46px; color: #FFC21A; }
.eb-save-card p { margin: 0; }
.eb-save-go { display: flex; gap: 12px; flex-wrap: wrap; }
.eb-save-card .eb-muted { font-size: 17px; }

/* ---- phones and tablets (touch.js) ---- */
html.eb-touch, html.eb-touch body { touch-action: none; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.eb-stick { position: fixed; z-index: 80; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; background: rgba(12, 8, 32, .35); border: 3px solid rgba(255, 243, 214, .45); pointer-events: none; }
.eb-stick i { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 194, 26, .85); border: 3px solid #0C0820; transform: translate(-50%, -50%); }
.eb-touch-btns { position: fixed; right: max(12px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); z-index: 81; display: flex; flex-direction: column; gap: 10px; }
.eb-touch-btns button { min-width: 64px; min-height: 44px; padding: 6px 10px; background: rgba(36, 27, 87, .9); color: #FFF3D6; border: 3px solid #0C0820; box-shadow: 3px 3px 0 #0C0820; font: 800 16px "Barlow Condensed", system-ui, sans-serif; }
.eb-touch-btns button.cel { background: #FFC21A; color: #0C0820; }
.eb-touch-btns button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #0C0820; }
.eb-tchat { position: fixed; right: 92px; top: 50%; transform: translateY(-50%); z-index: 82; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; background: rgba(27, 20, 66, .96); border: 3px solid #0C0820; box-shadow: 5px 5px 0 #0C0820; }
.eb-tchat button { min-height: 44px; padding: 6px 12px; background: #2E2470; color: #FFF3D6; border: 3px solid #0C0820; font: 800 17px "Barlow Condensed", system-ui, sans-serif; }
.eb-turn { display: none; }
@media (orientation: portrait) { html.eb-touch .eb-turn { display: block; position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 79; width: max-content; max-width: calc(100vw - 32px); padding: 8px 14px; background: rgba(27, 20, 66, .92); border: 3px solid #0C0820; color: #FFF3D6; font: 700 15px "Barlow Condensed", system-ui, sans-serif; text-align: center; pointer-events: none; animation: eb-turn-out 0s 8s forwards; } }
@keyframes eb-turn-out { to { opacity: 0; visibility: hidden; } }
html.eb-touch #chatHistory { max-width: 46vw; font-size: 13px; }
html.eb-touch #eb-perf { display: none; }
@media (max-height: 500px) { html.eb-touch #eb-hud { transform: translateX(-50%) scale(.62); transform-origin: bottom center; bottom: 4px; } }
@media (max-width: 900px), (max-height: 520px) {
  .eb-coach { left: 12px !important; transform: none !important; width: auto !important; max-width: calc(100vw - 300px) !important; }
  .eb-coach .eb-coach-body p { font-size: 15px; }
}

/* ---- the loading cover (game.html) ---- */
.eb-loading { position: fixed; inset: 0; z-index: 200000; display: grid; place-items: center; background: #16103A; transition: opacity .4s; }
.eb-loading.out { opacity: 0; pointer-events: none; }
.eb-loading-in { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.eb-loading-logo { font: 64px "Titan One", Arial, sans-serif; color: #FFC21A; -webkit-text-stroke: 3px #0C0820; paint-order: stroke fill; text-shadow: 5px 5px 0 #0C0820; letter-spacing: .02em; }
.eb-loading-egg { width: 34px; height: 44px; background: #FFF3D6; border: 4px solid #0C0820; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%; animation: eb-egg-hop 0.9s ease-in-out infinite; }
.eb-loading-text { font: 700 20px "Barlow Condensed", Arial, sans-serif; color: #C9BFEA; }
@keyframes eb-egg-hop { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-12px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .eb-loading-egg { animation: none; } }
/* ---- reconnecting ---- */
.eb-reconnect { position: fixed; inset: 0; z-index: 150000; display: grid; place-items: center; background: rgba(12, 8, 32, .7); padding: 16px; }
.eb-reconnect-card { max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 26px 30px; background: #241B57; border: 4px solid #0C0820; box-shadow: 10px 10px 0 #0C0820; color: #FFF3D6; font: 600 20px/1.35 "Barlow Condensed", system-ui, sans-serif; }
.eb-reconnect-card .eb-display { font-size: 40px; color: #FFC21A; }
.eb-reconnect-card p { margin: 0; }
.eb-reconnect-spin { width: 38px; height: 38px; border: 5px solid #3A2E80; border-top-color: #FFC21A; border-radius: 50%; animation: eb-spin .8s linear infinite; }
@keyframes eb-spin { to { transform: rotate(360deg); } }

/* ---- watching live (spectate.js) ---- */
.eb-spec-strip { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 32px);
  padding: 8px 14px; background: rgba(27, 20, 66, .94); border: 3px solid #0C0820; box-shadow: 5px 5px 0 #0C0820; color: #C9BFEA; font: 700 16px "Barlow Condensed", system-ui, sans-serif; transition: opacity .35s, transform .35s; }
.eb-spec-strip b { color: #FFC21A; font-size: 18px; }
.eb-spec-strip kbd { display: inline-block; min-width: 20px; padding: 0 5px; background: #FFF3D6; color: #0C0820; border: 2px solid #0C0820; font: 800 13px "Barlow Condensed", sans-serif; text-align: center; }
.eb-spec-strip.out { opacity: 0; transform: translate(-50%, -12px); pointer-events: none; }
/* the clean view: the field and the score only */
body.eb-clean #chatHistory, body.eb-clean #eb-perf, body.eb-clean .exitContainer, body.eb-clean #sound, body.eb-clean #exit, body.eb-clean .eb-spec-strip, body.eb-clean #mapInfo, body.eb-clean .eb-diff { display: none !important; }

/* ---- clips (clips.js) ---- */
.eb-rec { position: fixed; left: 16px; top: 64px; z-index: 90; display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; padding: 8px 12px; background: rgba(27, 20, 66, .95); border: 3px solid #0C0820; box-shadow: 4px 4px 0 #0C0820; color: #FFF3D6; font: 800 17px "Barlow Condensed", system-ui, sans-serif; cursor: pointer; text-align: left; }
.eb-rec i { grid-row: 1 / 3; width: 14px; height: 14px; border-radius: 50%; background: #FF4D4D; box-shadow: 0 0 0 3px #0C0820; animation: eb-rec-blink 1s steps(2, start) infinite; }
.eb-rec small { font-weight: 600; font-size: 13px; color: #C9BFEA; }
@keyframes eb-rec-blink { to { visibility: hidden; } }
.eb-rec-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 95; padding: 10px 16px; background: #241B57; border: 3px solid #0C0820; box-shadow: 5px 5px 0 #0C0820; color: #FFF3D6; font: 700 18px "Barlow Condensed", system-ui, sans-serif; transition: opacity .35s; }
.eb-rec-toast.out { opacity: 0; }
.ebr-clip.on { background: #FF4D4D; color: #0C0820; }
body.eb-clean .eb-rec { display: none !important; }
.eb-perf-offer { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 96; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: min(720px, calc(100vw - 32px)); padding: 12px 16px; background: #241B57; border: 3px solid #0C0820; box-shadow: 6px 6px 0 #0C0820; color: #FFF3D6; font: 600 17px/1.3 "Barlow Condensed", system-ui, sans-serif; }
.eb-perf-offer span { flex: 1 1 320px; }
/* a player's title: a small slanted banner (scoreboard, player card) */
.eb-banner { display: inline-block; align-self: flex-start; padding: 1px 10px 2px; background: var(--yolk, #FFC21A); color: #0C0820; border: 2px solid #0C0820; box-shadow: 2px 2px 0 #0C0820; font: italic 800 12px/1.2 "Barlow Condensed", system-ui, sans-serif; letter-spacing: .02em; transform: skewX(-12deg); white-space: nowrap; }
.bd-who { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.eb-card .eb-banner { display: block; width: max-content; margin-top: 3px; font-size: 13px; }
