/* ============================================================
   pb-styles.css — Wisconsin Powerball · lottomom.com
   Dark navy theme · Bebas Neue + DM Sans + DM Mono
   ============================================================ */

/* Google Fonts loaded in HTML <head> */

:root {
  --bg:      #0d1b2e;
  --surface: #132240;
  --card:    #172a4a;
  --border:  #1e3660;
  --text:    #e8f0ff;
  --muted:   #6b85b0;
  --red:     #c8102e;
  --dark-red:#8b0b1f;
  --gold:    #f5c518;
  --gold-dark:#c9a010;
  --navy:    #002868;
  --green:   #22c55e;
}

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

/* ── Base ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── Starfield ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,40,104,0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(200,16,46,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(245,197,24,0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.1; }
  50%       { opacity: 0.8; }
}

/* ── Header ── */
header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  border-bottom: 2px solid rgba(245,197,24,0.2);
  background: linear-gradient(180deg, rgba(0,40,104,0.4) 0%, transparent 100%);
}

.wi-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--gold);
  background: rgba(245,197,24,0.1);
  border: 1px solid rgba(245,197,24,0.2);
  padding: 0.3rem 1rem;
  border-radius: 2px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

h1 {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(3.5rem, 10vw, 6rem);
  letter-spacing: 0.05em;
  line-height: 0.9;
  background: linear-gradient(135deg, #fff 0%, var(--gold) 40%, #fff 70%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(245,197,24,0.3));
  margin-bottom: 0.5rem;
}

.subtitle {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ── Jackpot Banner ── */
.jackpot-banner {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(200,16,46,0.15), rgba(0,40,104,0.15));
  border-bottom: 1px solid rgba(245,197,24,0.2);
}

.jackpot-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.jackpot-amount {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: var(--gold);
  text-shadow: 0 0 40px rgba(245,197,24,0.5);
  letter-spacing: 0.02em;
  transition: all 0.5s ease;
}

.jackpot-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ── Main ── */
main {
  position: relative;
  z-index: 5;
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 0.7rem 1.1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.tab:hover:not(.active) { color: var(--text); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Section Label ── */
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(245,197,24,0.2);
}

/* ── Selected Display ── */
.selected-display {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  min-height: 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
}

/* ── Balls ── */
.ball {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ball.white {
  background: radial-gradient(circle at 35% 35%, #fff, #d0d0d0);
  color: #1a1a2e;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 3px rgba(255,255,255,0.8);
}
.ball.powerball {
  background: radial-gradient(circle at 35% 35%, var(--gold), #b8860b);
  color: #111;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), 0 0 20px rgba(245,197,24,0.4), inset 0 1px 3px rgba(255,255,255,0.6);
}
.ball.empty {
  background: rgba(255,255,255,0.05);
  border: 2px dashed rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.2);
  font-size: 0.8rem;
}
.ball.matched {
  box-shadow: 0 0 20px rgba(245,197,24,0.7) !important;
  outline: 2px solid var(--gold);
}

.separator {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  padding: 0 0.2rem;
  align-self: center;
}

/* ── Picker Section ── */
.picker-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.2rem;
}
.picker-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.2rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
}
.picker-hint {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
}

/* ── Number Grid ── */
.number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 0.5rem;
}
.num-btn {
  aspect-ratio: 1;
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.num-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  transform: scale(1.06);
}
.num-btn.selected {
  background: var(--red);
  border-color: var(--red);
  color: white;
  box-shadow: 0 0 15px rgba(200,16,46,0.5);
  transform: scale(1.06);
}
.num-btn.pb-selected {
  background: var(--gold);
  border-color: var(--gold-dark);
  color: #111;
  box-shadow: 0 0 15px rgba(245,197,24,0.6);
  transform: scale(1.06);
}
.num-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── Button Row ── */
.btn-row {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.btn {
  flex: 1;
  min-width: 120px;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-family: 'Bebas Neue', cursive;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--dark-red));
  color: white;
  box-shadow: 0 4px 15px rgba(200,16,46,0.4);
}
.btn-primary:hover { box-shadow: 0 6px 25px rgba(200,16,46,0.6); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); color: var(--text); border-color: rgba(255,255,255,0.3); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #111;
  box-shadow: 0 4px 15px rgba(245,197,24,0.3);
  font-size: 1.05rem;
}
.btn-gold:hover { box-shadow: 0 6px 25px rgba(245,197,24,0.5); transform: translateY(-1px); }

/* ── Result Panel ── */
.result-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: none;
  text-align: center;
}
.result-panel.visible { display: block; }
.result-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 2rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}
.result-win  { color: var(--gold); text-shadow: 0 0 30px rgba(245,197,24,0.5); }
.result-lose { color: var(--muted); }
.result-prize {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.3rem;
  color: var(--gold);
  margin: 0.5rem 0;
}
.result-msg { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.2rem; }
.draw-balls {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.match-indicator {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* Ball drop animations */
@keyframes ballDrop {
  from { transform: translateY(-30px) scale(0.8); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.draw-balls .ball { animation: ballDrop 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }
.draw-balls .ball:nth-child(1) { animation-delay: 0.05s; }
.draw-balls .ball:nth-child(2) { animation-delay: 0.15s; }
.draw-balls .ball:nth-child(3) { animation-delay: 0.25s; }
.draw-balls .ball:nth-child(4) { animation-delay: 0.35s; }
.draw-balls .ball:nth-child(5) { animation-delay: 0.45s; }
.draw-balls .ball:nth-child(6) { animation-delay: 0.60s; }
.draw-balls .ball:nth-child(7) { animation-delay: 0.75s; }

/* ── Saved Tickets ── */
.saved-ticket-list { display: flex; flex-direction: column; gap: 0.8rem; }
.saved-ticket {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.saved-balls { display: flex; gap: 0.4rem; align-items: center; }
.mini-ball {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 1rem;
  flex-shrink: 0;
}
.mini-ball.white {
  background: radial-gradient(circle at 35% 35%, #fff, #d0d0d0);
  color: #1a1a2e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.mini-ball.powerball {
  background: radial-gradient(circle at 35% 35%, var(--gold), #b8860b);
  color: #111;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.saved-date { font-size: 0.72rem; color: var(--muted); font-family: 'DM Mono', monospace; }
.del-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: all 0.15s;
  line-height: 1;
}
.del-btn:hover { color: var(--red); background: rgba(200,16,46,0.1); }

/* ── Prize Table ── */
.prize-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.prize-table th {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
.prize-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 0.83rem;
}
.prize-table tr:last-child td { border-bottom: none; }
.prize-table tr:hover td { background: rgba(255,255,255,0.03); }
.prize-amount { color: var(--gold); font-weight: 600; font-family: 'DM Mono', monospace; }

/* ── Confetti ── */
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 1000;
  animation: confettiFall var(--dur, 3s) ease-in var(--delay, 0s) forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
}
.empty-state-icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* ── Disclaimer ── */
.disclaimer {
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  line-height: 1.7;
  position: relative;
  z-index: 5;
  font-family: 'DM Sans', sans-serif;
}

/* ── Responsive ── */
@media (max-width: 500px) {
  .number-grid { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 0.35rem; }
  .num-btn { font-size: 0.8rem; }
  .ball { width: 42px; height: 42px; font-size: 1.15rem; }
  .tab { padding: 0.6rem 0.8rem; font-size: 0.72rem; }
}
