html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #0f1117;
  color: #e2e8f0;
}

/* ==================== DASHBOARD HEADER ==================== */
.dashboard-header {
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid #2d3748;
  margin-bottom: 1.5rem;
}

.dashboard-title {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.dashboard-subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
}

@media (max-width: 767px) {
  .dashboard-title {
    font-size: 1.25rem;
  }

  .dashboard-subtitle {
    font-size: 0.8rem;
  }

  .winning-numbers-display {
    padding: 0.5rem 0.6rem;
    gap: 0.4rem;
  }

  .wn-badge {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.8rem;
  }

  .wn-label {
    font-size: 0.7rem;
  }

  .legend {
    gap: 0.6rem;
  }

  .legend-item {
    font-size: 0.72rem;
  }

  .round-filters .btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }

  .filter-label {
    font-size: 0.75rem;
  }
}

/* ==================== WINNING NUMBERS DISPLAY ==================== */
.winning-numbers-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: #1e2433;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #2d3748;
}

.wn-label {
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wn-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(245, 158, 11, 0.1);
  padding: 0.35rem 0.6rem;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.wn-pair-100 {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
}

.wn-pair-50 {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
}

.wn-pair-separator {
  color: #f59e0b;
  font-weight: 700;
  font-size: 0.8rem;
  margin: 0 0.15rem;
}

.wn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 50%;
}

