/* ==========================================================================
   FBorLI: shared stylesheet
   One file controls the look of every page. Change a color here and it
   updates everywhere. Beginner tip: the stuff inside :root is your "control
   panel" of colors; tweak those values first.
   ========================================================================== */

:root {
  --fb-blue: #1877F2;      /* Facebook blue */
  --li-blue: #0A66C2;      /* LinkedIn blue */
  --ink: #1c1e21;          /* main text color */
  --muted: #65676b;        /* secondary/gray text */
  --line: #e4e6eb;         /* border lines */
  --bg: #e9eef7;           /* page background (soft blue tint) */
  --card: #ffffff;         /* card background */
  --accent: #1877F2;       /* low-key blue accent for numbers etc. */
  --hero-glow: rgba(24,119,242,0.12);  /* soft blue halo behind the hero */
  --good: #17a34a;         /* correct green */
  --bad: #dc2626;          /* incorrect red */
  --radius: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --maxw: 720px;
}

/* Dark mode: automatically follows the visitor's system setting. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e4e6eb;
    --muted: #b0b3b8;
    --line: #3a3b3c;
    --bg: #16181d;
    --card: #242526;
    --accent: #4a97ff;
    --hero-glow: rgba(74,151,255,0.14);
    --shadow: 0 2px 12px rgba(0,0,0,0.4);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--li-blue); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wordmark {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark .fb { color: var(--fb-blue); }
.wordmark .li { color: var(--li-blue); }
.wordmark .or {
  color: var(--muted);
  font-weight: 500;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.8em;
  margin: 0 0.32em;   /* the gap that separates FB and LI from "or" */
}

.nav-links { display: flex; gap: 8px; }
.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.nav-links a:hover { background: var(--bg); }
.nav-links a.active {
  border-color: var(--line);
  background: var(--bg);
}

/* ---------- Layout ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ---------- Homepage hero ---------- */
.hero {
  text-align: center;
  padding: 44px 8px 12px;
  background: radial-gradient(130% 90% at 50% -10%, var(--hero-glow), transparent 62%);
  border-radius: 22px;
}
.hero h1 {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 1.05;
  margin: 8px 0 4px;
  letter-spacing: -1px;
}
.hero .tagline {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34ch;
  margin: 0 auto 28px;
}
.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.08s, filter 0.15s, box-shadow 0.15s;
  color: #fff;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-fb { background: var(--fb-blue); }
.btn-li { background: var(--li-blue); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: 0.5; cursor: default; filter: none; }

/* ---------- Game ---------- */
.stats {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat .num { font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--accent); }
.stat .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.prompt {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 12px;
}

.post {
  font-size: 1.2rem;
  line-height: 1.6;
  white-space: pre-wrap;   /* keeps line breaks from the post text */
  min-height: 120px;
  display: flex;
  align-items: center;
}

.guess-row {
  display: flex;
  gap: 14px;
  margin-top: 22px;
}
.guess-row .btn { flex: 1; padding: 18px; font-size: 1.1rem; }

.result {
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  display: none;   /* shown by JS after a guess */
}
.result.correct { background: rgba(23,163,74,0.12); color: var(--good); }
.result.incorrect { background: rgba(220,38,38,0.12); color: var(--bad); }
.reveal {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.98rem;
  text-align: center;
  display: none;
}
#next-btn { display: none; margin: 20px auto 0; }

/* Milestone toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  max-width: 90vw;
  text-align: center;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty-state { text-align: center; display: none; }
.empty-state h2 { margin-top: 0; }

/* ---------- Forms (Submit page) ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
.field input[type=text],
.field input[type=email],
.field textarea,
.field select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
}
.field textarea { min-height: 140px; resize: vertical; }
.radio-row { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-pill {
  flex: 1;
  min-width: 130px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
}
.radio-pill input { margin-right: 8px; }

.notice {
  background: rgba(24,119,242,0.08);
  border: 1px solid rgba(24,119,242,0.3);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.95rem;
  margin-bottom: 22px;
}

/* ---------- About ---------- */
.prose h2 { margin-top: 28px; }
.prose p { margin: 12px 0; }
.stat-brag { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin: 24px 0; }
.stat-brag .b { text-align: center; }
.stat-brag .b .n { font-size: 1.8rem; font-weight: 800; color: var(--li-blue); }
.stat-brag .b .l { font-size: 0.85rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: center;
}
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
