:root {
  --bg: #08080a; --panel: #151316; --panel2: #1d191c; --field: #0c0a0c; --line: #2c2226; --line2: #422c32;
  --text: #f5f0f7; --muted: #b9abb0; --accent: #b51634; --accent-hi: #d42a4a; --ok: #35d47a; --err: #ff5a6e;
  --twitch: #9146ff;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(1200px 600px at 10% -10%, #2a0a12 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text); font: 15px/1.5 "Segoe UI", system-ui, sans-serif; min-height: 100vh;
  display: flex; flex-direction: column; }
main { flex: 1 0 auto; width: 100%; align-content: start; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand b { display: block; font-size: 1.25em; letter-spacing: .02em; }
.brand span { display: block; color: var(--accent-hi); font-size: .8em; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.logo { width: 42px; height: 42px; border-radius: 10px; }
.top-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.top .guild-select { width: 330px; max-width: 100%; padding: 9px 12px; }
.top-label { margin: 0 0 0 6px; font-size: .82em; font-weight: 700; }
.who { color: var(--muted); font-size: .9em; margin-left: 6px; }
.btn.small { padding: 7px 12px; font-size: .88em; }
@media (max-width: 760px) { .top-right { width: 100%; justify-content: flex-start; } .top .guild-select { width: 100%; } }
main { max-width: 760px; margin: 28px auto; padding: 0 16px; display: grid; gap: 18px; }
.card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line2); border-radius: 14px;
  padding: 22px; position: relative; }
.card::before { content: ""; position: absolute; left: 18px; top: -1px; width: 56px; height: 2px; background: var(--accent); }
h1 { margin: 0 0 8px; font-size: 1.6em; } h2 { margin: 0 0 10px; font-size: 1.2em; } h3 { margin: 0 0 6px; font-size: 1.05em; }
.hint { color: var(--muted); font-size: .88em; margin: 4px 0 12px; }
.features { color: var(--muted); padding-left: 20px; margin: 10px 0 18px; } .features li { margin: 4px 0; }
label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: .92em; }
input, select { width: 100%; padding: 10px 12px; background: var(--field); color: var(--text); border: 1px solid var(--line2);
  border-radius: 8px; font: inherit; }
input:focus, select:focus { outline: none; border-color: var(--accent); }
.top select { width: auto; padding: 6px 10px; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 8px;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font: inherit; font-weight: 700;
  cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hi); }
