/* Radio Lichtblick – Webplayer. Farben, Schriften und Formen folgen dem Erscheinungsbild (ci/Radio-Lichtblick-CI.md). */

@font-face { font-family: "Outfit"; src: url("/schrift/Outfit.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/schrift/Inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Farben des Erscheinungsbilds */
  --mitternacht: #081029;
  --nachtblau: #0E1B3D;
  --daemmerblau: #1B2B5E;
  --daemmerung: #4A3A8C;
  --morgenrot: #FF6B4A;
  --glut: #FF9838;
  --lichtgelb: #FFC62E;
  --schein: #FFE08A;
  --wolkenweiss: #FFF8EA;
  --nebel: #B9C2DD;
  --tinte: #0B1330;
  /* daraus abgeleitet */
  --flaeche: rgba(255, 248, 234, .055);
  --flaeche-stark: rgba(255, 248, 234, .09);
  --rand: rgba(255, 248, 234, .13);
  --sonne: linear-gradient(90deg, var(--morgenrot), var(--glut) 45%, var(--lichtgelb));
  --kopf: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rund: 28px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  font-family: var(--text); font-size: 16px; line-height: 1.5; color: var(--wolkenweiss);
  background: var(--mitternacht);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, p, ol { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: var(--lichtgelb); text-underline-offset: 3px; }
a:hover { color: var(--schein); }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--schein); outline-offset: 3px; border-radius: 8px; }

/* ---------------------------------------------------------------- Himmel */
.himmel {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 108%, rgba(255, 107, 74, .50) 0%, rgba(255, 152, 56, .16) 24%, rgba(74, 58, 140, .30) 48%, rgba(14, 27, 61, 0) 72%),
    linear-gradient(180deg, var(--mitternacht) 0%, var(--nachtblau) 58%, #16204d 100%);
}
.boegen { position: absolute; left: 50%; bottom: -2vh; width: max(1200px, 118vw); height: auto; transform: translateX(-50%); }
.boegen path { fill: none; stroke: var(--wolkenweiss); stroke-width: 1.4; opacity: .07; transform-origin: 50% 100%; }
.boegen path:nth-child(3) { stroke: var(--glut); opacity: .13; }
.boegen path:nth-child(4) { stroke: var(--lichtgelb); opacity: .20; stroke-width: 2; }
body.spielt .boegen path { animation: atmen 5.5s ease-in-out infinite; }
body.spielt .boegen path:nth-child(2) { animation-delay: .5s; }
body.spielt .boegen path:nth-child(3) { animation-delay: 1s; }
body.spielt .boegen path:nth-child(4) { animation-delay: 1.5s; }
@keyframes atmen { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }

/* ---------------------------------------------------------------- Kopf */
.kopf {
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 40px) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--wolkenweiss); }
.logo:hover { color: var(--wolkenweiss); }
.zeichen { width: 56px; height: 56px; flex: none; }
.wort { display: flex; flex-direction: column; line-height: 1; font-family: var(--kopf); }
.wort-radio { font-size: 12px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--lichtgelb); margin: 0 0 4px 2px; }
.wort-name { font-size: 30px; font-weight: 800; letter-spacing: -.015em; }

.live {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 12px; border-radius: 999px;
  font-family: var(--kopf); font-weight: 600; font-size: 14px; letter-spacing: .01em; white-space: nowrap;
  background: var(--flaeche); border: 1px solid var(--rand); color: var(--nebel);
}
.punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--nebel); flex: none; }
.live.an { color: var(--wolkenweiss); }
.live.an .punkt { background: var(--morgenrot); box-shadow: 0 0 0 0 rgba(255, 107, 74, .7); animation: puls 2s ease-out infinite; }
@keyframes puls { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 74, .65); } 100% { box-shadow: 0 0 0 11px rgba(255, 107, 74, 0); } }

/* ---------------------------------------------------------------- Bühne */
.buehne {
  width: 100%; max-width: 1180px; margin: 0 auto; flex: 1;
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 40px) 28px;
  display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(300px, 1fr); grid-template-areas: "spieler verlauf" "drunter verlauf";
  gap: clamp(16px, 2vw, 24px) clamp(18px, 2.4vw, 30px); align-items: start;
}
.spieler { grid-area: spieler; }
.verlauf-karte { grid-area: verlauf; }
.drunter { grid-area: drunter; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: clamp(14px, 1.8vw, 20px); align-items: stretch; }

.spieler {
  position: relative; display: grid; grid-template-columns: minmax(180px, 270px) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: center;
  padding: clamp(20px, 3vw, 36px); border-radius: var(--rund);
  background: linear-gradient(160deg, rgba(255, 248, 234, .085), rgba(255, 248, 234, .03));
  border: 1px solid var(--rand); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}

