* { box-sizing: border-box; }

/* ── LANDING PAGE ── */
.landing {
  position: relative;
  min-height: 100vh;
  padding: 60px 24px 40px;
  text-align: center;
  color: white;
  overflow: hidden;
}

.landing.hidden { display: none; }

.landing-bg-shine {
  position: absolute;
  top: -40%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,215,0,0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.landing-hero {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto 36px;
}

.landing-trophy {
  font-size: 5rem;
  filter: drop-shadow(0 8px 24px rgba(255,215,0,0.6));
  animation: trophy-bob 3s ease-in-out infinite;
  margin-bottom: 8px;
}

@keyframes trophy-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

.landing-title {
  font-size: 3.6rem;
  letter-spacing: 3px;
  margin: 0 0 8px;
  font-weight: 900;
  background: linear-gradient(180deg, #fff 30%, #ffd700 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(255,215,0,0.4);
  line-height: 1;
}

.landing-sub {
  font-size: 1.05rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.9;
  margin: 0 0 6px;
}

.landing-tag {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 500;
  opacity: 0.92;
}

.landing-stats {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  margin-bottom: 36px;
}

.lstat {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  padding: 18px 26px;
  min-width: 160px;
  backdrop-filter: blur(10px);
}

.lstat-pot {
  background: linear-gradient(135deg, rgba(255,215,0,0.25), rgba(255,152,0,0.25));
  border-color: rgba(255,215,0,0.5);
  box-shadow: 0 8px 24px rgba(255,180,0,0.25);
}

.lstat-num {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  color: #ffd700;
  text-shadow: 0 2px 12px rgba(255,215,0,0.5);
}

.lstat-pot .lstat-num { color: white; }

.lstat-label {
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.85;
  margin-top: 4px;
}

.landing-cta {
  position: relative;
  z-index: 1;
  margin-bottom: 48px;
}

.landing-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.landing-cta .landing-btn-primary,
.landing-cta .landing-btn-secondary {
  display: inline-block;
}

.landing-btn {
  font-size: 1.2rem !important;
  padding: 16px 56px !important;
  font-weight: 900 !important;
  letter-spacing: 2px;
  border-radius: 30px !important;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: transform 0.15s;
}

.landing-btn-primary {
  background: linear-gradient(135deg, #ffd700, #ff9800) !important;
  color: #3a1f00 !important;
  box-shadow: 0 8px 28px rgba(255,180,0,0.5);
}

.landing-btn-secondary {
  background: rgba(255,255,255,0.15) !important;
  color: white !important;
  border: 2px solid rgba(255,255,255,0.5) !important;
  backdrop-filter: blur(8px);
}

.landing-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

@media (min-width: 600px) {
  .landing-cta {
    flex-direction: row;
    justify-content: center;
  }
}

.landing-note {
  margin: 18px auto 0;
  max-width: 520px;
  font-size: 0.92rem;
  opacity: 0.85;
  line-height: 1.5;
}

.payment-card {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 560px;
  margin: 28px auto 36px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(108,180,255,0.18), rgba(13,110,253,0.18));
  border: 1px solid rgba(108,180,255,0.5);
  border-radius: 16px;
  text-align: left;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(13,110,253,0.18);
}

.payment-icon {
  font-size: 2.4rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.payment-body { flex: 1; }

.payment-label {
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 6px;
}

.payment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.payment-method {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.yappy-number {
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.4);
  color: white;
  font-family: -apple-system, monospace;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 3px;
  padding: 6px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.yappy-number:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.yappy-number.copied {
  background: #198754 !important;
  border-color: #198754 !important;
  letter-spacing: 0.5px;
}

.payment-hint {
  margin-top: 8px;
  font-size: 0.82rem;
  opacity: 0.85;
  line-height: 1.4;
}

.yappy-pay-reminder {
  background: linear-gradient(90deg, #cfe2ff, #b6d4fe);
  color: #084298;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 8px;
  border-left: 3px solid #0d6efd;
}

.yappy-pay-reminder code {
  background: white;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.landing-how {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto 40px;
}

.landing-how h2 {
  font-size: 1.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 22px;
  font-weight: 800;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.how-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: left;
  position: relative;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, border-color 0.2s;
}

.how-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,215,0,0.5);
}

.how-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ff9800);
  color: #3a1f00;
  font-weight: 900;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(255,180,0,0.4);
}

.how-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.how-card p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.85;
  line-height: 1.4;
}

.landing-rules {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto 36px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.07);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.15);
}

.landing-rules h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.landing-rules-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.rule-pill {
  background: rgba(255,215,0,0.18);
  border: 1px solid rgba(255,215,0,0.4);
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 0.85rem;
  font-weight: 600;
}

.rule-pill strong {
  color: #ffd700;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.landing-max {
  margin: 6px 0 0;
  font-size: 0.85rem;
  opacity: 0.85;
}

.landing-footer {
  position: relative;
  z-index: 1;
  padding: 18px;
  font-size: 0.9rem;
  opacity: 0.8;
  border-top: 1px solid rgba(255,255,255,0.15);
  max-width: 760px;
  margin: 0 auto;
}

.landing-admin-row {
  margin-top: 14px;
}

.landing-admin-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.5px;
  transition: all 0.15s;
  backdrop-filter: blur(8px);
}

.landing-admin-btn:hover {
  background: rgba(255,215,0,0.18);
  border-color: rgba(255,215,0,0.5);
  color: white;
}

@media (max-width: 600px) {
  .landing { padding: 40px 16px 30px; }
  .landing-title { font-size: 2.4rem; letter-spacing: 1px; }
  .landing-trophy { font-size: 3.6rem; }
  .lstat { padding: 14px 18px; min-width: 130px; }
  .lstat-num { font-size: 1.8rem; }
}



body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,215,0,0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(0,200,150,0.1) 0%, transparent 40%),
    linear-gradient(135deg, #0a3d2a 0%, #0f5132 50%, #198754 100%);
  min-height: 100vh;
  color: #1a1a1a;
}

header {
  text-align: center;
  padding: 36px 16px 20px;
  color: white;
  position: relative;
}

header::before {
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 200px; height: 4px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
}

header h1 {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: 2px;
  font-weight: 900;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3), 0 0 30px rgba(255,215,0,0.4);
  background: linear-gradient(180deg, #fff 30%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  margin: 8px 0 4px;
  opacity: 0.95;
  letter-spacing: 1px;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.tz-note {
  margin: 0 0 16px;
  font-size: 0.78rem;
  opacity: 0.75;
  letter-spacing: 0.5px;
}

.header-stats {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.progress {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.trophy-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 18px auto 0;
  max-width: 800px;
}

/* TROPHY SCORE CARD */
.score-trophy {
  position: relative;
  flex: 1 1 360px;
  max-width: 380px;
  background:
    radial-gradient(ellipse at top, rgba(255,255,255,0.25), transparent 60%),
    linear-gradient(135deg, #ffd700 0%, #ffb300 50%, #cd8500 100%);
  color: #3a1f00;
  border-radius: 20px;
  padding: 18px 24px;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.4),
    0 0 30px rgba(255,215,0,0.5),
    0 12px 40px rgba(0,0,0,0.35),
    inset 0 -4px 12px rgba(0,0,0,0.15);
  text-align: center;
  overflow: hidden;
  transition: transform 0.3s;
}

.score-trophy.first {
  background:
    radial-gradient(ellipse at top, rgba(255,255,255,0.35), transparent 60%),
    linear-gradient(135deg, #fff5b8 0%, #ffd700 40%, #ff9800 90%);
  box-shadow:
    0 0 0 3px rgba(255,255,255,0.6),
    0 0 50px rgba(255,215,0,0.8),
    0 16px 50px rgba(0,0,0,0.4),
    inset 0 -4px 12px rgba(0,0,0,0.2);
  animation: champion-float 3s ease-in-out infinite;
}

@keyframes champion-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.score-trophy.pulse {
  animation: trophy-pulse 0.8s ease-out;
}

@keyframes trophy-pulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(255,255,255,0.6), 0 0 80px rgba(255,215,0,1), 0 12px 40px rgba(0,0,0,0.35); }
  100% { transform: scale(1); }
}

.trophy-shine {
  position: absolute;
  top: 0;
  left: -150%;
  width: 80%;
  height: 100%;
  background: linear-gradient(120deg,
    transparent 30%,
    rgba(255,255,255,0.55) 50%,
    transparent 70%);
  transform: skewX(-20deg);
  animation: shine 4s ease-in-out infinite;
}

@keyframes shine {
  0%, 100% { left: -150%; }
  50% { left: 150%; }
}

.trophy-label {
  font-size: 0.78rem;
  letter-spacing: 4px;
  font-weight: 800;
  opacity: 0.7;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.trophy-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 2px;
  position: relative;
  z-index: 1;
}

.trophy-star {
  font-size: 2.4rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

#total-score-num {
  font-size: 3.6rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 2px 4px rgba(0,0,0,0.2),
    0 0 20px rgba(255,255,255,0.5);
}

.trophy-unit {
  font-size: 1.1rem;
  font-weight: 700;
  opacity: 0.8;
  letter-spacing: 1px;
}

.trophy-sub {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  opacity: 0.85;
  position: relative;
  z-index: 1;
  min-height: 1.2em;
}

/* PRIZE POT VARIANT */
.pot-trophy {
  background:
    radial-gradient(ellipse at top, rgba(255,255,255,0.25), transparent 60%),
    linear-gradient(135deg, #ffd700 0%, #b8860b 50%, #6b4500 100%);
  color: #2a1a00;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.4),
    0 0 30px rgba(184,134,11,0.5),
    0 12px 40px rgba(0,0,0,0.4),
    inset 0 -4px 12px rgba(0,0,0,0.2);
}

.pot-trophy::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #2d8a4f 50%, transparent);
  opacity: 0.6;
}

.pot-trophy #pot-amount {
  font-size: 3.6rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 2px 4px rgba(0,0,0,0.25),
    0 0 24px rgba(255,255,255,0.6),
    0 0 6px rgba(45,138,79,0.4);
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
}

/* PREDICTION RATE CARD */
.stats-card {
  max-width: 380px;
  margin: 14px auto 24px;
  background: rgba(255,255,255,0.97);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  border: 2px solid rgba(255,215,0,0.4);
}

.stats-card.hidden { display: none; }

