/* =========================================================
   YoRadio – Global Styles
   ========================================================= */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
    sans-serif;
  background: #fafafa;
  color: #222;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  padding: 16px;
  max-width: 900px;
  margin: auto;
}

/* =========================================================
   Header & Navigation
   ========================================================= */

.site-header {
  background: white;
  border-bottom: 1px solid #ddd;
  padding: 8px 0;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: auto;
  padding: 0 16px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  font-size: 32px;
  margin-right: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-weight: 700;
  font-size: 20px;
}

.brand-subtitle {
  font-size: 13px;
  color: #666;
}

.nav-links {
  display: flex;
  gap: 16px;
}

.nav-link {
  font-size: 15px;
  padding: 6px 4px;
}

.nav-link.active {
  border-bottom: 2px solid #0077ff;
}

/* Mobile Menu Button (hidden on desktop) */
.nav-toggle {
  display: none;
}

/* =========================================================
   Sections
   ========================================================= */

.section {
  margin-top: 24px;
}

.section-header {
  margin-bottom: 16px;
}

.section-title.small {
  font-size: 22px;
  margin: 0;
}

.section-lead.small {
  font-size: 14px;
  color: #555;
}

/* =========================================================
   Podcast-Liste (radio.php)
   ========================================================= */

.podcast-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.podcast-group {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e2e2;
  padding: 10px 10px 6px;
}

.podcast-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.episode-row {
  border-top: 1px solid #f0f0f0;
  padding: 4px 0 6px;
}

.episode-row:first-of-type {
  border-top: none;
}

/* obere Zeile: Play + Titel */
.episode-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.episode-text {
  display: flex;
  flex-direction: column;
}

.episode-title {
  font-size: 14px;
  line-height: 1.3;
}

/* untere Zeile: Zeit + Progress + Download */
.episode-controls {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  font-size: 12px;
}

/* =========================================================
   Play/Pause Button
   ========================================================= */

.episode-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  color: #0077ff;
  transition: transform 0.1s ease, color 0.1s ease;
}

.episode-play-btn:hover {
  color: #0055cc;
}

.episode-play-btn:active {
  transform: scale(0.92);
}

/* =========================================================
   Time Display
   ========================================================= */

.episode-time {
  display: inline-block;
  width: 46px;
  text-align: right;
  color: #555;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* =========================================================
   Fortschrittsbalken
   ========================================================= */

.episode-progress {
  width: 120px;
  vertical-align: middle;
  box-sizing: border-box;
}

.episode-progress::-webkit-slider-thumb {
  cursor: pointer;
}

.episode-progress::-moz-range-thumb {
  cursor: pointer;
}

/* =========================================================
   Download Button
   ========================================================= */

.episode-download {
  display: inline-block;
  font-size: 18px;
  text-decoration: none;
  color: #444;
  text-align: center;
  width: 20px;
}

.episode-download:hover {
  color: #0077ff;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  margin-top: 40px;
  background: #f5f5f5;
  padding: 20px 0;
  border-top: 1px solid #ddd;
  font-size: 14px;
}

.footer-inner {
  max-width: 1100px;
  margin: auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.footer-link {
  color: #444;
}

/* =========================================================
   Desktop-Optimierung (Notebook & größer)
   ========================================================= */

@media (min-width: 800px) {

  .podcast-group {
    padding: 10px 12px 8px;
  }

  .episode-list {
    gap: 0;
  }

  /* Jede Episode in EINER Zeile: links Titel, rechts Controls */
  .episode-row {
    padding: 2px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .episode-main {
    flex: 1 1 auto;
  }

  .episode-controls {
    margin-top: 0;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
  }

  .episode-progress {
    width: 150px;
  }
}

/* =========================================================
   Mobile-Optimierung (Handy)
   ========================================================= */

@media (max-width: 700px) {
  .container {
    padding: 10px;
  }

  /* Navigation darf umbrechen und kleiner werden */
  .navbar {
    flex-wrap: wrap;
    gap: 4px;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 10px;
  }

  .nav-link {
    font-size: 13px;
    padding: 4px 2px;
  }

  .podcast-group {
    padding: 8px 8px 4px;
  }

  .podcast-title {
    font-size: 15px;
  }

  .episode-title {
    font-size: 13px;
  }

  .episode-progress {
    width: 100%;
    max-width: 160px;
  }
}
