/* ============================================================
   nytic.ch – Teamspeak 3 mit Live-Viewer
   ============================================================ */
.ts-body {
  --c: #c79bff;
  --c2: #5aa9ff;
  --g: #90BE20;
  --muted: rgba(255, 255, 255, .62);
  --line: rgba(255, 255, 255, .09);
  --ease: cubic-bezier(.2, .75, .2, 1);
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  background: #0b0c0a;
  margin-bottom: 0;
}
@supports (overflow: clip) { html.ts-js, html.ts-js .ts-body { overflow-x: clip; overflow-y: visible; } }
.ts-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); position: relative; z-index: 1; }
.ts-eyebrow { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--c); margin: 0 0 .8rem; }
.ts-h2 { font-family: 'Thasadith', sans-serif; font-weight: 700; color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.1; margin: 0; overflow-wrap: anywhere; }
code { font-family: var(--mono); font-size: .9em; color: #fff; }

/* ---------- Buttons ---------- */
.ts-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.25rem; border-radius: 999px; font-weight: 700; font-size: .95rem; font-family: inherit; cursor: pointer;
  color: #fff !important; text-decoration: none !important; background: transparent; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); transition: transform .2s, background .25s, box-shadow .25s; }
.ts-btn:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--c) 14%, transparent); }
.ts-btn--primary { background: linear-gradient(120deg, var(--c), var(--c2)); border-color: transparent; color: #0b0c14 !important; box-shadow: 0 12px 34px -12px var(--c); }
.ts-btn--primary:hover { background: linear-gradient(120deg, var(--c), var(--c2)); box-shadow: 0 16px 40px -12px var(--c); }
.ts-icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: #fff; cursor: pointer; transition: background .2s, transform .4s var(--ease); }
.ts-icon-btn:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.ts-icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ts-icon-btn.is-spin { transform: rotate(360deg); }

/* ---------- Hero ---------- */
.ts-hero { position: relative; overflow: hidden; padding: 110px 0 clamp(3rem, 6vw, 5rem);
  background: radial-gradient(55% 60% at 75% 50%, rgba(199, 155, 255, .13), transparent 70%), radial-gradient(40% 45% at 15% 20%, rgba(90, 169, 255, .08), transparent 70%), #0b0c0a; }
.ts-grid-bg { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(199, 155, 255, .22) 1px, transparent 1.5px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(70% 70% at 60% 50%, #000 30%, transparent 80%); mask-image: radial-gradient(70% 70% at 60% 50%, #000 30%, transparent 80%); }
.ts-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.ts-back { display: inline-flex; gap: .35rem; margin-bottom: 1.4rem; font-size: .85rem; font-weight: 700; color: var(--muted) !important; text-decoration: none !important; transition: color .2s; }
.ts-back:hover { color: var(--c) !important; }
.ts-head .ts-eyebrow { display: block; }
.ts-title { font-family: 'Thasadith', sans-serif; font-weight: 700; color: #fff; font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: 1; letter-spacing: -.02em; margin: 0 0 1.1rem; }
.ts-title span { background: linear-gradient(100deg, var(--c), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ts-lead { color: var(--muted); font-size: clamp(1rem, 1.25vw, 1.1rem); line-height: 1.75; max-width: 36rem; margin: 0 0 1.5rem; }
.ts-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.3rem; }
.ts-pill { display: inline-flex; align-items: center; gap: .55rem; margin: 0; padding: .4rem .9rem; border-radius: 999px; font-size: .85rem; color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.ts-pill i { width: 9px; height: 9px; border-radius: 50%; background: #9aa0a6; }
.ts-pill.is-ok i { background: #4ade80; animation: tsPing 2s infinite; }
.ts-pill.is-err i { background: #ff5a4a; }
@keyframes tsPing { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); } 70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

/* Online-Anzeige mit kreisenden Avataren */
.ts-orbit { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin: 0 auto; }
.ts-gauge { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ts-gauge-track { fill: none; stroke: rgba(255, 255, 255, .06); stroke-width: 14; }
.ts-gauge-fill { fill: none; stroke: url(#tsGauge); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray 1.2s var(--ease); filter: drop-shadow(0 0 10px rgba(199, 155, 255, .55)); }
.ts-gauge-dots { fill: none; stroke: rgba(199, 155, 255, .25); stroke-width: 1.2; stroke-dasharray: 1 9; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: tsSpin 60s linear infinite; }
@keyframes tsSpin { to { transform: rotate(360deg); } }
.ts-orbit-core { position: absolute; inset: 30%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(circle at 35% 30%, #232a1d, #0e100c 70%); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), inset 0 0 40px rgba(199, 155, 255, .08); }
.ts-orbit-core b { font-family: 'Thasadith', sans-serif; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.ts-orbit-core span { font-size: .78rem; color: var(--muted); }
.ts-orbit-core em { font-style: normal; color: #fff; }
.ts-orbit-ring { position: absolute; inset: 0; animation: tsSpin 80s linear infinite; }
.ts-ava { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; transition: transform 1s var(--ease), opacity .6s; }
.ts-ava > span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; font: 700 .85rem 'Thasadith', sans-serif; color: #fff; background: var(--a);
  border: 2px solid rgba(11, 12, 10, .9); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .8); animation: tsSpin 80s linear infinite reverse; }
.ts-ava.is-talking > span { box-shadow: 0 0 0 3px #4ade80, 0 0 20px 2px rgba(74, 222, 128, .6); }
.ts-ava.is-away > span { filter: grayscale(.8) brightness(.7); }
.ts-ava.is-new { opacity: 0; }
.ts-ava.is-gone { opacity: 0; }
.ts-ava--more > span { background: rgba(255, 255, 255, .1); font-size: .75rem; }

/* ---------- Viewer ---------- */
.ts-main { background: #10120e; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.ts-main-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr); gap: clamp(1rem, 2.5vw, 1.8rem); align-items: start; }
.ts-viewer, .ts-card { border-radius: 22px; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)); border: 1px solid var(--line); }
.ts-viewer { padding: clamp(1.2rem, 2.5vw, 1.8rem); position: relative; overflow: hidden; }
.ts-viewer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--c), var(--c2)); opacity: .8; }
.ts-viewer-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ts-refresh { display: flex; align-items: center; gap: .6rem; font: .78rem var(--mono); color: var(--muted); }
.ts-count { width: 22px; height: 22px; transform: rotate(-90deg); }
.ts-count circle { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 2.5; }
.ts-count .ts-count-run { stroke: var(--c); stroke-linecap: round; stroke-dasharray: 56.55; stroke-dashoffset: 0; }
.ts-count .ts-count-run.is-run { animation: tsCount var(--t, 15s) linear forwards; }
@keyframes tsCount { to { stroke-dashoffset: 56.55; } }
.ts-meta { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.ts-meta li { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; font: 700 .7rem var(--mono); color: rgba(255, 255, 255, .78); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.ts-meta li b { color: #fff; }
.ts-meta li i { width: 6px; height: 6px; border-radius: 50%; background: var(--k, var(--c)); }
.ts-toggle { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1rem; font-size: .82rem; color: var(--muted); cursor: pointer; user-select: none; }
.ts-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.ts-toggle span { position: relative; width: 34px; height: 20px; border-radius: 999px; background: rgba(255, 255, 255, .12); transition: background .25s; }
.ts-toggle span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.ts-toggle input:checked + span { background: var(--c); }
.ts-toggle input:checked + span::after { transform: translateX(14px); }
.ts-toggle input:focus-visible + span { outline: 2px solid var(--c); outline-offset: 2px; }

/* Channel-Baum */
.ts-tree { position: relative; display: flex; flex-direction: column; gap: 2px; }
.ts-ch { --depth: 0; position: relative; display: flex; align-items: center; gap: .6rem; min-height: 38px; padding: .4rem .7rem .4rem calc(.7rem + var(--depth) * 1.5rem); border-radius: 10px; color: rgba(255, 255, 255, .5); transition: background .3s, color .3s; }
.ts-ch::before { content: ''; position: absolute; left: calc(var(--depth) * 1.5rem - .55rem); top: 0; bottom: 50%; width: .7rem; border-left: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); border-bottom-left-radius: 6px; display: none; }
.ts-ch[style*="--depth:1"]::before, .ts-ch[style*="--depth:2"]::before, .ts-ch[style*="--depth:3"]::before { display: block; }
.ts-ch-ico { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.ts-ch-name { flex: 1; min-width: 0; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-ch-count { flex: none; min-width: 24px; padding: .1rem .45rem; border-radius: 999px; text-align: center; font: 700 .7rem var(--mono); color: #0b0c14; background: linear-gradient(120deg, var(--c), var(--c2)); transform: scale(0); transition: transform .4s var(--ease); }
.ts-ch.has-users { color: #fff; background: rgba(199, 155, 255, .07); }
.ts-ch.has-users .ts-ch-ico { opacity: 1; color: var(--c); }
.ts-ch.has-users .ts-ch-count { transform: none; }
.ts-ch.is-hidden { display: none; }
.ts-ch--spacer { min-height: 26px; justify-content: center; font: 700 .66rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .35); }
.ts-ch--spacer.is-line::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .15), transparent); }
.ts-ch--spacer[data-align="l"] { justify-content: flex-start; }
.ts-ch--spacer[data-align="r"] { justify-content: flex-end; }

/* Benutzer */
.ts-users { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ts-users.is-hidden { display: none; }
.ts-user { --depth: 0; display: flex; align-items: center; gap: .65rem; padding: .35rem .7rem .35rem calc(2rem + var(--depth) * 1.5rem); border-radius: 10px; transition: background .3s, opacity .5s, transform .5s var(--ease); }
.ts-user:hover { background: rgba(255, 255, 255, .04); }
.ts-user.is-new { animation: tsIn .7s var(--ease); }
.ts-user.is-gone { opacity: 0; transform: translateX(14px); }
.ts-user.is-moved { animation: tsMoved 1.2s ease; }
@keyframes tsIn { from { opacity: 0; transform: translateX(-14px); background: rgba(74, 222, 128, .18); } }
@keyframes tsMoved { 0% { background: rgba(199, 155, 255, .22); } }
.ts-user-ava { position: relative; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 700 .72rem 'Thasadith', sans-serif; color: #fff; background: var(--a); }
.ts-user.is-talking .ts-user-ava { box-shadow: 0 0 0 2px #4ade80, 0 0 14px rgba(74, 222, 128, .6); animation: tsTalk 1s ease-in-out infinite; }
@keyframes tsTalk { 50% { box-shadow: 0 0 0 4px rgba(74, 222, 128, .5), 0 0 22px rgba(74, 222, 128, .7); } }
.ts-user.is-away .ts-user-ava { filter: grayscale(.8) brightness(.7); }
.ts-user-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ts-user-name { color: #fff; font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-user-sub { color: rgba(255, 255, 255, .42); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-user.is-talking .ts-user-sub { color: #4ade80; }
.ts-user.is-away .ts-user-name { color: rgba(255, 255, 255, .55); }
.ts-flags { flex: none; display: flex; gap: .25rem; }
.ts-flag { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .7); }
.ts-flag svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ts-flag--off { color: #ff8a7a; background: rgba(255, 90, 74, .12); }
.ts-flag--away { color: #ffd166; background: rgba(255, 209, 102, .12); }
.ts-flag--rec { color: #ff5a4a; background: rgba(255, 90, 74, .14); animation: tsRec 1.4s ease-in-out infinite; }
@keyframes tsRec { 50% { opacity: .45; } }

.ts-empty { margin: .4rem 0 0; padding: 1rem; border-radius: 14px; text-align: center; color: var(--muted); font-size: .9rem; border: 1px dashed var(--line); }
.ts-error { margin: 1rem 0 0; padding: .8rem 1rem; border-radius: 12px; font-size: .88rem; color: #ffd0c9; background: rgba(255, 90, 74, .1); border: 1px solid rgba(255, 90, 74, .3); }
.ts-skeleton { display: flex; flex-direction: column; gap: 8px; }
.ts-skeleton i { height: 34px; border-radius: 10px; background: linear-gradient(90deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); background-size: 200% 100%; animation: tsShimmer 1.4s linear infinite; }
.ts-skeleton i:nth-child(2n) { margin-left: 1.5rem; }
@keyframes tsShimmer { to { background-position: -200% 0; } }

/* ---------- Seitenleiste ---------- */
.ts-side { display: flex; flex-direction: column; gap: 1rem; }
.ts-card { padding: 1.3rem 1.35rem; color: var(--muted); }
.ts-card p:last-child { margin-bottom: 0; }
.ts-data { margin: 0; display: flex; flex-direction: column; }
.ts-data div { display: grid; grid-template-columns: 5.5rem 1fr; gap: .6rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line); }
.ts-data div:first-child { border-top: 0; padding-top: 0; }
.ts-data dt { font: 700 .66rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--c); }
.ts-data dd { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: #fff; min-width: 0; }
.ts-data code { overflow-wrap: anywhere; }
.ts-copy { flex: none; padding: .2rem .55rem; border-radius: 999px; font: 700 .66rem var(--mono); color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); cursor: pointer; transition: background .2s, color .2s; }
.ts-copy:hover { color: #0b0c14; background: var(--c); }
.ts-howto { list-style: none; margin: 0; padding: 0; counter-reset: ts; display: flex; flex-direction: column; gap: .8rem; }
.ts-howto li { counter-increment: ts; position: relative; padding-left: 2.3rem; display: flex; flex-direction: column; gap: .15rem; font-size: .88rem; line-height: 1.55; }
.ts-howto li::before { content: counter(ts); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font: 700 .75rem var(--mono); color: #0b0c14; background: linear-gradient(120deg, var(--c), var(--c2)); }
.ts-howto b { color: #fff; }
.ts-howto a { color: var(--c); }
.ts-card--rules p { font-size: .88rem; line-height: 1.65; margin: 0; }

.ts-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1060; transform: translate(-50%, 20px); padding: .6rem 1rem; border-radius: 12px; background: #fff; color: #0b0c0a; font-weight: 700; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.ts-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsiv ---------- */
@media (max-width: 991.98px) {
  .ts-hero-grid, .ts-main-grid { grid-template-columns: 1fr; }
  .ts-orbit { width: min(100%, 360px); }
}
@media (max-width: 560px) {
  .ts-ava { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .ts-ava > span { font-size: .72rem; }
  .ts-user { padding-left: calc(1.4rem + var(--depth) * 1rem); }
  .ts-ch { padding-left: calc(.6rem + var(--depth) * 1rem); }
  .ts-ch::before { left: calc(var(--depth) * 1rem - .45rem); }
  .ts-refresh span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ts-body *, .ts-body *::before, .ts-body *::after { animation: none !important; transition: none !important; }
}
