/* =============================================================
   SITE.CSS: the styles BOTH pages share
   =============================================================
   Used by: index.html (the Quest Map) and quest.html (a quest guide).
   Goes with: css/map.css (only the map) and css/quest.css (only
   the quest page). Each page links THIS file first, then its own.

   Why first? When two rules style the same thing, the one that
   comes LATER wins. So the page's own file can change anything
   from here, e.g. how much space there is around the page.

   Sections:
     1. Colors
     2. The basics (body, hidden things)
     3. Buttons
     4. Pop-ups (dialog)
     5. The Coding Train video link
   ============================================================= */


/* ---------- 1. COLORS: change these to re-theme the whole site ---------- */
:root {
  --bg: #0b0d17;
  --panel: #151a2e;
  --border: #252c4d;
  --text: #e8ecff;
  --muted: #8b93b8;
  --pink: #ff3df0;
  --cyan: #3dfcff;
  --gold: #ffd23d;
}


/* ---------- 2. THE BASICS ---------- */
* { box-sizing: border-box; }

/* Anything with the "hidden" attribute is gone, even if another rule
   gives it a display (like display: flex). */
[hidden] { display: none !important; }

/* The dark background and the text font.
   Each page adds its own padding and its own glow on top
   (background-image in map.css and quest.css). */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  background-attachment: fixed;
}


/* ---------- 3. BUTTONS ---------- */
/* <button class="btn primary"> or <a class="btn gold"> */
.btn {
  font: 600 15px Inter, sans-serif;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn.primary { background: linear-gradient(90deg, var(--pink), #b04dff); color: #fff; }
.btn.secondary { background: #252c4d; color: var(--text); }
.btn.gold { background: var(--gold); color: #000; }


/* ---------- 4. POP-UPS (dialog) ---------- */
/* The look every pop-up shares. Its border, padding and width
   are set by each page. */
dialog {
  background: var(--panel);
  color: var(--text);
  border-radius: 16px;
  width: calc(100% - 32px);
}
/* ::backdrop = the dark layer behind an open pop-up */
dialog::backdrop { background: rgba(0, 0, 0, 0.75); }


/* ---------- 5. THE CODING TRAIN VIDEO LINK ---------- */
/* "📺 Watch the Coding Train challenge": in the map's project pop-up
   and at the top of a quest. Same pink as the "📺 Coding Train" tag. */
.video-link {
  display: inline-block;
  margin: 6px 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #3a1430;
  color: #ff9be8;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.video-link:hover { text-decoration: underline; }