/* Cover – ohne Bild steht dort das Zeichen im nachtblauen Feld */
.huelle {
  position: relative; aspect-ratio: 1; width: 100%; border-radius: 24px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(90% 60% at 50% 105%, rgba(255, 107, 74, .55), rgba(74, 58, 140, .35) 45%, rgba(14, 27, 61, 0) 75%),
    linear-gradient(180deg, var(--mitternacht), var(--daemmerblau));
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .75), 0 0 0 1px var(--rand);
  display: grid; place-items: center;
}
.huelle::after {   /* der Schein der Sonne hinter dem Cover, solange gesendet wird */
  content: ""; position: absolute; inset: -30%; z-index: -1; opacity: 0; transition: opacity .8s;
  background: radial-gradient(closest-side, rgba(255, 198, 46, .35), rgba(255, 198, 46, 0));
}
.huelle-zeichen { width: 58%; height: auto; margin-top: -4%; }
.huelle-wort {
  position: absolute; left: 0; right: 0; bottom: 13%; text-align: center; padding: 0 12px;
  font-family: var(--kopf); font-weight: 700; font-size: clamp(15px, 1.9vw, 20px); letter-spacing: .01em; color: var(--wolkenweiss);
}
.huelle img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.huelle img.da { opacity: 1; }

.angaben { min-width: 0; }
.ueber {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px;
  font-family: var(--kopf); font-weight: 600; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--lichtgelb);
}
.titel {
  font-family: var(--kopf); font-weight: 800; font-size: clamp(27px, 3.1vw, 42px); line-height: 1.07; letter-spacing: -.02em;
  overflow-wrap: anywhere; text-wrap: balance;
}
/* lange Titel und lange Interpreten-Reihen werden kleiner gesetzt, damit sie nicht die ganze Karte füllen */
.titel[data-laenge="lang"] { font-size: clamp(23px, 2.45vw, 32px); line-height: 1.1; }
.titel[data-laenge="sehr-lang"] { font-size: clamp(20px, 2vw, 26px); line-height: 1.14; letter-spacing: -.012em; }
.interpret[data-laenge="lang"] { font-size: clamp(16px, 1.5vw, 18.5px); }
.interpret { margin-top: 8px; font-family: var(--kopf); font-weight: 500; font-size: clamp(18px, 1.9vw, 23px); line-height: 1.25; color: var(--wolkenweiss); opacity: .92; overflow-wrap: anywhere; }
.album { margin-top: 6px; min-height: 1.5em; font-size: 14.5px; color: var(--nebel); overflow-wrap: anywhere; }

.fortschritt { margin-top: 20px; }
.leiste { height: 6px; border-radius: 999px; background: rgba(255, 248, 234, .14); overflow: hidden; }
.fuellung { height: 100%; width: 0; border-radius: inherit; background: var(--sonne); transition: width .5s linear; }
.zeiten { margin-top: 7px; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--nebel); font-variant-numeric: tabular-nums; }

.bedienung { margin-top: 24px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.knopf {
  position: relative; width: 78px; height: 78px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--tinte);
  background: radial-gradient(circle at 32% 26%, var(--schein), var(--lichtgelb) 55%, #f5ad17);
  box-shadow: 0 14px 34px -8px rgba(255, 198, 46, .55), inset 0 -3px 0 rgba(0, 0, 0, .08);
  transition: transform .15s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.knopf:hover { transform: scale(1.045); box-shadow: 0 18px 40px -8px rgba(255, 198, 46, .7), inset 0 -3px 0 rgba(0, 0, 0, .08); }
.knopf:active { transform: scale(.96); }
.knopf:focus-visible { border-radius: 50%; outline-offset: 5px; }
.knopf svg { width: 34px; height: 34px; fill: currentColor; grid-area: 1 / 1; }
.knopf .bild-aus, .knopf.an .bild-an { display: none; }
.knopf.an .bild-aus { display: block; }
.knopf .laedt { position: absolute; inset: -7px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--schein); opacity: 0; }
.knopf.wartet .laedt { opacity: 1; animation: drehen .9s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }

/* fünf kleine Balken vor „Jetzt läuft“: Sie tanzen, solange Ton läuft */
.wellen { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 15px; width: 22px; flex: none; }
.wellen i { flex: 1; height: 30%; border-radius: 2px; background: var(--lichtgelb); opacity: .55; }
.wellen i:nth-child(2) { height: 62%; }
.wellen i:nth-child(3) { height: 44%; }
.wellen i:nth-child(4) { height: 80%; }
.wellen i:nth-child(5) { height: 38%; }
body.spielt .wellen i { opacity: 1; animation: tanzen 1.1s ease-in-out infinite; }
body.spielt .wellen i:nth-child(1) { animation-duration: .9s; }
body.spielt .wellen i:nth-child(2) { animation-duration: 1.3s; animation-delay: -.4s; }
body.spielt .wellen i:nth-child(3) { animation-duration: 1.05s; animation-delay: -.7s; }
body.spielt .wellen i:nth-child(4) { animation-duration: 1.45s; animation-delay: -.2s; }
body.spielt .wellen i:nth-child(5) { animation-duration: .95s; animation-delay: -.55s; }
@keyframes tanzen { 0%, 100% { height: 22%; } 30% { height: 100%; } 60% { height: 45%; } 80% { height: 78%; } }

.laut { display: flex; align-items: center; gap: 6px; min-width: 140px; flex: 1 1 140px; max-width: 250px; }
.stumm { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--wolkenweiss); }
.stumm:hover { background: var(--flaeche-stark); }
.stumm svg { width: 24px; height: 24px; fill: currentColor; grid-area: 1 / 1; }
.stumm .bild-stumm, .stumm.an .bild-ton { display: none; }
.stumm.an .bild-stumm { display: block; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer;
  --wert: 100%;
}
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--lichtgelb) var(--wert), rgba(255, 248, 234, .16) var(--wert)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 248, 234, .16); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--lichtgelb); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; border: 0; background: var(--wolkenweiss); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--wolkenweiss); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }

