:root {
  --bg-dark: #0b132b;
  --glass-bg: rgba(15, 23, 42, 0.68);
  --glass-border: rgba(255, 255, 255, 0.16);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --online: #22c55e;
  --offline: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(180deg, rgba(11, 19, 43, 0.62) 0%, rgba(11, 19, 43, 0.85) 100%),
    url("img/hintergrund.jpeg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  flex: 1;
}

/* Glassmorphism Karten */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.6rem 1.85rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.sticky-top {
  padding-bottom: 1.45rem;
}

/* Header & Navigation */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.brand h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.top-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.42rem 0.78rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.top-nav a:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.top-nav a.active {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--offline);
  box-shadow: 0 0 8px var(--offline);
}

.status-dot.online {
  background: var(--online);
  box-shadow: 0 0 10px var(--online);
}

/* Webradio Player */
.player-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
}

.play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.play-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.04);
}

.play-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.now-playing-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.track-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.track-artist {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-top: 0.85rem;
}

.volume-box {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.volume-box input[type="range"] {
  accent-color: var(--accent);
  cursor: pointer;
  width: 115px;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

/* Hauptbereich & SPA Übergang */
main#pageContent {
  transition: opacity 0.18s ease;
}

main#pageContent.loading {
  opacity: 0.55;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.card-text {
  font-size: 0.94rem;
  color: var(--text-muted);
}

/* News-Bereich */
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.news-item {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.09);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.news-item:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(15, 23, 42, 0.68);
}

.news-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.news-item h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.news-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

/* Zwei-Spalten-Layout */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}

.two-col > .glass-card {
  margin-bottom: 0;
}

/* Zuletzt gespielt Liste */
.playlist-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.playlist-list li {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.9rem;
}

.playlist-list li strong {
  color: var(--text-main);
  font-weight: 600;
}

.playlist-list li span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Buttons & Links */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 11px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-link:hover {
  background: var(--accent);
  color: #0f172a;
}

.stream-hint {
  margin-top: 1.15rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.stream-hint code {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
  font-size: 0.82rem;
  word-break: break-all;
}

/* Unterseiten (News-Artikel, Sendeplan, Impressum, Datenschutz) */
.legal-content h1 {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.legal-content h2 {
  font-size: 1.14rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 1.5rem;
  margin-bottom: 0.55rem;
}

.legal-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
}

.legal-content a.btn-link,
.legal-content a.news-item {
  text-decoration: none;
}

.legal-content a.news-item {
  color: inherit;
}

.legal-content a.btn-link {
  color: var(--accent);
}

.legal-content a.btn-link:hover {
  color: #0f172a;
}

/* Hinweis-Banner & Sendeplan */
.notice-banner {
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fef3c7;
  font-size: 0.92rem;
}

.notice-banner strong {
  color: #fde68a;
}

.schedule-day {
  margin-top: 1.75rem;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.65rem;
}

.schedule-row {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-items: start;
}

.schedule-row.schedule-highlight {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.38);
}

.schedule-time {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.schedule-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.schedule-head h3 {
  font-size: 1rem;
  color: var(--text-main);
  margin: 0;
}

.schedule-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.schedule-tag.tag-curated {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}

.schedule-tag.tag-live {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
}

.schedule-info p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Footer mit Glassmorphism */
footer {
  width: calc(100% - 2.5rem);
  max-width: 940px;
  margin: 0 auto 2rem;
  padding: 1.15rem 1.85rem;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer nav {
  display: flex;
  gap: 1.1rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

footer a:hover {
  color: var(--accent);
}

/* Mobile Optimierung */
@media (max-width: 768px) {
  .container {
    padding: 1rem 0.9rem 1.5rem;
  }

  .glass-card {
    padding: 1.25rem 1.2rem;
    border-radius: 16px;
  }

  .sticky-top header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .header-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .top-nav {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 0.4rem;
  }

  .top-nav a {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
  }

  .status-badge {
    align-self: center;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .news-grid {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.85rem;
  }

  .schedule-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  footer {
    width: calc(100% - 1.8rem);
    padding: 1.1rem 1.2rem;
    border-radius: 16px;
    flex-direction: column;
    text-align: center;
  }
}