/* ═══════════════════════════════════════════════════════════════
   AstroTown · Game Jam Page
   ═══════════════════════════════════════════════════════════════ */

.jam-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--s5) var(--s8);
}

.grad-text {
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title-lg {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: var(--weight-black);
  letter-spacing: -0.02em;
  margin-bottom: var(--s6);
  text-align: center;
}

/* ── Hero ── */
.jam-hero {
  position: relative;
  padding: clamp(64px, 10vw, 120px) 0 clamp(40px, 6vw, 72px);
  text-align: center;
  overflow: hidden;
}

/* Pulse rings in background */
.jam-hero-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}
.jam-pulse-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(99,102,241,0.08);
  animation: jam-ring-pulse 6s ease-out infinite;
}
.ring-1 { width: 300px; height: 300px; animation-delay: 0s; }
.ring-2 { width: 500px; height: 500px; animation-delay: 2s; }
.ring-3 { width: 700px; height: 700px; animation-delay: 4s; }
@keyframes jam-ring-pulse {
  0%   { opacity: 0.6; transform: scale(0.8); }
  100% { opacity: 0;   transform: scale(1.4); }
}
.jam-hero-content { position: relative; z-index: 1; }

.jam-edition-badge {
  display: inline-block;
  padding: 5px 16px;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f59e0b;
  margin-bottom: var(--s5);
}

.jam-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: var(--weight-black);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: var(--s5);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.jam-title-line { display: block; }

.jam-hero-sub {
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto var(--s6);
}
.jam-hero-sub strong { color: var(--text-primary); }

/* Countdown */
.jam-countdown {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: var(--bg-surface);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--r-lg);
  padding: var(--s3) var(--s6);
  margin-bottom: var(--s6);
}
.countdown-unit { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.cd-num {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}
.cd-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.08em; }
.countdown-sep {
  font-size: 1.5rem;
  font-weight: var(--weight-black);
  color: rgba(245,158,11,0.4);
  padding-bottom: 12px;
}

/* CTA row */
.jam-hero-cta { display: flex; align-items: center; gap: var(--s4); justify-content: center; flex-wrap: wrap; margin-bottom: var(--s5); }
.jam-register-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s7);
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  border: none;
  border-radius: var(--r-full);
  color: #000;
  font-size: var(--text-base);
  font-weight: var(--weight-black);
  cursor: pointer;
  transition: all var(--t-fast) ease;
  box-shadow: 0 4px 24px rgba(245,158,11,0.35);
}
.jam-register-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(245,158,11,0.45); }
.jam-btn-badge {
  padding: 2px 8px;
  background: rgba(0,0,0,0.15);
  border-radius: var(--r-full);
  font-size: 11px;
}
.jam-rules-link { font-size: var(--text-sm); color: var(--text-muted); text-decoration: none; }
.jam-rules-link:hover { color: var(--text-secondary); }

.jam-hero-meta {
  display: flex;
  align-items: center;
  gap: var(--s3);
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
  flex-wrap: wrap;
}
.jam-hero-meta strong { color: var(--text-primary); }

/* ── Theme ── */
.jam-theme { margin-bottom: var(--s8); }
.theme-card {
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.06));
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: var(--r-xl);
  padding: var(--s7);
  text-align: center;
}
.theme-label {
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-glow);
  margin-bottom: var(--s5);
}
.theme-locked { display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.lock-icon { font-size: 40px; opacity: 0.5; }
.lock-text { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--text-secondary); }
.lock-hint { font-size: var(--text-xs); color: var(--text-muted); }

