
:root {
  --bidar-green: #AED369;
  --bidar-blue: #00ABE8;
  --green-dark: #547D27;
  --blue-dark: #087DA8;
  --bg: #F5F8FC;
  --surface: #FFFFFF;
  --border: #E2E9F1;
  --text: #19283A;
  --muted: #718096;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 28px 14px;
  display: grid;
  place-items: center;
  color: var(--text);
  background:
    radial-gradient(ellipse at 0 0, #AED36922, transparent 38%),
    radial-gradient(ellipse at 100% 100%, #00ABE818, transparent 40%),
    var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Arial, sans-serif;
}

button, input { font: inherit; }

.player {
  width: 100%;
  max-width: 520px;
  padding: 25px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 22px 65px #253e5914;
}

.topbar, .brand, .browser-heading, .time-row {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 10px;
}

.brand {
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #243B17;
  background: var(--bidar-green);
  font-size: 25px;
  font-weight: 900;
}

.brand-name {
  display: block;
  font-size: 13px;
  letter-spacing: 1.8px;
}

.brand-subtitle {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.podcast-tag {
  padding: 7px 10px;
  border-radius: 999px;
  background: #00ABE810;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 800;
}

.cover {
  position: relative;
  min-height: 235px;
  margin-top: 25px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #DCEBD0;
  border-radius: 18px;
  background: linear-gradient(135deg, #F5FAEB, #E9F8FE);
}

.cover-art {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.cover-art strong {
  color: var(--green-dark);
  font-size: 31px;
  letter-spacing: 7px;
}

.cover-art small {
  color: var(--blue-dark);
  font-size: 9px;
  letter-spacing: 2px;
}

.sound-bars {
  height: 67px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sound-bars i {
  width: 7px;
  height: 25px;
  border-radius: 8px;
  background: var(--bidar-blue);
}

.sound-bars i:nth-child(2),
.sound-bars i:nth-child(6) { height: 40px; }
.sound-bars i:nth-child(3),
.sound-bars i:nth-child(5) { height: 57px; }
.sound-bars i:nth-child(4) {
  height: 67px;
  background: var(--bidar-green);
}

.podcast-artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
  background: white;
}

.podcast-artwork[hidden],
.description-panel[hidden],
.episode-link[hidden] { display: none; }

.eyebrow {
  margin: 25px 0 9px;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

#episodeTitle {
  margin: 0 0 9px;
  font-size: clamp(23px, 5vw, 29px);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.episode-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.description-panel {
  margin-top: 17px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #F8FAFD;
}

.description-panel summary {
  min-height: 48px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.description-panel summary::-webkit-details-marker { display: none; }

.info-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--green-dark);
  background: #AED36940;
  font-weight: bold;
}

.chevron {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--blue-dark);
  border-bottom: 2px solid var(--blue-dark);
  transform: rotate(45deg);
  transition: transform .2s;
}

.description-panel[open] .chevron {
  transform: rotate(225deg);
}

.episode-description {
  padding: 0 15px 15px;
  color: #526476;
  font-size: 13px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  text-align: start;
}

.episode-link {
  display: inline-block;
  margin: 0 15px 15px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.audio-controls { margin-top: 26px; }

.progress {
  width: 100%;
  height: 5px;
  display: block;
  cursor: pointer;
  accent-color: var(--bidar-blue);
}

.time-row {
  justify-content: space-between;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 15px;
}

.control, .play-button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
  border: 0;
  transition: transform .15s, background .15s;
}

.control {
  width: 38px;
  height: 42px;
  border-radius: 12px;
  color: var(--blue-dark);
  background: transparent;
  font-size: 17px;
}

.control:hover { background: #00ABE812; }
.control.skip { font-size: 11px; font-weight: 800; }

.play-button {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  color: #243B17;
  background: var(--bidar-green);
  box-shadow: 0 6px 17px #AED36955;
  font-size: 24px;
}

.play-button:hover { background: #BCE27C; }
button:active { transform: scale(.96); }

.visualizer {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: .45;
}

.visualizer i {
  width: 3px;
  height: 4px;
  border-radius: 5px;
  background: var(--bidar-blue);
}

.visualizer.playing i {
  animation: equalize .55s ease-in-out infinite alternate;
}

.visualizer.playing i:nth-child(3n) { animation-delay: .2s; }
.visualizer.playing i:nth-child(2n) { animation-delay: .35s; }

@keyframes equalize {
  from { height: 3px; }
  to { height: 19px; }
}

.episode-browser {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #FBFCFE;
}

.browser-heading {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 15px;
}

.browser-heading h2 {
  margin: 0;
  font-size: 13px;
}

#episodeCount {
  color: var(--muted);
  font-size: 11px;
}

.search-label {
  display: block;
  margin: 11px 0 7px;
  color: var(--muted);
  font-size: 11px;
}

#searchInput {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #DCE5EE;
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: white;
  font-size: 12px;
}

#searchInput:focus {
  border-color: var(--bidar-blue);
  box-shadow: 0 0 0 3px #00ABE818;
}

.episode-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.episode-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  transition: border-color .2s, background .2s;
}

.episode-card:hover { border-color: var(--bidar-blue); }

.episode-card.selected {
  border-color: var(--bidar-green);
  background: #F8FBEF;
}

.episode-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px 12px;
}

.episode-card-title {
  flex: 1 1 180px;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.episode-card-date {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.episode-card-description {
  margin: 10px 0 14px;
  color: #526476;
  font-size: 12px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  text-align: start;
}

.episode-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.episode-card-button {
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: var(--bidar-green);
  color: #243B17;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.episode-card-button:hover { background: #BCE27C; }

.status-message {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.status-message.error { color: #B42338; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding-top: 17px;
  margin-top: 17px;
  border-top: 1px solid var(--border);
  color: #8A98A8;
  font-size: 9px;
  letter-spacing: .5px;
}

.footer a {
  color: var(--green-dark);
  font-weight: 850;
  text-decoration: none;
}

button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--bidar-blue);
  outline-offset: 3px;
}

@media (max-width: 400px) {
  body { padding: 12px 8px; }
  .player { padding: 17px; }
  .cover { min-height: 210px; }
  .controls { gap: 5px; }
  .control { width: 34px; }
  .play-button { width: 57px; height: 57px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