.stats-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.stats-emoji {
  font-size: 2.4rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

.stats-headline {
  flex: 1;
}

.stats-rate {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  color: #198754;
  letter-spacing: -1px;
  display: flex;
  align-items: baseline;
}

.stats-rate small {
  font-size: 1.2rem;
  font-weight: 700;
  margin-left: 4px;
  opacity: 0.7;
}

.stats-rate-label {
  font-size: 0.72rem;
  letter-spacing: 2px;
  font-weight: 800;
  color: #555;
  text-transform: uppercase;
  margin-top: 2px;
}

.stats-sub {
  font-size: 0.78rem;
  color: #777;
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
}

.stats-card.tier-high .stats-rate { color: #198754; }
.stats-card.tier-high { border-color: #198754; box-shadow: 0 12px 40px rgba(25,135,84,0.3); }

.stats-card.tier-mid .stats-rate { color: #ff9800; }
.stats-card.tier-mid { border-color: #ff9800; box-shadow: 0 12px 40px rgba(255,152,0,0.25); }

.stats-card.tier-low .stats-rate { color: #dc3545; }
.stats-card.tier-low { border-color: #dc3545; box-shadow: 0 12px 32px rgba(220,53,69,0.18); }

.stats-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed #e0e0e0;
}

.stat-bar.dim { opacity: 0.4; }

.stat-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: #333;
}

.stat-bar-num small { color: #888; font-weight: 500; }

.stat-bar-track {
  height: 8px;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease;
}

.rate-pill {
  display: inline-block;
  background: linear-gradient(135deg, #198754, #0f5132);
  color: white;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.rate-dim { color: #aaa; font-style: italic; }

.rules-card {
  background: rgba(255,255,255,0.97);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  border: 1px solid rgba(255,215,0,0.3);
}

.rules-card h3 {
  margin: 0 0 10px;
  color: #0f5132;
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.rules-card ul {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 0.9rem;
  columns: 2;
}

.results-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(90deg, #f0f7f2, #e8f3ec);
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.status-bar {
  background: rgba(255,255,255,0.97);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.primary-small {
  background: linear-gradient(135deg, #198754, #0f5132);
  color: white;
  padding: 10px 16px;
  font-size: 0.9rem;
  border-radius: 8px;
}

.primary-small:disabled {
  background: #aaa;
  cursor: not-allowed;
}

.status-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#pull-espn-btn {
  background: linear-gradient(135deg, #0d6efd, #084298);
}

.odds-schedule {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

.odds-schedule.waiting {
  background: linear-gradient(90deg, #fff8e6, #fff3cd);
  color: #856404;
  border-left: 4px solid #ffc107;
}

.odds-schedule.active {
  background: linear-gradient(90deg, #d1e7dd, #c3e6cb);
  color: #0f5132;
  border-left: 4px solid #198754;
}

.schedule-icon { font-size: 1rem; }


.odds-row {
  padding: 10px 18px 6px;
  background: linear-gradient(180deg, #f8f5fd, #fff);
  border-bottom: 1px dashed #e6dff5;
}

.odds-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #6f42c1;
  margin-bottom: 6px;
}

.odds-bar {
  display: flex;
  height: 18px;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.odds-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: width 0.3s;
  min-width: 0;
  overflow: hidden;
}

.odds-a { background: linear-gradient(135deg, #198754, #0f5132); }
.odds-d { background: linear-gradient(135deg, #6c757d, #495057); }
.odds-b { background: linear-gradient(135deg, #dc3545, #a71d2a); }

.odds-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #333;
}

.pull-status {
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 600;
}

.pull-status.hidden { display: none; }
.pull-status.info { background: #cfe2ff; color: #084298; border-left: 4px solid #0d6efd; }
.pull-status.ok { background: #d1e7dd; color: #0f5132; border-left: 4px solid #198754; }
.pull-status.warn { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }
.pull-status.err { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }

.hint {
  font-size: 0.78rem;
  color: #888;
  font-style: italic;
  font-weight: normal;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  justify-content: center;
}

button {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

button:hover { opacity: 0.9; transform: translateY(-1px); }
button:active { transform: translateY(0); }

.ghost {
  background: rgba(255,255,255,0.18);
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(8px);
}

.danger {
  background: linear-gradient(135deg, #dc3545, #a71d2a);
  color: white;
}

/* GROUP CARD — TOURNAMENT STYLE */
.group-card {
  background: white;
  border-radius: 16px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  overflow: hidden;
  border: 2px solid rgba(255,215,0,0.4);
}

.group-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background:
    linear-gradient(135deg, rgba(255,215,0,0.15), transparent),
    linear-gradient(90deg, #0a3d2a, #0f5132 40%, #198754 100%);
  color: white;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.group-header::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffd700, transparent);
}

.group-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
}

.group-letter {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(255,215,0,0.4);
}

.group-label {
  font-size: 0.8rem;
  letter-spacing: 4px;
  opacity: 0.7;
  text-transform: uppercase;
}

.group-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.badge.points {
  background: linear-gradient(135deg, #ffd700, #ff9800);
  color: #4a2c00;
  border-color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  padding: 4px 13px;
  box-shadow: 0 2px 8px rgba(255,180,0,0.4);
}
.badge.locked-badge { background: rgba(255,152,0,0.45) !important; }

.chevron {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* STANDINGS TABLE */
.standings {
  padding: 14px 18px;
  background: linear-gradient(180deg, #f8faf9, #f0f7f2);
  border-bottom: 1px solid #e0e8e3;
}

.standings table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.standings th {
  text-align: center;
  padding: 6px 4px;
  background: #0f5132;
  color: #fff;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.standings th:first-child { border-top-left-radius: 6px; }
.standings th:last-child { border-top-right-radius: 6px; }

.standings th.team-col { text-align: left; padding-left: 10px; }

.standings td {
  text-align: center;
  padding: 7px 4px;
  background: white;
  border-bottom: 1px solid #eee;
}

.standings td.team-col {
  text-align: left;
  padding-left: 10px;
  font-weight: 600;
}

.standings td.pos { font-weight: 700; color: #888; }

.standings tr.qualifies td {
  background: #e8f5ec;
  border-left: 4px solid #198754;
}
.standings tr.qualifies td:first-child {
  background: #198754;
  color: white;
}
.standings tr.qualifies td.pts-col { color: #0f5132; }

.standings tr.third-place td {
  background: #fff8e6;
  border-left: 4px solid #ffc107;
}
.standings tr.third-place td:first-child {
  background: #ffc107;
  color: #4a2c00;
}

.standings td.pts-col { font-weight: 700; }

.standings-empty {
  margin-top: 8px;
  text-align: center;
  font-style: italic;
  color: #888;
  font-size: 0.85rem;
}

.matches {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(15,81,50,0.03), transparent),
    #fcfdfc;
}

.matches.hidden { display: none; }

/* MATCH CARD — BRACKET STYLE */
.match-card {
  background: white;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid #e0e8e3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: all 0.2s;
}

.match-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.match-card.filled {
  border-color: #198754;
  box-shadow: 0 4px 14px rgba(25,135,84,0.15);
}

.match-card.locked {
  border-color: #ff9800;
  background: linear-gradient(180deg, #fffaef, white);
}

.match-card.deadline-locked {
  border-color: #6c757d;
  background: linear-gradient(180deg, #f0f0f0, white);
  opacity: 0.92;
}

.match-card.deadline-locked.filled {
  border-color: #4a5568;
  background: linear-gradient(180deg, #e9ecef, white);
}

.deadline-banner {
  background: linear-gradient(90deg, #6c757d, #495057);
  color: white;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.match-card.deadline-locked .big-score,
.match-card.deadline-locked .extra-field input {
  background: #e9ecef;
  color: #495057;
  cursor: not-allowed;
}

.deadline-rule {
  background: linear-gradient(90deg, #fff3cd, #fff8e1);
  color: #856404;
  border-left: 4px solid #ffc107;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 8px;
  line-height: 1.5;
}

.deadline-rule code {
  background: rgba(0,0,0,0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.match-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: linear-gradient(90deg, #0a3d2a, #0f5132);
  color: #ffd700;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.meta-when { color: white; }

.meta-when .tz {
  background: rgba(255,215,0,0.25);
  color: #ffd700;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  margin-left: 4px;
  font-weight: 700;
}

.meta-venue {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  text-align: right;
}

.meta-countdown {
  margin: 0 4px;
}

.cd {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.cd-upcoming {
  background: rgba(255,255,255,0.15);
  color: #ffd700;
  border: 1px solid rgba(255,215,0,0.4);
}

.cd-soon {
  background: rgba(255,193,7,0.3);
  color: #fff;
  border: 1px solid #ffc107;
  animation: pulse-soon 2s infinite;
}

.cd-live {
  background: #dc3545;
  color: white;
  animation: pulse-live 1.2s infinite;
  border: 1px solid #b02a37;
}

.cd-finished {
  background: rgba(0,0,0,0.4);
  color: #aaa;
}

@keyframes pulse-soon {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,193,7,0.6); }
  50% { box-shadow: 0 0 0 6px rgba(255,193,7,0); }
}

@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,53,69,0.7); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(220,53,69,0); transform: scale(1.04); }
}

.match-bracket {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(90deg, #f8faf9 0%, white 50%, #f8faf9 100%);
  border-bottom: 1px dashed #e0e8e3;
}

.side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-a { justify-content: flex-end; text-align: right; }
.side-b { justify-content: flex-start; text-align: left; }

.flag {
  font-size: 2rem;
  line-height: 1;
}

.country {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.score-center {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #0a3d2a, #198754);
  border-radius: 10px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.25);
}

.big-score {
  width: 54px;
  height: 50px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.95);
  color: #0f5132;
  font-family: inherit;
}

.big-score:focus {
  outline: 3px solid #ffd700;
  outline-offset: 1px;
}

.big-score.actual {
  background: #fff8e6;
  color: #c97a00;
}

.colon {
  color: #ffd700;
  font-size: 1.5rem;
  font-weight: 900;
}

.extras {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  padding: 12px 18px;
  align-items: end;
}

.extra-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.extra-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #555;
}

.extra-hint {
  text-transform: none;
  font-weight: 500;
  font-size: 0.65rem;
  color: #888;
  letter-spacing: 0;
}

.extra-field input,
.extra-field .ou-select {
  padding: 7px 8px;
  border: 1px solid #d0d7d2;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  background: white;
  /* Half the previous footprint — corners/yellows/reds are tight Over/Under
     pickers, they don't need to span the whole column. */
  max-width: 110px;
}

/* ─── OU segmented control (Over/Under toggle buttons) ─── */
.ou-toggle {
  display: inline-flex;
  background: white;
  border: 1px solid #d0d7d2;
  border-radius: 8px;
  overflow: hidden;
  height: 36px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.ou-opt {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #495057;
  letter-spacing: 0.3px;
  font-family: inherit;
  border-right: 1px solid #e9ecef;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, transform 0.08s;
}
.ou-opt:last-child { border-right: 0; }
.ou-opt:hover:not(:disabled) { background: #f7faf8; }
.ou-opt:active:not(:disabled) { transform: scale(0.97); }
.ou-opt:disabled { opacity: 0.45; cursor: not-allowed; }

.ou-opt.is-active.is-over {
  background: #198754;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.ou-opt.is-active.is-under {
  background: #dc3545;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.ou-opt.ou-clear {
  background: #f1f3f5;
  color: #6c757d;
  font-size: 14px;
  padding: 0 10px;
  font-weight: 800;
}
.ou-opt.ou-clear:hover:not(:disabled) { background: #e9ecef; color: #495057; }

.extra-field input:focus,
.extra-field .ou-select:focus {
  outline: none;
  border-color: #198754;
  box-shadow: 0 0 0 2px rgba(25,135,84,0.2);
}

.ou-extras {
  grid-template-columns: 1fr 1fr 1fr auto;
}

@media (max-width: 600px) {
  .ou-extras {
    grid-template-columns: 1fr 1fr;
  }
}

.match-actions {
  display: flex;
  gap: 4px;
}

.icon-btn {
  background: transparent;
  font-size: 1.2rem;
  padding: 6px 10px;
  line-height: 1;
  border-radius: 8px;
}

.icon-btn:hover { background: rgba(0,0,0,0.06); }

/* Lock button is the primary CTA on a filled prediction — make it pop so
   users notice they have to click it to commit before kickoff. */
.lock-match {
  background: #198754;
  color: #fff;
  font-size: 1.6rem;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(25,135,84,0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.lock-match:hover {
  background: #146c43;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(25,135,84,0.5);
}
.unlock-match { color: #ff9800; }
.clear-match, .clear-result { color: #dc3545; font-size: 1.4rem; }

.lock-match:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #198754;
  box-shadow: none;
  transform: none;
}
.lock-match:disabled:hover { background: #198754; transform: none; }

.match-card.locked .big-score,
.match-card.locked .extra-field input {
  background: #f0f0f0;
  color: #555;
  cursor: not-allowed;
}

.match-card.locked .big-score {
  background: rgba(255,255,255,0.6);
  color: #777;
}

/* ACTUAL RESULT BLOCK */
.actual-block {
  padding: 12px 18px 16px;
  background: linear-gradient(180deg, #fffbef, #fff8e6);
  border-top: 1px dashed #e6c47a;
}

.actual-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #c97a00;
  margin-bottom: 8px;
}

.actual-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.actual-row .actual {
  padding: 7px 10px;
  border: 1px solid #e6c47a;
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
}

.actual-row > .actual:nth-of-type(3),
.actual-row > .actual:nth-of-type(4) {
  flex: 1;
  min-width: 100px;
}

/* SCORE BREAKDOWN */
.score-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fffdf5, #fff3c4);
  border-top: 2px solid #ffd700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.points-total {
  font-weight: 900;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #ff9800, #c97a00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 6px;
  letter-spacing: 0.5px;
}

.point-tag {
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.point-tag.hit {
  background: linear-gradient(135deg, #28a745, #155724);
  color: white;
  box-shadow: 0 2px 6px rgba(40,167,69,0.35);
}

.point-tag.miss {
  background: #f8d7da;
  color: #721c24;
  opacity: 0.7;
}

/* TEAM-LINK (clickable country name) */
.team-link {
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  position: relative;
}
.team-link:hover {
  color: #198754;
  transform: translateY(-1px);
}
.team-link::after {
  content: " 👁";
  font-size: 0.7em;
  opacity: 0;
  transition: opacity 0.15s;
}
.team-link:hover::after { opacity: 0.6; }

/* SQUAD MODAL */
.squad-card {
  max-width: 640px !important;
  width: 100%;
  padding: 0 !important;
  overflow: hidden;
}

.squad-close {
  position: absolute;
  top: 10px; right: 14px;
  background: transparent;
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 8px;
  z-index: 10;
}
.squad-close:hover { background: rgba(255,255,255,0.2); }

.squad-header {
  background: linear-gradient(135deg, #0a3d2a, #198754);
  color: white;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.squad-flag {
  font-size: 3.4rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  line-height: 1;
}

.squad-team-name {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: 1px;
  font-weight: 800;
}

.squad-coach {
  font-size: 0.85rem;
  opacity: 0.85;
  letter-spacing: 0.5px;
  margin-top: 2px;
  font-weight: 500;
}

.squad-body {
  padding: 18px 22px 22px;
  max-height: 70vh;
  overflow-y: auto;
}

.squad-section {
  margin-bottom: 18px;
}

.squad-section h4 {
  margin: 0 0 8px;
  color: #0f5132;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 2px solid #198754;
  padding-bottom: 4px;
}

.squad-count {
  font-weight: 500;
  color: #888;
  font-size: 0.85rem;
}

.squad-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.squad-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f8faf9;
  border-radius: 8px;
  border-left: 3px solid #198754;
}

.player-num {
  background: linear-gradient(135deg, #198754, #0f5132);
  color: white;
  font-weight: 800;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.2;
}

.player-info strong {
  color: #1a1a1a;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-info small {
  color: #666;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.squad-empty {
  text-align: center;
  padding: 30px 20px;
  color: #555;
  line-height: 1.6;
}

.squad-empty code {
  background: #eee;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85em;
}

@media (max-width: 600px) {
  .squad-list { grid-template-columns: 1fr; }
  .squad-team-name { font-size: 1.3rem; }
  .squad-flag { font-size: 2.6rem; }
}

/* MODAL */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal.hidden { display: none; }

.modal-card {
  background: white;
  border-radius: 16px;
  padding: 28px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border: 2px solid rgba(255,215,0,0.5);
}

.modal-card.small { max-width: 360px; text-align: center; }

.login-back {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #f0f0f0;
  color: #333;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  cursor: pointer;
}
.login-back:hover {
  background: #198754;
  color: white;
  border-color: #198754;
}

.modal-card {
  position: relative;
}

.modal-card h2 {
  margin: 0 0 4px;
  color: #0f5132;
  text-align: center;
}

.modal-subtitle {
  text-align: center;
  margin: 0 0 20px;
  color: #666;
  font-size: 0.9rem;
}

.modal-card h3 {
  color: #0f5132;
  margin: 0 0 12px;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.login-form {
  background: linear-gradient(180deg, #f8faf9, #f0f7f2);
  border: 1px solid #d0e0d6;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.login-form .field { margin-bottom: 12px; }

.login-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #c0d0c6;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
}

.login-form input:focus {
  outline: none;
  border-color: #198754;
  box-shadow: 0 0 0 3px rgba(25,135,84,0.2);
}

.login-form .primary-big {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  margin-top: 4px;
  border-radius: 10px;
}

.login-error {
  margin-top: 10px;
  background: #f8d7da;
  color: #721c24;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  border-left: 3px solid #dc3545;
}
.login-error.hidden { display: none; }

.login-help {
  text-align: center;
  font-size: 0.82rem;
  color: #777;
  margin: 0 0 14px;
  font-style: italic;
}

.empty-list {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 14px;
}

.user-list { margin-bottom: 8px; }

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.user-tile {
  position: relative;
  background: linear-gradient(180deg, #f8faf9, #f0f7f2);
  border: 2px solid #d0e0d6;
  border-radius: 12px;
  padding: 16px 10px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  font-family: inherit;
}

.user-tile:hover {
  border-color: #198754;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(25,135,84,0.2);
}

.user-tile.me {
  border-color: #ffd700;
  background: linear-gradient(180deg, #fffdf5, #fff8e6);
}

.tile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #198754, #0f5132);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-img.lb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.avatar-letter {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}

.avatar-letter.lb {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #198754, #0f5132);
  color: white;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.tile-name { font-weight: 700; color: #1a1a1a; font-size: 0.95rem; }
.tile-team {
  font-size: 0.72rem;
  color: #555;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.tile-pts { font-size: 0.8rem; color: #c97a00; font-weight: 600; }

.tile-edit {
  position: absolute;
  bottom: 4px;
  left: 6px;
  color: #198754;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  opacity: 0.5;
}
.tile-edit:hover { opacity: 1; background: rgba(25,135,84,0.1); }

.tile-resetpin {
  position: absolute;
  bottom: 4px;
  left: 32px;
  font-size: 0.95rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  opacity: 0.55;
  cursor: pointer;
}
.tile-resetpin:hover { opacity: 1; background: rgba(13,110,253,0.1); }

.tile-lock {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 0.85rem;
}

.tile-me {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #ffd700;
  color: #4a2c00;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.tile-delete {
  position: absolute;
  bottom: 4px;
  right: 6px;
  color: #dc3545;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  opacity: 0.5;
}

.tile-delete:hover { opacity: 1; background: rgba(220,53,69,0.1); }

.divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  color: #999;
  font-size: 0.85rem;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: #ddd;
  z-index: 0;
}

.divider span {
  position: relative;
  background: white;
  padding: 0 12px;
  z-index: 1;
}

.admin-gate {
  background: linear-gradient(135deg, #fff8e6, #fff3cd);
  border: 2px dashed #ffc107;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  margin-bottom: 14px;
}

.admin-icon {
  font-size: 2.4rem;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.admin-gate h3 {
  margin: 0 0 4px;
  color: #856404;
}

.admin-msg {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: #856404;
}

.admin-gate input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ffc107;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  margin-bottom: 8px;
}

.admin-gate input:focus {
  outline: none;
  border-color: #856404;
  box-shadow: 0 0 0 3px rgba(133,100,4,0.2);
}

.admin-gate button {
  width: 100%;
  padding: 10px;
}

.admin-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  border-left: 4px solid #198754;
  color: #0f5132;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-badge.hidden { display: none; }

.create-form.hidden { display: none; }

.req-tag {
  background: #dc3545;
  color: white;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 800;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.req-tag-sm {
  background: #dc3545;
  color: white;
  font-size: 0.55rem;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-left: 2px;
  vertical-align: middle;
}

/* YAPPY UPLOAD (wide rectangle) */
.yappy-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.yappy-zone {
  width: 100%;
  min-height: 130px;
  background: linear-gradient(135deg, #fffaef, #fff3c4);
  border: 3px dashed #ff9800;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  color: #c97a00;
  text-align: center;
  position: relative;
  transition: all 0.15s;
}
.yappy-zone:hover {
  background: linear-gradient(135deg, #fff3c4, #ffeaa0);
  transform: scale(1.01);
}
.yappy-zone small {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}
#yappy-preview {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  display: none;
  border-radius: 8px;
}

/* PENDING BANNER (inside app shell) */
.pending-banner {
  background: linear-gradient(90deg, #fff3cd, #ffe69c);
  color: #856404;
  padding: 12px 20px;
  text-align: center;
  border-bottom: 3px solid #ffc107;
  font-size: 0.95rem;
}
.pending-banner.hidden { display: none; }

/* PENDING USER TILES */
.user-tile.pending {
  background: linear-gradient(180deg, #fff8e6, #fff3cd);
  border-color: #ffc107;
}
.tile-pending-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #ffc107;
  color: #4a2c00;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.tile-review {
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: linear-gradient(135deg, #198754, #0f5132);
  color: white;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.tile-review:hover { transform: scale(1.05); }

.pending-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #856404 !important;
}
.pending-count {
  background: #dc3545;
  color: white;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* PENDING DOT on user pill */
.pending-dot {
  background: #dc3545;
  color: white;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  box-shadow: 0 0 10px rgba(220,53,69,0.7);
  animation: dot-pulse 1.5s ease-in-out infinite;
}
.pending-dot.hidden { display: none; }
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(220,53,69,0.7); }
  50% { box-shadow: 0 0 18px rgba(220,53,69,1); }
}

/* VERIFY MODAL */
.verify-card { max-width: 640px !important; padding: 0 !important; overflow: hidden; }
.verify-header {
  background: linear-gradient(135deg, #ff9800, #c97a00);
  color: white;
  padding: 18px 22px;
  text-align: center;
}
.verify-tag {
  display: inline-block;
  background: rgba(0,0,0,0.2);
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.verify-header h2 {
  margin: 8px 0 0;
  font-size: 1.8rem;
  letter-spacing: 1px;
}
.verify-body {
  padding: 20px;
}
.verify-row {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
}
.verify-photo-block { flex-shrink: 0; }
.verify-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #555;
  margin-bottom: 6px;
}
.verify-photo {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  background: #f0f0f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ddd;
}
.verify-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.verify-meta {
  flex: 1;
  font-size: 0.95rem;
}
.verify-meta > div {
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}
.verify-yappy {
  background: #f8faf9;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.verify-yappy img {
  max-width: 100%;
  max-height: 360px;
  border-radius: 6px;
}
.no-img {
  color: #888;
  font-style: italic;
  font-size: 0.9rem;
  padding: 30px;
}

.photo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.photo-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0f7f2, #e8f3ec);
  border: 3px dashed #198754;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  color: #198754;
  text-align: center;
  font-size: 1.6rem;
  position: relative;
  transition: all 0.15s;
}

.photo-circle:hover {
  background: linear-gradient(135deg, #e8f3ec, #d4ebd9);
  transform: scale(1.03);
}

.photo-circle small {
  font-size: 0.65rem;
  font-weight: 600;
  color: #198754;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.photo-clear {
  background: #f0f0f0;
  color: #333;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 12px;
}

.photo-clear.hidden { display: none; }

.create-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
}

.create-form select:focus {
  outline: none;
  border-color: #198754;
  box-shadow: 0 0 0 3px rgba(25,135,84,0.2);
}

.create-form .field {
  margin-bottom: 10px;
}

.create-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.create-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.create-form input:focus {
  outline: none;
  border-color: #198754;
  box-shadow: 0 0 0 3px rgba(25,135,84,0.2);
}

.primary-big {
  background: linear-gradient(135deg, #198754, #0f5132);
  color: white;
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  margin-top: 8px;
  border-radius: 8px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  justify-content: center;
}

.ghost-dark {
  background: #e0e0e0;
  color: #333;
}

.confirm-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 12px rgba(255,152,0,0.4));
}

.confirm-body {
  margin: 14px 0;
}

.cb-match {
  background: linear-gradient(180deg, #f0f7f2, #fcfdfc);
  border: 2px solid #198754;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
}

.cb-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  text-align: center;
  margin-bottom: 8px;
}

.cb-side {
  font-size: 0.95rem;
}

.cb-side > :first-child { font-size: 2rem; }

.cb-score {
  font-size: 2.2rem;
  font-weight: 900;
  color: #0f5132;
  padding: 8px 14px;
  background: linear-gradient(135deg, #fff, #f8faf9);
  border-radius: 10px;
  border: 2px solid #ffd700;
}

.cb-score small {
  color: #ffd700;
  font-size: 1.4rem;
}

.cb-extras {
  text-align: center;
  font-size: 0.85rem;
  color: #555;
  font-weight: 600;
  padding-top: 8px;
  border-top: 1px dashed #d0e0d6;
}

.cb-line {
  background: #f8faf9;
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: 6px;
  font-size: 0.9rem;
  border-left: 3px solid #198754;
}

.cb-more {
  text-align: center;
  color: #888;
  font-style: italic;
  font-size: 0.85rem;
  padding-top: 6px;
}

.confirm-warning {
  background: linear-gradient(90deg, #fff8e6, #fff3cd);
  color: #856404;
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.confirm-check {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8faf9;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d0e0d6;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 14px;
  user-select: none;
}

.confirm-check input {
  width: 18px;
  height: 18px;
  accent-color: #198754;
  cursor: pointer;
}

.primary-small:disabled {
  background: #aaa;
  cursor: not-allowed;
  opacity: 0.6;
}

#pin-input {
  font-size: 2rem;
  letter-spacing: 1rem;
  text-align: center;
  padding: 12px;
  width: 100%;
  border: 2px solid #198754;
  border-radius: 10px;
  font-family: inherit;
}

.pin-error {
  margin-top: 10px;
  color: #dc3545;
  font-weight: 700;
}

.pin-error.hidden { display: none; }

/* USER BAR */
.user-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

/* WALLET PILL — sized up + shine to draw the eye */
.wallet-pill {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  background:
    radial-gradient(ellipse at top, rgba(255,255,255,0.18), transparent 60%),
    linear-gradient(135deg, #28a745 0%, #198754 50%, #0f5132 100%);
  border: 2px solid rgba(255,215,0,0.55);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.2) inset,
    0 0 22px rgba(40,167,69,0.45),
    0 6px 16px rgba(0,0,0,0.25);
  animation: wallet-glow 3s ease-in-out infinite;
}
.wallet-pill.hidden { display: none; }

@keyframes wallet-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.2) inset, 0 0 22px rgba(40,167,69,0.45), 0 6px 16px rgba(0,0,0,0.25); }
  50%      { box-shadow: 0 0 0 1px rgba(255,255,255,0.25) inset, 0 0 32px rgba(255,215,0,0.55), 0 6px 16px rgba(0,0,0,0.3); }
}

/* Sweeping shine across the pill */
.wallet-pill::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg,
    transparent 30%,
    rgba(255,255,255,0.55) 50%,
    transparent 70%);
  transform: skewX(-20deg);
  animation: wallet-shine 4.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes wallet-shine {
  0%, 100% { left: -120%; }
  55%      { left: 140%; }
}

.wallet-balance-btn,
.wallet-topup-btn {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  color: white;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.wallet-balance-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 1.25rem;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35), 0 0 10px rgba(255,215,0,0.4);
}

.wallet-icon { font-size: 1.5rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }

#wallet-balance-text { font-variant-numeric: tabular-nums; }

.wallet-topup-btn {
  background: rgba(255,215,0,0.22);
  padding: 8px 14px;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  border-left: 1px solid rgba(255,255,255,0.3);
  text-transform: uppercase;
}

.wallet-balance-btn:hover { background: rgba(255,255,255,0.12); transform: scale(1.02); }
.wallet-topup-btn:hover   { background: rgba(255,215,0,0.4); }

/* LEDGER */
.ledger-card { max-width: 720px !important; }
.ledger-balance {
  text-align: center;
  margin: 14px 0 18px;
  padding: 14px;
  background: linear-gradient(135deg, #f0f7f2, #d4ebd9);
  border-radius: 12px;
  border: 2px solid #198754;
}
.ledger-balance-label {
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #198754;
  font-weight: 800;
}
.ledger-balance-num {
  font-size: 2.4rem;
  font-weight: 900;
  color: #0f5132;
  letter-spacing: -1px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.ledger-section-title {
  margin: 16px 0 8px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #555;
}
.ledger-empty {
  font-style: italic;
  color: #888;
  text-align: center;
  padding: 14px;
  background: #f8f9fa;
  border-radius: 8px;
}
.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.ledger-table th, .ledger-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.ledger-table th {
  background: #f8faf9;
  color: #555;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.ledger-table td.num, .ledger-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-table .pos { color: #198754; font-weight: 700; }
.ledger-table .neg { color: #dc3545; font-weight: 700; }

.dep-status {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
}
.dep-pending  { background: #fff3cd; color: #856404; }
.dep-approved { background: #d1e7dd; color: #0f5132; }
.dep-rejected { background: #f8d7da; color: #721c24; }

/* Ledger surplus + cash-out */
.ledger-surplus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.ledger-mini {
  background: #fafafa;
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
}
.ledger-mini-label {
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #777;
  font-weight: 700;
  margin-bottom: 4px;
}
.ledger-mini-val {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1a1a1a;
}
.ledger-mini-surplus {
  background: linear-gradient(135deg, #d1e7dd, #c3e6cb);
  border-color: #198754;
}
.ledger-mini-surplus .ledger-mini-val { color: #0f5132; }
.ledger-cashout-btn {
  width: 100%;
  background: linear-gradient(135deg, #dc3545, #a71d2a);
  border-radius: 10px;
  margin-bottom: 6px;
}
.ledger-cashout-btn:disabled {
  background: #ccc;
  opacity: 0.6;
  cursor: not-allowed;
}
.ledger-cashout-hint {
  font-size: 0.78rem;
  color: #777;
  font-style: italic;
  margin: 0 0 12px;
  text-align: center;
}

/* Cash-out modal */
.cashout-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.cashout-stats > div {
  background: #f8faf9;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.cashout-stats > div span {
  display: block;
  font-size: 0.7rem;
  color: #777;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}
.cashout-stats > div strong {
  font-size: 1.1rem;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
}
.cashout-stat-highlight {
  background: linear-gradient(135deg, #d1e7dd, #c3e6cb) !important;
  border: 2px solid #198754;
}
.cashout-stat-highlight strong { color: #0f5132 !important; }

.cashout-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.cashout-chips .chip-btn {
  flex: 1;
  background: white;
  border: 2px solid #dc3545;
  color: #dc3545;
}
.cashout-chips .chip-btn:hover {
  background: #dc3545;
  color: white;
}

.cashout-preview {
  background: linear-gradient(135deg, #fff8e6, #fff3cd);
  border: 2px solid #ffc107;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.cashout-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.92rem;
}
.cashout-preview-row strong { font-variant-numeric: tabular-nums; }
.cashout-preview-row .penalty { color: #dc3545; }
.cashout-preview-net {
  border-top: 1px dashed #ffc107;
  padding-top: 8px;
  margin-top: 4px;
  font-weight: 800;
}
.cashout-preview-net strong { color: #0f5132; font-size: 1.15rem; }

.cashout-rules {
  font-size: 0.78rem;
  color: #777;
  font-style: italic;
  margin: 8px 0 12px;
  text-align: center;
}
.cashout-rules .hidden { display: none; }

.wd-net-row { color: #0f5132; font-weight: 700; }
.wd-instructions {
  background: #fff3cd;
  color: #856404;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
  font-size: 0.88rem;
  margin-top: 14px;
}

/* PENDING DEPOSITS (in admin panel) */
.pending-deposits-list { margin-top: 18px; }

/* BETTING SETTINGS panel */
.bet-config-section {
  margin-top: 24px;
  padding: 18px;
  background: linear-gradient(180deg, #f5f0fa, #faf6ff);
  border: 1px solid #d6c8e8;
  border-radius: 14px;
}
.bet-config-section h3 {
  margin: 0 0 10px;
  color: #4d2d8f;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 1rem;
}
.bet-config-note {
  background: linear-gradient(90deg, #fff3cd, #ffe69c);
  color: #856404;
  border-left: 4px solid #ffc107;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.45;
}

.bet-control {
  margin-bottom: 16px;
  background: white;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e0d8eb;
}
.bet-control > label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: #4d2d8f;
  margin-bottom: 6px;
  font-size: 0.92rem;
  gap: 10px;
  flex-wrap: wrap;
}
.bet-control > small {
  display: block;
  color: #777;
  font-size: 0.78rem;
  font-style: italic;
  margin-top: 6px;
}
.big-readout {
  background: linear-gradient(135deg, #6f42c1, #4d2d8f);
  color: white;
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-style: normal;
}

.bet-control input[type=range] {
  width: 100%;
  accent-color: #6f42c1;
}
.bet-control input[type=number],
.bet-control input[type=text] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}
.bet-control input:focus {
  outline: none;
  border-color: #6f42c1;
  box-shadow: 0 0 0 3px rgba(111,66,193,0.2);
}

.bet-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
  background: #eee;
}
.bar-pocket { background: linear-gradient(135deg, #198754, #0f5132); transition: width 0.2s; }
.bar-bote   { background: linear-gradient(135deg, #ffc107, #c97a00); transition: width 0.2s; }

.bet-toggle-group {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.toggle-btn {
  flex: 1;
  background: #f0f0f0;
  border: 2px solid #ddd;
  color: #555;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.toggle-btn:hover { border-color: #6f42c1; color: #4d2d8f; }
.toggle-btn.active {
  background: linear-gradient(135deg, #6f42c1, #4d2d8f);
  color: white;
  border-color: #4d2d8f;
  box-shadow: 0 2px 8px rgba(111,66,193,0.3);
}

#bc-save {
  margin-top: 12px;
  background: linear-gradient(135deg, #6f42c1, #4d2d8f);
  border-radius: 10px;
}

.bc-save-status {
  margin-top: 10px;
  padding: 9px 13px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}
.bc-save-status.ok  { background: #d1e7dd; color: #0f5132; border-left: 3px solid #198754; }
.bc-save-status.err { background: #f8d7da; color: #721c24; border-left: 3px solid #dc3545; }
.bc-save-status.hidden { display: none; }

.bc-log-heading {
  margin: 20px 0 8px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #4d2d8f;
}
.bc-log { display: flex; flex-direction: column; gap: 4px; }
.bc-log-entry {
  background: white;
  border: 1px solid #e0d8eb;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bc-log-date { color: #888; font-size: 0.72rem; min-width: 90px; }
.bc-log-field { font-weight: 700; color: #4d2d8f; }
.bc-log-arrow { color: #888; }
.bc-log-entry code {
  background: #f5f0fa;
  color: #4d2d8f;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* BUY-IN icon on user tile */
.tile-buyin {
  position: absolute;
  bottom: 4px;
  left: 56px;
  font-size: 0.95rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  opacity: 0.6;
  cursor: pointer;
}
.tile-buyin:hover { opacity: 1; background: rgba(255,180,0,0.15); }

.logout-btn {
  background: rgba(220,53,69,0.18);
  border: 1px solid rgba(220,53,69,0.5);
  color: white;
  padding: 6px 14px;
  border-radius: 24px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.15s;
}
.logout-btn:hover {
  background: rgba(220,53,69,0.4);
  transform: translateY(-1px);
}

.user-pill {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 24px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.user-pill:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ffb300);
  color: #0f5132;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.switch-icon { opacity: 0.6; }

/* LEADERBOARD */
.leaderboard-card {
  background: white;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  border: 2px solid rgba(255,215,0,0.4);
}

.leaderboard-card.hidden { display: none; }

/* ─── Profile modal ───────────────────────────────────────── */
.profile-modal-card {
  max-width: 560px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
}
.profile-loading { text-align: center; padding: 40px; color: #888; }
.profile-body { padding: 4px 2px; }
.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
  margin-bottom: 14px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #198754;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 20px; font-weight: 700; color: #0f5132; margin: 0 0 4px; }
.profile-meta { font-size: 12px; color: #666; }
.profile-meta span { margin-right: 10px; }
.profile-status-verified { color: #198754; font-weight: 600; }
.profile-status-pending  { color: #b87900; font-weight: 600; }

.profile-section { margin-top: 16px; }
.profile-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #555;
  margin: 0 0 8px;
}
.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.profile-stat {
  background: #f7faf8;
  border: 1px solid #e0ebe4;
  border-radius: 8px;
  padding: 10px 12px;
}
.profile-stat-label { font-size: 11px; color: #666; text-transform: uppercase; }
.profile-stat-value { font-size: 18px; font-weight: 700; color: #0f5132; }
.profile-stat-sub { font-size: 11px; color: #999; }

.profile-cat-bars { display: flex; flex-direction: column; gap: 6px; }
.profile-cat-bar { font-size: 12px; }
.profile-cat-bar-head { display: flex; justify-content: space-between; margin-bottom: 2px; color: #333; }
.profile-cat-bar-track { background: #eee; border-radius: 6px; height: 8px; overflow: hidden; }
.profile-cat-bar-fill { height: 100%; border-radius: 6px; transition: width 0.4s; }

.profile-bets-list, .profile-deposits-list {
  list-style: none; padding: 0; margin: 0;
  max-height: 220px; overflow-y: auto;
  border: 1px solid #eee; border-radius: 8px;
}
.profile-bets-list li, .profile-deposits-list li {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f3f3;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.profile-bets-list li:last-child, .profile-deposits-list li:last-child { border-bottom: none; }
.profile-bet-stake { font-weight: 700; color: #0d6efd; white-space: nowrap; }
.profile-bet-won  { color: #198754; }
.profile-bet-lost { color: #dc3545; }
.profile-bet-refunded { color: #6c757d; }
.profile-deposit-amount { font-weight: 700; color: #198754; white-space: nowrap; }
.profile-deposit-status-approved { color: #198754; font-size: 11px; }
.profile-deposit-status-rejected { color: #dc3545; font-size: 11px; }
.profile-deposit-status-pending  { color: #b87900; font-size: 11px; }
.profile-private-banner {
  background: #fff3cd; color: #6b5500; border: 1px solid #ffeeba;
  padding: 6px 10px; border-radius: 6px; font-size: 11px; margin-bottom: 10px;
}

/* ─── Today's matches panel ───────────────────────────────── */
.today-matches-section {
  background: linear-gradient(180deg, #fffdf4 0%, #fff8e1 100%);
  color: #1a1a1a;
  border-radius: 14px;
  padding: 14px 18px;
  margin: 16px 0;
  border: 2px solid rgba(25,135,84,0.4);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.today-matches-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(25,135,84,0.3);
  margin-bottom: 10px;
}
.today-matches-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #0f5132;
  text-transform: uppercase;
}
.today-matches-date {
  font-size: 12px;
  color: #555;
  font-weight: 600;
}
.today-matches-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.today-match-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: white;
  border: 1px solid #e0ebe4;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.today-match-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(25,135,84,0.18);
  border-color: #198754;
}
.today-match-time {
  font-weight: 700;
  color: #0f5132;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.today-match-time small { display: block; font-size: 10px; color: #888; font-weight: 500; }
.today-match-teams { font-size: 14px; color: #1a1a1a; }
.today-match-teams strong { font-weight: 700; }
.today-match-stage {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: #198754;
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.today-match-stage.live { background: #dc3545; animation: live-pulse 1.4s ease-in-out infinite; }
.today-match-stage.finished { background: #6c757d; }
.today-match-stage.soon { background: #ff9800; }
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.today-matches-empty {
  text-align: center;
  padding: 24px 12px;
  color: #6c757d;
  font-size: 14px;
  font-style: italic;
}

/* ─── Toast notifications (top-right stack) ───────────────── */
.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast {
  pointer-events: auto;
  background: linear-gradient(180deg, #198754 0%, #0f5132 100%);
  color: white;
  border: 2px solid #ffd84d;
  border-radius: 10px;
  padding: 12px 16px 12px 14px;
  min-width: 280px;
  max-width: 360px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toast-in 0.25s cubic-bezier(.2,.9,.3,1.2);
  font-size: 13px;
}
.toast.toast-leaving {
  animation: toast-out 0.2s ease-in forwards;
}
.toast-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
.toast-body { flex: 1; }
.toast-title {
  font-weight: 700;
  font-size: 13px;
  color: #ffd84d;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}
.toast-text { line-height: 1.35; }
.toast-close {
  background: transparent;
  border: 0;
  color: #ffd84d;
  font-size: 18px;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  font-weight: 700;
  flex-shrink: 0;
}
.toast-close:hover { color: white; }
.toast.toast-info {
  background: linear-gradient(180deg, #0d6efd 0%, #0a4d9a 100%);
  border-color: #99c2ff;
}
.toast.toast-info .toast-title,
.toast.toast-info .toast-close { color: #99c2ff; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}
@media (max-width: 600px) {
  .toast-stack { top: 8px; right: 8px; left: 8px; }
  .toast { min-width: 0; max-width: 100%; }
}

/* ─── Scroll-to-top (floating + inline) ───────────────────── */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #198754;
  color: white;
  border: 2px solid rgba(255,215,0,0.5);
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 250;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: transform 0.15s, opacity 0.2s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}
.scroll-to-top:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}
.scroll-to-top:hover {
  transform: translateY(-2px) scale(1.05);
  background: #146c43;
}
.scroll-to-top.hidden { display: flex; } /* override generic .hidden to keep fade */

.scroll-to-top-inline {
  background: #198754;
  color: white;
  border: 1px solid rgba(255,215,0,0.4);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 8px;
}
.scroll-to-top-inline:hover { background: #146c43; }

/* ─── All matches (chronological, collapsible) ────────────── */
.all-matches-section {
  background: linear-gradient(180deg, #fffdf4 0%, #fff8e1 100%);
  color: #1a1a1a;
  border-radius: 14px;
  padding: 14px 18px;
  margin: 16px 0;
  border: 2px solid rgba(13, 110, 253, 0.35);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.all-matches-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(13, 110, 253, 0.35);
  margin-bottom: 10px;
}
.all-matches-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #0d4d9a;
  text-transform: uppercase;
}
.all-matches-count {
  background: #0d4d9a;
  color: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}
.all-matches-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.all-matches-date-sep {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6c757d;
  padding: 8px 4px 4px;
  font-weight: 700;
  border-bottom: 1px solid #eee;
  margin-top: 6px;
}
.all-matches-date-sep:first-child { margin-top: 0; }
.am-row {
  background: white;
  border: 1px solid #e0ebe4;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.12s, border-color 0.12s;
}
.am-row.expanded { border-color: #0d4d9a; box-shadow: 0 4px 12px rgba(13,77,154,0.22); }
.am-head {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.1s;
}
.am-head:hover { background: #f7faf8; }
.am-time { font-weight: 700; color: #0f5132; font-size: 13px; font-variant-numeric: tabular-nums; }
.am-time small { display: block; font-size: 9px; color: #888; font-weight: 500; }
.am-teams { font-size: 13px; color: #1a1a1a; }
.am-teams strong { font-weight: 700; }
.am-flags { font-size: 14px; margin: 0 3px; }
.am-tags { display: flex; align-items: center; gap: 6px; }
.am-stage-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  background: #eef2ee;
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 700;
}
.am-status-pending {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #b87900;
  background: #fff3cd;
  border: 1px solid #ffe69a;
  border-radius: 999px;
  padding: 3px 9px;
}
.am-status-predicted {
  font-size: 13px;
  color: #198754;
  font-weight: 800;
  background: #d1e7dd;
  border: 1px solid #a3cfbb;
  border-radius: 999px;
  padding: 2px 8px;
}
.am-points {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.am-points-pos {
  background: linear-gradient(180deg, #fff8e1 0%, #ffe082 100%);
  color: #6b4d00;
  border: 1px solid #ffc107;
  box-shadow: 0 1px 2px rgba(255,193,7,0.35);
}
.am-points-zero {
  background: #e9ecef;
  color: #6c757d;
  border: 1px solid #ced4da;
}
.am-status-bet {
  font-size: 14px;
  color: #fff;
  background: linear-gradient(180deg, #f0b400 0%, #b87900 100%);
  border: 1px solid #8a5a00;
  font-weight: 900;
  text-shadow: 0 1px 1px rgba(0,0,0,0.25);
  border-radius: 999px;
  width: 26px;
  height: 26px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: 0 1px 3px rgba(184,121,0,0.4);
}
.am-status-bet:hover { transform: scale(1.1); box-shadow: 0 2px 6px rgba(184,121,0,0.55); }
.am-status-bet:active { transform: scale(0.95); }

/* Outcome variants: green if won, red if lost. Gold default = active. */
.am-status-bet--won {
  background: linear-gradient(180deg, #28a745 0%, #146c43 100%);
  border-color: #0a3d24;
  box-shadow: 0 1px 3px rgba(20,108,67,0.5);
}
.am-status-bet--won:hover { box-shadow: 0 2px 6px rgba(20,108,67,0.65); }
.am-status-bet--lost {
  background: linear-gradient(180deg, #dc3545 0%, #842029 100%);
  border-color: #5a161c;
  box-shadow: 0 1px 3px rgba(132,32,41,0.5);
}
.am-status-bet--lost:hover { box-shadow: 0 2px 6px rgba(132,32,41,0.65); }
.am-status-bet--refunded {
  background: linear-gradient(180deg, #adb5bd 0%, #6c757d 100%);
  border-color: #495057;
  box-shadow: 0 1px 3px rgba(73,80,87,0.4);
  font-size: 11px;        /* "RF" is wider than "$" — shrink a touch */
  letter-spacing: 0.3px;
}
.am-status-bet--refunded:hover { box-shadow: 0 2px 6px rgba(73,80,87,0.55); }

/* Bet summary popup (anchored to $ icon) */
.bet-summary-popup {
  position: fixed;
  z-index: 9999;
  background: white;
  border: 2px solid #b87900;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  padding: 12px 14px;
  font-size: 13px;
  color: #1a1a1a;
  animation: bsp-pop 0.15s ease-out;
}
@keyframes bsp-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bsp-head {
  font-weight: 700;
  font-size: 12px;
  color: #8a5a00;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #ffe082;
  margin-bottom: 6px;
  padding-right: 24px;
}
.bsp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* The bet line itself uses money/casino green so it pops as the
   meaningful info. Container stays clean white. */
.bsp-list li {
  background: linear-gradient(180deg, #198754 0%, #0f5132 100%);
  border: 1px solid #0a3d24;
  border-radius: 6px;
  padding: 7px 10px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 1px 3px rgba(15,81,50,0.3);
  text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}
.bsp-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: 0;
  font-size: 18px;
  color: #8a5a00;
  cursor: pointer;
  font-weight: 700;
  padding: 0;
  line-height: 1;
}
.bsp-close:hover { color: #b02a37; }
.am-chevron { color: #999; font-size: 10px; transition: transform 0.2s; }
.am-row.expanded .am-chevron { transform: rotate(90deg); color: #0d4d9a; }
.am-body { padding: 8px 12px 14px; border-top: 1px solid #eef2ee; background: #fafdfb; display: none; }
.am-row.expanded .am-body { display: block; }
.am-body .match-card,
.am-body .bet-card { margin-top: 8px; }

.all-matches-empty { text-align: center; padding: 20px 12px; color: #6c757d; font-size: 14px; }

/* ─── Custody panel (admin) ───────────────────────────────── */
.custody-panel {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 10px;
  padding: 12px;
  margin-top: 4px;
}
.custody-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px dashed #b87900;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.custody-balance-label { font-size: 12px; color: #6b5500; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 700; }
.custody-balance-amount { font-size: 22px; font-weight: 800; color: #0f5132; }

.custody-refund-form {
  display: grid;
  grid-template-columns: 1.5fr 1fr 2fr auto;
  gap: 6px;
  margin-bottom: 10px;
  align-items: stretch;
}
.custody-refund-form input {
  padding: 7px 10px;
  border: 1px solid #ffc107;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  background: white;
  min-width: 0;
}
.custody-refund-form button {
  padding: 7px 12px;
  background: #198754;
  color: white;
  font-weight: 700;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.custody-refund-form button:hover { background: #146c43; }
.custody-refund-form button:disabled { background: #6c757d; cursor: not-allowed; }
@media (max-width: 600px) {
  .custody-refund-form { grid-template-columns: 1fr 1fr; }
  .custody-refund-form input[name="reason"] { grid-column: 1 / -1; }
  .custody-refund-form button { grid-column: 1 / -1; }
}

.custody-log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
  font-size: 12px;
}
.custody-log li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px dashed rgba(184,121,0,0.18);
}
.custody-log li:last-child { border-bottom: 0; }
.custody-log-when { color: #6b5500; font-variant-numeric: tabular-nums; }
.custody-log-text strong { color: #0f5132; }
.custody-log-amount { font-weight: 800; text-align: right; white-space: nowrap; }
.custody-log-amount.cred { color: #0f5132; }
.custody-log-amount.deb  { color: #842029; }
.custody-log-empty { text-align: center; padding: 12px; color: #6c757d; font-style: italic; }

/* ─── Settle tournament admin row ─────────────────────────── */
.settle-tournament-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 10px;
  margin-top: 4px;
}
.settle-status { font-size: 13px; color: #8a5a00; font-weight: 600; }
.settle-status.settled { color: #198754; }
.settle-btn {
  background: #dc3545;
  color: white;
  font-weight: 700;
}
.settle-btn:hover { background: #b02a37; }
.settle-btn:disabled { background: #6c757d; cursor: not-allowed; }
.settle-out {
  margin-top: 8px;
  padding: 10px 12px;
  background: #d1e7dd;
  border: 1px solid #badbcc;
  border-radius: 8px;
  font-size: 13px;
  color: #0f5132;
}
.settle-out.hidden { display: none; }
.settle-out.error { background: #f8d7da; border-color: #f5c2c7; color: #842029; }

/* ─── Live bet tape (time & sale) ─────────────────────────── */
.bet-tape-section {
  background: linear-gradient(180deg, #fffdf4 0%, #fff8e1 100%);
  color: #1a1a1a;
  border-radius: 14px;
  padding: 14px 18px;
  margin: 16px 0;
  border: 2px solid rgba(255,193,7,0.55);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  max-height: 360px;
  display: flex;
  flex-direction: column;
}
.bet-tape-section.hidden { display: none; }
.bet-tape-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(180,140,0,0.35);
  margin-bottom: 8px;
}
.bet-tape-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #8a5a00;
  text-transform: uppercase;
}
.bet-tape-count {
  background: #b87900;
  color: #fffdf4;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}
.bet-tape-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 12px;
}
.bet-tape-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  padding: 7px 6px;
  border-bottom: 1px dashed rgba(180,140,0,0.18);
  animation: tape-fade-in 0.4s ease-out;
}
.bet-tape-row:last-child {
  border-bottom: none;
  /* Newest entry — gold highlight so it pops at the bottom of the tape. */
  background: linear-gradient(90deg, rgba(255,193,7,0.22), transparent 60%);
  border-radius: 6px;
}
.bet-tape-time {
  color: #8a5a00;
  font-weight: 600;
}
.bet-tape-body { color: #2a2a2a; }
.bet-tape-body strong { color: #0f5132; font-weight: 700; }
.bet-tape-stake {
  color: #198754;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.bet-tape-empty {
  text-align: center;
  padding: 18px 12px;
  color: #8a5a00;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  opacity: 0.7;
}
.bet-tape-row-pred .bet-tape-body strong { color: #0d4d9a; }
.bet-tape-stake-pred {
  color: #0d4d9a;
  background: rgba(13,77,154,0.1);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Heat tiers by stake size — bigger bet = louder color */
.bet-tape-tier-med {
  background: linear-gradient(90deg, rgba(255,193,7,0.35), rgba(255,193,7,0.10) 70%, transparent);
  border-left: 4px solid #ffc107;
  padding-left: 8px;
}
.bet-tape-tier-big {
  background: linear-gradient(90deg, rgba(25,135,84,0.42), rgba(25,135,84,0.12) 70%, transparent);
  border-left: 4px solid #198754;
  padding-left: 8px;
}
.bet-tape-tier-big .bet-tape-stake { color: #0a4d2e; font-weight: 800; }
.bet-tape-tier-whale {
  background: linear-gradient(90deg, rgba(220,53,69,0.48), rgba(220,53,69,0.14) 70%, transparent);
  border-left: 4px solid #dc3545;
  padding-left: 8px;
  animation: tape-whale-pulse 1.4s ease-out;
}
.bet-tape-tier-whale .bet-tape-stake { color: #842029; font-weight: 800; font-size: 13px; }
.bet-tape-tier-whale .bet-tape-body strong { color: #842029; }

.bet-tape-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  vertical-align: middle;
}
.bet-tape-tier-big .bet-tape-badge   { background: #198754; color: #fff; }
.bet-tape-tier-whale .bet-tape-badge { background: #dc3545; color: #fff; }

@keyframes tape-whale-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(220,53,69,0.6); }
  60%  { box-shadow: 0 0 0 12px rgba(220,53,69,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,53,69,0); }
}
@keyframes tape-fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.leaderboard-header h3 {
  margin: 0;
  color: #c97a00;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ghost-small {
  background: #f0f0f0;
  color: #333;
  padding: 4px 10px;
  font-size: 0.78rem;
}

.leaderboard-card.collapsed #leaderboard-body { display: none; }

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.leaderboard-table th {
  background: linear-gradient(135deg, #c97a00, #a06000);
  color: white;
  padding: 8px;
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.leaderboard-table th:first-child { border-top-left-radius: 8px; text-align: center; width: 50px; }
.leaderboard-table th:last-child { border-top-right-radius: 8px; text-align: right; }

.leaderboard-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
}

.leaderboard-table td.rank {
  text-align: center;
  font-size: 1.3rem;
  width: 50px;
}

.leaderboard-table td.pts-col {
  text-align: right;
  color: #c97a00;
}

.leaderboard-table tr.me-row td {
  background: #fff8e6;
}

.leaderboard-table tbody tr:nth-child(1) td {
  background: linear-gradient(90deg, #fff5b8, #ffd700) !important;
  font-size: 1.05rem;
  position: relative;
}

.leaderboard-table tbody tr:nth-child(1) td.pts-col {
  font-size: 1.25rem;
  font-weight: 900;
  color: #4a2c00;
}

.leaderboard-table tbody tr:nth-child(1) td.rank {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(255,180,0,0.5));
}

.leaderboard-table tbody tr:nth-child(2) td {
  background: linear-gradient(90deg, #f0f0f0, #d4d4d4) !important;
}

.leaderboard-table tbody tr:nth-child(3) td {
  background: linear-gradient(90deg, #f5e0c8, #d49a6a) !important;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lb-avatar {
  flex: 0 0 36px;
}

.lb-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.lb-team {
  font-size: 0.7rem;
  color: #666;
  font-weight: 500;
}

.you-tag {
  background: #ffd700;
  color: #4a2c00;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-left: 4px;
}

/* ── BETTING DASH (social parimutuel) ── */
.betting-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid rgba(111,66,193,0.5);
}
.betting-section-compact {
  margin-top: 14px;
  padding-top: 0;
  border-top: none;
}
.betting-title {
  margin: 0 0 4px;
  text-align: center;
  color: white;
  font-size: 2rem;
  letter-spacing: 3px;
  background: linear-gradient(180deg, #fff 30%, #c9a4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(111,66,193,0.4);
}
.betting-subtitle {
  text-align: center;
  color: rgba(255,255,255,0.85);
  margin: 0 0 14px;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
}
.betting-info-banner {
  max-width: 800px;
  margin: 0 auto 18px;
  padding: 10px 14px;
  background: rgba(111,66,193,0.18);
  border: 1px solid rgba(111,66,193,0.4);
  border-radius: 10px;
  color: white;
  font-size: 0.85rem;
  text-align: center;
}
.betting-paused-banner,
.betting-empty-banner {
  max-width: 800px;
  margin: 0 auto 18px;
  padding: 14px;
  background: rgba(220,53,69,0.18);
  border: 1px solid rgba(220,53,69,0.5);
  border-radius: 10px;
  color: white;
  text-align: center;
  font-weight: 700;
}
.betting-empty-banner {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  font-weight: 500;
}
.betting-paused-banner.hidden,
.betting-empty-banner.hidden { display: none; }

.bet-card {
  background: white;
  border-radius: 14px;
  margin: -6px 0 18px 24px;          /* tuck up under the match card, indented a bit */
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  border: 2px solid rgba(111,66,193,0.4);
  overflow: hidden;
  position: relative;
}
/* Connector line from match-card down into the bet-card */
.bet-card::before {
  content: "";
  position: absolute;
  top: -16px;
  left: -12px;
  width: 12px;
  height: 30px;
  border-left: 3px solid rgba(111,66,193,0.4);
  border-bottom: 3px solid rgba(111,66,193,0.4);
  border-bottom-left-radius: 8px;
  pointer-events: none;
}
.bet-card.is-hot::before { border-color: #ff6b9d; }
.bet-card.is-settled::before { border-color: #198754; }
.bet-card.is-locked::before { border-color: #6c757d; }

/* Shell card — market pre-armed, waiting for real teams */
.bet-card.is-shell {
  border-color: rgba(108,117,125,0.5);
  background: linear-gradient(180deg, #f8f9fa, white);
  opacity: 0.92;
}
.bet-card.is-shell::before { border-color: rgba(108,117,125,0.5); }
.bet-card.is-shell .bet-card-head {
  background: linear-gradient(90deg, #495057, #6c757d);
}
.bet-status-pending {
  background: #fff3cd;
  color: #856404;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.4px;
}
.bet-shell-body {
  padding: 12px 18px;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
  border-bottom: 1px dashed #e0e0e0;
}
.bet-shell-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  padding: 10px 18px 14px;
}
.bet-shell-slot {
  background: #f8faf9;
  border: 1px dashed #d0d7d2;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bet-shell-key {
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #888;
  font-weight: 700;
}
.bet-shell-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #555;
}

/* Knockout team-setter (admin) */
.kt-card { padding: 12px; }
.kt-slots {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}
.kt-slot { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.kt-slot label {
  font-size: 0.72rem;
  color: #777;
  font-style: italic;
  margin-bottom: 4px;
}
.kt-slot select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
}
.kt-vs { color: #888; font-weight: 700; padding: 0 4px; font-size: 0.85rem; }
.bet-card.is-hot {
  border-color: #ff6b9d;
  box-shadow: 0 8px 32px rgba(255,107,157,0.35);
}
.bet-card.is-locked {
  border-color: #6c757d;
  opacity: 0.92;
}
.bet-card.is-settled {
  border-color: #198754;
  background: linear-gradient(180deg, #f0f7f2, white);
}
.bet-card.is-void {
  border-color: #0d6efd;
  background: linear-gradient(180deg, #e7f1ff, white);
  opacity: 0.97;
}
.bet-card.is-void .bet-card-head {
  background: linear-gradient(90deg, #0a3d8b, #0d6efd);
}
.bet-refund-summary {
  background: #cfe2ff;
  color: #084298;
  border-bottom-color: #0d6efd;
}
.bet-feed-out.refunded {
  background: #cfe2ff;
  color: #084298;
}
.bet-slip-refund-note {
  background: #d1e7dd;
  color: #0f5132;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  margin-bottom: 10px;
  border-left: 3px solid #198754;
}

.bet-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(111,66,193,0.12), transparent),
              linear-gradient(90deg, #4d2d8f, #6f42c1);
  color: white;
  flex-wrap: wrap;
  gap: 10px;
}
.bet-card.is-settled .bet-card-head {
  background: linear-gradient(90deg, #0a3d2a, #198754);
}
.bet-card.is-hot .bet-card-head {
  background: linear-gradient(90deg, #c9184a, #ff6b9d);
}
.bet-card-teams {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
}
.bet-flag { font-size: 1.5rem; }
.bet-team { letter-spacing: 0.3px; }
.bet-vs { opacity: 0.7; font-size: 0.85rem; font-weight: 600; }

.bet-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.78rem;
  flex-wrap: wrap;
}
.bet-when {
  background: rgba(0,0,0,0.25);
  padding: 3px 9px;
  border-radius: 12px;
}
.bet-when .tz {
  background: rgba(255,215,0,0.3);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
  margin-left: 3px;
}
.bet-hot {
  background: #ffd700;
  color: #4a2c00;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  animation: hot-pulse 1.8s infinite;
}
@keyframes hot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,215,0,0.7); }
  50% { box-shadow: 0 0 0 7px rgba(255,215,0,0); }
}

.bet-status {
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.4px;
}
.bet-status-open    { background: #d1e7dd; color: #0f5132; }
.bet-status-locked  { background: #e9ecef; color: #495057; }
.bet-status-settled { background: #ffd700; color: #4a2c00; }
.bet-status-void    { background: #f8d7da; color: #721c24; }

.bet-settled-summary {
  padding: 10px 18px;
  background: #fffdf5;
  border-bottom: 1px solid #ffe69c;
  font-size: 0.9rem;
  font-weight: 600;
  color: #856404;
}

.one-sided-nudge {
  background: linear-gradient(90deg, #fff3cd, #ffe69c);
  color: #4a2c00;
  padding: 8px 18px;
  font-size: 0.85rem;
  border-bottom: 1px solid #ffc107;
}

.bet-selections {
  display: grid;
  gap: 8px;
  padding: 14px 18px;
}
.bet-sel {
  background: #f8faf9;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.bet-sel:hover { border-color: #6f42c1; background: #faf6ff; }
.bet-sel.is-active { border-color: #6f42c1; background: #f0e7ff; box-shadow: 0 0 0 3px rgba(111,66,193,0.18); }
.bet-sel.is-winner {
  border-color: #198754;
  background: linear-gradient(135deg, #d1e7dd, #c3e6cb);
}
.bet-card.is-locked .bet-sel,
.bet-card.is-settled .bet-sel { cursor: default; }
.bet-card.is-locked .bet-sel:hover { background: #f8faf9; border-color: #e0e0e0; }

.bet-sel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  margin-bottom: 6px;
}
.bet-sel-label { font-size: 0.98rem; color: #1a1a1a; }
.bet-sel-odds {
  font-family: -apple-system, monospace;
  font-weight: 800;
  background: #4d2d8f;
  color: white;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
}
.bet-sel-odds.warn {
  background: #dc3545;
  animation: warn-pulse 1.5s infinite;
}
@keyframes warn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.bet-sel-bar {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.bet-sel-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6f42c1, #c9184a);
  transition: width 0.3s;
}
.bet-sel.is-winner .bet-sel-bar-fill {
  background: linear-gradient(90deg, #198754, #0f5132);
}
.bet-sel-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #666;
  font-weight: 600;
  flex-wrap: wrap;
  gap: 6px;
}
.bet-sel-you {
  background: #ffd700;
  color: #4a2c00;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 700;
}
.bet-sel-warn {
  color: #dc3545;
  font-style: italic;
  font-size: 0.75rem;
}

.bet-counter {
  display: block;
  text-align: center;
  padding: 6px 18px;
  background: #fafafa;
  border-top: 1px dashed #e0e0e0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
}
.bet-counter.empty { font-style: italic; color: #888; }

/* Bet slip */
.bet-slip {
  background: linear-gradient(135deg, #f0e7ff, #e8d8ff);
  border: 2px solid #6f42c1;
  border-radius: 12px;
  margin: 0 14px 14px;
  padding: 14px;
}
.bet-slip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4d2d8f;
  margin-bottom: 10px;
}
.bet-slip-close {
  background: transparent;
  border: none;
  color: #4d2d8f;
  font-size: 1.4rem;
  cursor: pointer;
  font-weight: 800;
  padding: 0 6px;
  line-height: 1;
}
.bet-slip-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.chip-btn {
  flex: 1;
  background: white;
  border: 2px solid #6f42c1;
  border-radius: 10px;
  padding: 10px 6px;
  font-family: inherit;
  font-weight: 800;
  color: #4d2d8f;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.95rem;
  transition: all 0.15s;
}
.chip-btn small { font-size: 0.7rem; opacity: 0.7; font-weight: 500; }
.chip-btn:hover { background: #6f42c1; color: white; transform: translateY(-1px); }
.bet-slip-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 2px solid #6f42c1;
  border-radius: 10px;
  padding: 6px 12px;
  margin-bottom: 10px;
}
.bet-slip-prefix { font-weight: 700; color: #4d2d8f; }
.bet-slip-input {
  flex: 1 1 auto;
  min-width: 0;            /* allow flex item to shrink below content size */
  width: 100%;
  border: none;
  outline: none;
  font-size: 1.2rem;
  font-weight: 800;
  font-family: inherit;
  color: #4d2d8f;
  background: transparent;
  text-align: center;
  padding: 0 4px;
  /* Kill iOS Safari's native number spinners that eat input width */
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
}
.bet-slip-input::-webkit-outer-spin-button,
.bet-slip-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.bet-slip-suffix { font-size: 0.85rem; color: #888; white-space: nowrap; }
.bet-slip-est {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #4d2d8f;
}
.bet-slip-est strong { font-size: 1.05rem; }
.bet-slip-meta {
  font-size: 0.78rem;
  color: #666;
  margin-bottom: 10px;
}
.bet-slip-error {
  background: #f8d7da;
  color: #721c24;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.bet-slip-go {
  width: 100%;
  background: linear-gradient(135deg, #6f42c1, #4d2d8f);
  color: white;
  padding: 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bet-slip-go-label { font-weight: 800; letter-spacing: 1px; }
.bet-slip-go-amt {
  background: rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 2px 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.bet-slip-go-amt:empty { display: none; }
.bet-slip-go-usd {
  text-align: center;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #4d2d8f;
  font-variant-numeric: tabular-nums;
  min-height: 1.2em;
}
.bet-slip-go:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}
.bet-slip-go:not(:disabled):hover { transform: translateY(-1px); }

/* Social feed */
.bet-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 12px 18px 16px;
  background: linear-gradient(180deg, #fafafa, white);
  border-top: 1px dashed #e0e0e0;
}
.bet-feed-col-head {
  font-weight: 700;
  font-size: 0.82rem;
  color: #4d2d8f;
  padding-bottom: 4px;
  margin-bottom: 6px;
  border-bottom: 2px solid #6f42c1;
}
.bet-feed-col-head small { color: #888; font-weight: 500; font-size: 0.72rem; }
.bet-feed-list { display: flex; flex-direction: column; gap: 4px; }
.bet-feed-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  padding: 4px 6px;
  background: white;
  border-radius: 6px;
  border-left: 2px solid #6f42c1;
}
.bet-feed-avatar { flex-shrink: 0; }
.bet-feed-avatar img.lb, .bet-feed-avatar .avatar-letter.lb { width: 22px; height: 22px; font-size: 0.7rem; }
.bet-feed-name { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bet-feed-amt {
  background: #f0e7ff;
  color: #4d2d8f;
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.bet-feed-out { font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.bet-feed-out.won { background: #d1e7dd; color: #0f5132; }
.bet-feed-out.lost { background: #f8d7da; color: #721c24; }

/* Admin betting summary */
.betting-admin-section {
  margin-top: 24px;
  padding: 18px;
  background: linear-gradient(180deg, #f0e7ff, #faf6ff);
  border: 1px solid #d6c8e8;
  border-radius: 14px;
}
.betting-admin-section h3 { margin: 0 0 14px; color: #4d2d8f; letter-spacing: 1px; text-transform: uppercase; font-size: 1rem; }
.betting-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.bsum-card {
  background: white;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid #e0d8eb;
}
.bsum-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #777;
  font-weight: 700;
  margin-bottom: 4px;
}
.bsum-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: #4d2d8f;
  font-variant-numeric: tabular-nums;
}
.bsum-sub { font-size: 0.72rem; color: #888; margin-top: 2px; }
.bsum-actions { display: flex; gap: 8px; }
.bsum-reconcile-out {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.bsum-reconcile-out.hidden { display: none; }
.bsum-reconcile-out.ok { background: #d1e7dd; color: #0f5132; border-left: 3px solid #198754; }
.bsum-reconcile-out.err { background: #f8d7da; color: #721c24; border-left: 3px solid #dc3545; }

.bsum-section-h {
  margin-top: 18px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #4d2d8f;
}
.bsum-hint { font-size: 0.8rem; color: #777; margin: 0 0 8px; font-style: italic; }

.testmode-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.testmode-out {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
}
.testmode-out.hidden { display: none; }
.testmode-out.info  { background: #cfe2ff; color: #084298; border-left: 3px solid #0d6efd; }
.testmode-out.ok    { background: #d1e7dd; color: #0f5132; border-left: 3px solid #198754; }
.testmode-out.err   { background: #f8d7da; color: #721c24; border-left: 3px solid #dc3545; }
.testmode-out h4 { margin: 0 0 6px; }
.testmode-out code { background: rgba(0,0,0,0.08); padding: 1px 6px; border-radius: 4px; font-size: 0.85em; }
.testmode-out pre { white-space: pre-wrap; word-break: break-word; }

.espn-league-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.espn-league-row select {
  flex: 1; min-width: 200px;
  padding: 7px 10px; border: 1px solid #ccc; border-radius: 6px;
  font-family: inherit; font-size: 0.9rem;
}

.manual-settle-list { display: flex; flex-direction: column; gap: 8px; }
.ms-card {
  background: white;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e0d8eb;
}
.ms-head { font-size: 0.92rem; margin-bottom: 6px; }
.ms-meta { font-size: 0.75rem; color: #777; font-weight: 500; margin-left: 8px; }
.ms-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.ms-btn {
  background: #6f42c1;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}
.ms-btn:hover { background: #4d2d8f; }

/* KNOCKOUT STAGE */
.knockouts-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid rgba(255,215,0,0.4);
}

.knockouts-title {
  margin: 0 0 4px;
  text-align: center;
  color: white;
  font-size: 2rem;
  letter-spacing: 3px;
  text-shadow: 0 2px 12px rgba(255,215,0,0.4);
  background: linear-gradient(180deg, #fff 40%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.knockouts-subtitle {
  text-align: center;
  color: rgba(255,255,255,0.85);
  margin: 0 0 20px;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
}

.round-card {
  background: white;
  border-radius: 16px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  overflow: hidden;
  border: 2px solid rgba(255,215,0,0.45);
}

.round-header {
  background:
    linear-gradient(135deg, rgba(255,215,0,0.18), transparent),
    linear-gradient(90deg, #4a0e0e, #8b1a1a 50%, #c41e3a 100%);
  color: white;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.round-header::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffd700, transparent);
}

.round-header h3 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 800;
}

.round-badges {
  display: flex;
  gap: 6px;
}

.round-matches {
  padding: 18px;
  background: linear-gradient(180deg, rgba(196,30,58,0.03), transparent), #fcfdfc;
}

.round-card[data-round="final"] .round-header {
  background:
    linear-gradient(135deg, rgba(255,215,0,0.25), transparent),
    linear-gradient(90deg, #b8860b, #daa520 40%, #ffd700 100%);
  color: #4a2c00;
}

.round-card[data-round="final"] .round-header h3 {
  text-shadow: 0 2px 8px rgba(255,215,0,0.5);
}

.round-card[data-round="third"] .round-header {
  background:
    linear-gradient(90deg, #6c5300, #997300 50%, #c98800 100%);
}

.round-card[data-round="sf"] .round-header {
  background:
    linear-gradient(90deg, #4d1f00, #7a3300 50%, #cc5500 100%);
}

.round-card[data-round="qf"] .round-header {
  background:
    linear-gradient(90deg, #5a0e2e, #8b1a3d 50%, #c41e5a 100%);
}

footer {
  text-align: center;
  padding: 20px;
}
footer > small {
  display: block;
  color: white;
  opacity: 0.7;
  margin-top: 12px;
}
/* Restore normal inheritance for sections we moved in (status-bar, odds banner,
   rules-card). They have their own light backgrounds and need dark text. */
footer .status-bar,
footer .odds-schedule,
footer .rules-card {
  text-align: left;
  opacity: 1;
  color: #1a1a1a;
  margin-bottom: 12px;
}

@media (max-width: 700px) {
  header h1 { font-size: 1.8rem; letter-spacing: 1px; }
  .rules-card ul { columns: 1; }

  /* Match bracket: teams horizontal at top, score centered BELOW.
     Layout (mobile):
       [Team A]   [Team B]
            [score]
  */
  .match-bracket {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "teama teamb"
      "score score";
    column-gap: 10px;
    row-gap: 10px;
    align-items: center;
  }
  .side-a {
    grid-area: teama;
    flex-direction: row !important;
    justify-content: flex-end;
    text-align: right;
    gap: 6px;
  }
  .side-b {
    grid-area: teamb;
    flex-direction: row !important;
    justify-content: flex-start;
    text-align: left;
    gap: 6px;
  }
  .side .country { font-size: 0.95rem; }
  .side .flag { font-size: 1.4rem; }
  .score-center { grid-area: score; justify-self: center; }

  /* OU bets: stacked vertically (Corners → Yellows → Reds → actions).
     Each row spans full width so the segmented buttons fit. */
  .ou-extras {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  .extras .extra-field { width: 100%; }
  .extras .ou-toggle { width: 100%; }
  .extras .ou-opt { flex: 1 1 0; padding: 0 6px; }

  /* Lock + clear buttons: full-width row, centered */
  .match-actions {
    grid-column: 1 / -1;
    justify-content: center;
    margin-top: 4px;
    gap: 10px;
  }

  .standings { padding: 10px; font-size: 0.78rem; }
  .standings td.team-col, .standings th.team-col { padding-left: 6px; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE — covers everything added in Phase 5.
   Breakpoint: ≤ 600px (phone portrait). Tablet uses default desktop.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Global tightening — less padding everywhere on small screens */
  body { font-size: 14px; }
  main { padding: 8px !important; }

  /* Swap trophy order on mobile: Prize Pot first, Your Score second.
     The Pot is the "why am I here" hook for visitors; Score is personal. */
  .trophy-row #prize-pot   { order: 1; }
  .trophy-row #score-trophy { order: 2; }

  /* ─── Leaderboard table (5 cols too wide for phone) ─── */
  .leaderboard-card { padding: 10px 8px; }
  .leaderboard-table { font-size: 11px; }
  .leaderboard-table th, .leaderboard-table td { padding: 6px 4px; }
  /* Hide "Predicted" column on phones — keep the essential 4: #, Player, Winrate, Points */
  .leaderboard-table th:nth-child(3),
  .leaderboard-table td:nth-child(3) { display: none; }
  .leaderboard-table .lb-team { display: block; font-size: 10px; }
  .leaderboard-table td.rank { width: 32px; font-size: 13px; }
  .rate-pill { font-size: 10px; padding: 1px 5px; }

  /* ─── Live bet tape ─── */
  .bet-tape-section { padding: 10px 12px; }
  .bet-tape-title { font-size: 12px; }
  .bet-tape-list { font-size: 11px; }
  .bet-tape-row {
    grid-template-columns: 48px 1fr;
    gap: 6px;
    row-gap: 2px;
    padding: 6px 4px;
  }
  /* Stake jumps to row 2 spanning both columns so the body has full width */
  .bet-tape-stake {
    grid-column: 2;
    text-align: left;
    font-size: 11px;
  }
  .bet-tape-body small { display: block; margin-top: 2px; }
  .bet-tape-badge { display: inline-block; margin-top: 3px; }

  /* ─── Today's matches ─── */
  .today-matches-section { padding: 10px 12px; }
  .today-match-row {
    grid-template-columns: 52px 1fr;
    gap: 8px;
    row-gap: 4px;
    padding: 8px 10px;
  }
  .today-match-stage {
    grid-column: 2;
    justify-self: start;
    font-size: 9px;
    padding: 2px 7px;
  }
  .today-match-teams { font-size: 12px; }

  /* ─── All matches (chronological collapsible) ─── */
  .all-matches-section { padding: 10px 12px; }
  .am-head {
    grid-template-columns: 56px 1fr;
    gap: 8px;
    row-gap: 4px;
    padding: 8px 10px;
  }
  .am-teams { font-size: 12px; }
  .am-stage-tag { font-size: 9px; padding: 2px 6px; }
  .am-tags {
    grid-column: 2;
    justify-self: end;
    gap: 4px;
  }
  .am-chevron { display: none; }   /* chevron noise on small screens */
  .am-body { padding: 6px 4px 10px; }
}

  /* ─── Profile modal ─── */
  .profile-modal-card {
    width: 96%;
    max-height: 92vh;
    padding: 14px 12px;
  }
  .profile-header { gap: 10px; padding-bottom: 10px; margin-bottom: 10px; }
  .profile-avatar { width: 52px; height: 52px; font-size: 22px; }
  .profile-name { font-size: 17px; }
  .profile-meta { font-size: 11px; }
  .profile-meta span { display: block; margin: 1px 0; }
  .profile-stat-grid { grid-template-columns: 1fr; gap: 6px; }
  .profile-stat { padding: 8px 10px; }
  .profile-stat-value { font-size: 16px; }
  .profile-bets-list, .profile-deposits-list { max-height: 180px; font-size: 11px; }
  .profile-bets-list li, .profile-deposits-list li { padding: 6px 10px; gap: 6px; }
  .profile-cat-bar { font-size: 11px; }

  /* ─── Toolbar (Expand / Collapse / Clear / Grupos / Knockout) ─── */
  .toolbar { gap: 6px; margin-bottom: 12px; }
  .toolbar button {
    padding: 8px 10px;
    font-size: 0.8rem;
    flex: 1 1 auto;
    min-width: 0;
  }

  /* ─── Footer ─── */
  footer { padding: 12px 8px; }
  .footer-rules { padding: 12px 10px !important; font-size: 12px; }
  .footer-rules h3 { font-size: 13px; }
  footer .status-bar { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; }
  footer .status-actions { justify-content: center; flex-wrap: wrap; gap: 6px; }
  .deadline-rule { font-size: 11px; padding: 10px; }

  /* ─── Floating scroll-to-top ─── */
  .scroll-to-top { width: 44px; height: 44px; bottom: 16px; right: 16px; font-size: 1.2rem; }

  /* ─── Admin panel ─── */
  .modal-card { width: 96%; padding: 14px 12px; max-height: 92vh; overflow-y: auto; }
  .admin-gate input { width: 100%; box-sizing: border-box; }
  .user-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
  .user-tile { padding: 10px 8px; font-size: 12px; }
  .tile-avatar { width: 44px; height: 44px; font-size: 18px; }
  .settle-tournament-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .settle-btn { width: 100%; font-size: 12px; padding: 10px; }
  .betting-summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bsum-card { padding: 8px; }
  .bsum-value { font-size: 16px; }

/* Even tighter for very narrow (≤ 380px = iPhone SE, mini) */
@media (max-width: 380px) {
  .leaderboard-table { font-size: 10px; }
  .leaderboard-table .lb-info strong { font-size: 11px; }
  .am-teams, .today-match-teams, .bet-tape-body { font-size: 11px; }
  .bet-tape-time, .today-match-time, .am-time { font-size: 11px; }
}
