/* pb-styles.css — Powerball Louisiana — LottoMom.com */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg: #0f1117;
  --surface: #1a1d2e;
  --card: #1e2235;
  --border: #2a2d3e;
  --gold: #f5c842;
  --gold-dim: #b89a20;
  --green: #4ade80;
  --text: #e8eaf0;
  --muted: #8b8fa8;
  --accent: #ef4444;
  --accent2: #f97316;
  --red: #f87171;
  --ball-red: #dc2626;
  --ball-white: #e8eaf0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

/* AD SYSTEM */
.ad-banner {
  background: linear-gradient(90deg, #1a1d2e, #222540, #1a1d2e);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .05em;
}
.ad-banner span { color: var(--gold); }
.ad-leaderboard {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .05em;
  margin: 0 auto;
  width: 728px;
  max-width: 100%;
  height: 90px;
}
.ad-rect {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .05em;
  width: 300px;
  height: 250px;
  flex-shrink: 0;
}
.ad-wrap { padding: 12px 20px; display: flex; justify-content: center; }
.ad-inline { margin: 24px 0; display: flex; justify-content: center; }

/* HEADER */
header {
  background: linear-gradient(135deg, #1a0505 0%, #2a0a0a 50%, #1e0808 100%);
  border-bottom: 2px solid #3d1010;
  padding: 20px 24px 18px;
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% -10%, rgba(239,68,68,.18), transparent);
  pointer-events: none;
}

/* BACK LINK — must appear before .tabs rule */
.pb-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0;
  margin-bottom: 10px;
  transition: color .2s;
}
.pb-back:hover { color: var(--gold); }

.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tab-btn {
  flex: 1;
  min-width: 80px;
  padding: 9px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.tab-btn.active {
  background: var(--card);
  color: var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.tab-btn:hover:not(.active) { color: var(--text); }

/* HEADER INNER */
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.header-title { display: flex; align-items: center; gap: 14px; }
.game-logo {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--ball-red), #7f1d1d);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 0 20px rgba(220,38,38,.4);
}
.header-title h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.header-title .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.jackpot-display {
  text-align: right;
}
.jackpot-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.jackpot-amount {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
  text-shadow: 0 0 20px rgba(245,200,66,.3);
}
.jackpot-note { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* MAIN LAYOUT */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}
@media(max-width:860px) {
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

/* PANEL */
.panel { display: none; }
.panel.active { display: block; }

/* PLAY TAB */
.play-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.play-card h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* NUMBER DISPLAY */
.ball-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  min-height: 56px;
}
.ball {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-weight: 700;
  position: relative;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  flex-shrink: 0;
}
.ball::after {
  content: '';
  position: absolute;
  top: 6px; left: 10px;
  width: 14px; height: 6px;
  background: rgba(255,255,255,.3);
  border-radius: 50%;
  transform: rotate(-35deg);
}
.ball.white {
  background: radial-gradient(circle at 35% 35%, #f5f5f5, #c0c0c0);
  color: #1a1a2e;
  box-shadow: 0 4px 12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.6);
}
.ball.red {
  background: radial-gradient(circle at 35% 35%, #ef4444, #991b1b);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239,68,68,.5), inset 0 1px 0 rgba(255,255,255,.2);
}
.ball.empty {
  background: rgba(255,255,255,.05);
  border: 2px dashed var(--border);
  box-shadow: none;
}
.ball.empty::after { display: none; }
.ball-sep {
  font-size: 20px;
  color: var(--border);
  font-weight: 300;
}
.ball.pop { animation: ballPop .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes ballPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* CONTROLS */
.sim-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #b91c1c);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(239,68,68,.3);
  letter-spacing: .02em;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(239,68,68,.4); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

/* MULTIPLIER */
.multiplier-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.multiplier-label { font-size: 13px; color: var(--muted); }
.multiplier-select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
}
.power-play-badge {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: .06em;
}

/* TICKET HISTORY */
.ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ticket-balls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mini-ball {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.mini-ball.white {
  background: radial-gradient(circle at 35% 35%, #e8eaf0, #9ca3af);
  color: #1a1a2e;
}
.mini-ball.red {
  background: radial-gradient(circle at 35% 35%, #ef4444, #991b1b);
  color: #fff;
}
.ticket-meta { font-size: 11px; color: var(--muted); }
.ticket-prize {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}
.ticket-prize.no-win { color: var(--muted); }

/* PRIZE TABLE */
.prize-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.prize-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.prize-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prize-table tr:last-child td { border-bottom: none; }
.prize-table tr:hover td { background: rgba(255,255,255,.02); }
.prize-amt { color: var(--gold); font-weight: 700; }
.prize-odds { color: var(--muted); font-size: 12px; }

/* FREQUENCY TAB */
.freq-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.freq-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.freq-btn.active { background: var(--card); color: var(--gold); border-color: rgba(245,200,66,.3); }

.freq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.freq-ball {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.freq-ball-inner {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  position: relative;
  cursor: default;
  transition: transform .2s;
}
.freq-ball-inner:hover { transform: scale(1.1); }
.freq-ball-inner.white-ball {
  background: radial-gradient(circle at 35% 35%, #f5f5f5, #9ca3af);
  color: #1a1a2e;
}
.freq-ball-inner.red-ball {
  background: radial-gradient(circle at 35% 35%, #ef4444, #991b1b);
  color: #fff;
}
.freq-count { font-size: 11px; color: var(--muted); }
.freq-bar-wrap {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 2px;
  overflow: hidden;
  width: 44px;
}
.freq-bar {
  height: 100%;
  border-radius: 2px;
  background: var(--gold);
  transition: width .4s ease;
}
.freq-bar.red-bar { background: var(--accent); }

/* HISTORY TAB */
.history-table-wrap { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 480px; }
.history-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  position: sticky; top: 0;
}
.history-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.history-table tr:hover td { background: rgba(255,255,255,.02); }
.h-balls { display: flex; align-items: center; gap: 4px; }
.h-ball {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.h-ball.w { background: radial-gradient(circle at 35% 35%, #e8eaf0, #9ca3af); color: #111; }
.h-ball.r { background: radial-gradient(circle at 35% 35%, #ef4444, #991b1b); color: #fff; }
.h-sep { color: var(--border); font-size: 14px; }
.h-date { color: var(--muted); }
.h-mult { font-size: 11px; color: var(--accent2); font-weight: 600; }

/* STATS TAB */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
}
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* SIDEBAR */
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.sidebar-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 14px;
  letter-spacing: .04em;
}
.info-list { list-style: none; }
.info-list li {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.info-list li:last-child { border-bottom: none; }
.info-list .k { color: var(--muted); }
.info-list .v { color: var(--text); font-weight: 600; }
.next-draw-countdown {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  text-align: center;
  padding: 12px 0;
}
.next-draw-label { font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px; }

/* FOOTER */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 24px 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
footer a { color: var(--gold); text-decoration: none; }

/* SECTION LABEL */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* HOT/COLD PILLS */
.hot-cold-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hc-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px 5px 6px;
  font-size: 12px;
  color: var(--text);
}
.hc-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.hot .hc-num { background: var(--accent); color: #fff; }
.cold .hc-num { background: #3b82f6; color: #fff; }
