/* blissMonsterInc — design system
   Colors sampled directly from img/logo.png (black badge, neon-lime crown/text, mid-green jersey) */

:root {
  --bm-lime: #a6ff00;
  --bm-lime-dark: #8fe000;
  --bm-green-deep: #2c6e0e;
  --bm-black: #0d0d0d;
  --bm-surface: #1b1b1b;
  --bm-surface-alt: #262626;
  --bm-border: #333333;
  --bm-white: #ffffff;
  --bm-gray-300: #cfcfcf;
  --bm-gray-400: #9a9a9a;
  --bm-gray-600: #555555;
  --bm-red: #ff4d4d;
  --bm-amber: #ffc107;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* Caps every page's width so content never stretches edge-to-edge on wide monitors. */
.bm-content {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

body {
  background-color: var(--bm-black);
  background-image:
    linear-gradient(180deg, rgba(13,13,13,.30) 0%, rgba(13,13,13,.55) 40%, rgba(13,13,13,.85) 75%, var(--bm-black) 100%),
    linear-gradient(rgba(44,110,14,.22), rgba(44,110,14,.22)),
    url('../img/bg-stadium.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--bm-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: 90px; /* room for bottom-fixed CTA on mobile */
}

a { color: var(--bm-lime); text-decoration: none; }
a:hover { color: var(--bm-lime-dark); }

/* ---------- Navbar ---------- */
nav.bm-navbar {
  background-color: rgba(27,27,27,.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--bm-border);
  padding: .6rem 1rem;
}
.bm-navbar { min-height: 76px; }
.bm-navbar .navbar-brand { padding: .25rem 0; }
.bm-navbar .navbar-brand img { height: 56px; width: auto; }
@media (min-width: 576px) {
  .bm-navbar .navbar-brand img { height: 80px; }
}
.bm-navbar .nav-link {
  color: var(--bm-gray-300);
  font-weight: 500;
}
.bm-navbar .nav-link.active,
.bm-navbar .nav-link:hover {
  color: var(--bm-lime);
}
.bm-navbar .navbar-toggler { border-color: var(--bm-border); }

/* Mobile/tablet nav — a plain dropdown panel that wraps onto its own line
   below the brand+toggler row (normal document flow, no position:fixed, no
   backdrop, no overlay), toggled by main.js adding/removing .show. This
   sidesteps the whole class of containing-block/backdrop-filter bugs that a
   fixed-position slide-in panel was running into. */
.bm-mobile-nav {
  display: none;
  flex-basis: 100%;
  width: 100%;
  order: 3;
  flex-direction: column;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--bm-border);
}
.bm-mobile-nav.show { display: flex; }

.bm-mobile-nav-links {
  display: flex;
  flex-direction: column;
}
.bm-mobile-nav-links .nav-link {
  display: block;
  padding: .6rem 0;
  color: var(--bm-gray-300);
}

.bm-mobile-nav-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
  margin-top: .5rem;
  padding-top: .75rem;
  border-top: 1px solid var(--bm-border);
}

@media (min-width: 992px) {
  .bm-mobile-nav {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    flex: 1 1 auto;
    flex-basis: auto;
    width: auto;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
  .bm-mobile-nav-links {
    flex-direction: row;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
  }
  .bm-mobile-nav-footer {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
}

/* ---------- Cards / surfaces ---------- */
.bm-card {
  background-color: var(--bm-surface);
  border: 1px solid var(--bm-border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.bm-card-title {
  color: var(--bm-gray-400);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .35rem;
}
.bm-stat {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--bm-lime);
}

/* ---------- Buttons ---------- */
.btn-bm-primary {
  background-color: var(--bm-lime);
  border-color: var(--bm-lime);
  color: var(--bm-black);
  font-weight: 700;
  border-radius: 10px;
  padding: .65rem 1.25rem;
}
.btn-bm-primary:hover, .btn-bm-primary:focus {
  background-color: var(--bm-lime-dark);
  border-color: var(--bm-lime-dark);
  color: var(--bm-black);
}
.btn-bm-secondary {
  background-color: transparent;
  border: 1px solid var(--bm-lime);
  color: var(--bm-lime);
  font-weight: 600;
  border-radius: 10px;
}
.btn-bm-secondary:hover { background-color: rgba(166,255,0,.1); color: var(--bm-lime); }
.btn-bm-danger {
  background-color: transparent;
  border: 1px solid var(--bm-red);
  color: var(--bm-red);
  border-radius: 10px;
}
.btn-bm-danger:hover { background-color: rgba(255,77,77,.12); color: var(--bm-red); }
.btn-whatsapp {
  background-color: #25d366;
  border-color: #25d366;
  color: #0d0d0d;
  font-weight: 700;
  border-radius: 10px;
}
.btn-whatsapp:hover { background-color: #1ebc59; color: #0d0d0d; }

/* Help ("?") button — links to the Staker's Guide PDF */
.bm-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--bm-lime);
  color: var(--bm-lime);
  font-weight: 800;
  font-size: .95rem;
  text-decoration: none;
  flex: 0 0 auto;
}
.bm-help-btn:hover { background: rgba(166,255,0,.12); color: var(--bm-lime); }

/* iOS / Android "Install the app" row — sits below the login card, styled
   with each platform's own brand tone so the two buttons read as distinct
   install paths rather than generic actions. */
.bm-install-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .6rem;
  width: 100%;
  max-width: 420px;
  padding-top: .25rem;
}
.bm-install-label {
  color: var(--bm-gray-400);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  width: 100%;
  text-align: center;
  margin-bottom: .1rem;
}
.bm-install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: none;
  border-radius: 10px;
  padding: .5rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  flex: 1 1 auto;
  transition: transform .1s ease, filter .15s ease;
}
.bm-install-btn:hover { filter: brightness(1.12); }
.bm-install-btn:active { transform: scale(.97); }
.bm-install-btn svg { flex: 0 0 auto; }

.bm-install-btn-ios {
  background: #ffffff;
  color: #0d0d0d;
}
.bm-install-btn-android {
  background: #3ddc84;
  color: #0d0d0d;
}

/* Bottom-fixed CTA for mobile participant screens */
.bm-fixed-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(13,13,13,0), var(--bm-black) 30%);
  padding: 1rem;
  z-index: 1030;
}
.bm-fixed-cta .btn { width: 100%; font-size: 1.05rem; padding: .85rem; }

