:root {
  color-scheme: dark;
  --hintergrund: #0b0d10;
  --kopf: #11151a;
  --fläche: #151a20;
  --fläche-hell: #1d242c;
  --fläche-tief: #07090c;
  --linie: #2e3742;
  --text: #f3f6f4;
  --text-leise: #aeb9c4;
  --akzent: #26c6aa;
  --akzent-dunkel: #168a78;
  --sport: #f0b84a;
  --rot: #dd6262;
  --schatten: 0 20px 48px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  background: var(--hintergrund);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.app {
  height: calc(100vh - 34px);
  display: grid;
  grid-template-rows: 58px 1fr;
}

.kopfleiste {
  min-height: 58px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--linie);
  background: var(--kopf);
}

.marke {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.markenzeichen {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: #10151b;
}

.markenzeichen img {
  width: 40px;
  height: 40px;
  display: block;
}

.markentext {
  min-width: 0;
}

.markentext h1 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.markentext p {
  margin: 3px 0 0;
  max-width: 52vw;
  color: var(--text-leise);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.kopfleistenAktionen {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.audioSteuerung {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.symbolTaste,
.primärTaste,
.sekundärTaste,
.sekundärLink {
  min-height: 40px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  color: var(--text);
  background: var(--fläche-hell);
  text-decoration: none;
}

.symbolTaste {
  width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.symbolTaste:hover,
.sekundärTaste:hover,
.sekundärLink:hover {
  border-color: var(--akzent);
}

.tonTaste {
  width: 64px;
  font-size: 0.82rem;
  font-weight: 850;
}

.tonTaste.aktiv {
  border-color: var(--sport);
  color: var(--sport);
}

.lautstärkeRegler {
  width: clamp(92px, 10vw, 150px);
  min-width: 92px;
  accent-color: var(--akzent);
}

.tonspurAuswahl {
  min-height: 40px;
  max-width: 170px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: var(--fläche-hell);
}

.tonspurAuswahl[hidden] {
  display: none;
}

.tonspurAuswahl:focus,
.lautstärkeRegler:focus-visible,
.symbolTaste:focus-visible,
.primärTaste:focus-visible,
.sekundärTaste:focus-visible,
.sekundärLink:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

.primärTaste {
  min-width: 96px;
  padding: 0 18px;
  border-color: var(--akzent-dunkel);
  background: var(--akzent);
  color: #04110e;
  font-weight: 800;
}

.primärTaste:hover {
  background: #47d3bd;
}

.sekundärTaste,
.sekundärLink {
  min-width: 96px;
  padding: 0 16px;
  display: inline-grid;
  place-items: center;
}

.receiverRaster {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(620px, 1.55fr);
  grid-template-areas: "sender player";
  background: var(--fläche-tief);
}

.senderbereich,
.epgBereich,
.playerBereich {
  min-width: 0;
  min-height: 0;
}

.senderbereich {
  grid-area: sender;
  display: grid;
  grid-template-rows: auto 1fr;
  border-right: 1px solid var(--linie);
  background: #10151b;
}

.epgBereich {
  display: grid;
  grid-template-rows: auto 1fr;
  border-top: 1px solid var(--linie);
  background: var(--fläche);
}

.playerBereich {
  grid-area: player;
  display: grid;
  grid-template-rows: minmax(260px, 1fr) auto minmax(178px, 0.42fr);
  overflow: hidden;
  background: radial-gradient(circle at center, #11161c 0%, #050608 72%);
}

.bereichsKopf {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--linie);
  background: rgba(255, 255, 255, 0.015);
}

.bereichsKopf h2 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.98rem;
}

.bereichsKopf span {
  color: var(--text-leise);
  white-space: nowrap;
  font-size: 0.86rem;
}

.senderListe,
.programmListe {
  min-height: 0;
  overflow: auto;
}

.senderListe {
  padding: 8px;
}

.senderEintrag {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.senderEintrag:hover {
  background: var(--fläche-hell);
}

.senderEintrag.aktiv {
  border-color: var(--akzent);
  background: rgba(38, 198, 170, 0.08);
  box-shadow: inset 0 0 0 1px rgba(38, 198, 170, 0.22);
}

.senderNummer {
  width: 38px;
  height: 38px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--akzent);
  background: #070a0e;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.senderText {
  min-width: 0;
}

.senderKopfzeile {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.senderName,
.senderSendung {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.senderName {
  font-weight: 850;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.22;
}

.senderEintrag.aktiv .senderName {
  mask-image: none;
}

.senderEintrag.aktiv .senderName .lauftext {
  display: inline-block;
  min-width: 0;
  animation: none;
}

.qualität {
  min-width: 52px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(240, 184, 74, 0.35);
  color: var(--sport);
  background: rgba(240, 184, 74, 0.08);
  font-size: 0.74rem;
  font-weight: 850;
}

.senderSendung {
  margin-top: 4px;
  color: var(--text-leise);
  font-size: 0.86rem;
}

.programmListe {
  padding: 8px 10px 14px;
}

.playerBereich .epgBereich {
  min-height: 0;
  margin: 0 18px 18px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  overflow: hidden;
}

.playerBereich .epgBereich .bereichsKopf {
  min-height: 42px;
  padding: 8px 12px;
}

.programmEintrag {
  padding: 11px 4px;
  border-bottom: 1px solid var(--linie);
}

.programmKopfzeile {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.jetztMarke {
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #06110f;
  background: var(--akzent);
  font-size: 0.72rem;
  font-weight: 900;
}

.programmZeit {
  color: var(--text-leise);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.programmTitel {
  line-height: 1.3;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.listenHinweis {
  padding: 14px;
  color: var(--text-leise);
  line-height: 1.35;
}

.videoFläche {
  position: relative;
  min-height: 260px;
  margin: 18px 18px 0;
  border: 1px solid #050608;
  border-radius: 8px;
  overflow: hidden;
  background: #030405;
  box-shadow: var(--schatten);
}

.videoFläche video {
  width: 100%;
  height: 100%;
  display: block;
  background: #030405;
  object-fit: contain;
}

.leerzustand {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--text-leise);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.4));
  pointer-events: none;
}

.leerzustand strong {
  color: var(--text);
  font-size: 1.05rem;
}

.leerzustand.versteckt {
  display: none;
}

.playerInfo {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 1px;
  margin: 0 18px 18px;
  border: 1px solid var(--linie);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  background: var(--linie);
}

.playerInfo > div {
  min-width: 0;
  padding: 13px 14px;
  background: rgba(21, 26, 32, 0.94);
}

.etikett {
  display: block;
  margin-bottom: 5px;
  color: var(--sport);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.playerInfo h2,
.playerInfo h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playerInfo h2 {
  font-size: 1.08rem;
}

.playerInfo h3 {
  font-size: 0.96rem;
}

.playerInfo p {
  margin: 5px 0 0;
  color: var(--text-leise);
}

.meldung {
  position: fixed;
  right: 16px;
  bottom: 48px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  color: #06110f;
  background: var(--sport);
  box-shadow: var(--schatten);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.meldung.sichtbar {
  opacity: 1;
  transform: translateY(0);
}

.fußzeile {
  height: 34px;
  display: grid;
  place-items: center;
  padding: 7px 12px;
  border-top: 1px solid var(--linie);
  color: var(--text-leise);
  background: var(--kopf);
  font-size: 0.84rem;
}

.adminSeite {
  overflow: auto;
}

.adminRahmen {
  min-height: calc(100vh - 34px);
  width: min(860px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  align-content: start;
  gap: 18px;
}

.adminKopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: var(--fläche);
}

.adminForm {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: var(--fläche);
}

.adminForm label {
  display: grid;
  gap: 6px;
  color: var(--text-leise);
}

.adminForm label span {
  font-weight: 750;
}

.adminForm input,
.adminForm textarea {
  width: 100%;
  border: 1px solid var(--linie);
  border-radius: 8px;
  color: var(--text);
  background: #0c1015;
}

.adminForm input {
  min-height: 42px;
  padding: 0 12px;
}

.adminForm textarea {
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
}

.adminForm input:focus,
.adminForm textarea:focus {
  outline: 2px solid var(--akzent);
  outline-offset: 1px;
}

.adminAktionen {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.adminSenderAuswahl {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

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

.adminAuswahlKopf h2 {
  margin: 0;
  min-width: 0;
  font-size: 0.98rem;
  line-height: 1.22;
}

.adminAuswahlKopf span {
  flex: 0 0 auto;
  color: var(--text-leise);
  font-size: 0.86rem;
}

.senderAuswahlListe {
  max-height: 290px;
  overflow: auto;
  display: grid;
  gap: 6px;
}

.senderAuswahlEintrag {
  min-height: 50px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: #0c1015;
}

.senderAuswahlEintrag:has(input:checked) {
  border-color: var(--akzent);
  background: rgba(38, 198, 170, 0.08);
}

.senderAuswahlEintrag.aktiv:not(:has(input:checked)) {
  border-color: rgba(240, 184, 74, 0.38);
}

.senderAuswahlEintrag input {
  width: 18px;
  height: 18px;
  accent-color: var(--akzent);
}

.senderAuswahlText {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.senderAuswahlText strong,
.senderAuswahlText small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.senderAuswahlText strong {
  color: var(--text);
  line-height: 1.18;
}

.senderAuswahlText small {
  color: var(--text-leise);
  line-height: 1.25;
}

.adminAuswahlAktionen {
  justify-content: flex-start;
}

@keyframes laufschrift {
  0%, 18% {
    transform: translateX(0);
  }
  88%, 100% {
    transform: translateX(calc(-100% + 100px));
  }
}

@media (max-width: 1120px) {
  .receiverRaster {
    grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.3fr);
    grid-template-rows: 1fr;
    grid-template-areas: "sender player";
  }

  .senderbereich {
    border-top: 0;
  }

  .epgBereich {
    border-top: 1px solid var(--linie);
  }
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .app {
    min-height: calc(100vh - 34px);
    height: auto;
    grid-template-rows: auto auto;
  }

  .kopfleiste {
    align-items: flex-start;
    flex-direction: column;
  }

  .markentext p {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.28;
  }

  .kopfleistenAktionen {
    width: 100%;
    display: grid;
    grid-template-columns: 42px 1fr 42px 42px;
    align-items: center;
  }

  .audioSteuerung {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) minmax(120px, auto);
  }

  .lautstärkeRegler {
    width: 100%;
  }

  .tonspurAuswahl {
    max-width: 100%;
  }

  .receiverRaster {
    overflow: visible;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "player"
      "sender";
  }

  .playerBereich {
    min-height: auto;
    overflow: visible;
    grid-template-rows: auto auto auto;
  }

  .videoFläche {
    height: min(54vw, 260px);
    min-height: 190px;
    margin: 12px 12px 0;
  }

  .playerInfo {
    grid-template-columns: 1fr;
    margin: 0 12px 12px;
  }

  .bereichsKopf {
    align-items: flex-start;
  }

  .bereichsKopf h2 {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.22;
  }

  .bereichsKopf span {
    flex: 0 0 auto;
  }

  .playerInfo h2,
  .playerInfo h3,
  .senderSendung {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .playerInfo h2,
  .playerInfo h3 {
    line-height: 1.22;
  }

  .senderSendung {
    line-height: 1.28;
  }

  .programmKopfzeile {
    flex-wrap: wrap;
  }

  .playerBereich .epgBereich {
    margin: 0 12px 12px;
  }

  .senderbereich,
  .epgBereich {
    min-height: auto;
    border-right: 0;
    border-top: 1px solid var(--linie);
  }

  .senderListe,
  .programmListe {
    max-height: none;
    overflow: visible;
  }

  .senderEintrag {
    min-height: 64px;
  }

  .adminKopf {
    align-items: flex-start;
    flex-direction: column;
  }

  .adminAktionen {
    justify-content: stretch;
  }

  .adminAktionen > * {
    flex: 1 1 150px;
  }
}
