/* Now Playing: schwarzer Grund, ein Farbschleier des laufenden Songs, große Platte, weiße Schrift. */
:root {
  color-scheme: dark;
  --grund: #000;
  --text: #fff;
  --still: rgba(235, 235, 245, 0.6);
  --schwach: rgba(235, 235, 245, 0.45);
  --linie: rgba(255, 255, 255, 0.1);
  --akzent: #ff375f;
  --rand: 20px;
  --radius: 22px;
  --spieler: 96px;
  --safe-oben: env(safe-area-inset-top, 0px);
  --safe-unten: env(safe-area-inset-bottom, 0px);
  --safe-links: env(safe-area-inset-left, 0px);
  --safe-rechts: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body {
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--grund);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
::selection { background: var(--akzent); color: #fff; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: 3px; border-radius: 8px; }
html { scrollbar-color: #3a3a3c #000; }

/* Farbschleier des laufenden Songs. Kein backdrop-filter: das malt in manchen WebKit-Umgebungen gar nichts. */
.wasche {
  position: fixed; inset: -80px; z-index: -2;
  background: var(--bild, none) center / cover;
  filter: blur(60px) saturate(1.8);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.spielt .wasche { animation: atmen 7s ease-in-out infinite alternate; }
@keyframes atmen { from { opacity: 0.5; } to { opacity: 0.38; } }
.schleier {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.3) 32%, rgba(0, 0, 0, 0.42) 62%, #000 100%);
}

.sprung { position: absolute; left: -9999px; }
.sprung:focus { left: 12px; top: 12px; z-index: 30; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }

.kopf {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(14px + var(--safe-oben)) calc(var(--rand) + var(--safe-rechts)) 14px calc(var(--rand) + var(--safe-links));
  background: #000;
}
.marke { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.navigation { display: flex; gap: 18px; font-size: 14px; color: var(--still); }
.navigation a:hover, .navigation a:focus-visible { color: var(--text); }

main {
  max-width: 1100px; margin: 0 auto;
  padding: 4px calc(var(--rand) + var(--safe-rechts)) calc(48px + var(--safe-unten)) calc(var(--rand) + var(--safe-links));
}
.hat-player main { padding-bottom: calc(var(--spieler) + 48px + var(--safe-unten)); }

h1 { font-size: 26px; line-height: 1.15; font-weight: 650; letter-spacing: -0.02em; }
h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.01em; margin: 44px 0 14px; }
.held-meta, .song-meta, .album-meta { margin-top: 4px; font-size: 14px; color: var(--still); }
.hinweis { font-size: 14px; color: var(--still); }

.held, .song, .album-kopf { display: grid; gap: 20px; }
.held-cover, .song > .cover, .album-kopf > .cover, .cover-rahmen {
  display: block; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}
.cover { width: 100%; height: 100%; object-fit: cover; background: #111; }
.cover-fehlt { display: grid; place-items: center; background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 70%), var(--plate, #111); color: rgba(255, 255, 255, 0.08); }
.cover-fehlt svg { width: 100%; height: 100%; }
.held-cover, .song > .cover { transition: transform 0.8s ease; }
.song.laeuft > .cover, .held.laeuft .held-cover { transform: scale(1.02); }

.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; margin-top: 16px; padding: 0 26px; border-radius: 999px;
  background: #fff; color: #000; font-size: 16px; font-weight: 600;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s;
}
.knopf:active { transform: scale(0.94); }
.knopf.klein { min-height: 36px; margin-top: 0; padding: 0 16px; font-size: 14px; background: rgba(255, 255, 255, 0.14); color: var(--text); }
.knopf:hover { background: rgba(255, 255, 255, 0.86); }
.knopf.klein:hover, .filter:hover, .karte-spiel:hover, .icon:not(.gross):hover { background: rgba(255, 255, 255, 0.24); }
.filter, .karte-spiel, .icon, .karte-cover { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s; }
.karte-spiel:active, .icon:active { transform: scale(0.9); }
.karte:hover .karte-cover { transform: translateY(-3px); }
.track:hover:not(.laeuft) .track-titel { color: var(--text); }
.zeile[data-s]:hover { color: rgba(235, 235, 245, 0.75); }

.filterleiste { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 4px; }
.filter { min-height: 36px; padding: 0 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 14px; }
.filter[aria-pressed="true"] { background: #fff; color: #000; font-weight: 600; }
.filter span { margin-left: 4px; opacity: 0.6; }

.raster { list-style: none; display: grid; gap: 22px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.karte { display: grid; gap: 6px; align-content: start; }
.karte-cover { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45); }
.karte-cover > a { display: block; width: 100%; height: 100%; }
.karte-titel { font-size: 14px; font-weight: 550; }
.karte-meta { font-size: 12px; color: var(--still); }
.karte-spiel {
  position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.62);
}
.karte-spiel svg { width: 15px; height: 15px; fill: #fff; }
.karte-spiel .i-pause, .karte-spiel.laeuft .i-spiel, #spiel .i-pause, #spiel.laeuft .i-spiel { display: none; }
.karte-spiel.laeuft .i-pause, #spiel.laeuft .i-pause { display: block; }

.trackliste { list-style: none; margin-top: 28px; }
.track {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: 100%; min-height: 52px; text-align: left; font-size: 16px;
  border-top: 1px solid var(--linie);
}
.trackliste li:last-child .track { border-bottom: 1px solid var(--linie); }
.track-nr, .track-dauer { font-size: 12px; color: var(--still); font-variant-numeric: tabular-nums; }
.track-zeile { display: grid; place-items: center; }
.track .eq { display: none; }
.track.laeuft .track-nr { display: none; }
.track.laeuft .eq { display: flex; }
.track.laeuft .track-titel { color: var(--akzent); }

.eq { gap: 2px; align-items: flex-end; height: 12px; }
.eq i { width: 3px; height: 4px; background: var(--akzent); animation: eq 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: 0.2s; }
.eq i:nth-child(3) { animation-delay: 0.4s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }

.text { margin-top: 36px; }
.text > h2:first-child { margin-top: 0; }
.song > .text { grid-column: 1 / -1; }
.lyrics { list-style: none; max-width: 34rem; }
.abschnitt { margin: 28px 0 8px; font-size: 12px; color: var(--still); }
.zeile {
  padding: 7px 0; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em;
  color: var(--schwach); transition: color 0.3s; cursor: pointer;
}
.zeile.aktiv { color: #fff; }
.zeile.aktiv .wort { color: rgba(235, 235, 245, 0.45); transition: color 0.15s; }
.zeile.aktiv .wort.gesungen { color: #fff; }
.zeile.ohne { cursor: default; }

.linie { height: 44px; margin-top: 18px; color: #fff; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.linie svg { display: block; width: 100%; height: 100%; }
.linie .lauf { animation: welle 5s linear infinite; animation-play-state: paused; }
.spielt .linie .lauf { animation-play-state: running; }
@keyframes welle { to { stroke-dashoffset: -530; } }

.fuss { padding: 32px calc(var(--rand) + var(--safe-rechts)) calc(32px + var(--safe-unten)) calc(var(--rand) + var(--safe-links)); font-size: 12px; color: var(--still); text-align: center; }
.hat-player .fuss { padding-bottom: calc(var(--spieler) + 32px + var(--safe-unten)); }

.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 0 calc(12px + var(--safe-rechts)) calc(10px + var(--safe-unten)) calc(12px + var(--safe-links));
  background: #121214;
  border-top: 1px solid var(--linie);
}
#fortschritt {
  display: block; width: 100%; height: 18px; margin: 0; background: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
#fortschritt::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, #fff var(--position, 0%), rgba(255, 255, 255, 0.22) var(--position, 0%)); }
#fortschritt::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: #fff; }
#fortschritt::-moz-range-track { height: 3px; background: rgba(255, 255, 255, 0.22); }
#fortschritt::-moz-range-progress { height: 3px; background: #fff; }
#fortschritt::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.player-inhalt { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.player-cover { display: block; width: 48px; height: 48px; border-radius: 8px; background: #111 center / cover no-repeat; }
.player-text { min-width: 0; display: grid; }
.player-titel { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-album { font-size: 12px; color: var(--still); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-steuerung { display: flex; align-items: center; gap: 2px; }
.player-zeiten { display: flex; grid-column: 2 / -1; justify-content: space-between; font-size: 12px; color: var(--still); font-variant-numeric: tabular-nums; }
.icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.icon svg { width: 22px; height: 22px; fill: #fff; }
.icon.gross { width: 48px; height: 48px; background: #fff; }
.icon.gross svg { width: 21px; height: 21px; fill: #000; }

.embed-modus .kopf, .embed-modus .fuss, .embed-modus .player, .embed-modus .sprung,
.embed-modus .wasche, .embed-modus .schleier { display: none; }
.embed-modus main { max-width: none; padding: 12px; }
.embed { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
.embed .cover { width: 96px; height: 96px; border-radius: 10px; }
.embed-titel { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.embed-kuenstler { margin-bottom: 8px; font-size: 12px; color: var(--still); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.embed-zeile { min-height: 1.5em; margin-top: 8px; font-size: 12px; color: var(--still); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 720px) {
  :root { --rand: 32px; }
  .held, .song, .album-kopf { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 44px; align-items: end; }
  h1 { font-size: 34px; }
  .raster { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 30px 22px; }
  .seite-start main { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px 44px; align-items: start; }
  .seite-start .held { grid-column: 1; grid-row: 1 / 3; display: grid; grid-template-columns: 1fr; gap: 20px; }
  .seite-start .filterleiste { grid-column: 2; grid-row: 1; margin: 0; }
  .seite-start #singles { grid-column: 2; grid-row: 2; }
  .seite-start #singles h2 { margin-top: 0; }
  .seite-start #singles .raster { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .seite-start #alben { grid-column: 1 / -1; }
  .zeile { font-size: 26px; }
  .player-inhalt { grid-template-columns: 56px minmax(0, 1fr) auto minmax(0, 380px); gap: 16px; max-width: 1100px; margin: 0 auto; }
  .player-cover { width: 56px; height: 56px; }
  .player-zeiten { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .eq i { height: 8px; }
}
