* {
  box-sizing: border-box;
}

:root {
  --bg: #071018;
  --panel: #111b29;
  --panel-2: #0c1520;
  --line: #29384b;
  --text: #f5f7fb;
  --muted: #9aa7b8;
  --green: #8cff2f;
  --gold: #ffc94c;
  --orange: #ff7b1a;
  --blue: #79dcff;
  --danger: #ff546c;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(38, 102, 77, 0.17), transparent 430px),
    var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.mobile-app {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 14px 42px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 4px;
  background: rgba(7, 16, 24, 0.94);
  backdrop-filter: blur(14px);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 19px;
  font-weight: 950;
}

.app-brand b {
  color: var(--green);
}

.brand-ball {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--green);
  border-radius: 50%;
  font-size: 17px;
}

.admin-mini-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 13px;
}

.lucky-header-link {
  padding: 8px 11px;
  color: #071018;
  text-decoration: none;
  background: var(--green);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .06em;
}

.lucky-sponsor-banner {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 16px;
  padding: 14px;
  color: var(--text);
  text-decoration: none;
  background:
    radial-gradient(circle at right, rgba(255, 201, 76, .16), transparent 45%),
    linear-gradient(135deg, rgba(35, 72, 30, .98), rgba(12, 29, 24, .98));
  border: 1px solid rgba(140, 255, 47, .42);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}

