/* The Vault Web companion — same palette as the macOS app and the
 * marketing landing site. */

:root {
  --bg: #0c0a14;
  --bg-deep: #06040a;
  --card: #14111e;
  --card-raised: #1a1626;
  --border: #28233a;
  --border-strong: #3a3450;
  --accent: #ff6b1a;
  --accent-hi: #ffa05c;
  --gold: #d4af37;
  --text: #f4eddc;
  --text-2: #b6abc4;
  --text-3: #6c647a;
  --win: #6dd97c;
  --loss: #ff5f6d;
  --silent: #9b83ff;
  --max-w: 980px;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-hi); text-decoration: none; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

input[type="text"], input[type="email"] {
  font: inherit;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
}
input[type="text"]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.18); }

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px 500px at 18% -10%, rgba(255,107,26,0.15), transparent 60%),
    radial-gradient(700px 500px at 95% 20%, rgba(212,175,55,0.10), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* ─── Top bar ─────────────────────────────────────────────────── */
.topbar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-emblem {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid rgba(212,175,55,0.4);
}
.brand-mark {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(120deg, var(--accent-hi), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}
.link-muted { color: var(--text-2); }
.link-muted:hover { color: var(--text); }
.auth-pill {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  background: rgba(109,217,124,0.14);
  border: 1px solid rgba(109,217,124,0.4);
  color: var(--win);
}

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 28px 64px;
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform 0.06s ease, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  color: white;
  background: linear-gradient(120deg, var(--accent), var(--gold));
  border-color: rgba(212,175,55,0.5);
  box-shadow: 0 6px 20px -6px rgba(255,107,26,0.55);
}
.btn-primary:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(255,107,26,0.7);
}
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-ghost {
  color: var(--text-2);
  background: var(--card);
  border-color: var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  background: var(--card-raised);
  border-color: rgba(212,175,55,0.4);
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 18px 0 26px; }

/* ─── Common bits ─────────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 3px 8px;
  background: rgba(212,175,55,0.10);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 999px;
}
.grad {
  background: linear-gradient(120deg, var(--accent-hi), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted  { color: var(--text-2); }
.small  { font-size: 12px; }
.footnote { margin-top: 14px; }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--win);
  vertical-align: middle;
}
.dot-pulse {
  box-shadow: 0 0 0 0 rgba(109, 217, 124, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(109, 217, 124, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(109, 217, 124, 0); }
  100% { box-shadow: 0 0 0 0 rgba(109, 217, 124, 0); }
}

.trust-line {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ─── Signed-out hero ─────────────────────────────────────────── */
.signed-out h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.08;
  font-weight: 900;
  margin: 12px 0 14px;
  letter-spacing: -0.01em;
}
.signed-out .lede {
  color: var(--text-2);
  font-size: 16px;
  margin: 0 0 8px;
  max-width: 56ch;
}
.signin-explainer {
  margin-top: 32px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 60ch;
}
.signin-explainer h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--gold);
  text-transform: uppercase;
}
.signin-explainer ul { padding: 0 0 0 18px; margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.7; }

/* ─── Signed-in shell ─────────────────────────────────────────── */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3.5vw, 32px);
  line-height: 1.05;
  margin: 8px 0 4px;
  font-weight: 900;
}
.page-head p { margin: 0; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── Your status card ────────────────────────────────────────── */
.me-card {
  background: linear-gradient(180deg, var(--card-raised), var(--card));
  border: 1px solid rgba(212,175,55,0.45);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: 0 12px 36px -22px rgba(255,107,26,0.5);
}
.me-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.me-row .me-id { display: flex; flex-direction: column; }
.me-row .me-id strong { font-weight: 800; font-size: 15px; }
.me-status-spacer { flex: 1; }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-deep);
  object-fit: cover;
}
.avatar.lg { width: 48px; height: 48px; }

.status-pills {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.status-pills label { cursor: pointer; }
.status-pills input { position: absolute; opacity: 0; pointer-events: none; }
.status-pills .pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text-2);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.status-pills label:hover .pill { color: var(--text); }
.status-pills input:checked + .pill.ok    { color: var(--win);    border-color: rgba(109,217,124,0.6); background: rgba(109,217,124,0.12); }
.status-pills input:checked + .pill.gold  { color: var(--gold);   border-color: rgba(212,175,55,0.6); background: rgba(212,175,55,0.10); }
.status-pills input:checked + .pill.ember { color: var(--accent-hi); border-color: rgba(255,107,26,0.6); background: rgba(255,107,26,0.10); }
.status-pills input:checked + .pill.mute  { color: var(--text-2); border-color: var(--border-strong); background: var(--card-raised); }

.me-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) { .me-grid { grid-template-columns: 1fr; } }

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}

/* ─── Feed ─────────────────────────────────────────────────────── */
.feed-heading {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 900;
  margin: 16px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.count-pill {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(255,107,26,0.18);
  border: 1px solid rgba(255,107,26,0.5);
  color: var(--accent-hi);
  padding: 3px 10px;
  border-radius: 999px;
}

.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  color: var(--text-3);
}

.row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.row:hover { border-color: rgba(212,175,55,0.35); }
.row.looking  { border-left: 3px solid var(--win); }
.row.inRun    { border-left: 3px solid var(--gold); }
.row.inCoop   { border-left: 3px solid var(--accent); }
.row.afk      { border-left: 3px solid var(--text-3); }

.row .meta { min-width: 0; }
.row .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}
.row .name { font-weight: 800; font-size: 14px; }
.row .stats {
  font-size: 12px;
  color: var(--text-3);
}
.row .note {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: rgba(0,0,0,0.25);
}
.tag.ok    { color: var(--win); }
.tag.gold  { color: var(--gold); }
.tag.ember { color: var(--accent-hi); }
.tag.mute  { color: var(--text-3); }
.tag.live  { color: var(--win); background: rgba(109,217,124,0.10); }

.row .actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.row .actions a, .row .actions button {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--card-raised);
  color: var(--text-2);
  text-align: center;
  min-width: 88px;
}
.row .actions a:hover, .row .actions button:hover {
  color: var(--text);
  border-color: rgba(212,175,55,0.5);
}
.row .actions a.steam  { color: var(--accent-hi); border-color: rgba(255,107,26,0.4); }
.row .actions button.discord { color: var(--silent); border-color: rgba(155,131,255,0.4); }
.row .actions a.friend { color: var(--gold); border-color: rgba(212,175,55,0.4); }

/* ─── Auth callback page ─────────────────────────────────────── */
.auth-callback {
  max-width: 460px;
  margin: 0 auto;
  padding: 80px 28px;
  text-align: center;
}
.auth-emblem {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 14px;
  border: 1px solid rgba(212,175,55,0.45);
}
.auth-callback h1 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  margin: 0 0 8px;
}
.auth-callback .btn-ghost { margin-top: 22px; }

/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 28px 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner strong { display: block; font-size: 13px; }
.footer-inner p { margin: 2px 0 0; font-size: 11px; color: var(--text-3); }
.footer-links { display: flex; gap: 22px; font-size: 13px; }
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--text); }