.btn.twitch { background: var(--twitch); border-color: var(--twitch); color: #fff; }
.btn.ghost { background: transparent; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.msg { font-size: .9em; } .msg.ok { color: var(--ok); } .msg.err { color: var(--err); }
.server-list { display: grid; gap: 8px; }
.server { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--field); }
.server img, .server .ph { width: 36px; height: 36px; border-radius: 50%; background: var(--line2); flex: none;
  display: grid; place-items: center; font-weight: 700; }
.server .name { flex: 1; font-weight: 600; }
.server .btn { padding: 6px 12px; font-size: .9em; }
.row-head { display: flex; align-items: center; gap: 10px; }
.badge.live { background: #e91916; color: #fff; font-weight: 800; font-size: .75em; padding: 2px 8px; border-radius: 5px; }
.sub { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding: 18px max(24px, calc((100% - 1100px) / 2)); border-top: 1px solid var(--line); background: #0a090bcc; font-size: .9em; }
.credit { display: flex; align-items: center; gap: 10px; }
.credit small { display: block; color: var(--accent-hi); font-size: .78em; font-weight: 600; letter-spacing: .04em; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot nav a, .legal a { color: var(--muted); text-decoration: none; }
.foot nav a:hover, .legal a:hover { color: var(--text); }
.legal { max-width: 860px; margin: 28px auto 60px; padding: 0 20px; display: block; }
.legal h1 { font-size: 1.8em; margin: 18px 0 4px; }
.legal h2 { margin-top: 28px; font-size: 1.12em; }
.legal table { border-collapse: collapse; width: 100%; font-size: .92em; }
.legal td, .legal th { border: 1px solid var(--line2); padding: 9px 10px; text-align: left; vertical-align: top; }
.legal th { background: var(--panel2); }
.legal code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; }
.legal .back { color: var(--accent-hi); font-weight: 600; }
.legal-links { margin-top: 36px; color: var(--muted); }
[hidden] { display: none !important; }
@media (max-width: 560px) { .top { padding: 12px 16px; } .card { padding: 16px; } }

.extras { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); }
.extras h3 { margin: 0 0 2px; }
.extras .hint { margin: 0 0 6px; }
.extras label.check { margin: 8px 0 0; }
label.check input:disabled + span { opacity: .45; }
.rl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.extras label.check.rl-sub { margin-left: 28px; }
@media (max-width: 560px) { .rl-grid { grid-template-columns: 1fr; } }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row3 { display: grid; grid-template-columns: 1.2fr .7fr 1.5fr; gap: 8px; }
.grid2 > .wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid2, .row3 { grid-template-columns: 1fr; } }

.levels { display: grid; gap: 8px; }
.level { display: grid; grid-template-columns: 110px auto 1fr; gap: 10px; align-items: center; }
.level span { color: var(--muted); font-size: .9em; }
.hint.warn { color: #f5c542; }
code { background: var(--panel2); padding: 1px 6px; border-radius: 4px; }

.keybox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.keybox code { padding: 8px 10px; font-size: .95em; word-break: break-all; flex: 1; }

#clipBox select#clipsMode { margin-bottom: 4px; }

.alert-list { display: grid; gap: 8px; margin: 6px 0 10px; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; }
.alert-row img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.alert-row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.alert-row .info span { color: var(--muted); font-size: .88em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-add { border: 1px dashed var(--line2); border-radius: 10px; padding: 10px 14px; }
.alert-add summary { cursor: pointer; font-weight: 700; color: var(--accent-hi); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 150px; overflow: auto; padding: 6px; background: var(--field);
  border: 1px solid var(--line2); border-radius: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 3px 8px; border: 1px solid var(--line2);
  border-radius: 999px; font-size: .85em; font-weight: 500; cursor: pointer; }
.chip input { width: 14px; height: 14px; accent-color: var(--accent); }

/* Reiter */
.tabs { position: sticky; top: 0; z-index: 5; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line2);
  border-radius: 14px; padding: 12px 14px 0; }
.tabs-head { display: flex; align-items: center; gap: 10px; margin: 0 4px 10px; font-size: 1.12em; flex-wrap: wrap; }
/* Verbindungen (wie in Streamer.bot): Zähler + Punkt, aufklappbare Liste */
.conn { position: relative; margin-left: auto; font-size: .82rem; }
.conn-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line2); border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.conn-pill:hover { border-color: var(--accent); }
.conn .chev { color: var(--muted); font-size: .9em; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: #6b6168; }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px rgba(53, 212, 122, .6); }
.dot.warn { background: #f5c542; box-shadow: 0 0 8px rgba(245, 197, 66, .5); }
.dot.bad { background: var(--err); box-shadow: 0 0 8px rgba(255, 90, 110, .6); }
.conn-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 330px; max-width: calc(100vw - 32px);
  background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; padding: 6px; box-shadow: 0 14px 40px rgba(0, 0, 0, .6); }
.conn-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px;
  border-radius: 8px; color: var(--text); text-decoration: none; cursor: pointer; }
.conn-row:hover { background: rgba(181, 22, 52, .14); }
.conn-row b { display: block; font-size: .95em; }
.conn-row small { display: block; color: var(--muted); font-size: .85em; line-height: 1.3; }
.conn-row .go { color: var(--muted); }
@media (max-width: 560px) { .conn { margin-left: 0; } .conn-menu { left: 0; right: auto; } }
.tabs-row { display: flex; flex-wrap: wrap; gap: 0 4px; }
.tabs-row::-webkit-scrollbar { display: none; }
.tabs-row button { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font: inherit;
  font-weight: 700; padding: 9px 14px 11px; cursor: pointer; white-space: nowrap; }
.tabs-row button:hover { color: var(--text); }
.tabs-row button.active { color: var(--text); border-bottom-color: var(--accent); }
.sub.first { border-top: 0; margin-top: 0; padding-top: 0; }
.pane > h2:first-child, .pane > .sub.first > h3:first-child { margin-top: 0; }
@media (max-width: 560px) { .tabs-row button { padding: 8px 10px 10px; } .tabs-row button span:last-child { font-size: .92em; } }

/* Herzschlag in der Kopfzeile (wie der Stream Guard) – schneller und rot, wenn der Kanal live ist */
.brand-link { color: inherit; text-decoration: none; }
.pulse { flex: 1; min-width: 120px; max-width: 360px; height: 46px; position: relative; overflow: hidden; margin: 0 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 25%, #000 92%, transparent); }
.pulse-svg { position: absolute; left: 0; top: 0; width: 400%; height: 100%; animation: pulse-run 6s linear infinite; }
.pulse-line, .pulse-glow { fill: none; stroke: var(--accent-hi); stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pulse-glow { stroke-width: 7; opacity: .22; }
.pulse-dot { position: absolute; right: 9%; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--accent-hi); box-shadow: 0 0 10px var(--accent-hi); animation: pulse-blink 1.5s ease-in-out infinite; }
@keyframes pulse-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse-blink { 0%, 100% { opacity: .45; } 40% { opacity: 1; } }
body.is-live .pulse-svg { animation-duration: 2.6s; }
body.is-live .pulse-line, body.is-live .pulse-glow { stroke: #ff3b30; }
body.is-live .pulse-dot { background: #ff3b30; box-shadow: 0 0 12px #ff3b30; animation-duration: .65s; }
@media (prefers-reduced-motion: reduce) { .pulse-svg, .pulse-dot { animation: none; } }
@media (max-width: 760px) { .pulse { display: none; } }

/* Infoseite /about */
.about { max-width: 1040px; }
.about-hero { text-align: center; padding: 26px 10px 10px; }
.about-logo { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 0 40px #b5163455; }
.about-hero h1 { font-size: 2.3em; margin: 14px 0 10px; }
.about-hero .lead { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: 1.08em; }
.actions.center { justify-content: center; }
.feats { display: grid; gap: 34px; margin: 40px 0; }
.feat { display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; align-items: center; }
.feat.rev .feat-text { order: 2; }
.feat.feat-solo { grid-template-columns: 1fr; max-width: 720px; }
.feat-icon { font-size: 2em; }
.feat h2 { margin: 6px 0 8px; font-size: 1.35em; }
.feat p { color: var(--muted); margin: 0; }
.feat-shot img { width: 100%; max-height: 420px; object-fit: cover; object-position: top; border-radius: 12px; border: 1px solid var(--line2);
  box-shadow: 0 18px 50px #0009, 0 0 40px #b5163422; display: block; }
.about-privacy { margin-bottom: 20px; }
.lang-links a { color: var(--muted); text-decoration: none; font-weight: 700; padding: 4px 8px; border-radius: 6px; }
.lang-links a:hover { color: var(--text); background: var(--panel2); }
@media (max-width: 760px) { .feat { grid-template-columns: 1fr; } .feat.rev .feat-text { order: 0; } .about-hero h1 { font-size: 1.7em; } }
.about .legal-links { text-align: center; }
.about .legal-links a { color: var(--muted); text-decoration: none; }
.about .legal-links a:hover { color: var(--text); }

/* Sprung aus der Verbindungsliste: Ziel kurz aufleuchten lassen */
.flash { animation: sp-flash 1.8s ease; }
@keyframes sp-flash { 0%, 60% { box-shadow: 0 0 0 2px var(--accent-hi), 0 0 24px rgba(212, 42, 74, .55); } 100% { box-shadow: none; } }

/* Vorschau des Discord-Posts */
.pv { margin: 22px 0 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pv-head h3 { margin: 0; }
.pv-switch { display: inline-flex; background: var(--field); border: 1px solid var(--line2); border-radius: 999px; padding: 3px; }
.pv-switch button { background: none; border: 0; color: var(--muted); font: inherit; font-size: .88em; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.pv-switch button.active { background: var(--accent); color: #fff; }
.dc { background: #313338; border-radius: 10px; padding: 16px 14px 14px; color: #dbdee1; font-family: "gg sans", "Noto Sans", "Segoe UI", system-ui, sans-serif;
      font-size: 15px; line-height: 1.375; overflow: hidden; }
.dc .hint { margin: 0; color: #949ba4; }
.dc-msg { display: flex; gap: 14px; }
.dc-av { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.dc-body { min-width: 0; flex: 1; }
.dc-name { color: #f2f3f5; font-weight: 600; }
.dc-app { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 4px; border-radius: 3px; vertical-align: 2px; margin-left: 2px; }
.dc-time { color: #949ba4; font-size: 12px; font-weight: 400; margin-left: 4px; }
.dc-content { margin-top: 2px; word-wrap: break-word; }
.dc-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc a { color: #00a8fc; text-decoration: none; }
.dc a:hover { text-decoration: underline; }
.dc-embed { margin-top: 6px; max-width: 520px; background: #2b2d31; border-left: 4px solid #9146ff; border-radius: 4px; }
.dc-e { padding: 10px 16px 14px 12px; display: grid; gap: 6px; }
.dc-author { display: flex; align-items: center; gap: 8px; color: #f2f3f5; font-size: 14px; font-weight: 600; }
.dc-author img { width: 24px; height: 24px; border-radius: 50%; }
.dc-title { color: #00a8fc !important; font-weight: 700; font-size: 16px; }
.dc-desc { font-size: 14px; }
.dc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; font-size: 14px; }
.dc-field b { display: block; color: #f2f3f5; font-weight: 600; margin-bottom: 2px; }
.dc-field.wide { grid-column: 1 / -1; }
.dc-img { width: 100%; border-radius: 4px; margin-top: 6px; }
.dc-foot { display: flex; align-items: center; gap: 8px; color: #b5bac1; font-size: 12px; margin-top: 2px; }
.dc-foot img { width: 20px; height: 20px; border-radius: 50%; }
.dc-btn { display: inline-block; margin-top: 8px; background: #4e5058; color: #fff !important; font-size: 14px; font-weight: 500;
          padding: 6px 14px; border-radius: 4px; }
.dc-btn:hover { background: #6d6f78; text-decoration: none !important; }
@media (max-width: 560px) { .dc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dc-av { width: 32px; height: 32px; } }

/* Auto-Löschen */
.row2 { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; }
.cl-icon { font-size: 1.4em; width: 32px; text-align: center; flex: none; }
.cl-row .info .cl-state { color: var(--ok); }
.cl-row .info .cl-state.bad { color: #f5c542; }
main > * { min-width: 0; }
