/* ==========================
   Global Resets & Defaults
   ========================== */
* {
  margin: 0;
  padding: 0;
  font-size: 15px;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background-color: #121212;
  color: #f5f5f5;
  flex-direction: column;
}

/* WHY scrollbar-gutter: stable: without this, a page with a scrollbar
   (content taller than the viewport) has ~20px less usable width than a
   page without one — since the header nav is right-aligned, it visibly
   shifts sideways every time you navigate between a short page (like
   Profile) and a taller one (like Home/Dashboard). This reserves that
   scrollbar space always, whether or not a scrollbar is actually needed,
   so the nav sits in the exact same spot on every page.
   WHY overflow-y: auto is required alongside it: scrollbar-gutter only
   has any effect on an element whose own overflow isn't the default
   "visible" — html is "visible" by default, so without this the gutter
   property silently does nothing. "auto" (not "scroll") keeps it so an
   actual scrollbar only ever gets drawn when content genuinely overflows
   — the reserved space is constant, but the visible bar itself still only
   shows up when needed. */
html {
  scrollbar-gutter: stable;
  overflow-y: auto;
}

h1 {
  font-size: 20px;
}
section,
h1,
h2,
h3,
h4,
p {
  margin-bottom: 10px;
}

/* ==========================
   Layout Wrappers
   ========================== */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.bodyContainer {
  flex: 1;
  display: flex;
  min-height: 100vh;
}

/* ==========================
   Header
   ========================== */
.header {
  display: flex;
  align-items: center;
}

.headerContainer {
  background-color: #1f1f1f;
  font-family: "Inter";
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.headerContainer1 {
  font-family: "Inter";
  font-size: 35px;
  font-weight: 900;
  flex-grow: 1;
  margin: 10px;
}

.headerContainer2 {
  display: flex;
  align-items: center;
}
.headerContainer2 ul {
  display: flex;
  align-items: center;
  gap: 20px;
}
.headerContainer2 li {
  justify-content: space-evenly;
  display: flex;
  list-style-type: none;
  margin: 0;
}

a {
  text-decoration: none;
  color: white;
}
a.active-tab {
  border-top: 3px solid #fcd34d;
  padding-top: 7px;
  color: #fcd34d;
  font-weight: bold;
}
a:not(.active-tab):hover {
  border-top: 3px solid #444;
  padding-top: 7px;
}

/* Buttons */
button {
  background-color: #1f1f1f;
  color: white;
  padding: 6px 10px;
  border: none;
  border-radius: 5px;
  font-family: "Inter";
  cursor: pointer;
  transition: background-color 0.3s ease;
}
button:hover {
  background-color: #fcd34d;
  color: black;
}

/* Balance button — matches the 404 page's bordered-pill treatment,
   set apart from the plain nav-tab look via #toggleBtn's higher
   specificity overriding the generic button rule above. */
#toggleBtn {
  background: #292929;
  color: #f5f5f5;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
}

/* WHAT: Makes the "Deposit" nav link (#depositNavItem, see index.html)
   look like the #toggleBtn Balance button above instead of a plain nav
   link — same background/border/padding/radius, applied to the <a>
   inside it. WHY: it's an action, not navigation, and per the design
   discussion this was built from, matching an existing "this is a
   button, not a link" treatment already on the page reads more
   consistent than inventing a third distinct style. */
#depositNavItem a {
  background: #292929;
  color: #f5f5f5;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
}

/* ==========================
   Sidebar
   ========================== */
.sidebar {
  width: 200px;
  background: #292929;
  color: white;
  padding: 20px;
}
.sidebar-section {
  margin-bottom: 30px;
}
.sidebar h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: #fcd34d;
  text-align: center;
}
.sidebar ul {
  list-style: none;
  padding: 0;
}
.sidebar li {
  padding: 10px;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 5px;
}
.sidebar li:hover {
  background: #555;
}
.sidebar li.active {
  background: #fcd34d;
  color: black;
}

/* ==========================
   Content Area
   ========================== */
