:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #161b22;
  --fg: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --ok: #3fb950;
  --bad: #f85149;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
               "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  flex-direction: column;
}

header {
  padding: 0.75rem 1.25rem;
  background: var(--panel);
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
  gap: 1rem;
}
h1 { font-size: 1.1rem; margin: 0; font-weight: 600; }
.status {
  font-size: 0.85rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #21262d;
  color: var(--muted);
}
.status.connected { color: var(--ok); }
.status.disconnected { color: var(--bad); }

main#log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.entry {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.75rem;
  row-gap: 0.4rem;
  align-items: baseline;
  padding: 0.6rem 0.8rem;
  background: var(--panel);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.entry.empty .text { color: var(--muted); font-style: italic; }
.entry .meta {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.entry .text {
  font-size: 1.15rem;
  line-height: 1.4;
  word-break: break-word;
}
.entry .player {
  grid-column: 1 / -1;
  width: 100%;
  height: 32px;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: var(--panel);
  border-top: 1px solid #222;
  font-size: 0.85rem;
  color: var(--muted);
}
button {
  background: #21262d;
  color: var(--fg);
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}
button:hover { background: #30363d; }