.lucky-sponsor-banner:active { transform: scale(.985); }
.sponsor-wheel { display: grid; place-items: center; width: 46px; height: 46px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,201,76,.45); border-radius: 50%; font-size: 24px; }
.sponsor-copy { min-width: 0; }
.sponsor-copy small,.sponsor-copy strong,.sponsor-copy b { display: block; }
.sponsor-copy small { color: var(--gold); font-size: 9px; font-weight: 950; letter-spacing: .13em; }
.sponsor-copy strong { margin: 3px 0; font-size: 15px; }
.sponsor-copy b { color: var(--green); font-size: 10px; }
.sponsor-cta { padding: 9px 10px; color: #071018; background: var(--green); border-radius: 9px; font-size: 10px; font-weight: 950; }

@media (max-width: 390px) {
  .lucky-sponsor-banner { grid-template-columns: 42px minmax(0, 1fr); }
  .sponsor-cta { grid-column: 1 / -1; text-align: center; }
}

.app-view {
  position: relative;
}

.page-intro {
  margin: 22px 4px 20px;
}

.page-intro h1 {
  margin: 5px 0 8px;
  font-size: 28px;
}

.page-intro p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.league-menu {
  display: grid;
  gap: 12px;
}

.league-button {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 16px;
  gap: 13px;
  align-items: center;
  width: 100%;
  min-height: 106px;
  padding: 16px;
  color: var(--text);
  text-align: left;
  background: linear-gradient(145deg, rgba(24, 35, 51, 0.98), rgba(13, 23, 34, 0.98));
  border: 1px solid var(--line);
  border-radius: 17px;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

.league-button:active {
  transform: scale(0.985);
}

.league-flag {
  font-size: 35px;
  text-align: center;
}

.league-copy {
  min-width: 0;
}

.league-copy strong,
.league-copy small,
.league-copy b {
  display: block;
}

.league-copy strong {
  margin-bottom: 6px;
  font-size: 17px;
}

.league-copy small {
  color: var(--muted);
  font-size: 12px;
}

.league-copy b {
  margin-top: 4px;
  color: var(--green);
  font-size: 13px;
}

.league-count {
  min-width: 58px;
  padding: 9px 7px;
  text-align: center;
  border: 1px solid rgba(140, 255, 47, 0.28);
  border-radius: 12px;
  background: rgba(140, 255, 47, 0.04);
}

.league-count strong,
.league-count small {
  display: block;
}

.league-count strong {
  color: var(--green);
  font-size: 22px;
}

.league-count small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.league-arrow,
.match-arrow {
  color: white;
  font-size: 32px;
  font-weight: 300;
}

.time-note {
  margin: 26px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.back-button {
  position: absolute;
  top: 4px;
  left: 0;
  z-index: 5;
  width: 42px;
  height: 42px;
  color: white;
  background: transparent;
  border: none;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.selected-league-head {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 13px;
  align-items: center;
  padding: 12px 52px 18px;
}

.selected-league-flag {
  font-size: 38px;
}

.selected-league-head h2 {
  margin: 0 0 2px;
  font-size: 20px;
}

.selected-league-head span,
.selected-league-head strong {
  display: block;
}

.selected-league-head span {
  color: var(--muted);
  font-size: 12px;
}

.selected-league-head strong {
  margin-top: 3px;
  color: var(--green);
  font-size: 12px;
}

.compact-match-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(19, 29, 43, 0.98), rgba(10, 18, 28, 0.98));
}

.compact-match-button {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(41, 56, 75, 0.8);
  cursor: pointer;
}

.compact-match-button:last-child {
  border-bottom: none;
}

.compact-match-button:active {
  background: rgba(140, 255, 47, 0.06);
}

.match-date strong,
.match-date small {
  display: block;
}

.match-date strong {
  color: var(--green);
  font-size: 13px;
}

.match-date small {
  margin-top: 4px;
  color: white;
  font-size: 12px;
}

.match-teams {
  display: grid;
  text-align: center;
}

.match-teams strong {
  font-size: 13px;
  line-height: 1.25;
}

.match-teams b {
  margin: 2px 0;
  color: var(--green);
  font-size: 10px;
}

.bet-page-title {
  padding: 4px 45px 12px;
  text-align: center;
}

.bet-page-title h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.bet-page-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.match-card,
.bet-panel,
.slip-card {
  background: linear-gradient(180deg, rgba(20, 31, 46, 0.99), rgba(10, 18, 28, 0.99));
  border: 1px solid var(--line);
  border-radius: 16px;
}

.compact-match-card {
  padding: 10px;
}

.teams-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}

.team-side {
  padding: 9px;
  text-align: center;
  border-radius: 12px;
}

.home-side {
  background: rgba(87, 182, 49, 0.12);
  border: 1px solid rgba(140, 255, 47, 0.25);
}

.away-side {
  background: rgba(255, 123, 26, 0.1);
  border: 1px solid rgba(255, 123, 26, 0.25);
}

.team-role {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 900;
}

.home-side .team-role {
  color: var(--green);
}

.away-side .team-role {
  color: var(--orange);
}

.team {
  font-size: 13px;
  font-weight: 950;
}

.versus {
  align-self: center;
  color: var(--green);
  font-size: 14px;
  font-weight: 950;
}

.summary-sticky {
  position: sticky;
  top: 68px;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 9px 0;
  padding: 10px 13px;
  background: rgba(7, 14, 22, 0.96);
  border: 1px solid var(--line);
  border-radius: 13px;
  backdrop-filter: blur(12px);
}

.summary-sticky span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.summary-sticky strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.summary-sticky div:last-child {
  text-align: right;
}

.summary-sticky div:last-child strong {
  color: var(--green);
}

.bet-panel {
  overflow: hidden;
  margin-bottom: 86px;
}

.table-head,
.bet-row {
  display: grid;
  grid-template-columns: minmax(105px, 1.35fr) 0.65fr 0.9fr 1fr;
  gap: 7px;
  align-items: center;
}

.table-head {
  padding: 10px 10px;
  color: var(--muted);
  background: #0a121c;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.bet-row {
  min-height: 54px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
}

.prediction {
  min-width: 0;
  font-size: 12px;
  font-weight: 900;
}

.prediction-name {
  word-break: break-word;
}

.side-tag {
  display: inline-block;
  margin-right: 5px;
  padding: 3px 5px;
  border-radius: 5px;
  font-size: 8px;
  vertical-align: middle;
}

.side-tag.home {
  color: var(--green);
  background: rgba(140, 255, 47, 0.12);
  border: 1px solid rgba(140, 255, 47, 0.25);
}

.side-tag.away {
  color: var(--orange);
  background: rgba(255, 123, 26, 0.1);
  border: 1px solid rgba(255, 123, 26, 0.25);
}

.odds {
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
}

.bet-input {
  width: 100%;
  min-width: 0;
  padding: 9px 7px;
  color: white;
  text-align: right;
  background: #07101a;
  border: 1px solid #34465a;
  border-radius: 9px;
  outline: none;
}

.bet-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(140, 255, 47, 0.08);
}