/* ---------- Forms ---------- */
.form-control, .form-select {
  background-color: var(--bm-surface-alt);
  border: 1px solid var(--bm-border);
  color: var(--bm-white);
}
.form-control:focus, .form-select:focus {
  background-color: var(--bm-surface-alt);
  border-color: var(--bm-lime);
  color: var(--bm-white);
  box-shadow: 0 0 0 .2rem rgba(166,255,0,.2);
}
.form-control::placeholder { color: var(--bm-gray-600); }
.form-label { color: var(--bm-gray-300); font-weight: 600; font-size: .9rem; }
.form-text { color: var(--bm-gray-400); }

/* ---------- Password show/hide toggle ---------- */
.bm-password-wrap { position: relative; }
.bm-password-wrap .form-control { padding-right: 2.6rem; }
.bm-password-toggle {
  position: absolute;
  top: 50%;
  right: .5rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: .35rem;
  color: var(--bm-gray-400);
  cursor: pointer;
  line-height: 0;
  border-radius: 6px;
}
.bm-password-toggle:hover,
.bm-password-toggle:focus-visible {
  color: var(--bm-lime);
  outline: none;
}

/* ---------- Badges / status pills ---------- */
.bm-badge {
  display: inline-block;
  padding: .3rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.bm-badge-win { background: rgba(166,255,0,.15); color: var(--bm-lime); }
.bm-badge-loss { background: rgba(255,77,77,.15); color: var(--bm-red); }
.bm-badge-pending { background: rgba(255,193,7,.15); color: var(--bm-amber); }
.bm-badge-dns { background: rgba(154,154,154,.15); color: var(--bm-gray-400); }

/* ---------- Scorecard grid ---------- */
.bm-scorecard { display: flex; flex-wrap: wrap; gap: .5rem; }
.bm-scorecard-day {
  flex: 0 0 auto;
  width: 64px;
  text-align: center;
  background: var(--bm-surface-alt);
  border: 1px solid var(--bm-border);
  border-radius: 10px;
  padding: .5rem .25rem;
}
.bm-scorecard-day .day-label { font-size: .7rem; color: var(--bm-gray-400); }
.bm-scorecard-day .day-status { font-size: .72rem; font-weight: 700; margin-top: .2rem; }
.bm-scorecard-day.win { border-color: var(--bm-lime); }
.bm-scorecard-day.loss { border-color: var(--bm-red); }

/* ---------- Tables (admin) ---------- */
.table {
  --bs-table-bg: var(--bm-surface);
  --bs-table-color: var(--bm-white);
  --bs-table-striped-bg: var(--bm-surface-alt);
  --bs-table-striped-color: var(--bm-white);
  --bs-table-border-color: var(--bm-border);
  --bs-table-hover-bg: #232323;
  --bs-table-hover-color: var(--bm-white);
  border-radius: 10px;
  overflow: hidden;
}
.table thead th {
  color: var(--bm-gray-400);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom-color: var(--bm-border);
}

/* ---------- Auth screens ---------- */
.bm-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.bm-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bm-surface);
  border: 1px solid var(--bm-border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
}
.bm-auth-card img.logo { max-width: 220px; display: block; margin: 0 auto 1rem; }

