:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --shadow:0 18px 40px rgba(17,24,39,.10);

  --accent:#2563eb;
  --accentSoft:rgba(37,99,235,.14);

  --btnTop:#ffffff;
  --btnMid:#f2f4f8;
  --btnBot:#e2e6ef;
  --btnLine:#cfd6e3;
}

*{box-sizing:border-box}
body{
  margin:0;
  background:
    radial-gradient(900px 400px at 20% 0%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(900px 500px at 90% 100%, rgba(16,185,129,.08), transparent 60%),
    var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

.app{max-width:1200px;margin:0 auto;padding:16px}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.75);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.brand{display:flex;align-items:center;gap:10px;font-weight:900}
.brandText{letter-spacing:.04em}

.led{
  width:10px;height:10px;border-radius:999px;
  background: radial-gradient(circle, #ff7b7b 0%, #b40000 55%, #4a0000 100%);
  box-shadow: 0 0 10px rgba(255,80,80,.55);
  animation: ledPulse 1.6s ease-in-out infinite;
}
@keyframes ledPulse{
  0%,100%{filter:brightness(.75); box-shadow:0 0 6px rgba(255,80,80,.30)}
  50%{filter:brightness(1.35); box-shadow:0 0 14px rgba(255,80,80,.80)}
}

.controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sep{width:1px;height:26px;background:var(--line)}

.knob{
  width:42px;height:42px;
  border-radius:16px;
  border:1px solid var(--btnLine);
  background:
    radial-gradient(70% 50% at 30% 20%, rgba(255,255,255,.95), transparent 60%),
    linear-gradient(180deg, var(--btnTop), var(--btnMid) 55%, var(--btnBot));
  box-shadow:
    0 10px 18px rgba(17,24,39,.10),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -2px 0 rgba(0,0,0,.06);
  color:var(--text);
  font-weight:900;
  cursor:pointer;
  user-select:none;
}
.knob:active{
  transform: translateY(1px);
  box-shadow:
    0 6px 12px rgba(17,24,39,.10),
    inset 0 2px 6px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.85);
}
.knob.isOn{
  outline:2px solid var(--accentSoft);
  border-color: rgba(37,99,235,.35);
}

.layout{
  display:grid;
  grid-template-columns: 330px 1fr;
  gap:14px;
  margin-top:14px;
}

.sidebar, .screen{
  border-radius:18px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.sidebar{padding:12px}
.row{margin-bottom:10px}

.search, .select{
  width:100%;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.95);
  color:var(--text);
  outline:none;
}
.search:focus, .select:focus{
  border-color: rgba(37,99,235,.45);
  box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}

.channelList{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height: calc(100vh - 250px);
  overflow:auto;
  padding-right:4px;
}
.channelList::-webkit-scrollbar{width:8px}
.channelList::-webkit-scrollbar-thumb{background:rgba(17,24,39,.12);border-radius:999px}

.channelItem{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.92);
  cursor:pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.channelItem:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(17,24,39,.08);
}
.channelItem.active{
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}
.chNo{
  width:34px;height:34px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
  border:1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f3f5fa);
}
.chText{min-width:0;display:flex;flex-direction:column;gap:2px}
.chName{font-weight:900}
.chDesc{
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 210px;
}
.favBtn{
  margin-left:auto;
  width:36px;height:36px;
  border-radius:14px;
  border:1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f0f2f7);
  cursor:pointer;
  font-weight:900;
  color: rgba(245,158,11,.80);
}
.favBtn:active{transform:translateY(1px)}
.favBtn.isFav{
  border-color: rgba(245,158,11,.45);
  box-shadow: 0 0 0 4px rgba(245,158,11,.12);
  color: rgba(245,158,11,1);
}

.hint{margin-top:10px;color:var(--muted);font-size:12px}

.screen{padding:12px}
.now{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin:6px 4px 10px;
}
.nowName{font-weight:900;font-size:18px}
.nowDesc{color:var(--muted);font-size:13px;margin-top:2px}
.nowRight{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}

.pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.95);
  color: var(--muted);
}
.pillSoft{
  background: rgba(37,99,235,.08);
  color: rgba(37,99,235,.95);
  border-color: rgba(37,99,235,.18);
}

.tv{
  position:relative;
  width:100%;
  aspect-ratio: 16 / 9;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--line);
  background:#000;
  box-shadow: inset 0 18px 40px rgba(0,0,0,.35);
}
#player{
  position:absolute;inset:0;
  width:100%;height:100%;
  border:0;
}

.scanlines,.vignette{position:absolute;inset:0;pointer-events:none}
.scanlines{
  background:repeating-linear-gradient(180deg, transparent 0px, transparent 2px, rgba(0,0,0,.10) 3px, rgba(0,0,0,.10) 4px);
  opacity:.25;
}
.vignette{
  background:radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 45%, rgba(0,0,0,.18) 75%, rgba(0,0,0,.38) 100%);
  opacity:.8;
}

.fxOff .scanlines,
.fxOff .vignette{display:none}

.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.92);
  box-shadow: 0 14px 34px rgba(17,24,39,.14);
  color: var(--text);
  font-weight:800;
  opacity:0;
  pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show{
  opacity:1;
  transform: translateX(-50%) translateY(-2px);
}

.foot{margin-top:10px;color:var(--muted);font-size:12px}

/* Besucherzähler */
.visitorBox{
  margin-top:12px;
  border-radius:18px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 22px rgba(17,24,39,.08);
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
}
.visitorItem{
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:120px;
}
.visitorLabel{
  font-size:12px;
  color:var(--muted);
  font-weight:800;
}
.visitorValue{
  font-size:18px;
  font-weight:900;
  margin-top:2px;
}
.visitorDivider{
  width:1px;
  height:34px;
  background: var(--line);
}

@media (max-width: 950px){
  .layout{grid-template-columns: 1fr}
  .channelList{max-height:220px}
  .visitorItem{min-width:100px}
}
/* ===== HEADER LAYOUT ===== */
/* ===== HEADER RESPONSIVE FIX (mobile clean) ===== */

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

/* Desktop: drei Bereiche */
.brand{flex:0}
.kofiBox{
  flex:1;
  display:flex;
  justify-content:center;
  align-items:center;
  min-width:0;
}
.controls{
  flex:0;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* Ko fi Widget darf nicht überlaufen */
.kofiBox *{
  max-width:100% !important;
}

/* Mobile: Buttons verschwinden, Header wird “stacked” */
@media (max-width: 700px){
  .topbar{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding:12px 12px;
  }

  .brand{
    display:flex;
    justify-content:flex-start;
  }

  .kofiBox{
    justify-content:center;
    padding:2px 0 6px;
  }

  /* die 5 Buttons weg */
  .controls{
    display:none;
  }
}

/* Sehr klein: Ko fi leicht verkleinern, damit es immer passt */
@media (max-width: 420px){
  .kofiBox{
    transform: scale(.92);
    transform-origin: center;
  }
}
/* ===== CLEANUP: Buttons + Favoriten komplett aus ===== */
.controls{ display:none !important; }   /* 5 Buttons weg (PC + Handy) */
.favBtn{ display:none !important; }     /* Favoriten-Stern weg */

/* falls du irgendwo statt favBtn eine andere Klasse nutzt */
.fav{ display:none !important; }
