/* Aufbau der Seite. Farben, Schrift und Rundungen kommen aus dem Theme
   (app/static/themes/<name>.css) — hier steht nur, wo was liegt.
   Ein neues Theme setzt die Variablen neu und muss diese Datei nicht anfassen. */

:root {
  /* Rueckfallwerte: gelten, falls ein Theme eine Variable nicht setzt. */
  --bg: #ffffff;
  --bg-alt: #f4f4f5;
  --card: #ffffff;
  --ink: #1a1d21;
  --muted: #6b7280;
  --line: #e2e5e9;
  --accent: #2a6f5c;
  --accent-ink: #ffffff;
  --accent-soft: #eaf3f0;
  --live: #2f9e44;
  --bar-bg: #1a1d21;
  --bar-ink: #ffffff;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  --radius-pill: 999px;
  --shadow: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap { max-width: 800px; margin: 0 auto; padding: 0 16px; width: 100%; }

/* --- Kopfbalken --- */

.bar { background: var(--bar-bg); color: var(--bar-ink); box-shadow: var(--shadow); }
.bar .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.bar img { height: 40px; width: 40px; border-radius: 50%; object-fit: cover; }
.bar h1 { font-size: 1.1rem; margin: 0; font-weight: 700; letter-spacing: .02em; }
.bar a { color: inherit; text-decoration: none; }
.bar .home { margin-left: auto; font-size: .85rem; opacity: .85; }
.bar .home:hover { opacity: 1; text-decoration: underline; }

/* --- Kanalleiste --- */

.sub { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.sub .wrap { padding-top: 12px; padding-bottom: 12px; }
.tagline { margin: 0 0 10px; color: var(--muted); font-size: .92rem; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--radius-pill); padding: 5px 14px; font: inherit; font-size: .9rem;
  cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; margin-top: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.live { background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 25%, transparent); }

/* --- Nachrichten --- */

main { padding: 22px 0 40px; flex: 1; }
ul.messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
li.msg {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 12px 14px;
}
li.msg.fresh { animation: pop 1s ease; }
@keyframes pop { from { background: var(--accent-soft); } }
.msg-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.sender { color: var(--ink); font-weight: 600; font-size: .95rem; }
.chan { color: var(--accent); font-weight: 600; }
.text { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.meta { margin-top: 6px; font-size: .75rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }

.empty, .more-wrap { text-align: center; color: var(--muted); padding: 26px 0; }
button.more {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 8px 18px; cursor: pointer; font: inherit; font-size: .9rem;
}
button.more:hover { border-color: var(--accent); color: var(--accent); }

footer { background: var(--bg-alt); border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
footer .wrap { padding-top: 16px; padding-bottom: 24px; }
footer a { color: var(--accent); }