/* ---------- Home / login split layout: form left (not flush edge), hero right.
   The whole screen must fit without scrolling, on any viewport. ---------- */
.bm-home {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bm-home-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.75rem 1.25rem 1rem;
  min-height: 0;
  gap: .5rem;
  overflow: hidden;
}
.bm-auth-card-left { margin: 0; max-height: 100%; overflow: hidden; width: 100%; }
.bm-auth-card-left img.logo { margin: 0 0 .5rem; max-width: 140px; }
.bm-auth-card-left h1 { text-align: left; font-size: 1.15rem; margin-bottom: .35rem; }
.bm-auth-card-left p.bm-muted { text-align: left; }
.bm-auth-tagline { color: var(--bm-gray-400); font-size: .85rem; line-height: 1.4; margin-bottom: 1rem; }

.bm-home-hero {
  background: linear-gradient(160deg, var(--bm-surface) 0%, var(--bm-black) 70%);
  border-top: 1px solid var(--bm-border);
  padding: 1.5rem;
  overflow: hidden;
  min-height: 0;
}
.bm-hero-inner { max-width: 560px; margin: 0 auto; }
.bm-hero-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--bm-white);
  margin-bottom: .4rem;
}
.bm-hero-lead {
  color: var(--bm-gray-300);
  line-height: 1.45;
  margin-bottom: .9rem;
  font-size: .88rem;
}
.bm-feature-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.bm-feature-list li { display: flex; gap: .6rem; align-items: flex-start; }
.bm-feature-list li div { color: var(--bm-gray-300); line-height: 1.3; font-size: .84rem; }
.bm-feature-list li strong { color: var(--bm-white); }
.bm-feature-icon {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(166,255,0,.15);
  color: var(--bm-lime);
  display: flex; align-items: center; justify-content: center;
  margin-top: .1rem;
}
.bm-feature-icon svg { width: 12px; height: 12px; }

