/* ── LottoMom · Mississippi Match 5 Styles (prefix: m5) ── */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --gold: #d4a017;
  --gold-dim: rgba(212,160,23,0.15);
  --red: #C8102E;
  --red-dim: rgba(200,16,46,0.15);
  --bg: #0a0800;
  --surface: #14100a;
  --card: #1c1508;
  --border: rgba(255,255,255,0.08);
  --text: #fff;
  --muted: rgba(255,255,255,0.38);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.m5-wrap {
  max-width: 620px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

.m5-glow {
  position: fixed;
  top: -8%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(200,16,46,0.28) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Back Link ── */
.m5-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  padding: 14px 20px 0;
  position: relative;
  z-index: 10;
  transition: color 0.15s;
}
.m5-back:hover { color: var(--gold); }

/* ── Header ── */
.m5-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 20px 24px;
}
.m5-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #FF6070;
  border: 1px solid rgba(200,16,46,0.4);
  padding: 5px 16px;
  border-radius: 100px;
  margin-bottom: 14px;
  background: rgba(200,16,46,0.1);
}
.m5-header h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
  line-height: 1;
  margin-bottom: 4px;
}
.m5-header h1 span { color: #FF6070; }
.m5-header p {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.m5-divider {
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  margin: 12px auto 0;
}

/* ── Ad Slots ── */
.lm-ad-banner, .lm-ad-midpage, .lm-ad-badge {
  display: none;
  position: relative;
  z-index: 1;
  text-align: center;
}
.lm-ad-banner { margin: 0 16px 16px; }
.lm-ad-midpage { margin: 16px; }
.lm-ad-badge { padding: 8px 0 0; }
.lm-ad-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  margin-bottom: 6px;
}
.lm-ad-sponsor-label {
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  margin-top: 5px;
  letter-spacing: 0.06em;
}
.lm-ad-badge-inner { font-size: 11px; color: rgba(255,255,255,0.3); letter-spacing: 0.04em; }
.lm-ad-badge-inner a { color: var(--gold); text-decoration: none; }
.lm-ad-badge-inner a:hover { text-decoration: underline; }

/* ── Jackpot Banner ── */
.m5-jackpot {
  position: relative;
  z-index: 1;
  margin: 0 16px 16px;
  background: linear-gradient(135deg, rgba(200,16,46,0.18), rgba(200,16,46,0.06));
  border: 1px solid rgba(200,16,46,0.3);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.m5-jackpot-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}
.m5-jackpot-amount {
  font-family: 'Oswald', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #FF6070;
  line-height: 1;
}
.m5-jackpot-draw {
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.m5-jackpot-draw strong { color: var(--text); display: block; font-size: 13px; }

/* ── Tabs ── */
.tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0;
  margin: 0 16px 16px;
  background: var(--surface);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid var(--border);
}
.tab {
  flex: 1;
  padding: 9px 4px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
}
.tab.active {
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 12px rgba(200,16,46,0.4);
}

/* ── Tab Panels ── */
.tab-panel { display: none; position: relative; z-index: 1; }
.tab-panel.active { display: block; }

/* ── Play Panel ── */
.m5-play-card {
  margin: 0 16px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.m5-play-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  text-align: center;
}
.m5-balls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.m5-ball {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid rgba(200,16,46,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
}
.m5-ball.picked {
  background: radial-gradient(circle at 35% 35%, #e02040, var(--red));
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 4px 20px rgba(200,16,46,0.5);
}
.m5-ball.picked::after {
  content: '';
  position: absolute;
  top: 8px; left: 10px;
  width: 14px; height: 8px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  transform: rotate(-30deg);
}
.m5-btn-row {
  display: flex;
  gap: 10px;
}
.m5-btn {
  flex: 1;
  padding: 13px;
  border-radius: 10px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.02em;
}
.m5-btn-primary {
  background: linear-gradient(135deg, #e02040, var(--red));
  color: #fff;
  box-shadow: 0 4px 18px rgba(200,16,46,0.4);
}
.m5-btn-primary:hover { box-shadow: 0 6px 26px rgba(200,16,46,0.6); transform: translateY(-1px); }
.m5-btn-primary:active { transform: translateY(0); }
.m5-btn-secondary {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}
.m5-btn-secondary:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

.m5-result-card {
  margin: 0 16px 16px;
  background: var(--card);
  border: 1px solid rgba(200,16,46,0.25);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: none;
}
.m5-result-card.show { display: block; }
.m5-result-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  text-align: center;
}
.m5-result-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.m5-result-ball {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 17px;
  font-weight: 700;
}
.m5-result-ball.win {
  background: radial-gradient(circle at 35% 35%, #e02040, var(--red));
  color: #fff;
  box-shadow: 0 2px 12px rgba(200,16,46,0.5);
}
.m5-result-ball.lose {
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--muted);
}
.m5-match-msg {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding: 10px 0 4px;
}
.m5-match-sub {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.m5-prize-highlight {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(200,16,46,0.1);
  border: 1px solid rgba(200,16,46,0.25);
  text-align: center;
  font-weight: 700;
  color: #FF6070;
  font-size: 16px;
}

/* ── Pick Grid ── */
.m5-grid-wrap {
  margin: 0 16px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.m5-grid-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  text-align: center;
}
.m5-grid-sub {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 14px;
}
.m5-grid-sub span { color: #FF6070; font-weight: 700; }
.m5-num-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 5px;
}
.m5-num-btn {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m5-num-btn:hover { border-color: rgba(200,16,46,0.4); color: var(--text); }
.m5-num-btn.sel {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(200,16,46,0.4);
}
.m5-grid-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* ── Frequency Panel ── */
.m5-freq-card {
  margin: 0 16px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.m5-freq-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  text-align: center;
}
.m5-freq-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.m5-freq-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e02040, var(--red));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(200,16,46,0.3);
}
.m5-freq-num.cold {
  background: radial-gradient(circle at 35% 35%, #4060a0, #1e3060);
  box-shadow: 0 2px 8px rgba(30,48,96,0.5);
}
.m5-freq-bar-wrap { flex: 1; height: 8px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.m5-freq-bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #e02040, var(--red)); transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.m5-freq-bar.cold { background: linear-gradient(90deg, #1e3060, #4060a0); }
.m5-freq-count { font-size: 12px; font-weight: 700; color: var(--muted); width: 24px; text-align: right; flex-shrink: 0; }

.m5-toggle-row {
  display: flex;
  gap: 8px;
  margin: 0 16px 16px;
}
.m5-toggle-btn {
  flex: 1;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.m5-toggle-btn.active {
  background: rgba(200,16,46,0.15);
  border-color: rgba(200,16,46,0.35);
  color: #FF6070;
}

/* ── History Panel ── */
.m5-history-card {
  margin: 0 16px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.m5-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.m5-history-date { font-size: 13px; font-weight: 600; color: var(--text); }
.m5-history-nums {
  display: flex;
  gap: 6px;
  padding: 12px 18px;
  flex-wrap: wrap;
}
.m5-hist-ball {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e02040, var(--red));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(200,16,46,0.3);
}

/* ── Stats Panel ── */
.m5-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 16px 16px;
}
.m5-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.m5-stat-val {
  font-family: 'Oswald', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #FF6070;
  line-height: 1;
  margin-bottom: 4px;
}
.m5-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.m5-odds-card {
  margin: 0 16px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.m5-odds-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.m5-odds-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
}
.m5-odds-row:last-child { border-bottom: none; }
.m5-odds-match { color: var(--text); font-weight: 500; }
.m5-odds-prize { color: var(--gold); font-weight: 700; }
.m5-odds-prob { color: var(--muted); font-size: 11px; }

/* ── Footer ── */
.m5-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 20px 48px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}
.m5-footer a { color: var(--gold); text-decoration: none; }

@keyframes ballBounce {
  0% { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(3deg); }
  80% { transform: scale(0.95); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.m5-ball.animate { animation: ballBounce 0.45s cubic-bezier(0.34,1.56,0.64,1) forwards; }