.content {
  flex: 1;
  padding: 20px;
  background: rgb(14, 14, 14);
}

/* ─── Nickname prompt banner ───────────────────────────────────────────
   Shown to users still carrying their auto-assigned player_<number>
   nickname. Revealed by shared/nicknameBanner.js — starts hidden so it
   never flashes into view for guests or for people who already chose one.

   WHY !important on .hidden: same reasoning as .nav-auth-gated elsewhere —
   a "not applicable right now" utility class should win regardless of what
   specificity gets added around it later. */
.hidden {
  display: none !important;
}

/* WHAT: the stacking container itself — see shared/siteAnnouncementBanner.js.
   Holds zero or more .site-announcement-banner items, newest on top. The
   outer margin lives here (not on the items) so N stacked banners read as
   one visual block with even gaps between them, instead of each carrying
   its own margin and doubling up. Empty container = no margin, so nothing
   is reserved on the page when no announcement is live. */
#siteAnnouncementBanner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#siteAnnouncementBanner:not(:empty) {
  margin: 16px 20px 18px;
}

/* WHAT: one admin-published site-wide notice — see
   shared/siteAnnouncementBanner.js. Same layout/shape as .nickname-banner
   below (own classes, not shared, since this is conceptually a different
   feature that just happens to look similar) but a blue left accent
   instead of yellow, so the two are visually distinguishable on the rare
   occasion both are showing at once. */
.site-announcement-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border: 1px solid #1f2f3a;
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  background: #131c26;
}

.site-announcement-text {
  flex: 1;
  min-width: 220px;
  color: #ddd;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.site-announcement-dismiss {
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #888;
  font-size: 0.9rem;
  cursor: pointer;
}

.site-announcement-dismiss:hover {
  color: #ddd;
}

.nickname-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  /* WHY horizontal margin now, when it didn't need any before: this banner
     used to sit inside .content, which supplies its own 20px padding —
     that's what kept it off the screen edges. Now that it's been moved out
     of .content (renderSportsData() was wiping it out — see the comment in
     index.html), it's a direct child of .wrapper with no padding of its
     own, so without this it would run edge-to-edge instead of lining up
     with the header/content's existing 20px inset. */
  margin: 16px 20px 18px;
  padding: 12px 16px;
  border: 1px solid #3a3a1f;
  border-left: 3px solid #fcd34d;
  border-radius: 8px;
  background: #1c1c14;
}

.nickname-banner-text {
  flex: 1;
  min-width: 220px;
  color: #ddd;
  font-size: 0.9rem;
  line-height: 1.45;
}

.nickname-banner-text strong {
  color: #fcd34d;
}

.nickname-banner-link {
  padding: 6px 12px;
  border-radius: 6px;
  background: #fcd34d;
  color: #000;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nickname-banner-dismiss {
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #888;
  font-size: 0.9rem;
  cursor: pointer;
}

.nickname-banner-dismiss:hover {
  color: #ddd;
}
.sidebar-section h3 {
  color: white;
  padding-bottom: 10px;
  position: relative;
}
.sidebar-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, #ffd700, #ff5a5f);
}

/* ==========================
   Events
   ========================== */