/* Live activity ticker — auto-scrolling strip of recent stake/win/loss activity */
.bm-ticker-label {
  color: var(--bm-gray-400);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 1.75rem;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.bm-ticker-label::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bm-lime);
  box-shadow: 0 0 0 3px rgba(166,255,0,.2);
  flex: 0 0 auto;
}
.bm-ticker {
  overflow: hidden;
  background: var(--bm-surface-alt);
  border: 1px solid var(--bm-border);
  border-radius: 10px;
  padding: .65rem 1rem;
  margin-bottom: .5rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.bm-ticker-track {
  display: inline-flex;
  gap: 1.5rem;
  white-space: nowrap;
  animation: bm-ticker-scroll 28s linear infinite;
  width: max-content;
}
.bm-ticker:hover .bm-ticker-track { animation-play-state: paused; }
.bm-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--bm-gray-300);
  font-size: .8rem;
}
.bm-ticker-pill {
  display: inline-block;
  padding: .12rem .5rem;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .03em;
}
.bm-ticker-win { background: rgba(166,255,0,.18); color: var(--bm-lime); }
.bm-ticker-loss { background: rgba(255,77,77,.18); color: var(--bm-red); }
.bm-ticker-pending { background: rgba(255,193,7,.18); color: var(--bm-amber); }

@keyframes bm-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .bm-ticker-track { animation: none; }
}

@media (min-width: 992px) {
  .bm-home { flex-direction: row; }
  .bm-home-form {
    flex: 0 0 42%;
    max-width: 42%;
    justify-content: flex-start;
    padding: 6rem 2.5rem 2rem 3.5rem;
  }
  .bm-auth-card-left img.logo { max-width: 170px; }
  .bm-auth-card-left h1 { font-size: 1.4rem; }
  .bm-home-hero {
    flex: 1;
    border-top: none;
    border-left: 1px solid var(--bm-border);
    display: flex;
    align-items: center;
    padding: 2rem 3rem;
  }
  .bm-hero-title { font-size: 1.6rem; }
  .bm-hero-lead { font-size: .95rem; }
  .bm-feature-list { gap: .65rem; }
  .bm-feature-list li div { font-size: .9rem; }
}

@media (min-height: 800px) {
  .bm-hero-lead { margin-bottom: 1.25rem; }
  .bm-feature-list { gap: .85rem; }
}

/* ---------- Page description text (under page <h1>) ---------- */
.bm-page-desc {
  color: var(--bm-gray-400);
  margin-top: -.35rem;
  margin-bottom: 1.1rem;
  max-width: 640px;
}

/* ---------- Misc ---------- */
.bm-muted { color: var(--bm-gray-400); }
.bm-divider { border-top: 1px solid var(--bm-border); margin: 1.25rem 0; }
.bm-empty { color: var(--bm-gray-400); text-align: center; padding: 2rem 1rem; }
.bm-credential-box {
  background: var(--bm-surface-alt);
  border: 1px dashed var(--bm-lime);
  border-radius: 10px;
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- Public live results scoreboard ---------- */
.bm-results-legend { color: var(--bm-gray-300); font-size: .85rem; }
.bm-legend-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--bm-border);
}
.bm-legend-win { color: var(--bm-lime); border-color: var(--bm-lime); }
.bm-legend-loss { color: var(--bm-red); border-color: var(--bm-red); }
.bm-legend-blank { background: var(--bm-surface-alt); }

.bm-results-table { --bs-table-bg: transparent; }
.bm-results-table thead th {
  color: var(--bm-lime);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom-color: var(--bm-border);
  white-space: nowrap;
}
.bm-results-table td { vertical-align: middle; white-space: nowrap; }
.bm-results-sticky {
  position: sticky;
  left: 0;
  background: var(--bm-surface);
  z-index: 1;
  min-width: 160px;
}
.bm-odds-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bm-green-deep);
  color: var(--bm-white);
  font-size: .7rem;
  font-weight: 800;
  margin-right: .4rem;
}
.bm-result-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--bm-surface-alt);
  border: 1px solid var(--bm-border);
}
.bm-result-win { color: var(--bm-lime); border-color: var(--bm-lime); background: rgba(166,255,0,.1); }
.bm-result-loss { color: var(--bm-red); border-color: var(--bm-red); background: rgba(255,77,77,.1); }
.bm-result-total-win { color: var(--bm-lime); font-weight: 800; }
.bm-result-total-loss { color: var(--bm-red); font-weight: 800; }
