/* Live Ghost Companion website: the same look as the app's settings window (dark panels, blue accent,
   the LGC badge). Dark only, like the app. */
:root {
  --bg: #0d1117;
  --panel: #161b24;
  --panel-2: #1c2330;
  --line: #2a3242;
  --text: #e6edf6;
  --muted: #9aa7b8;
  --accent: #4d94ff;
  --accent-soft: rgba(77, 148, 255, 0.16);
  --good: #3fcf8e;
  --bad: #ff7a6b;
  --gold: #e8c060;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
img { max-width: 100%; }

/* ---- header ---- */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
  padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.brand img { width: 40px; height: 40px; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.top nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.top nav a:hover, .top nav a.on { color: var(--text); background: var(--accent-soft); }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }

main { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; flex: 1; }
section { padding: 28px 0 8px; }
h1 { font-size: clamp(26px, 5vw, 36px); margin: 0 0 6px; }
h2 { font-size: 14px; margin: 0 0 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.lead { color: var(--muted); margin: 0 0 18px; max-width: 680px; }
.small { font-size: 13px; color: var(--muted); }
.hidden, [hidden] { display: none !important; }

/* ---- buttons and inputs (as in the app) ---- */
.button, button {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; cursor: pointer;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); text-decoration: none;
}
.button:hover, button:hover { border-color: var(--accent); }
.button.primary, button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.button.primary:hover, button.primary:hover { filter: brightness(1.1); }
button:disabled { opacity: 0.5; cursor: default; }
input[type="email"], input[type="text"] {
  font: inherit; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); min-width: 0;
}
input:focus-visible, button:focus-visible, .button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.msg { font-size: 14px; color: var(--muted); }
.msg.good { color: var(--good); }
.msg.bad { color: var(--bad); }

/* ---- hero ---- */
.hero { text-align: center; padding-top: 44px; }
.hero .badge-logo { width: 150px; height: 150px; filter: drop-shadow(0 0 24px rgba(77, 148, 255, 0.35)); }
.hero p.lead { margin: 10px auto 22px; }

/* ---- cards and grids ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.card h3 { margin: 0; font-size: 16px; }
.card p { margin: 0; }
.card .art {
  aspect-ratio: 1; border-radius: 8px; background: radial-gradient(circle at 50% 45%, rgba(77, 148, 255, 0.22), var(--bg) 70%);
  display: grid; place-items: center; overflow: hidden;
}
.card .art img { width: 80%; height: 80%; object-fit: contain; }
.card .art .glyph { font-size: 48px; color: var(--muted); }
.card.owned { border-color: var(--good); }
.card.locked { opacity: 0.55; }
.pill { display: inline-block; font-size: 12px; padding: 1px 9px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.pill.good { color: var(--good); border-color: var(--good); }
.pill.gold { color: var(--gold); border-color: var(--gold); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.timer { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.bar { height: 6px; border-radius: 3px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.empty {
  border: 1px dashed var(--line); border-radius: 10px; padding: 26px; text-align: center; color: var(--muted); background: rgba(22, 27, 36, 0.5);
}

/* ---- code reveal after claiming ---- */
.code {
  font: 600 clamp(15px, 3.6vw, 20px)/1.4 Consolas, "Cascadia Mono", monospace; letter-spacing: 1px;
  background: var(--bg); border: 1px solid var(--accent); border-radius: 8px; padding: 10px; text-align: center; word-break: break-all;
}

/* ---- triumphs ---- */
.triumph { display: flex; gap: 12px; align-items: flex-start; }
.triumph .star { font-size: 26px; line-height: 1; color: var(--line); }
.triumph.earned .star { color: var(--gold); }
.triumph h3 { font-size: 15px; }

/* ---- leaderboard ---- */
table.board { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.board th, .board td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.board th { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.board td.num, .board th.num { text-align: right; font-variant-numeric: tabular-nums; }
.board tr:last-child td { border-bottom: 0; }
.board .rank { color: var(--gold); font-weight: 700; }

/* ---- ad and affiliate spaces: invisible until something is put in them ---- */
.ad-slot { margin: 18px 0; display: flex; justify-content: center; }
.ad-slot:empty { display: none; }
.affiliates:empty { display: none; }

details { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 8px 0; }
summary { cursor: pointer; font-weight: 600; }
.draft { border: 2px dashed #e0a040; padding: 12px; border-radius: 8px; color: #f0c070; }

footer { border-top: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; }
footer .inner { max-width: 1040px; margin: 0 auto; padding: 18px 16px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

@media (max-width: 560px) {
  .top nav { order: 3; width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .board th:nth-child(4), .board td:nth-child(4) { display: none; }
}
