/* Farben wie im Projekt onradio-cover-bridge */
:root,
[data-theme="dark"] {
  /* Design „Neon Night“: Schwarz mit Magenta/Cyan */
  color-scheme: dark;
  --bg: #05030a;
  --bg-glow: #1a0630;
  --panel: rgba(14, 8, 24, 0.92);
  --panel-soft: rgba(24, 12, 40, 0.85);
  --hover: rgba(255, 61, 242, 0.08);
  --border: rgba(255, 61, 242, 0.18);
  --text: #f7f3ff;
  --muted: #b9a6d9;
  --accent: #ff3df2;
  --accent-strong: #7a5cff;
  --neon-cyan: #7ef3ff;
  --on-accent: #ffffff;
  --danger: #ff7f9d;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --radius: 1.2rem;
  --inset: rgba(5, 3, 12, 0.45);
  --inset-border: rgba(126, 243, 255, 0.08);
  --trend-up: #7ef3ff;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2fa;
  --bg-glow: #d7e3fb;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-soft: rgba(244, 247, 253, 0.95);
  --hover: rgba(78, 149, 255, 0.08);
  --border: rgba(16, 24, 48, 0.1);
  --text: #121a2e;
  --muted: #5b6680;
  --accent: #2f6fe0;
  --accent-strong: #1f58c2;
  --on-accent: #ffffff;
  --danger: #d6345a;
  --shadow: 0 18px 50px rgba(30, 50, 100, 0.16);
  --inset: rgba(225, 233, 247, 0.6);
  --inset-border: rgba(16, 24, 48, 0.06);
  --trend-up: #1f58c2;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(circle at top, var(--bg-glow) 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
h1, h2 { margin: 0; }

/* ---------- Bausteine ---------- */
.icon-btn {
  background: var(--panel-soft); border: 1px solid var(--border); border-radius: 0.8rem;
  width: 40px; height: 40px; cursor: pointer; display: inline-grid; place-items: center;
}
.icon-btn.round { width: 48px; height: 48px; border-radius: 50%; font-size: 17px; }
.icon-btn:hover, .pill-btn:hover, .provider:hover { border-color: var(--accent); }
.pill-btn {
  background: var(--panel-soft); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; white-space: nowrap;
}
.play-btn {
  width: 70px; height: 70px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--on-accent);
  font-size: 26px; font-weight: 700; box-shadow: 0 10px 30px rgba(78, 149, 255, .35);
}
.play-btn:hover { filter: brightness(1.08); }
.bmc img { display: block; border-radius: 8px; }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 20px;
  padding: 12px 22px; border-bottom: 1px solid var(--border);
  background: var(--panel); backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; white-space: nowrap; }
