/* Phase-1 placeholder theme. Designed properly later. */
:root {
  --bg: #14161a;
  --bg-card: #1c1f26;
  --bg-elev: #252a33;
  --fg: #e4e6eb;
  --fg-dim: #9aa0aa;
  --accent: #ff8a3d;       /* ember orange */
  --hp: #d44a4a;
  --stam: #4ad466;
  --mana: #4a8cd4;
  --good: #4ad466;
  --warn: #e0c14a;
  --bad: #d44a4a;
  --border: #2e3340;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif;
}

header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 24px;
}
header h1 { margin: 0; font-size: 1.3rem; color: var(--accent); }
header .meta { display: flex; gap: 16px; color: var(--fg-dim); font-size: 0.85rem; margin-left: auto; }

main {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 24px;
}

.placeholder {
  color: var(--fg-dim);
  text-align: center;
  padding: 48px;
  grid-column: 1 / -1;
}

.player-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: opacity 0.2s;
}
.player-card.offline { opacity: 0.55; }

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.player-name { font-weight: 600; font-size: 1.05rem; }
.status-pill {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-elev);
}
.status-pill.on { background: var(--good); color: #000; }
.status-pill.off { color: var(--fg-dim); }

.active-character .char-name {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 1rem;
}
.muted { color: var(--fg-dim); font-weight: 400; }

.fields { display: flex; flex-direction: column; gap: 6px; }
.field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.field-label {
  flex: 0 0 110px;
  color: var(--fg-dim);
  font-size: 0.85rem;
}
.field-value { font-weight: 500; }
.field-value.stale, .field-value.unavailable { color: var(--bad); }
.field-value.unavailable { color: var(--fg-dim); }

.bar {
  flex: 1;
  position: relative;
  height: 14px;
  background: var(--bg-elev);
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill { height: 100%; transition: width 0.3s ease; }
.bar-hp .bar-fill   { background: var(--hp); }
.bar-stam .bar-fill { background: var(--stam); }
.bar-mana .bar-fill { background: var(--mana); }
.bar-text {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: #fff;
  text-shadow: 0 0 2px rgba(0,0,0,0.6);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent);
  color: #000;
  border-radius: 3px;
  font-weight: 600;
}

.confidence-badge {
  display: inline-block;
  width: 14px; height: 14px; line-height: 14px; text-align: center;
  font-size: 0.7rem;
  background: var(--warn);
  color: #000;
  border-radius: 50%;
  cursor: help;
}
.warn-badge { color: var(--warn); cursor: help; }

.other-chars {
  margin-top: 12px;
  font-size: 0.85rem;
}
.other-chars summary {
  color: var(--fg-dim);
  cursor: pointer;
  user-select: none;
}
.other-list {
  margin-top: 6px;
  padding-left: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.other-char {
  display: flex; align-items: center; gap: 8px;
}

footer {
  padding: 16px 24px;
  text-align: center;
  color: var(--fg-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}
