/* ------------------global----------------------------- */
* {
  margin: 0;
  padding: 0;
  font-size: 15px;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background-color: #121212;
  color: #f5f5f5;
  height: 100%;
}

/* WHY scrollbar-gutter: stable + overflow-y: auto: see
   dashboard_login/index.css's identical rule — same reasoning, keeps the
   right-aligned nav from shifting sideways between this page and others
   when only one of them scrolls (the overflow-y is required for the
   gutter property to do anything at all — see that file's comment). */
html {
  scrollbar-gutter: stable;
  overflow-y: auto;
}

h1 {
  font-size: 20px;
}

/* ------------------wrapper & body----------------------------- */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.bodyContainer {
  display: flex;
  flex: 1;
  width: 100%;
  min-height: calc(100vh - 80px); /* optional: header/footer */
  padding: 0; /* remove horizontal gaps */
}

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

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

.headerContainer1 {
  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;
}

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;
}

/* Matches #toggleBtn's button look — see dashboard_login/index.css's
   identical rule for the full reasoning. */
#depositNavItem a {
  background: #292929;
  color: #f5f5f5;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
}

/* ------------------balance----------------------------- */
.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);
}

/* WHAT: The class balanceManager.js adds to the balance + Balance-button
   <li>s when the server says this session isn't valid anymore.
   WHY it had to be added here: this rule already existed in
   dashboard_login/index.css, leaderboard/index.css and notFound/index.css
   — but NOT in this file. balanceManager.js was correctly detecting the
   dead session and correctly calling classList.add("nav-auth-gated"), and
   then nothing happened, because on this page there was no rule for that
   class to trigger. Result: log out in another tab and this page kept
   showing a stale balance next to a Hide Balance button that no longer
   had anything behind it. The JS was right the whole time; the CSS hook
   was simply missing.
   WHY !important, same as the other three files: this is a "nothing else
   gets a say" utility class — it should win regardless of what specificity
   gets added to the header rules above it later.
   NOTE: unlike dashboard_login/leaderboard, the <li>s on this page do NOT
   carry this class in the markup by default. That's deliberate — this page
   is login-gated, so the balance SHOULD be visible normally; this class
   only ever gets applied at runtime once a session goes bad. */
.nav-auth-gated {
  display: none !important;
}

/* The mirror image of .nav-auth-gated — for a guests-only element such as
   a Login link. Nothing on this page uses it today (there's no Login item
   in this header), but the two are a matched pair everywhere else in the
   codebase and navVisibility.js expects both to exist wherever it runs —
   defining it here keeps that contract intact if this page's header ever
   grows one. */
.guest-only {
  display: none !important;
}

/* ------------------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 */
}

/*--------------------------- 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;
}

/* ------------------sidebar----------------------------- */
.bodyContainer {
  display: flex;
  min-height: 100vh;
}

/* Sidebar styling */
.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;
}

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

.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----------------------------- */
.content {
  flex: 1; /* take remaining space */
  display: flex;
  justify-content: center; /* center horizontally */
  align-items: flex-start; /* keep it at the top vertically */
  padding: 40px 20px; /* add space from top and sides */
  box-sizing: border-box;
}

/* =====================
   ACTIVE BETS TABLE - PREMIUM REDESIGN (MATCHING DASHBOARD)
   ===================== */
.active-bets-table {
  width: 100%;
  max-width: 1500px;
  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;
}

.active-bets-table 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;
}

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

.active-bets-table tbody tr {
  transition: all 0.3s ease;
}

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

.active-bets-table tbody tr:hover td {
  color: #ffffff;
}

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

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

.active-bets-table tbody tr.active-bet {
  color: #fff;
}

.active-bets-table tbody tr.closed-bet {
  color: #888;
}

/* Cancel button styling */
.cancel-bet {
  background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
  border: 1px solid #444;
  padding: 8px 16px;
  font-family: "Inter";
  cursor: pointer;
  color: #fcd34d;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cancel-bet:hover:not(:disabled) {
  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;
}

.cancel-bet:disabled {
  background: linear-gradient(135deg, #555 0%, #666 100%);
  color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  border-color: #666;
}

/* ---------modal css------------ */
#bet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.bet-modal {
  background-color: #111;
  color: #fff;
  border: 2px solid #fcd34d;
  border-radius: 10px;
  padding: 20px 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  font-family: "Inter", sans-serif;
}

.bet-modal h2 {
  color: #fcd34d;
  margin-bottom: 15px;
}

.bet-modal .modal-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
}

.bet-modal button {
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s;
}

.bet-modal .yes-btn {
  background-color: #fcd34d;
  color: #111;
}

.bet-modal .yes-btn:hover {
  background-color: #e5b800;
}

.bet-modal .no-btn {
  background-color: #444;
  color: #fff;
}

