/* Streamer-Bot – dunkles Design, Akzentfarbe je Kunde (--accent und --on-accent setzt die Seite).
   Bewusst ohne externe Schriften (keine Google Fonts: keine Daten der Zuschauer an Dritte). */
:root {
  --accent: #7c5cff; --on-accent: #14121c;
  --accent-2: color-mix(in srgb, var(--accent) 65%, #fff);
  --accent-deep: color-mix(in srgb, var(--accent) 55%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --glow: color-mix(in srgb, var(--accent) 45%, transparent);
  --bg: #0d0d12; --panel: #15151d; --panel-2: #1c1c26; --line: #2a2a38; --text: #ededf4; --muted: #9a9aae;
  --ok: #3ddc84; --warn: #ffb020; --bad: #ff5a5f; --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
body { background: radial-gradient(1100px 600px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
a { color: var(--accent-2); }
[hidden] { display: none !important; }

button { cursor: pointer; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 10px; padding: 8px 14px;
  font-weight: 600; transition: border-color .15s, background .15s, box-shadow .15s; }
button:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
button:disabled { opacity: .45; cursor: default; }
a.btn { display: inline-block; text-decoration: none; color: var(--text); border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px;
  padding: 8px 14px; font-weight: 600; }
a.btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
button.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 800; box-shadow: 0 6px 22px -10px var(--glow); }
button.danger { color: #ff8a8d; background: rgba(255, 90, 95, .07); border-color: rgba(255, 90, 95, .25); }
input[type=text], input[type=password], input[type=search], input[type=number], textarea, select { width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #101017; color: var(--text); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=color] { width: 48px; height: 40px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: #101017; cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); }
code { background: #101017; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; color: var(--accent-2); font-size: 13px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }

header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 14px 20px;
  border-bottom: 1px solid var(--line); background: rgba(21, 21, 29, .75); backdrop-filter: blur(6px); }
header h1 { margin: 0; font-size: 19px; font-weight: 800; }
header h1 span { color: var(--accent-2); }
header nav { display: flex; gap: 6px; flex-wrap: wrap; }
header nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
header nav a:hover, header nav a[aria-current] { color: var(--text); background: var(--panel-2); }
main { max-width: 920px; margin: 0 auto; padding: 18px 16px 60px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card h2 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); font-weight: 700; }
label.field { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.hint { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.login { max-width: 360px; margin: 12vh auto; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px;
  border-radius: 12px; display: none; max-width: 90vw; z-index: 10; box-shadow: 0 10px 30px -10px #000; }
.toast.show { display: block; }
.powered { text-align: center; color: var(--muted); font-size: 12px; margin: 26px 0 0; }
.powered a { color: var(--muted); }

/* ---------------------------------------------------------------- Bestenliste */
.intro { color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { margin-bottom: 6px; }
.stat .value { font-size: 22px; font-weight: 800; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.pill.live .dot { background: #ff4d4d; animation: pulse 1.8s infinite; }
.pill.bad { color: var(--bad); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 77, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); } }
@media (prefers-reduced-motion: reduce) { .pill.live .dot { animation: none; } }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar select { width: auto; min-width: 190px; }
.toolbar input { flex: 1; min-width: 160px; width: auto; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.podium .p { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; background: var(--panel-2); min-width: 0; }
.podium .p.first { border-color: var(--accent); box-shadow: 0 0 24px -10px var(--glow); background: linear-gradient(180deg, var(--accent-soft), var(--panel-2)); }
.podium .medal { font-size: 26px; line-height: 1; }
.podium .who { font-weight: 800; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .t { color: var(--accent-2); font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.rows { display: flex; flex-direction: column; gap: 4px; }
.row-item { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; overflow: hidden; }
.row-item:hover { background: var(--panel-2); }
.row-item .bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent-soft), transparent); border-radius: 10px; pointer-events: none; }
.row-item > :not(.bar) { position: relative; }
.row-item .place { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.row-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .time { font-weight: 700; color: var(--accent-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; }
.more { display: block; margin: 12px auto 0; }
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; } .stats .stat:first-child { grid-column: 1 / -1; }
  .podium { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Steuerseite */
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .status-grid { grid-template-columns: 1fr; } }
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.state .dot { width: 9px; height: 9px; border-radius: 50%; background: #555; }
.state.on .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.state.wait .dot { background: var(--warn); }
.state.bad .dot { background: var(--bad); }
.device { border: 1px dashed var(--accent); border-radius: 12px; padding: 14px; background: var(--accent-soft); }
.device .code { font: 800 26px ui-monospace, Menlo, Consolas, monospace; letter-spacing: 4px; color: var(--accent-2); }
.steps { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.steps li + li { margin-top: 4px; }
.cmd { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
.cmd + .cmd { margin-top: 8px; }
.cmd .title { font-weight: 700; overflow-wrap: anywhere; }
.cmd .resp { grid-column: 1 / -1; font-size: 14px; overflow-wrap: anywhere; }
.cmd .meta { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.cmd.off { opacity: .55; }
.cmd .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cmd .actions button { padding: 4px 10px; font-size: 13px; }