.stand { margin-top: 16px; min-height: 1.5em; font-size: 14px; color: var(--nebel); }

body.spielt .huelle::after { opacity: 1; }

/* ---------------------------------------------------------------- Seitenspalte */
.karte { padding: 20px 22px; border-radius: 22px; background: var(--flaeche); border: 1px solid var(--rand); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.karte h2 { font-family: var(--kopf); font-weight: 700; font-size: 18px; letter-spacing: -.005em; margin-bottom: 12px; }
.klein { font-size: 13.5px; color: var(--nebel); }
.leer { font-size: 14px; color: var(--nebel); }

.verlauf li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid rgba(255, 248, 234, .08); }
.verlauf li:first-child { border-top: 0; padding-top: 2px; }
.verlauf .bild { width: 44px; height: 44px; border-radius: 11px; overflow: hidden; background: linear-gradient(180deg, var(--mitternacht), var(--daemmerblau)); display: grid; place-items: center; box-shadow: 0 0 0 1px var(--rand); }
.verlauf .bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.verlauf .bild svg { width: 70%; height: auto; }
.verlauf .wer { min-width: 0; }
.verlauf strong { display: block; font-family: var(--kopf); font-weight: 600; font-size: 15.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verlauf span.von { display: block; font-size: 13.5px; color: var(--nebel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verlauf time { font-size: 12.5px; color: var(--nebel); font-variant-numeric: tabular-nums; }

.nachrichten { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; align-content: center; background: linear-gradient(120deg, rgba(255, 107, 74, .16), rgba(255, 198, 46, .08)); border-color: rgba(255, 152, 56, .32); }
.nachrichten h2 { margin-bottom: 2px; }
.nachrichten p { font-size: 14.5px; color: var(--wolkenweiss); opacity: .9; }
.uhr { width: 34px; height: 34px; color: var(--lichtgelb); }

.adresse { display: flex; gap: 8px; margin: 10px 0; }
.adresse input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--rand); background: rgba(8, 16, 41, .55); font-size: 13.5px; color: var(--wolkenweiss); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.adresse button { flex: none; padding: 10px 16px; border-radius: 12px; border: 0; cursor: pointer; font-family: var(--kopf); font-weight: 600; font-size: 14.5px; color: var(--tinte); background: var(--lichtgelb); transition: background .15s; }
.adresse button:hover { background: var(--schein); }

/* ---------------------------------------------------------------- Fuß und kleine Leiste */
.fuss {
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) calc(22px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; font-size: 13px; color: var(--nebel);
}
.unten {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5;
  display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 999px;
  background: rgba(14, 27, 61, .9); border: 1px solid var(--rand); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: herein .25s ease-out;
}
@keyframes herein { from { transform: translateY(20px); opacity: 0; } }
.klein-knopf { width: 48px; height: 48px; }
.klein-knopf svg { width: 22px; height: 22px; }
.unten-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.unten-text strong { font-family: var(--kopf); font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unten-text span { font-size: 13px; color: var(--nebel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- schmale Bildschirme */
@media (max-width: 900px) {
  .buehne { grid-template-columns: minmax(0, 1fr); grid-template-areas: "spieler" "verlauf" "drunter"; }
}
@media (max-width: 640px) {
  .kopf { padding-top: 16px; }
  .zeichen { width: 46px; height: 46px; }
  .wort-name { font-size: 25px; }
  .wort-radio { font-size: 10.5px; }
  .spieler { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .huelle { max-width: 300px; margin: 0 auto; }
  .bedienung { justify-content: center; }
  .laut { flex-basis: 100%; max-width: 280px; }
  .zeiten { text-align: left; }
  body:has(.unten:not([hidden])) .fuss { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* wer Bewegung am Bildschirm abgestellt hat, bekommt ein ruhiges Bild */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  body.spielt .wellen i:nth-child(odd) { height: 70%; }
  body.spielt .wellen i:nth-child(even) { height: 40%; }
}
