/* Game-layer components — extends styles.css using the same design tokens. */

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 18px;
}
.topnav .navlinks a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
  margin-left: 18px;
}
.topnav .navlinks a:hover { text-decoration: underline; }

/* --- Login --- */
.login-card {
  max-width: 460px;
  margin: 8vh auto 0;
}
.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.consent-row input[type="checkbox"] {
  accent-color: var(--accent);
  margin-top: 3px;
  width: 18px;
  height: 18px;
}

/* --- Dashboard header stats --- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.stat-tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
}
.stat-tile .value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-dark);
  font-family: "Iowan Old Style", "Palatino", "Book Antiqua", serif;
}
.stat-tile .label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- XP bar --- */
.xp-bar {
  height: 14px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-top: 8px;
}
.xp-bar .fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transition: width 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Journey map --- */
.journey-svg { width: 100%; height: auto; display: block; }
.journey-svg .connector {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
  stroke-linecap: round;
}
.journey-svg .connector-done {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
}
.journey-node circle {
  stroke-width: 4;
  transition: transform 200ms ease;
}
.journey-node text {
  font-family: "Avenir Next", "Avenir", sans-serif;
  font-weight: 700;
  text-anchor: middle;
}
.journey-node .node-label {
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink);
}
.journey-node--completed circle { fill: var(--accent); stroke: var(--accent-dark); }
.journey-node--completed .node-num { fill: #fff9f0; }
.journey-node--available circle,
.journey-node--in_progress circle { fill: var(--panel); stroke: var(--teal); }
.journey-node--available .node-num,
.journey-node--in_progress .node-num { fill: var(--teal); }
.journey-node--locked circle { fill: var(--bg); stroke: var(--border); }
.journey-node--locked .node-num { fill: var(--muted); }
.journey-node--locked { opacity: 0.65; }
a.journey-link { cursor: pointer; }
a.journey-link:hover circle { transform: scale(1.08); transform-origin: center; transform-box: fill-box; }

@keyframes nodePulse {
  0%, 100% { stroke-opacity: 1; r: 26; }
  50% { stroke-opacity: 0.35; r: 31; }
}
.journey-node--available .pulse-ring {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
  animation: nodePulse 2s ease-in-out infinite;
}

/* --- Anytime topics --- */
.anytime-block { margin-top: 18px; }
.anytime-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.anytime-chip {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--panel);
  border: 1.5px dashed var(--teal);
  border-radius: 14px;
  padding: 10px 16px 10px 12px;
  text-decoration: none;
  transition: transform 150ms ease;
}
.anytime-chip:hover { transform: translateY(-2px); }
.anytime-chip .dot { font-size: 1.3rem; }
.anytime-chip .name { font-weight: 700; color: var(--ink); font-size: 0.92rem; }
.anytime-chip .desc { color: var(--muted); font-size: 0.78rem; }
.anytime-chip--completed { border-style: solid; border-color: var(--accent); }
.anytime-chip--completed .dot { color: var(--accent-dark); }
.anytime-chip--in_progress { border-color: var(--accent-dark); }

/* --- Badges --- */
.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.badge-chip {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fff2e2;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px 8px 10px;
}
.badge-chip .icon { font-size: 1.4rem; }
.badge-chip .name { font-weight: 700; color: var(--accent-dark); font-size: 0.9rem; }
.badge-chip .desc { color: var(--muted); font-size: 0.78rem; }
.badge-chip--empty { background: var(--bg); color: var(--muted); font-size: 0.9rem; }

/* --- Completion screen --- */
.reward-hero { text-align: center; padding: 26px 0 8px; }
.reward-hero .big { font-size: 3rem; }
.reward-xp {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-dark);
  font-family: "Iowan Old Style", "Palatino", serif;
}
@keyframes popIn {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}
.pop-in { animation: popIn 600ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.pop-in-late { animation: popIn 600ms cubic-bezier(0.22, 1, 0.36, 1) 400ms both; }

/* --- Interview runner --- */
.progress-pips { display: flex; gap: 8px; margin: 6px 0 14px; }
.progress-pips .pip {
  width: 34px; height: 8px; border-radius: 999px;
  background: var(--border);
}
.progress-pips .pip--done { background: var(--accent); }
.progress-pips .pip--current { background: var(--teal); }

/* --- Admin table --- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.admin-table th { color: var(--muted); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.08em; }
