/* Results page additions — extends the index.html theme variables */

/* ── Latest Results section ── */
.results-section {
  padding: 80px 24px 60px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  position: relative;
}

.results-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 40% at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  max-width: 1100px;
  margin: 48px auto 0;
  position: relative;
}

.result-card {
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-3px);
}

.result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-game {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.result-game-emoji {
  font-size: 22px;
  line-height: 1;
}

.result-meta {
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}

.result-meta strong {
  color: var(--text);
  font-weight: 600;
}

.result-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 44px;
}

.ball {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  background: var(--amber);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.ball.bonus {
  background: var(--bg3);
  color: var(--text);
  border: 2px solid var(--amber);
  box-shadow: none;
}

.ball.powerball {
  background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.ball-sep {
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 300;
  margin: 0 2px;
  user-select: none;
}

.result-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.result-cta:hover {
  background: var(--amber);
  color: #0f172a;
}

.result-empty {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

.result-skeleton .ball {
  background: var(--bg3);
  color: transparent;
  box-shadow: none;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.85; }
}

/* ── Sticky bottom install bar (mobile) ── */
.install-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  transform: translateY(110%);
  transition: transform 0.3s ease;
}

.install-bar.visible {
  transform: translateY(0);
}

.install-bar-text {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--text);
}

.install-bar-text strong {
  color: var(--amber);
  font-weight: 700;
}

.install-bar-btn {
  background: var(--amber);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}

.install-bar-btn:hover {
  background: var(--amber-lt);
}

@media (max-width: 768px) {
  .install-bar {
    display: flex;
  }
  body {
    padding-bottom: 72px;
  }
}

/* ── Per-game page hero ── */
.game-hero {
  padding: 110px 24px 50px;
  text-align: center;
  position: relative;
}

.game-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.game-hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}

.game-hero .meta {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto 28px;
  position: relative;
}

.game-hero .game-result-card {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

/* ── Section: Recent Draws (per-game pages) ── */
.recent-draws {
  padding: 50px 24px 80px;
}

.recent-draws-list {
  max-width: 720px;
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-row {
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.recent-row .recent-meta {
  flex: 0 0 auto;
  min-width: 100px;
  color: var(--muted);
  font-size: 0.82rem;
}

.recent-row .recent-meta strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.recent-row .recent-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
}

.recent-row .ball {
  width: 30px;
  height: 30px;
  font-size: 0.78rem;
}

/* ── CTA strip ── */
.scan-cta {
  background: linear-gradient(135deg, var(--amber-dim) 0%, transparent 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  max-width: 720px;
  margin: 32px auto;
}

.scan-cta h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.scan-cta p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Last-updated stamp ── */
.last-updated {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 24px;
}

/* ── Responsive tweaks ── */
@media (max-width: 480px) {
  .ball {
    width: 32px;
    height: 32px;
    font-size: 0.82rem;
  }
  .result-card {
    padding: 18px 16px;
  }
  .result-game {
    font-size: 0.95rem;
  }
}