.providers { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.topbar .providers { flex: 1; }
.topright { margin-left: auto; }
.browser .providers { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.browser .provider { font-size: 13px; padding: 5px 11px; }
.provider {
  border: 1px solid var(--border); background: var(--panel-soft); border-radius: 999px;
  padding: 6px 13px; cursor: pointer; white-space: nowrap; font-size: 14px;
}
.provider.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent; color: var(--on-accent); font-weight: 600;
}
.topright { display: flex; align-items: center; gap: 14px; }
.datetime { text-align: right; line-height: 1.15; }
.clock { font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 700; }
.date { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ---------- Hauptbereich (Vollversion) ---------- */
.layout { display: grid; grid-template-columns: 360px 1fr; align-items: start; }
.browser {
  border-right: 1px solid var(--border); padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  position: sticky; top: var(--topbar-h, 82px); height: calc(100vh - var(--topbar-h, 82px)); overflow: hidden;
}
.browser-head { display: flex; flex-direction: column; gap: 10px; }
.provider-title { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.search {
  width: 100%; padding: 10px 12px; border-radius: 0.8rem;
  border: 1px solid var(--border); background: var(--panel-soft);
}
.station-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.station { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 0.8rem; cursor: pointer; }
.station:hover { background: var(--hover); }
.station.active { background: var(--panel-soft); outline: 1px solid var(--accent); }
.station .avatar {
  width: 36px; height: 36px; border-radius: 0.6rem; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
}
.station .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station .fav { color: var(--accent); }
.station .group { font-size: 11px; color: var(--muted); }

.stage { padding: 30px; display: flex; flex-direction: column; gap: 26px; }
.now-playing { display: grid; grid-template-columns: minmax(260px, 470px) 1fr; gap: 38px; align-items: center; }
.cover-wrap { aspect-ratio: 1; }
.cover {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius);
  box-shadow: var(--shadow); background: var(--panel); transition: opacity .35s ease;
}
.cover.loading { opacity: .35; }
.station-name { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.track-title { margin: 6px 0 4px; font-size: clamp(26px, 3.4vw, 46px); line-height: 1.1; }
.track-artist { font-size: clamp(18px, 2vw, 25px); color: var(--muted); }
.status { min-height: 18px; margin-top: 8px; }
.controls { display: flex; align-items: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.volume { display: flex; align-items: center; gap: 10px; margin-top: 18px; max-width: 380px; }
.volume input { flex: 1; accent-color: var(--accent); }
.speaker-btn {
  height: 48px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: var(--panel-soft); border: 1px solid var(--border); font-weight: 600; white-space: nowrap;
}
.speaker-btn:hover { border-color: var(--accent); }
.speaker-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--on-accent); border-color: transparent; }
.speaker-help ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.speaker-help p { margin: 0 0 8px; }
.speaker-help ol { margin: 0 0 10px; padding-left: 22px; display: grid; gap: 6px; }
.cast-search { width: 100%; padding: 10px 14px !important; }

/* Wetter – Aufbau wie onradio-cover-bridge */
.weather {
  margin-top: 26px; width: min(100%, 440px); padding: 14px;
  border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.weather:empty { display: none; }
.weather p { margin: 0; }
.wx-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.wx-eyebrow, .wx-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.wx-location { font-size: 16px; font-weight: 600; }
.wx-head-icon { width: 44px; height: 44px; }
.wx-current, .wx-day { background: var(--inset); border: 1px solid var(--inset-border); border-radius: 0.9rem; }
.wx-current { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 10px 14px; margin-bottom: 10px; }
.wx-temp { font-size: 34px; font-weight: 800; line-height: 1; }
.wx-current-side { display: grid; gap: 3px; justify-items: end; text-align: right; }
.wx-condition { font-size: 15px; }
.wx-pressure { font-size: 13px; color: var(--muted); }
.wx-trend { font-weight: 800; font-size: 15px; margin-left: 2px; }
.wx-trend.is-up { color: var(--trend-up); }
.wx-trend.is-down { color: var(--muted); }
.wx-trend.is-steady { color: var(--muted); }
.wx-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wx-day { padding: 10px 12px; min-width: 0; }
.wx-day-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.wx-day-label { font-weight: 600; }
.wx-day-icon { width: 28px; height: 28px; }
.wx-day-condition { font-size: 13px; color: var(--muted); min-height: 2.4em; line-height: 1.2; margin-bottom: 4px; }
.wx-day-temp { font-size: 19px; font-weight: 700; }
.wx-day-rain { font-size: 12.5px; color: var(--muted); }
.wx-icon { object-fit: contain; display: block; }
[data-theme="light"] .wx-icon { filter: brightness(0) saturate(100%) invert(30%) sepia(18%) saturate(900%) hue-rotate(185deg); }

/* QR-Code */
.qr-btn {
  width: 44px; height: 44px; padding: 3px; border-radius: 12px; border: 0; cursor: pointer;
  background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); flex: none;
}
.qr-btn img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.qr-btn:hover { transform: scale(1.05); }
.qr-hint {
  display: inline-flex; align-items: center; gap: 6px; margin-right: -6px;
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: var(--accent); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.qr-arrow { display: inline-block; font-size: 20px; animation: qr-nudge 1.4s ease-in-out infinite; }
@keyframes qr-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .qr-arrow { animation: none; } }
.qr-dialog form { align-items: center; text-align: center; }
.qr-big { width: min(300px, 70vw); background: #fff; padding: 10px; border-radius: 1rem; image-rendering: pixelated; }
.qr-url { font-weight: 600; font-size: 16px; }

.footer { display: none; }

/* ---------- Einstellungen ---------- */
.settings {
  background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
  width: min(440px, 94vw); padding: 0; box-shadow: var(--shadow);
}
.settings::backdrop { background: rgba(0, 0, 0, .55); }
.settings form { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.settings label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.settings input:not([type="checkbox"]) { padding: 9px 11px; border-radius: 0.6rem; border: 1px solid var(--border); background: var(--panel-soft); }
.settings p { margin: 0; }
.switch-row { flex-direction: row !important; align-items: center; justify-content: space-between; }
.switch-row input {
  appearance: none; width: 46px; height: 26px; border-radius: 999px; background: var(--border);
  position: relative; cursor: pointer; transition: background .2s;
}
.switch-row input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.switch-row input:checked { background: var(--accent-strong); }
.switch-row input:checked::after { transform: translateX(20px); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.settings button { padding: 8px 16px; border-radius: 0.6rem; border: 0; background: var(--accent-strong); color: #fff; font-weight: 600; cursor: pointer; }
.settings button.secondary { background: var(--panel-soft); color: var(--text); border: 1px solid var(--border); font-weight: 500; }

/* ---------- Mobilversion ---------- */
body.view-mobile .topbar {
  display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
}
body.view-mobile .brand { font-size: 15px; gap: 8px; grid-row: 1; grid-column: 1; }
body.view-mobile .brand img { width: 26px; height: 26px; }
body.view-mobile .topright { grid-row: 1; grid-column: 2; }
body.view-mobile .date .long, body.view-full .date .short { display: none; }
body.view-mobile #btnView .txt { display: none; }
body.view-mobile .topright { gap: 8px; }
body.view-mobile .topright .tb-coffee, body.view-mobile .qr-btn, body.view-mobile .qr-hint { display: none; }
body.view-mobile .weather { width: 100%; text-align: left; margin-top: 16px; }
body.view-mobile .clock { font-size: 20px; }
body.view-mobile #btnView { padding: 6px 9px; }
body.view-mobile .icon-btn:not(.round) { width: 34px; height: 34px; }
body.view-mobile .topright { gap: 6px; }
body.view-mobile .brand span { font-size: 14px; line-height: 1.1; max-width: 92px; white-space: normal; }
body.view-mobile .providers {
  grid-row: 2; grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  margin: 0 -14px; padding: 0 14px 2px;
}
body.view-mobile .providers::-webkit-scrollbar { display: none; }
body.view-mobile .layout { display: flex; flex-direction: column; min-height: 0; }
body.view-mobile .stage { order: 1; padding: 16px 14px 8px; gap: 16px; }
body.view-mobile .now-playing { grid-template-columns: 1fr; gap: 14px; text-align: center; }
body.view-mobile .cover-wrap { width: min(78vw, 340px); margin: 0 auto; }
body.view-mobile .track-title { font-size: 24px; }
body.view-mobile .track-artist { font-size: 17px; }
body.view-mobile .controls { justify-content: center; margin-top: 14px; }
body.view-mobile .speaker-btn span { display: none; }
body.view-mobile .speaker-btn { width: 48px; padding: 0; }
body.view-mobile .volume { margin: 12px auto 0; width: 100%; }
body.view-mobile .browser {
  order: 2; position: static; height: auto; overflow: visible;
  border-right: 0; border-top: 1px solid var(--border); padding: 14px;
}
body.view-mobile .station-list { overflow: visible; }
body.view-mobile .station { padding: 10px 8px; }
body.view-mobile .footer {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 14px max(24px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border);
}
body.view-full .footer {
  display: flex; justify-content: center; align-items: center; gap: 16px;
  padding: 14px; border-top: 1px solid var(--border);
}
body.view-full .footer .bmc { display: none; }

/* ---------- Angebot „Als App speichern“ ---------- */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 20;
  display: flex; gap: 14px; align-items: flex-start; max-width: 520px; margin: 0 auto;
  padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  box-shadow: var(--shadow); backdrop-filter: blur(18px);
  transform: translateY(140%); transition: transform .3s ease;
}
.install-banner.open { transform: translateY(0); }
.install-banner img { border-radius: 12px; flex: none; }
.install-body { flex: 1; min-width: 0; }
.install-banner p { margin: 0; }
.install-title { font-weight: 700; font-size: 16px; margin-bottom: 4px !important; }
.install-text { font-size: 14px; color: var(--muted); line-height: 1.4; }
.install-text b { color: var(--text); }
.ios-share { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--accent); border-radius: 5px; color: var(--accent); font-size: 12px; vertical-align: -4px; }
.install-actions { display: flex; gap: 10px; margin-top: 12px; }
.install-actions button { padding: 8px 16px; border-radius: 0.7rem; font-weight: 600; cursor: pointer; border: 1px solid var(--border); }
.install-primary { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--on-accent); border: 0 !important; }
.install-secondary { background: var(--panel-soft); }
.install-steps { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.install-steps li::marker { color: var(--accent); font-weight: 700; }
.install-banner.point-down { bottom: max(84px, calc(env(safe-area-inset-bottom) + 72px)); }
.install-banner.point-down::after {
  content: "↓"; position: absolute; left: 50%; bottom: -60px; transform: translateX(-50%); font-weight: 800; font-family: system-ui, sans-serif;
  font-size: 44px; color: var(--accent); text-shadow: 0 2px 10px rgba(0,0,0,.5);
  animation: point-down 1.2s ease-in-out infinite;
}
@keyframes point-down { 0%, 100% { translate: 0 0; } 50% { translate: 0 10px; } }
@media (prefers-reduced-motion: reduce) { .install-banner.point-down::after { animation: none; } }
.install-banner.point-up {
  top: max(64px, calc(env(safe-area-inset-top) + 56px)); bottom: auto;
  transform: translateY(-160%);
}
.install-banner.point-up.open { transform: translateY(0); }
.install-banner.point-up::after {
  content: "↑"; position: absolute; right: 22px; top: -58px;
  font: 800 44px system-ui, sans-serif; color: var(--accent); text-shadow: 0 2px 10px rgba(0,0,0,.5);
  animation: point-up 1.2s ease-in-out infinite;
}
@keyframes point-up { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) { .install-banner.point-up::after { animation: none; } }

/* ---------- Hilfe ---------- */
.help-dialog { width: min(620px, 94vw); max-height: 88vh; }
.help-dialog form { gap: 10px; }
.help-dialog details { border: 1px solid var(--border); border-radius: 0.8rem; background: var(--panel-soft); }
.help-dialog summary { cursor: pointer; padding: 11px 14px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.help-dialog summary::-webkit-details-marker { display: none; }
.help-dialog summary::after { content: "＋"; color: var(--accent); }
.help-dialog details[open] summary::after { content: "－"; }
.help-dialog ul { margin: 0; padding: 0 16px 12px 34px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.help-foot { margin-top: 4px !important; }

/* =====================================================================
   Vollansicht als App-Layout (Desktop, iPad quer)
   - Seite scrollt nicht; Senderliste und Bühne scrollen jeweils für sich
   - Cover und rechte Spalte sind gleich hoch und oben/unten bündig
   ===================================================================== */
body.view-full {
  --side: clamp(260px, 22vw, 340px);
  --meta-w: clamp(320px, 27vw, 420px);
  height: 100dvh; overflow: hidden; display: flex; flex-direction: column;
}
body.view-full .topbar { position: relative; flex: none; }
body.view-full .footer { display: none; }
body.view-full .layout {
  flex: 1; min-height: 0; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); align-items: stretch;
}
body.view-full .browser {
  position: static; top: auto; height: auto; min-height: 0; overflow: hidden;
  padding: 18px 14px 12px; gap: 12px;
}
body.view-full .browser .providers {
  flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; grid-auto-flow: row dense;
}
body.view-full .browser .provider.wide { grid-column: span 2; }
body.view-full .browser .provider {
  padding: 6px 8px; font-size: 12.5px; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Platz für Rahmen, damit der aktive Sender nicht abgeschnitten wird */
body.view-full .station-list { padding: 3px; margin: -3px; }
.station.active { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent); }
.sidebar-foot { margin: 0; flex: none; }
.sidebar-foot a { color: var(--muted); }

body.view-full .stage { min-height: 0; overflow: auto; padding: 24px 28px; display: flex; }
body.view-full .now-playing {
  --cover: min(calc(100dvh - var(--topbar-h, 82px) - 48px),
               calc(100vw - var(--side) - var(--meta-w) - 56px - 28px), 660px);
  margin: auto; /* zentriert, ohne beim Überlaufen oben abzuschneiden */
  display: grid; grid-template-columns: var(--cover) var(--meta-w);
  gap: 28px; align-items: stretch;
}
body.view-full .cover-wrap { width: var(--cover); height: var(--cover); aspect-ratio: 1; align-self: center; }
body.view-full .meta { display: flex; flex-direction: column; gap: 14px; min-height: var(--cover); }
body.view-full .np-card {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow);
}
body.view-full .track-title {
  font-size: clamp(22px, 2.3vw, 36px);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
body.view-full .track-artist {
  font-size: clamp(16px, 1.5vw, 21px);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body.view-full .controls { margin-top: 16px; gap: 10px; flex-wrap: nowrap; }
/* Lautsprecher in der Vollansicht als runder Knopf in derselben Reihe */
body.view-full .speaker-btn { width: 48px; padding: 0; margin-left: auto; }
body.view-full .speaker-btn span { display: none; }
body.view-full .volume { margin-top: 14px; max-width: none; }
body.view-full .weather { margin-top: 0; width: 100%; flex: none; }

/* Niedrige Fenster (z. B. iPad quer mit Browserleisten): kompakter */
@media (max-height: 860px) {
  body.view-full .np-card { padding: 16px 18px; }
  body.view-full .play-btn { width: 58px; height: 58px; font-size: 22px; }
  body.view-full .icon-btn.round { width: 42px; height: 42px; font-size: 15px; }
  body.view-full .speaker-btn { height: 42px; width: 42px; }
  body.view-full .controls { margin-top: 12px; }
  body.view-full .volume { margin-top: 10px; }
  body.view-full .weather { padding: 12px; }
  body.view-full .wx-head { margin-bottom: 8px; }
  body.view-full .wx-head-icon { width: 36px; height: 36px; }
  body.view-full .wx-current { padding: 8px 12px; margin-bottom: 8px; }
  body.view-full .wx-temp { font-size: 28px; }
  body.view-full .wx-day { padding: 8px 10px; }
  body.view-full .wx-day-condition { min-height: 0; }
  body.view-full .wx-day-temp { font-size: 17px; }
}
/* Schmale Fenster: rechte Spalte unter das Cover */
@media (max-width: 1060px) {
  body.view-full .now-playing {
    --cover: min(calc(100vw - var(--side) - 56px), 440px);
    grid-template-columns: var(--cover); margin: 0 auto;
  }
  body.view-full .meta { min-height: 0; }
}

/* Mobil: Senderliste über die volle Breite, Quellcode-Link steht schon im Fuß */
body.view-mobile .layout { align-items: stretch; }
body.view-mobile .sidebar-foot a, body.view-mobile .sidebar-foot .sep { display: none; }

/* =====================================================================
   Display-Modus
   ===================================================================== */
body.display-mode { overflow: hidden; }
.display-mode-view {
  position: fixed; inset: 0; z-index: 50; overflow: hidden; color: #fff;
  background: #05070d; cursor: pointer;
  padding: max(24px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right))
           max(24px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
}
.display-mode-view[hidden] { display: none; }
.dm-bg {
  position: absolute; inset: -60px; background-size: cover; background-position: center;
  filter: blur(50px) brightness(.45) saturate(1.3); transform: scale(1.1);
  transition: background-image .8s ease;
}
.dm-inner {
  position: relative; height: 100%; display: grid; align-items: center; gap: clamp(24px, 4vw, 56px);
  grid-template-columns: min(calc(100dvh - 48px), 52vw) 1fr;
}
.dm-cover {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 1.4rem;
  box-shadow: 0 30px 90px rgba(0,0,0,.6); background: rgba(255,255,255,.06);
}
.dm-info { display: flex; flex-direction: column; justify-content: space-between; height: min(calc(100dvh - 48px), 52vw); min-width: 0; }
.dm-clock { font-size: clamp(56px, 9vw, 120px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.dm-date { font-size: clamp(16px, 1.8vw, 24px); opacity: .8; margin-top: 6px; }
.dm-station { text-transform: uppercase; letter-spacing: .1em; font-size: clamp(13px, 1.3vw, 17px); color: #9fd1ff; font-weight: 700; }
.dm-title {
  font-size: clamp(30px, 4.2vw, 64px); font-weight: 800; line-height: 1.05; margin: 8px 0 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.dm-artist {
  font-size: clamp(20px, 2.3vw, 34px); opacity: .85;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dm-weather { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-size: clamp(14px, 1.4vw, 19px); }
.dm-weather .wx-icon { width: 34px; height: 34px; filter: none !important; }
.dmw-now { display: flex; align-items: center; gap: 10px; width: 100%; }
.dmw-now b { font-size: clamp(28px, 3vw, 40px); }
.dmw-now span { opacity: .85; }
.dmw-day { display: flex; align-items: center; gap: 8px; opacity: .9; }
.dmw-day .wx-icon { width: 26px; height: 26px; }

.dm-controls {
  position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 999px;
  background: rgba(10, 14, 26, .72); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.12);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.display-mode-view.show-controls .dm-controls { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.dm-controls button {
  width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; font-size: 20px; cursor: pointer;
}
.dm-controls .dm-play { width: 66px; height: 66px; border: 0; background: linear-gradient(135deg, #7ab6ff, #4e95ff); color: #06101f; font-size: 24px; }
.dm-controls .dm-exit { width: auto; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.dm-hint {
  position: absolute; right: 24px; bottom: 18px; font-size: 13px; opacity: .45; transition: opacity .3s;
}
.display-mode-view.show-controls .dm-hint { opacity: 0; }

/* Hochkant (iPad senkrecht, Handy): Cover oben, Infos darunter */
@media (orientation: portrait) {
  .dm-inner { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; justify-items: center; text-align: center; }
  .dm-cover { width: min(80vw, 56dvh); }
  .dm-info { height: auto; gap: 22px; width: min(92vw, 720px); }
  .dm-time { order: -1; }
  .dm-weather { justify-content: center; }
  .dmw-now { justify-content: center; }
}
/* Sehr schmale Handys: kein Platz für den Display-Button in der Kopfzeile */
@media (max-width: 430px) { body.view-mobile #btnDisplay { display: none; } }

/* ---------------------------------------------------------------- Live-TV */
.tv-player { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.tv-player > div { width: 100%; height: 100%; }
body.tv-mode .cover-wrap { aspect-ratio: auto; }
body.tv-mode .cover { display: none; }
body.view-mobile.tv-mode .cover-wrap { width: min(94vw, 640px); }
body.view-full.tv-mode .now-playing {
  --tv-w: min(calc(100vw - var(--side) - var(--meta-w) - 56px - 28px), 1100px);
  grid-template-columns: var(--tv-w) var(--meta-w);
}
body.view-full.tv-mode .cover-wrap { width: var(--tv-w); height: auto; aspect-ratio: auto; }
@media (max-width: 1060px) {
  body.view-full.tv-mode .now-playing { --tv-w: min(calc(100vw - var(--side) - 56px), 900px); grid-template-columns: var(--tv-w); }
}
body.view-full.tv-mode .meta { min-height: 0; }
body.tv-mode .volume, body.tv-mode #btnSpeakers { display: none; }
/* Display-Modus mit Live-TV: Cover-Fläche frei lassen, der Player liegt darüber */
body.dm-tv .dm-cover { visibility: hidden; }
body.dm-tv .tv-player { border-radius: 1.4rem; box-shadow: 0 30px 90px rgba(0,0,0,.6); }

/* ---------------------------------------------------- Kopfzeilen-Buttons */
.tb-btn {
  height: 42px; min-width: 42px; padding: 0 11px; border-radius: 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--panel-soft); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: border-color .2s, box-shadow .2s, color .2s, transform .15s;
}
.tb-btn .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tb-btn:hover { border-color: var(--accent); color: var(--accent); }
.tb-btn:active { transform: scale(.96); }
.tb-wide { padding: 0 14px 0 12px; }
.tb-coffee { color: var(--neon-cyan, var(--accent)); }
[data-theme="dark"] .tb-btn:hover { box-shadow: 0 0 16px rgba(255, 61, 242, .35); }
[data-theme="light"] .tb-coffee { color: var(--accent); }
body.view-mobile .tb-btn { height: 36px; min-width: 36px; padding: 0 8px; }
body.view-mobile .tb-btn .ico { width: 18px; height: 18px; }
body.view-mobile #btnView .txt { display: none; }

/* ------------------------------------------------- Neon Night (Dunkel) */
[data-theme="dark"] body {
  background:
    radial-gradient(900px 500px at 75% 20%, rgba(255, 61, 242, .2), transparent 60%),
    radial-gradient(800px 600px at 20% 90%, rgba(0, 229, 255, .14), transparent 60%),
    #05030a fixed;
}
[data-theme="dark"] .cover {
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255, 61, 242, .5), 0 0 60px rgba(255, 61, 242, .4), 0 0 140px rgba(0, 229, 255, .22);
}
[data-theme="dark"] .track-title {
  font-weight: 900; text-transform: uppercase; letter-spacing: .01em;
  background: linear-gradient(90deg, #fff, #ff9df7 60%, #7ef3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="dark"] .station-name { color: var(--neon-cyan); text-shadow: 0 0 12px rgba(126, 243, 255, .6); }
[data-theme="dark"] .play-btn { box-shadow: 0 0 30px rgba(255, 61, 242, .65); }
[data-theme="dark"] .provider.active { box-shadow: 0 0 18px rgba(255, 61, 242, .5); }
[data-theme="dark"] .station.active { outline-color: var(--accent); box-shadow: inset 3px 0 0 var(--neon-cyan); }
[data-theme="dark"] .clock { color: var(--neon-cyan); text-shadow: 0 0 14px rgba(126, 243, 255, .55); }
[data-theme="dark"] .np-card, [data-theme="dark"] .weather { border-color: rgba(126, 243, 255, .16); }
[data-theme="dark"] .tv-player { box-shadow: 0 0 0 1px rgba(255, 61, 242, .45), 0 0 60px rgba(255, 61, 242, .35); }

/* Display-Modus im Neon-Stil */
.dm-station { color: #7ef3ff; text-shadow: 0 0 12px rgba(126, 243, 255, .6); }
.dm-controls .dm-play { background: linear-gradient(135deg, #ff3df2, #7a5cff); color: #fff; box-shadow: 0 0 26px rgba(255, 61, 242, .6); }
.dm-cover { box-shadow: 0 0 0 1px rgba(255, 61, 242, .45), 0 0 70px rgba(255, 61, 242, .35), 0 30px 90px rgba(0, 0, 0, .6); }

/* Uhrzeit und Datum nebeneinander (Vollansicht) */
body.view-full .datetime { display: flex; align-items: baseline; gap: 12px; text-align: left; }
body.view-full .datetime .date { font-size: 14px; }
