/**
 * community-books-1528355.css
 * Book CTAs in games, XP purchase rewards, reading streaks, SOTD tie-ins
 * Task #1528355 — Community integration: books/toolkits in games, XP rewards, social proof
 */

/* ── Game Book CTA (shown after game info sections) ──────────────────────── */
.game-book-cta {
  background: linear-gradient(135deg, #0a2540 0%, #1a3a5c 100%);
  border: 1px solid rgba(0,135,90,0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.game-book-cta:hover {
  border-color: rgba(0,135,90,0.7);
  transform: translateY(-2px);
  text-decoration: none;
}
.game-book-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00875A, #7c3aed);
  opacity: 0.8;
}

.game-book-cta-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.game-book-cta-body {
  flex: 1;
  min-width: 0;
}

.game-book-cta-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #34d399; /* WCAG AA: 8.39:1 on #0a2540 (was #00875A at 3.41:1) */
  margin-bottom: 0.25rem;
}

.game-book-cta-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.game-book-cta-desc {
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.4;
}

.game-book-cta-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,135,90,0.15);
  border: 1px solid rgba(0,135,90,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #34d399; /* WCAG AA: 8.39:1 on #0a2540 (was #00875A at 3.41:1) */
  font-size: 0.875rem;
  transition: background 0.2s;
}
.game-book-cta:hover .game-book-cta-arrow {
  background: rgba(0,135,90,0.3);
}

/* Trivia fact card (between-round / below trivia section) */
.game-fact-card {
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.game-fact-card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.game-fact-card-body {}
.game-fact-card-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 0.3rem;
}
.game-fact-card-text {
  font-size: 0.875rem;
  color: #e2e8f0;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.game-fact-card-link {
  font-size: 0.8125rem;
  color: #a78bfa;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(167,139,250,0.4);
  transition: color 0.2s;
}
.game-fact-card-link:hover { color: #c4b5fd; }

/* ── SOTD Book Tie-in (Settlement of the Day) ────────────────────────────── */
.sotd-book-cta {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sotd-book-cta:hover {
  border-color: #00875A;
  box-shadow: 0 2px 8px rgba(0,135,90,0.1);
  text-decoration: none;
}
.sotd-book-cta-icon { font-size: 1.75rem; flex-shrink: 0; }
.sotd-book-cta-body { flex: 1; min-width: 0; }
.sotd-book-cta-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #00875A;
  margin-bottom: 0.2rem;
}
.sotd-book-cta-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}
.sotd-book-cta-desc {
  font-size: 0.8125rem;
  color: #64748b;
}
.sotd-book-cta-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: #00875A;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* ── Book purchase XP toast ──────────────────────────────────────────────── */
.book-xp-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #0a2540;
  border: 1px solid rgba(0,135,90,0.4);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  min-width: 280px;
  max-width: 420px;
}
.book-xp-toast.visible {
  transform: translateX(-50%) translateY(0);
}
.book-xp-toast-icon { font-size: 1.75rem; flex-shrink: 0; }
.book-xp-toast-body {}
.book-xp-toast-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.9375rem;
  margin-bottom: 0.15rem;
}
.book-xp-toast-sub {
  color: #94a3b8;
  font-size: 0.8125rem;
}
.book-xp-toast-xp {
  margin-left: auto;
  flex-shrink: 0;
  background: rgba(0,135,90,0.2);
  border: 1px solid rgba(0,135,90,0.4);
  border-radius: 8px;
  padding: 0.3rem 0.75rem;
  font-weight: 800;
  color: #4ade80;
  font-size: 1rem;
}

/* ── Book reading streak badge (on profile) ──────────────────────────────── */
.reading-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #3b82f6;
}
.reading-streak-badge .streak-fire { font-size: 1rem; }

/* ── Tournament prize block ──────────────────────────────────────────────── */
.tournament-prize-books {
  background: linear-gradient(135deg, rgba(124,58,237,0.08) 0%, rgba(0,135,90,0.06) 100%);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1rem 0;
}
.tournament-prize-books-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.tournament-prize-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.875rem;
}
.tournament-prize-row:last-child { border-bottom: none; }
.tournament-prize-place {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8125rem;
  flex-shrink: 0;
}
.tournament-prize-place.p1 { background: rgba(234,179,8,0.2); color: #eab308; border: 1px solid rgba(234,179,8,0.4); }
.tournament-prize-place.p2 { background: rgba(148,163,184,0.15); color: #94a3b8; border: 1px solid rgba(148,163,184,0.3); }
.tournament-prize-place.p3 { background: rgba(205,127,50,0.15); color: #cd7f32; border: 1px solid rgba(205,127,50,0.3); }
.tournament-prize-desc { color: #e2e8f0; flex: 1; }
.tournament-prize-value { color: #a78bfa; font-weight: 700; font-size: 0.8125rem; white-space: nowrap; }

/* ── Mobile responsive ────────────────────────────────────────────────────── */
@media (max-width: 599px) {
  .game-book-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.25rem;
  }
  .game-book-cta-arrow { display: none; }

  .sotd-book-cta {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .sotd-book-cta-btn {
    width: 100%;
    justify-content: center;
  }

  .book-xp-toast {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    transform: translateY(80px);
    max-width: none;
    min-width: 0;
  }
  .book-xp-toast.visible {
    transform: translateY(0);
    left: 1rem;
    right: 1rem;
  }
}