/* ==================== LEGEND ==================== */
.legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #94a3b8;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.swatch-potential    { background: rgba(234,179,8,0.6);  border: 2px solid #eab308; }
.swatch-winner-100   { background: rgba(59,130,246,0.6); border: 2px solid #3b82f6; }
.swatch-winner-50    { background: rgba(16,185,129,0.6); border: 2px solid #10b981; }
.swatch-live-plain   { background: rgba(239,68,68,0.4);  border: 2px solid #ef4444; }
.swatch-upcoming     { background: rgba(71,85,105,0.6);  border: 2px solid #475569; }

/* ==================== ROUND FILTERS ==================== */
.round-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-label {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 0.25rem;
}

.round-filters .btn {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
}

/* ==================== SECTION HEADERS ==================== */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.live-header .section-title {
  color: #ef4444;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: #e2e8f0;
}

/* ==================== PULSE DOTS ==================== */
.pulse-dot {
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.4s ease-in-out infinite;
}

.pulse-dot-sm {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.4s ease-in-out infinite;
  margin-right: 4px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.3); }
}

/* ==================== GAMES GRID ==================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* ==================== GAME CARD BASE ==================== */
.game-card {
  background: #1a1f2e;
  border: 1px solid #2d3748;
  border-radius: 12px;
  padding: 1rem;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Live game base */
.game-card.live-plain {
  border-color: #ef4444;
  background: #1e1414;
}

/* Upcoming */
.game-card.upcoming {
  border-color: #374151;
  background: #161b27;
  opacity: 0.85;
}

/* Finished, not a winner */
.game-card.finished {
  border-color: #374151;
  background: #161b27;
}

/* ==================== WINNER CARDS ==================== */
/* Yellow highlight for potential winners (live, under 2 min) */
.game-card.winner-live-potential {
  border: 2px solid #eab308;
  background: linear-gradient(135deg, #422006 0%, #3f2d0d 100%);
  box-shadow: 0 0 20px rgba(234,179,8,0.3);
  animation: glow-yellow 2s ease-in-out infinite alternate;
}

/* Blue highlight for $100 game winners */
.game-card.winner-final-100 {
  border: 2px solid #3b82f6;
  background: linear-gradient(135deg, #0f2044 0%, #0d1b35 100%);
  box-shadow: 0 0 20px rgba(59,130,246,0.3);
}

/* Green highlight for $50 game winners */
.game-card.winner-final-50 {
  border: 2px solid #10b981;
  background: linear-gradient(135deg, #0a2e1e 0%, #0d2418 100%);
  box-shadow: 0 0 20px rgba(16,185,129,0.3);
}

@keyframes glow-yellow {
  from { box-shadow: 0 0 12px rgba(234,179,8,0.3); }
  to   { box-shadow: 0 0 28px rgba(234,179,8,0.7); }
}

/* ==================== WINNER BANNER ==================== */
.winner-banner {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.75rem;
  margin: -1rem -1rem 0.75rem -1rem;
  text-align: center;
}

.winner-banner-potential { background: #854d0e; color: #fef08a; }
.winner-banner-100       { background: #1e40af; color: #93c5fd; }
.winner-banner-50        { background: #065f46; color: #6ee7b7; }

/* ==================== STATUS BADGES ==================== */
.game-status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.badge-live     { background: rgba(239,68,68,0.2);  color: #f87171; border: 1px solid #ef4444; }
.badge-upcoming { background: rgba(71,85,105,0.3);  color: #94a3b8; border: 1px solid #475569; }
.badge-final    { background: rgba(71,85,105,0.3);  color: #94a3b8; border: 1px solid #475569; }
.badge-winner   { background: rgba(16,185,129,0.2); color: #34d399; border: 1px solid #10b981; }

/* ==================== MATCHUP ==================== */
.matchup {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.team {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.team.home   { align-items: flex-end;  text-align: right; }
.team.visitor { align-items: flex-start; text-align: left; }

.team-abbr {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1;
}

.team-name {
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.2;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team.home .team-name   { margin-left: auto; }
.team.visitor .team-name { margin-right: auto; }

.score {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: #e2e8f0;
}

.score-win  { color: #f8fafc; }
.score-loss { color: #475569; }

.score-digit {
  font-size: 0.68rem;
  color: #64748b;
}

.score-digit.highlight-digit {
  color: #f59e0b;
  font-weight: 700;
}

.team.winner-team .team-abbr { color: #fbbf24; }

.vs-divider {
  font-size: 0.65rem;
  font-weight: 700;
  color: #475569;
  flex-shrink: 0;
  text-align: center;
  min-width: 28px;
}

.leading .score { color: #fbbf24; }

.game-time {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
}

/* ==================== REFRESH BAR ==================== */
.refresh-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

/* ==================== SETTINGS CARD ==================== */
.settings-card {
  background: #1a1f2e;
  border: 1px solid #2d3748;
  border-radius: 12px;
  padding: 1.75rem;
}

.settings-help {
  background: #161b27;
  border: 1px solid #2d3748;
  border-radius: 10px;
  padding: 1.25rem;
  font-size: 0.88rem;
  color: #94a3b8;
}

.settings-help h5 {
  color: #e2e8f0;
  margin-bottom: 0.75rem;
}

.settings-help ul {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.8;
}

/* ==================== WINNERS SUMMARY ==================== */
.winners-summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.summary-card {
  background: linear-gradient(135deg, #065f46, #0a2e1e);
  border: 1px solid #10b981;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 120px;
  flex: 1;
}

.summary-card-total {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  border-color: #3b82f6;
}

.summary-card-money {
  background: linear-gradient(135deg, #065f46, #047857);
  border-color: #10b981;
}

.summary-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: #34d399;
  line-height: 1;
}

.summary-card-total .summary-number {
  color: #60a5fa;
}

.summary-label {
  font-size: 0.75rem;
  color: #6ee7b7;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.summary-card-total .summary-label {
  color: #93c5fd;
}

/* ==================== ROUND STATISTICS ==================== */
.round-stat-card {
  background: #161b27;
  border: 1px solid #374151;
  border-radius: 8px;
  overflow: hidden;
}

.round-stat-header {
  background: #1e2433;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #f59e0b;
  border-bottom: 1px solid #374151;
}

.round-stat-body {
  padding: 0.75rem;
}

.round-stat-count {
  font-size: 1.5rem;
  font-weight: 800;
  color: #e2e8f0;
  line-height: 1;
}

.round-stat-count small {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
  margin-left: 0.25rem;
}

.round-stat-money {
  font-size: 1.1rem;
  font-weight: 700;
  color: #10b981;
  margin-top: 0.25rem;
}

/* ==================== PRIZE INPUT ==================== */
.prize-input-group {
  background: #1a1f2e;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #374151;
}

.prize-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
}

.prize-input-group .input-group-text {
  background: #0f1117;
  border-color: #374151;
  color: #10b981;
  font-weight: 700;
}

.prize-input-group .form-control {
  background: #0f1117;
  border-color: #374151;
  color: #e2e8f0;
  font-weight: 600;
}

/* ==================== FOOTER ==================== */
.footer {
  border-color: #2d3748 !important;
}

/* ==================== FORM OVERRIDES ==================== */
.form-control,
.form-control:focus {
  background-color: #0f1117;
  border-color: #374151;
  color: #e2e8f0;
}

.form-control:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 0.2rem rgba(245,158,11,0.25);
}

.form-text { color: #64748b !important; }
.form-label { color: #e2e8f0; }

/* ==================== ALERTS ==================== */
.alert { border-radius: 10px; }

/* ==================== POOL GAME STATISTICS ==================== */
.pool-game-stat-card {
  background: #161b27;
  border: 2px solid #374151;
  border-radius: 8px;
  overflow: hidden;
}

.pool-game-stat-card.pool-game-100 {
  border-color: #10b981;
}

.pool-game-stat-card.pool-game-50 {
  border-color: #3b82f6;
}

.pool-game-stat-header {
  background: #1e2433;
  padding: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  color: #e2e8f0;
  border-bottom: 1px solid #374151;
  text-align: center;
}

.pool-game-stat-card.pool-game-100 .pool-game-stat-header {
  background: linear-gradient(135deg, #065f46, #047857);
  color: #6ee7b7;
}

.pool-game-stat-card.pool-game-50 .pool-game-stat-header {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  color: #93c5fd;
}

.pool-game-stat-body {
  padding: 1.5rem;
  text-align: center;
}

.pool-game-stat-count {
  font-size: 2rem;
  font-weight: 800;
  color: #e2e8f0;
  line-height: 1;
}

.pool-game-stat-count small {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
  margin-left: 0.25rem;
}

.pool-game-stat-money {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.pool-game-stat-card.pool-game-100 .pool-game-stat-money {
  color: #10b981;
}

.pool-game-stat-card.pool-game-50 .pool-game-stat-money {
  color: #3b82f6;
}