/* --- Global & Base Styles --- */
:root {
  --chive-green: #4c7e4e;
  --fresh-sprout: #8dba8f;
  --deep-forest: #2d442e;
  --earthy-grey: #5c635c;

  --chive-white: #f8faf8;
  --dark-chive: #1a1c1a;

  --chive-primary: #386b3b;
  --chive-on-primary: #ffffff;
  --chive-primary-container: #b9f1b6;
  --chive-on-primary-container: #002204;

  --sage-secondary: #53634f;
  --sage-on-secondary: #ffffff;
  --sage-secondary-container: #d6e8ce;
  --sage-on-secondary-container: #111f0f;

  --earth-tertiary: #386567;
  --earth-on-tertiary: #ffffff;
  --earth-tertiary-container: #bcebeb;

  --chive-grey: #747972;
  --chive-outline: #747972;
  --chive-surface: #f8faf7;
  --chive-on-surface: #191d19;

  --chive-primary-dark: #9ed49c;
  --chive-on-primary-dark: #04390e;
  --chive-surface-dark: #111411;
  --chive-on-surface-dark: #e1e3de;

  --episode-1: #4c7e4e;
  --episode-2: #8dba8f;
  --episode-3: #2d442e;
  --episode-4: #5c635c;
  --episode-5: #b9f1b6;
  --episode-6: #53634f;
  --episode-7: #d6e8ce;
  --episode-8: #bcebeb;
  --episode-9: #9ed49c;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  padding-top: 9000px;
  font-family: Arial, sans-serif;
  background: var(--chive-surface);
  padding-top: 20px;
  margin: 0;
  color: var(--chive-on-surface);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: darkgreen;
  text-decoration: underline;
  
}
p a {
background-color: white;
}
h1 {
  text-align: center;
  margin-bottom: 30px;
}
.hidden {
  display: none !important;
}

#sticky-audio-player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background-color: var(--chive-primary-container);
  padding: 10px 0;
  box-shadow: 0 -2px 5px rgba(26, 28, 26, 0.2);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}
#sticky-audio {
  width: 90%;
  max-width: 100vw;
}

.main-header-block,
.episode {
  width: 95%;
  overflow: auto;
  font-size: small;
  background: var(--chive-white);
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  width: 800px;
  max-width: 90%;
  box-shadow: 0 2px 6px rgba(26, 28, 26, 0.12);
}
.main-header-block {
  text-align: center;
  padding: 40px 20px;
  box-shadow: 0 8px 30px rgba(26, 28, 26, 0.14);
  margin-top: 90px !important;
}
.podcast-title {
  color: var(--deep-forest);
  font-size: 2.5em;
  font-weight: 300;
}
.cover-image {
  width: 200px;
  max-width: 95%;
  height: 200px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.podcast-link a {
  text-decoration: none;
  font-weight: 600;
}
.podcast-description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--earthy-grey);
  line-height: 1.7;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: auto;
  background: rgba(45, 68, 46, 0.9);
  border-radius: 12px;
  margin: 15px auto;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  box-shadow: 0 6px 20px rgba(17, 31, 15, 0.5);
  border: 1px solid rgba(185, 241, 182, 0.2);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.navbar a {
  color: var(--chive-on-primary);
  padding: 10px 14px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  background-color: var(--chive-on-surface) !important;
}
.navbar a:hover,
.navbar a:focus {
  background: rgba(185, 241, 182, 0.22);
  color: var(--chive-on-primary);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(17, 31, 15, 0.35);
}
.search-container {
  flex-grow: 1;
  margin: 0 20px;
  position: relative;
  width: 320px;
  max-width: 100%;
}
.search-container input {
  width: auto;
  padding: 12px 15px 12px 42px;
  border-radius: 8px;
  border: 1px solid rgba(158, 212, 156, 0.35);
  background: rgba(17, 20, 17, 0.2);
  color: var(--chive-on-primary);
  transition: border 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  font-size: 1rem;
}
.search-container::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--chive-primary-dark);
  pointer-events: none;
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--chive-on-primary);
  line-height: 1;
}

.nav-links {
  display: flex;
  flex-grow: 1;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
}

@media (max-width: 700px) {
  .navbar {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(45, 68, 46, 0.98);
    border-radius: 0 0 12px 12px;
    padding: 20px 0;
    box-shadow: 0 6px 20px rgba(17, 31, 15, 0.5);
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links a,
  .search-container {
    width: 90%;
    text-align: center;
    margin: 10px auto;
  }
  .menu-toggle {
    display: block;
  }
  .search-container {
    max-width: 100%;
  }
}

.audio-player {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background-color: var(--sage-secondary-container);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(17, 31, 15, 0.18);
  max-width: 400px;
  margin: 20px auto;
}
.audio-player button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-family: Arial, sans-serif;
  color: var(--chive-on-primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  min-width: 120px;
}
.audio-player button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.audio-player button:first-child {
  background-color: var(--chive-primary);
}
.audio-player button:first-child:hover {
  background-color: var(--chive-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(17, 31, 15, 0.3);
}
.audio-player button:first-child:active {
  background-color: var(--deep-forest);
  transform: translateY(0);
  box-shadow: none;
}
.audio-player button:last-child {
  background-color: var(--earth-tertiary);
}
.audio-player button:last-child:hover {
  background-color: var(--sage-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(17, 31, 15, 0.3);
}
.audio-player button:last-child:active {
  background-color: var(--chive-on-primary-dark);
  transform: translateY(0);
  box-shadow: none;
}

.episode:nth-of-type(9n + 1) { background: var(--episode-1); color: var(--chive-on-primary); }
.episode:nth-of-type(9n + 2) { background: var(--episode-2); color: var(--chive-on-surface); }
.episode:nth-of-type(9n + 3) { background: var(--episode-3); color: var(--chive-on-primary); }
.episode:nth-of-type(9n + 4) { background: var(--episode-4); color: var(--chive-on-primary); }
.episode:nth-of-type(9n + 5) { background: var(--episode-5); color: var(--chive-on-primary-container); }
.episode:nth-of-type(9n + 6) { background: var(--episode-6); color: var(--chive-on-primary); }
.episode:nth-of-type(9n + 7) { background: var(--episode-7); color: var(--sage-on-secondary-container); }
.episode:nth-of-type(9n + 8) { background: var(--episode-8); color: var(--sage-on-secondary-container); }
.episode:nth-of-type(9n + 9) { background: var(--episode-9); color: var(--chive-on-primary-dark); }

#downloadButton {
  background: linear-gradient(135deg, var(--chive-green), var(--chive-primary));
  color: var(--chive-on-primary);
  font-size: 1.1em;
  font-weight: 600;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(17, 31, 15, 0.22);
  transition: all 0.3s ease;
}

#downloadButton:hover {
  background: linear-gradient(135deg, var(--fresh-sprout), var(--chive-green));
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(17, 31, 15, 0.3);
}

#downloadButton:disabled {
  background: var(--chive-grey);
  color: var(--chive-on-surface-dark);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cover-image {
  max-width: 85%;
  width: 200px;
  height: 200px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.ep-image {
  max-width: 85%;
  width: 150px;
  height: 150px;
  border-radius: 10px;
  margin-bottom: 20px;
  center: center;
  text-align: center;
}
.law {
  background: var(--chive-white);
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  max-width: 800px;
  box-shadow: 0 2px 6px rgba(26, 28, 26, 0.12);
}