/* ── Prizes ── */
.jam-prizes { margin-bottom: var(--s8); }
.prize-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s4);
}
.prize-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s5);
  text-align: center;
  transition: transform var(--t-fast) ease;
}
.prize-card:hover { transform: translateY(-4px); }
.prize-card.gold   { border-color: rgba(245,158,11,0.3); box-shadow: 0 0 32px rgba(245,158,11,0.08); }
.prize-card.silver { border-color: rgba(203,213,225,0.2); }
.prize-card.bronze { border-color: rgba(180,83,9,0.2); }
.prize-card.special{ border-color: rgba(99,102,241,0.2); }
.prize-rank { font-size: 2rem; margin-bottom: var(--s2); }
.prize-title { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-muted); margin-bottom: var(--s2); }
.prize-amount {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--weight-black);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--s4);
}
.prize-card.gold .prize-amount { color: #f59e0b; }
.prize-perks {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.prize-perks li { font-size: 12px; color: var(--text-muted); padding-left: var(--s3); position: relative; }
.prize-perks li::before { content: '·'; position: absolute; left: 0; color: var(--accent-glow); }

/* ── Rules ── */
.jam-rules { margin-bottom: var(--s8); }
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s4);
}
.rule-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s5);
}
.rule-icon { font-size: 24px; margin-bottom: var(--s3); }
.rule-block h3 { font-size: var(--text-sm); font-weight: var(--weight-bold); margin-bottom: var(--s2); }
.rule-block p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ── Timeline ── */
.jam-timeline { margin-bottom: var(--s8); }
.timeline {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.tl-item {
  display: flex;
  gap: var(--s5);
  align-items: flex-start;
  padding-bottom: var(--s6);
  position: relative;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  background: var(--bg-deep);
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}
.tl-dot.active {
  background: #f59e0b;
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245,158,11,0.5);
}
.tl-item:not(:last-child) .tl-dot::after {
  content: '';
  position: absolute;
  left: 50%; top: 100%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(var(--s6) + 14px);
  background: var(--border-subtle);
}
.tl-item.current .tl-dot::after { background: linear-gradient(to bottom, rgba(245,158,11,0.4), var(--border-subtle)); }
.tl-date { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: 4px; }
.tl-title { font-size: var(--text-sm); font-weight: var(--weight-bold); margin-bottom: 4px; }
.tl-highlight { color: #f59e0b; }
.tl-desc { font-size: 13px; color: var(--text-muted); }
.tl-item.past { opacity: 0.5; }

/* ── Leaderboard ── */
.jam-leaderboard { margin-bottom: var(--s8); }
.leaderboard-empty {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s8);
  text-align: center;
}
.lb-icon { font-size: 40px; margin-bottom: var(--s4); opacity: 0.4; }
.leaderboard-empty p { color: var(--text-muted); font-size: var(--text-sm); margin-bottom: var(--s4); }

/* ── FAQ ── */
.jam-faq { margin-bottom: var(--s8); }
.faq-list { display: flex; flex-direction: column; gap: var(--s2); max-width: 720px; margin: 0 auto; }
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.faq-item summary {
  padding: var(--s4) var(--s5);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 18px; color: var(--text-muted); transition: transform var(--t-fast) ease; }
details[open] .faq-item summary::after { content: '−'; }
.faq-item p { padding: 0 var(--s5) var(--s4); font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.7; }

/* ── Final CTA ── */
.jam-final-cta {
  text-align: center;
  padding: var(--s8) var(--s5);
  background: linear-gradient(135deg, rgba(245,158,11,0.06), rgba(236,72,153,0.06));
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: var(--r-xl);
  margin-bottom: var(--s8);
}
.jam-final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: var(--weight-black);
  letter-spacing: -0.03em;
  margin-bottom: var(--s3);
}
.jam-final-cta p { color: var(--text-secondary); margin-bottom: var(--s6); }

/* ── Register modal ── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal, 1000);
  align-items: center;
  justify-content: center;
  padding: var(--s4);
}
.modal-backdrop.open { display: flex; }
.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-normal);
  border-radius: var(--r-xl);
  padding: var(--s7);
  width: 100%;
  max-width: 440px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: var(--s4);
  right: var(--s4);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-overlay);
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-raised); }
.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  margin-bottom: var(--s2);
  letter-spacing: -0.01em;
}
.modal-sub { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--s5); }
.modal-field { margin-bottom: var(--s4); }
.modal-field label { display: block; font-size: 12px; font-weight: var(--weight-semibold); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.modal-field input,
.modal-field select {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  padding: var(--s3) var(--s4);
}
.modal-field input:focus,
.modal-field select:focus { outline: none; border-color: var(--border-focus); }
.modal-actions { margin-top: var(--s5); }