.chance-win {
  color: var(--green);
  text-align: right;
  font-size: 11px;
  font-weight: 950;
}

.group-title {
  padding: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.group-title.home-win {
  color: var(--green);
  background: linear-gradient(90deg, rgba(46, 117, 53, 0.35), rgba(26, 73, 35, 0.12));
}

.group-title.draw {
  color: #b8daf5;
  background: rgba(75, 109, 140, 0.18);
}

.group-title.away-win {
  color: var(--orange);
  background: linear-gradient(90deg, rgba(128, 72, 31, 0.28), rgba(83, 43, 19, 0.1));
}

.other-score-row .prediction-name {
  color: var(--blue);
}

.form-message {
  min-height: 18px;
  margin: 10px;
  color: var(--danger);
  text-align: center;
  font-size: 12px;
}

.mobile-action-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr minmax(135px, 190px);
  gap: 10px;
  align-items: center;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 10px 14px;
  color: #0c1608;
  background: linear-gradient(90deg, #80d832, #a4ff45);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
}

.mobile-action-bar small {
  display: block;
  font-size: 10px;
}

.mobile-action-bar b {
  font-size: 11px;
}

.mobile-action-bar button {
  min-height: 44px;
  color: #081006;
  background: rgba(255, 255, 255, 0.32);
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.slip-card {
  margin-top: 50px;
  overflow: hidden;
}

.slip-header {
  padding: 18px;
  text-align: center;
  border-bottom: 1px dashed #536276;
}

.slip-header p {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.15em;
}

.slip-header h2 {
  margin: 0;
}

.slip-match {
  padding: 16px;
  text-align: center;
  border-bottom: 1px dashed #536276;
}

.slip-match span,
.slip-match small {
  display: block;
  color: var(--muted);
}

.slip-match strong {
  display: block;
  margin: 7px 0;
}

.slip-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.slip-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.slip-item .right {
  text-align: right;
}

.slip-total-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
  background: rgba(140, 255, 47, 0.06);
}

.slip-total-grid span,
.slip-footer span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.slip-total-grid div:last-child {
  text-align: right;
}

.slip-total-grid div:last-child strong {
  color: var(--green);
}

.slip-footer {
  display: grid;
  gap: 9px;
  padding: 15px;
  border-top: 1px dashed #536276;
}

.slip-footer div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.new-slip-button {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  padding: 13px;
  color: #091106;
  background: var(--green);
  border: none;
  border-radius: 11px;
  font-weight: 950;
}

.screenshot-note {
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.empty-state {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
}

@media (min-width: 700px) {
  .mobile-app {
    padding-top: 10px;
  }
}


/* V10 — Total Bet only, CONFIRM status */
.summary-sticky.single-total {
  grid-template-columns: 1fr;
}

.summary-sticky.single-total div {
  text-align: left;
}

.summary-sticky.single-total strong {
  color: var(--text);
  font-size: 21px;
}

.mobile-action-bar > div {
  display: grid;
  gap: 2px;
}

.mobile-action-bar > div > small {
  color: rgba(8, 16, 6, 0.72);
  font-weight: 800;
}

.mobile-action-bar > div > b {
  font-size: 17px;
  line-height: 1.1;
}

.slip-total-grid.single-slip-total {
  grid-template-columns: 1fr;
  padding: 18px 20px;
  background:
    linear-gradient(90deg, rgba(42, 115, 66, 0.17), rgba(140, 255, 47, 0.04));
}

.slip-total-grid.single-slip-total div {
  text-align: left;
}

.slip-total-grid.single-slip-total span {
  font-size: 12px;
}

.slip-total-grid.single-slip-total strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 24px;
}

.confirm-status {
  color: var(--green);
  letter-spacing: 0.04em;
}

/* Make slip selection amounts easier to read */
.slip-item .right > strong::before {
  content: "BET ";
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.slip-item .right small {
  color: var(--green);
  font-weight: 800;
}


/* V11 — Slip saved to Supabase */
.save-message {
  min-height: 18px;
  margin: 0 10px 10px;
  color: var(--green);
  text-align: center;
  font-size: 11px;
}

.mobile-action-bar button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.slip-footer {
  gap: 12px;
}

.slip-footer div {
  align-items: center;
}

.slip-footer strong {
  overflow-wrap: anywhere;
}


.missing-odds-row {
  box-shadow: inset 3px 0 0 var(--danger);
}

.bet-limit-note{display:grid;grid-template-columns:1fr 1.45fr;gap:8px;margin:9px 0;padding:11px 12px;background:rgba(255,201,76,.055);border:1px solid rgba(255,201,76,.22);border-radius:12px}
.bet-limit-note span{display:block;color:var(--muted);font-size:9px;text-transform:uppercase}
.bet-limit-note strong{display:block;margin-top:4px;color:var(--gold);font-size:12px}
.bet-limit-note div:last-child{text-align:right}
.bet-limit-hint{display:block;margin-top:3px;color:var(--muted);text-align:right;font-size:8px;white-space:nowrap}
.bet-input.input-error{border-color:var(--danger);box-shadow:0 0 0 2px rgba(255,84,108,.09)}
.limit-error-row{background:rgba(255,84,108,.035)}
@media(max-width:390px){.bet-limit-note{grid-template-columns:1fr}.bet-limit-note div:last-child{text-align:left}}


/* V16 — Maximum payout per match */
.summary-sticky.payout-summary {
  grid-template-columns: .8fr 1.2fr;
}

.summary-sticky.payout-summary div:last-child {
  text-align: right;
}

.summary-sticky.payout-summary div:last-child strong {
  color: var(--green);
  font-size: 14px;
}

.bottom-summary-copy {
  display: grid;
  gap: 4px;
}

.bottom-summary-copy small {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bottom-summary-copy b {
  font-size: 11px;
}

.over-limit-text {
  color: var(--danger) !important;
}

.mobile-action-bar button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 390px) {
  .summary-sticky.payout-summary {
    grid-template-columns: 1fr;
  }

  .summary-sticky.payout-summary div:last-child {
    text-align: left;
  }
}


/* V17.4 — Smaller centered minimum bet placeholder */
.bet-input {
  text-align: center;
}

.bet-input::placeholder {
  color: #7f8da0;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
  text-align: center;
}

@media (max-width: 520px) {
  .bet-input::placeholder {
    font-size: 10px;
  }
}


/* V17.6 — 96BOLA premium create-slip button */
.mobile-action-bar {
  border-top: 1px solid rgba(220, 255, 160, 0.55);
}

.mobile-action-bar button {
  min-height: 48px;
  color: #071006;
  background: linear-gradient(180deg, #c8ff72 0%, #8cff2f 56%, #70d925 100%);
  border: 2px solid #e5ffad;
  border-radius: 13px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -2px 0 rgba(21, 73, 9, 0.24),
    0 0 0 1px rgba(7, 16, 6, 0.45),
    0 8px 22px rgba(112, 217, 37, 0.33);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.035em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.mobile-action-bar button::before {
  content: "🧾";
  margin-right: 7px;
}

.mobile-action-bar button:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 0 rgba(21, 73, 9, 0.22),
    0 0 0 1px rgba(7, 16, 6, 0.48),
    0 0 24px rgba(140, 255, 47, 0.42),
    0 12px 28px rgba(112, 217, 37, 0.36);
}

.mobile-action-bar button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.mobile-action-bar button:focus-visible {
  outline: 3px solid rgba(229, 255, 173, 0.45);
  outline-offset: 3px;
}

.mobile-action-bar button:disabled {
  color: rgba(7, 16, 6, 0.55);
  background: linear-gradient(180deg, #a8c883, #78965d);
  border-color: rgba(222, 240, 202, 0.5);
  box-shadow: none;
  opacity: 0.62;
}

.app-brand span:last-child {
  font-weight: 950;
  letter-spacing: 0.025em;
}

.app-brand b {
  color: var(--green);
}