.events {
  background-color: #1f1f1f;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}
.events:hover {
  transform: scale(1.01);
}
.events h4 {
  margin: 0 0 5px;
  color: #fcd34d;
}
.events p {
  margin: 0;
  color: #fff;
  display: none;
}
.faq-answer {
  display: none;
}

/* ==========================
   Tables
   ========================== */
/* =====================
   Dashboard Tables - PREMIUM REDESIGN
   ===================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-family: "Inter", sans-serif;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid #333;
}

th {
  background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
  color: #fcd34d;
  font-weight: 700;
  font-size: 14px;
  padding: 16px 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #fcd34d;
  text-align: center;
}

td {
  padding: 14px 12px;
  text-align: center;
  color: #e0e0e0;
  font-weight: 500;
  border-bottom: 1px solid #2a2a2a;
  transition: all 0.3s ease;
}

tbody tr {
  transition: all 0.3s ease;
}

tbody tr:hover {
  background: rgba(252, 211, 77, 0.1);
  transform: translateY(-2px);
}

tbody tr:hover td {
  color: #ffffff;
}

/* Bet Type column styling */
td:first-child {
  font-weight: 600;
  text-align: left;
  color: #ffffff;
  padding-left: 16px;
}

/* Odds buttons in tables */
.odds-button {
  background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
  border: 1px solid #444;
  padding: 10px 15px;
  font-family: "Inter";
  cursor: pointer;
  color: #fcd34d;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  min-width: 80px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.odds-button:hover {
  background: linear-gradient(135deg, #fcd34d 0%, #e5b800 100%);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(252, 211, 77, 0.3);
  border-color: #fcd34d;
}

.odds-button .probability {
  font-size: 14px;
  font-weight: 700;
  color: inherit;
}

.odds-button .odds {
  font-size: 11px;
  color: inherit;
  opacity: 0.8;
}

/* Liquidity column styling */
td:last-child {
  font-weight: 600;
  color: #10b981; /* Green for money */
  text-align: center;
}

/* Striped rows for better readability */
tbody tr:nth-child(even) {
  background: rgba(40, 40, 40, 0.3);
}

tbody tr:nth-child(odd) {
  background: rgba(30, 30, 30, 0.3);
}

/* Info icon in table headers */
/* WHY position:relative here, scoped via :has() to only the th that
   actually contains an .info-icon: .info-popup below is position:absolute
   but had no positioned ancestor anywhere above it — with none, it falls
   back to the browser's "static position" (roughly wherever it would
   have landed in normal document flow), which for the rightmost
   (Liquidity) column of a wide table meant it defaulted to a position far
   to the right, then rendered its full 280px width from there with zero
   awareness of the screen edge. Giving this th position:relative makes it
   the popup's actual containing block, so .info-popup's right:0 (see its
   rule below) anchors predictably to THIS column's right edge instead of
   an arbitrary document-flow position. */
th:has(.info-icon) {
  position: relative;
}

.info-icon {
  display: inline-block;
  margin-left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  text-align: center;
  font-size: 11px;
  line-height: 16px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.info-icon:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
  transform: scale(1.1);
}

/* Info popup styling */
.info-popup {
  display: none;
  /* WHY position:fixed (and no top/right here anymore): this popup is now
     appended straight to <body> and positioned in render.js at the moment
     it's opened, computed from the info icon's actual on-screen location
     (getBoundingClientRect()). It used to be position:absolute, anchored
     via top:100%/right:0 to a positioned th ancestor inside the table —
     which broke once tables started living inside a horizontally
     scrollable wrapper (.table-scroll): anything positioned relative to an
     ancestor with overflow-x:auto gets clipped to that ancestor's current
     scrolled-into-view slice, so part of the popup got cut off whenever
     the table was scrolled sideways. position:fixed + JS-computed
     coordinates anchor it to the actual viewport instead, so scroll state
     (table's or page's) no longer matters. */
  position: fixed;
  background: #2a2a2a;
  color: #ffffff;
  border: 1px solid #444;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  width: 280px;
  /* Safety net for very narrow screens: caps the popup so it can never
     exceed the viewport width even if 280px would otherwise be too wide
     (e.g. a phone under ~300px wide) — same "safety net alongside the
     real fix" pattern used for the confirm-bet modal's mobile
     repositioning earlier. */
  max-width: calc(100vw - 24px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 100;
  border-left: 4px solid #fcd34d;
  text-transform: none;
  line-height: 1.4;
}

/* Events container styling */
.events {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
  transition: all 0.3s ease;
}

.events:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.events h4 {
  margin: 0 0 15px 0;
  color: #fcd34d;
  font-size: 16px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
  cursor: pointer;
  transition: color 0.3s ease;
}

.events h4:hover {
  color: #ffffff;
}

/* League headers */
.league-block h3 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  margin: 25px 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #fcd34d;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hide table button */
.hide-table-btn {
  margin-top: 15px;
  padding: 8px 20px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  transition: all 0.3s ease;
}

.hide-table-btn:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Mobile responsive */
/* WHY the extra (max-height: 500px) and (orientation: landscape) clause
   on every mobile media query in this file (3 total, all updated the
   same way), not just max-width alone: a phone that's comfortably under
   768px wide in portrait is typically 740-915px wide in LANDSCAPE — over
   the threshold, so these blocks used to get skipped entirely on a real
   phone turned sideways, silently falling back to the desktop layout.
   Confirmed via My Bets (activeBets), where that fallback caused a real
   overflow bug — applied here proactively since the same gap exists on
   this page too, even though it hasn't visibly broken here (yet).
   Landscape phones are short, though, even when they're "wide" by this
   query's own standard — matching on a short height in landscape catches
   them anyway, on top of the original portrait width check. */
@media (max-width: 768px), (max-height: 500px) and (orientation: landscape) {
  table {
    font-size: 12px;
  }

  th,
  td {
    padding: 10px 8px;
  }

  .odds-button {
    padding: 8px 10px;
    min-width: 60px;
    font-size: 11px;
  }

  .events {
    padding: 15px;
    margin-bottom: 20px;
  }
}

/* ==========================
   Footer
   ========================== */

footer {
  color: #888;
  background-color: #1f1f1f;
  font-weight: normal;
  font-size: 12px; /* change this one number to resize everything */
  text-align: center;
  padding: 30px 40px;
}

footer * {
  font-size: inherit; /* forces the year span to match */
}

/* ==========================
   Bet Slip Popup & Modals
   ========================== */
.bet-slip-popup {
  display: none;
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -30%);
  background-color: #111;
  border: 1px solid #fcd34d;
  padding: 20px;
  z-index: 999;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  width: 300px;
  font-family: sans-serif;
}
.modal-title {
  color: #fcd34d;
  font-size: 1.2rem;
  margin-bottom: 10px;
  text-align: center;
}
.bet-slip-popup input {
  width: 100%;
  padding: 8px;
  margin: 8px 0;
  box-sizing: border-box;
}
.bet-slip-popup button {
  margin-right: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #fcd34d;
  color: #000;
  transition: background-color 0.2s ease-in-out;
}
.bet-slip-popup button:hover {
  background-color: #e5b800;
  color: black;
}
.bet-slip-popup .no-btn {
  background-color: #444 !important;
  color: #fff !important;
}
.bet-slip-popup .no-btn:hover {
  background-color: #666 !important;
}

#bet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
.bet-modal {
  background: #111;
  border: 2px solid #fcd34d;
  color: #fff;
  padding: 24px 32px;
  border-radius: 12px;
  min-width: 280px;
  text-align: center;
}
.bet-modal h2 {
  margin-bottom: 16px;
}
.modal-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
}
.modal-buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
.yes-btn {
  background-color: #fcd34d;
  color: #000;
}
.yes-btn:hover {
  background-color: #e5b800;
}
.no-btn {
  background-color: #444;
  color: #fff;
}
.no-btn:hover {
  background-color: #666;
}

.hide-table-btn {
  margin-top: 10px;
  padding: 5px 12px;
  background-color: rgb(255, 39, 39);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: #fff;
}
.hide-table-btn:hover {
  background-color: #e5b800;
}

/* ==========================
   Info Icon & Popup
   ========================== */
/* WHAT used to be here: a second, stale .info-icon/.info-popup block
   (white background, 200px wide, no positioning) left over from an
   earlier version of this tooltip. Because it came AFTER the real
   definition (see the "Info icon in table headers" section) at equal
   specificity, it was silently winning the cascade for every property it
   touched — background, color, width, padding — while the first block's
   untouched properties (top/right, added for the mobile overflow fix)
   still applied underneath. Two rules quietly splitting control of the
   same element is exactly what caused the confusing white-box mismatch
   between what this file "intended" and what actually rendered — removed
   rather than left to keep fighting the real definition above. */
.bettype-cell {
  cursor: pointer;
  font-weight: bold;
}
.bettype-info {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
  background: #f9f9f9;
}

/* ==========================
   Notifications
   ========================== */
#notif-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}
.custom-notif {
  background: #222;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.6s ease;
  min-width: 200px;
}
.custom-notif.show {
  opacity: 1;
  transform: translateX(0);
}
.custom-notif.error {
  background: #d9534f;
}
.custom-notif.success {
  background: #5cb85c;
}
.odds-warning {
  color: #fcd34d;
  font-weight: bold;
  margin-top: 10px;
  text-align: center;
}
/* Nov 23: cancel cut-off line on the confirm-bet pop-up (betslip.js). */
.cancel-note {
  color: #d1d5db;
  font-size: 13px;
  margin-top: 6px;
  text-align: center;
}

/* ==========================
   Odds Button & Bet Container
   ========================== */
.odds-button {
  background-color: #2e2e2e;
  border: 1px solid #fcd34d;
  padding: 5px 15px;
  font-family: "Inter";
  cursor: pointer;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  display: flex;
  flex-direction: column; /* stack */
  align-items: center;
  justify-content: center;
  margin: 0 auto; /* centers the button inside the table cell */
}
.odds-button:hover {
  background-color: #fcd34d;
  color: black;
}
.bet-container {
  padding: 15px 10px;
}

.odds-button .probability {
  font-size: 14px;
  font-weight: bold;
}

.odds-button .odds {
  font-size: 12px;
  color: #aaa; /* lighter so odds look secondary */
}

/* ==========================
   Blurred & Balance Text
   ========================== */
.balance {
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 4px;
  color: #fcd34d;
}
.blurred {
  color: transparent;
  text-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
}

/* ==========================
   Auth-gated nav items
   ========================== */
/* WHY hidden by default instead of JS hiding them reactively: the old way
   (visible by default, JS hides it once it confirms you're a guest) meant
   these items were always visible for a brief moment on every page load —
   the login-check is async (has to await a token check, then a real
   fetch to the server), so there's an unavoidable gap between "page
   painted" and "JS decided to hide this." Starting hidden and having JS
   REVEAL it once login is confirmed (navVisibility.js/balanceManager.js
   remove this class) means a guest never sees it flash in the first
   place — nothing to hide, because it was never shown.
   WHY !important: this needs to unconditionally win over
   .headerContainer2 li's `display: flex` (a more specific selector —
   class + element beats a single class) — a state/utility class like this
   is supposed to override component styling regardless of what gets added
   there later, same reasoning most CSS frameworks use !important on their
   .hidden/.d-none utility classes. */
.nav-auth-gated {
  display: none !important;
}

/* WHAT: the mirror image of .nav-auth-gated — hidden by default, JS
   reveals it only for guests (no valid token). WHY hidden by default
   here too, same reasoning as above: starting visible and having JS hide
   it once login is confirmed would flash a "Login" button at logged-in
   users for a moment on every page load. Starting hidden and revealing
   only once a guest is confirmed avoids that in both directions. */
.guest-only {
  display: none !important;
}

/* ==========================
   Progress Bar
   ========================== */
#progressBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 5px;
  background: linear-gradient(to right, #ffd700, #ff5a5f);
  z-index: 9999;
  transition: width 0.2s ease-out;
}

/* ==========================
   Responsive Media Queries
   ========================== */
@media (max-width: 768px), (max-height: 500px) and (orientation: landscape) {
  .headerContainer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .headerContainer2 ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    gap: 25px;
  }
  .headerContainer2 ul li {
    list-style: none;
    padding: 8px 12px;
  }
  .bodyContainer {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    border-right: none;
    padding: 10px;
  }
  .sidebar h2 {
    width: 100%;
    text-align: center;
  }
  .sidebar ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  .sidebar ul li {
    margin: 8px;
    padding: 10px 16px;
    font-size: 12px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #1f1f1f;
    flex: 1 1 auto;
    min-width: 80px;
  }
  .content {
    width: 100%;
    padding: 10px;
  }
  /* Matches .content's mobile padding drop above, so the banner's
     horizontal inset stays consistent with the rest of the page instead of
     keeping the wider desktop 20px margin on a narrow screen. */
  .nickname-banner {
    margin: 12px 10px 14px;
  }
  #siteAnnouncementBanner:not(:empty) {
    margin: 12px 10px 14px;
  }
  table {
    width: 100%;
    font-size: 12px;
  }

  /* WHAT: the actual horizontal-scroll fix for long bet-type text (e.g.
     "Ultra Kill/Rampage to happen") overflowing the screen edge.
     WHY overflow-x:auto moved here instead of staying on `table`: a
     <table> can't shrink below its widest cell's content, so overflow-x
     on the table itself had nothing to scroll — the extra width just
     spilled past the viewport. This wrapper (added around every table in
     render.js's buildBetTable()) gives the table something to overflow
     INTO, so the scrollbar actually contains it instead of the page
     bleeding sideways. -webkit-overflow-scrolling: touch keeps the
     scroll feeling native (momentum) on iOS Safari specifically. */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .bet-slip-popup {
    width: 90%;
    left: 5%;
    /* WHY top: 10% instead of anchoring to the bottom: this used to be
       bottom: 20px (with desktop's top: 30% still leaking through,
       which stretched the box to fill the gap between them — that was
       the huge empty black space bug). Anchoring to the bottom was also
       a real risk on its own: that's exactly the screen zone the mobile
       keyboard covers first when you tap the bet amount input — iOS
       Safari in particular keeps position:fixed pinned to the full
       layout viewport (not the shrunk visible one) when the keyboard
       opens, so a bottom-anchored box can end up hidden behind it.
       Anchoring near the top instead, with no bottom/height set (so the
       box just hugs its own content), keeps it clear of the keyboard on
       the vast majority of phones. */
    top: 10%;
    transform: none;
  }
  /* WHY this is a safety net, not the actual fix: the actual fix is
     confirmBet() in betslip.js calling .blur() on the bet amount input
     right before this modal opens — that closes the keyboard outright.
     This override exists in case the keyboard's close animation hasn't
     finished by the time the modal renders. #bet-overlay centers
     .bet-modal via flexbox (align-items: center), not top/left/transform
     like .bet-slip-popup, so the equivalent "move it up" here is nudging
     align-items to flex-start + a padding-top, rather than a top offset.
     Not pinned all the way to the top like the bet slip: this modal is
     short (no input field, just text + Yes/No), so matching the bet
     slip's top: 10% would look stranded — this keeps it a bit higher
     than dead-center instead. */
  #bet-overlay {
    align-items: flex-start;
    padding-top: 18%;
  }
}

/* Add this to your CSS file */
.empty-market-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  width: 100%;
  padding: 40px 20px;
}

.empty-state-content {
  text-align: center;
  max-width: 500px;
}

.empty-state-icon {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-state-content h2 {
  color: #f5f5f5;
  font-size: 24px;
  margin-bottom: 12px;
  font-weight: 600;
}

.empty-state-content p {
  color: #888;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.empty-state-hint {
  color: #fcd34d;
  font-size: 14px;
  font-style: italic;
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 768px), (max-height: 500px) and (orientation: landscape) {
  .empty-state-icon {
    font-size: 60px;
  }

  .empty-state-content h2 {
    font-size: 20px;
  }

  .empty-state-content p {
    font-size: 14px;
  }
}

/* Sidebar Badges - SIMPLIFIED */
.sidebar-badge {
  color: white;
  font-size: 13px;
  margin-left: 8px;
  font-weight: 600;
  display: inline;
}

.sidebar li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* When market is active (clicked), badge turns black */
.sidebar li.active .sidebar-badge {
  color: black;
}

/* Nov 16: logo alignment — the global "h1 { margin-bottom: 10px }" rule
   pushed "FairPlay" up, so the scales icon looked too low next to it. */
.websiteName h1 {
  margin: 0;
}