.bet-modal .no-btn:hover {
  background-color: #666;
}

.cancel-warning {
  color: #fcd34d;
  margin-top: 10px;
  display: none;
}

/* ------------------------ 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;
}

/* ------------------mobile responsive----------------------------- */
/* WHY the extra (max-height: 500px) and (orientation: landscape) clause,
   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 this whole block used to get skipped entirely, silently
   falling back to the desktop layout on a real phone. That's exactly
   what caused the My Bets table to overflow sideways in landscape (the
   .content/.tab-content overflow containment below is scoped inside this
   same block, so it was disappearing right along with everything else).
   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) {
  .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; /* Allow items to grow and fill available space */
    min-width: 80px; /* Set minimum width */
  }

  .content {
    width: 100%;
    /* Without this, .content (itself a flex item of .bodyContainer)
       would refuse to shrink below the table's natural content width —
       see .tab-content's comment right below for the full explanation of
       this flexbox default and why it was letting the table force the
       whole page wider than the screen. */
    min-width: 0;
    padding: 10px;
  }

  /* WHY .tab-content (the plain div sidebar.js already wraps each table
     in) is the scroll container here, instead of overflow-x:auto on the
     table itself (which is what this rule used to do): overflow-x:auto
     set directly on a <table> is unreliable — with table-layout:auto
     (the default), a table's rendered width can still grow past whatever
     "width" is set to if its columns' combined content demands more
     room, so the scrollbar never actually appeared; the table just
     pushed its container, and the whole page, wider than the viewport
     instead. That oversized page turned out to be why the cancel-bet
     confirmation modal's backdrop wasn't covering the full screen on
     mobile. A plain block div doesn't have that quirk — it gets a
     definite width from its containing block and reliably clips/scrolls
     an oversized child via overflow-x. Bonus: since .tab-content is
     itself a flex item of .content (.content uses display:flex to center
     its children), giving it any overflow value other than "visible"
     also resets ITS OWN automatic minimum width — the same flexbox
     default .content's min-width:0 above is guarding against, one level
     down. */
  .tab-content {
    width: 100%;
    overflow-x: auto;
  }

  table {
    width: 100%;
    font-size: 12px;
  }

  .active-bets-table th,
  .active-bets-table td {
    padding: 8px 6px;
    font-size: 11px;
  }

  .cancel-bet {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* -------bet history style----------------- */

.active-bets-table td.profit {
  color: #10b981;
  font-weight: 600;
}

.active-bets-table td.loss {
  color: #ef4444;
  font-weight: 600;
}

.active-bets-table td.neutral {
  color: #6b7280;
  font-weight: 600;
}
/* --------pagination GOOGLE LIKE LMAO ----------- */

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 8px 12px;
  background: #2a2a2a;
  color: white;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
  background: #fcd34d;
  color: black;
}

.pagination button:disabled {
  background: #1a1a1a;
  color: #666;
  cursor: not-allowed;
}

.pagination button.active-page {
  background: #fcd34d;
  color: black;
  font-weight: 600;
}

/* -----------------download excel ---------------*/

#downloadExcel {
  margin: 10px 0;
  padding: 10px 20px;
  background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
  border: 1px solid #444;
  color: #fcd34d;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#downloadExcel: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;
}

/* ---------------- Analytics Section ----------------- */

.time-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.time-filters button {
  padding: 8px 16px;
  background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
  border: 1px solid #444;
  border-radius: 8px;
  color: #fcd34d;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.time-filters 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;
}

.time-filters button.active {
  background: linear-gradient(135deg, #fcd34d 0%, #e5b800 100%);
  color: #000;
  border-color: #fcd34d;
  font-weight: 600;
}

#analyticsChart {
  max-width: 800px;
  width: 100%;
  margin: 0 auto 30px auto;
  background-color: #1a1a1a;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid #333;
}

/* Analytics summary table */
#analyticsTable {
  max-width: 800px;
  margin: 0 auto;
  border-collapse: collapse;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid #333;
}

#analyticsTable 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;
}

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

#analyticsTable tbody tr {
  transition: all 0.3s ease;
}

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

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

/* Striped rows for analytics table too */
#analyticsTable tbody tr:nth-child(even) {
  background: rgba(40, 40, 40, 0.3);
}

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

/* 🆕 NEW STATUS STYLING */
.neutral,
.refund-low-liquidity {
  color: #888;
  background: rgba(136, 136, 136, 0.1);
}

/* Optional: Add special color for low liquidity refunds */
.refund-low-liquidity {
  color: #f59e0b; /* Orange to indicate it's different */
  background: rgba(245, 158, 11, 0.1);
}

/* 🆕 Event ID styling for history table */
.history-event-id {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.history-event-id:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.event-id-cell {
  font-family: "Courier New", monospace;
  font-size: 13px;
}

/* 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;
}
