/* ── LottoMom · Mississippi Pick 4 Styles (prefix: p4) ── */
@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;
  --purple: #4B0082;
  --purple-bright: #A080FF;
  --bg: #0a0800;
  --surface: #100a18;
  --card: #160e22;
  --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', sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; }

.p4-wrap { max-width: 620px; margin: 0 auto; min-height: 100vh; position: relative; }
.p4-glow { position: fixed; top: -8%; left: 50%; transform: translateX(-50%); width: 320px; height: 320px; background: radial-gradient(circle, rgba(75,0,130,0.28) 0%, transparent 70%); pointer-events: none; z-index: 0; }

.p4-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; }
.p4-back:hover { color: var(--gold); }

.p4-header { position: relative; z-index: 1; text-align: center; padding: 20px 20px 24px; }
.p4-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--purple-bright); border: 1px solid rgba(75,0,130,0.5); padding: 5px 16px; border-radius: 100px; margin-bottom: 14px; background: rgba(75,0,130,0.15); }
.p4-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; }
.p4-header h1 span { color: var(--purple-bright); }
.p4-header p { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.p4-divider { width: 36px; height: 2px; background: linear-gradient(90deg, transparent, var(--purple-bright), 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; }
.lm-ad-badge-inner { font-size: 11px; color: rgba(255,255,255,0.3); }
.lm-ad-badge-inner a { color: var(--gold); text-decoration: none; }

/* Draw times */
.p4-draws { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px 16px; }
.p4-draw-card { background: var(--card); border: 1px solid rgba(75,0,130,0.3); border-radius: 14px; padding: 14px 16px; }
.p4-draw-label { font-size: 9px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.p4-draw-time { font-family: 'Oswald', sans-serif; font-size: 22px; font-weight: 700; color: var(--purple-bright); }
.p4-draw-tz { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* 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; cursor: pointer; transition: all 0.18s; text-align: center; }
.tab.active { background: var(--purple); color: #fff; box-shadow: 0 2px 12px rgba(75,0,130,0.5); }
.tab-panel { display: none; position: relative; z-index: 1; }
.tab-panel.active { display: block; }

/* Play card */
.p4-play-card { margin: 0 16px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; }
.p4-play-label { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; text-align: center; }
.p4-type-row { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.p4-type-btn { flex: 1; min-width: 70px; padding: 8px 4px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s; text-align: center; }
.p4-type-btn.active { background: rgba(75,0,130,0.2); border-color: rgba(75,0,130,0.5); color: var(--purple-bright); }

.p4-digits { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.p4-digit { width: 62px; height: 72px; border-radius: 12px; background: var(--surface); border: 2px solid rgba(75,0,130,0.25); display: flex; align-items: center; justify-content: center; font-family: 'Oswald', sans-serif; font-size: 34px; font-weight: 700; color: var(--muted); transition: all 0.25s; }
.p4-digit.set { background: linear-gradient(135deg, rgba(75,0,130,0.3), rgba(75,0,130,0.1)); border-color: var(--purple); color: var(--purple-bright); box-shadow: 0 4px 20px rgba(75,0,130,0.3); }

.p4-btn-row { display: flex; gap: 10px; }
.p4-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; }
.p4-btn-primary { background: linear-gradient(135deg, #7030b0, var(--purple)); color: #fff; box-shadow: 0 4px 18px rgba(75,0,130,0.45); }
.p4-btn-primary:hover { box-shadow: 0 6px 26px rgba(75,0,130,0.65); transform: translateY(-1px); }
.p4-btn-secondary { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }

/* Keypad */
.p4-keypad-wrap { margin: 0 16px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.p4-keypad-label { font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; text-align: center; }
.p4-keypad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.p4-key { padding: 14px 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 700; cursor: pointer; transition: all 0.15s; text-align: center; }
.p4-key:hover { background: rgba(75,0,130,0.15); border-color: rgba(75,0,130,0.4); color: var(--purple-bright); }

/* Result */
.p4-result-card { margin: 0 16px 16px; background: var(--card); border: 1px solid rgba(75,0,130,0.3); border-radius: var(--radius); padding: 18px 20px; display: none; }
.p4-result-card.show { display: block; }
.p4-result-title { font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; text-align: center; }
.p4-result-digits { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.p4-res-digit { width: 54px; height: 64px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: 'Oswald', sans-serif; font-size: 30px; font-weight: 700; }
.p4-res-digit.match { background: linear-gradient(135deg, #7030b0, var(--purple)); color: #fff; box-shadow: 0 4px 16px rgba(75,0,130,0.4); }
.p4-res-digit.nomatch { background: var(--surface); border: 2px solid var(--border); color: var(--muted); }
.p4-result-msg { text-align: center; font-size: 15px; font-weight: 700; padding: 8px 0 4px; }
.p4-result-sub { text-align: center; font-size: 12px; color: var(--muted); }
.p4-prize-box { margin-top: 12px; padding: 10px; border-radius: 10px; background: rgba(75,0,130,0.12); border: 1px solid rgba(75,0,130,0.3); text-align: center; font-weight: 700; color: var(--purple-bright); font-size: 16px; }

/* Frequency */
.p4-freq-card { margin: 0 16px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.p4-freq-title { font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; text-align: center; }
.p4-freq-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.p4-freq-num { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #7030b0, var(--purple)); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: 700; flex-shrink: 0; }
.p4-freq-num.cold { background: linear-gradient(135deg, #1a0830, #100520); }
.p4-freq-bar-wrap { flex: 1; height: 8px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.p4-freq-bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #7030b0, var(--purple-bright)); transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.p4-freq-bar.cold { background: linear-gradient(90deg, #1a0830, #6030a0); }
.p4-freq-count { font-size: 12px; font-weight: 700; color: var(--muted); width: 28px; text-align: right; flex-shrink: 0; }

.p4-toggle-row { display: flex; gap: 8px; margin: 0 16px 16px; }
.p4-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; }
.p4-toggle-btn.active { background: rgba(75,0,130,0.18); border-color: rgba(75,0,130,0.45); color: var(--purple-bright); }

/* History */
.p4-history-card { margin: 0 16px 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.p4-history-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.p4-history-date { font-size: 12px; font-weight: 600; color: var(--text); }
.p4-history-type { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.p4-history-nums { display: flex; gap: 5px; padding: 10px 16px; align-items: center; }
.p4-hist-d { width: 34px; height: 40px; border-radius: 8px; background: linear-gradient(135deg, #7030b0, var(--purple)); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: 700; }
.p4-hist-sep { color: var(--muted); }

/* Stats */
.p4-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 16px 16px; }
.p4-stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-align: center; }
.p4-stat-val { font-family: 'Oswald', sans-serif; font-size: 28px; font-weight: 700; color: var(--purple-bright); line-height: 1; margin-bottom: 4px; }
.p4-stat-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.p4-odds-card { margin: 0 16px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.p4-odds-title { font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.p4-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; }
.p4-odds-row:last-child { border-bottom: none; }
.p4-odds-match { color: var(--text); font-weight: 500; }
.p4-odds-prize { color: var(--gold); font-weight: 700; }
.p4-odds-prob { color: var(--muted); font-size: 11px; }

.p4-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; }
.p4-footer a { color: var(--gold); text-decoration: none; }

@keyframes digitFlip { 0%{transform:scale(1.2);opacity:0;} 100%{transform:scale(1);opacity:1;} }
.p4-digit.animate { animation: digitFlip 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards; }
