/* Spotify/Apple Music inspired styles */
.podcast-player {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 30px 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 0 auto 30px;
  text-align: center;
}

/* Centered artwork */
.podcast-artwork {
  width: 240px;
  height: 240px;
  margin: 0 auto 25px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.podcast-artwork img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

/* Podcast info */
.podcast-info {
  margin-bottom: 25px;
}

.podcast-title {
  font-size: 24px;
  margin-bottom: 8px;
  font-weight: 700;
}

.podcast-category {
  color: #666;
  margin-bottom: 12px;
  font-size: 16px;
}

.podcast-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: #777;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Action buttons */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
}

.favorite-btn,
.download-btn {
  background: #f0f0f0;
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.favorite-btn:hover,
.download-btn:hover {
  background: #e0e0e0;
}

.favorite-btn.active {
  background: #ff5e3a;
  color: white;
}

.favorite-btn.active svg {
  fill: white;
  stroke: white;
}

.download-btn {
  background: #e8f5e9;
  color: #2e7d32;
}

.download-btn:hover {
  background: #c8e6c9;
}

/* Audio player */
.audio-player-container {
  margin-bottom: 25px;
}

#audio-player {
  display: none; /* Hide default controls */
}

/* Progress bar */
.progress-container {
  margin-bottom: 15px;
}

/* LTR styles */
html[lang="en_US"] .progress-bar {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  position: relative;
  margin-bottom: 5px;
  cursor: pointer;
  direction: ltr;
  transition: height 0.2s ease;
}

html[lang="en_US"] .progress-bar:hover,
html[lang="en_US"] .progress-bar.dragging {
  height: 8px;
}

html[lang="en_US"] .progress {
  height: 100%;
  background: #ffcc08cc;
  border-radius: 2px;
  width: 0%;
  position: absolute;
  left: 0;
  transition: width 0.1s linear;
}

/* RTL styles */
html[lang="ar"] .progress-bar {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  position: relative;
  margin-bottom: 5px;
  cursor: pointer;
  direction: rtl;
  transition: height 0.2s ease;
}

html[lang="ar"] .progress-bar:hover,
html[lang="ar"] .progress-bar.dragging {
  height: 8px;
}

html[lang="ar"] .progress {
  height: 100%;
  background: #ffcc08cc;
  border-radius: 2px;
  width: 0%;
  position: absolute;
  right: 0;
  transition: width 0.1s linear;
}

/* Add a hover effect to show it's interactive */
.progress-bar:hover .progress::after,
.progress-bar.dragging .progress::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #ffcc08cc;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

/* Time display should also respect direction */
html[lang="ar"] .time-display {
  direction: rtl;
}

html[lang="en_US"] .time-display {
  direction: ltr;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

/* Player controls */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.player-button {
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  padding: 8px;
}

.play-button {
  background: #ffcc08cc;
  border: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  box-shadow: 0 4px 8px rgba(255, 94, 58, 0.3);
}

.volume-control {
  width: 80px;
}

#volume {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  cursor: pointer;
}

#volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #555;
  cursor: pointer;
}

/* Podcast description */
.podcast-description {
  text-align: left;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-top: 25px;
}

.podcast-description h3 {
  margin-bottom: 10px;
  font-size: 18px;
  color: #333;
}

/* Related podcasts section */
.related-podcasts {
  margin-top: 40px;
  width: 80%; /* Reduced to 80% of container width */
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  margin-bottom: 20px;
  font-size: 22px;
  text-align: center;
  color: #fff;
  padding: 0 30px;
}

.podcasts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: auto;
}

.podcast-card {
  flex: 0 0 calc(25% - 1.5rem); /* 4 cards per row */
  background: #2a374a;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
  position: relative;
}

.podcast-card:hover {
  transform: translateY(-5px);
}

.podcast-card .podcast-image {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
}

.podcast-card .podcast-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podcast-card .favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.podcast-card .podcast-content {
  padding: 1rem;
}

.podcast-card .podcast-title {
  color: white;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  height: auto;
  text-decoration: none; /* Ensure no text decoration */
}

.podcast-card .podcast-duration {
  color: #a0aec0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .podcast-card {
    flex: 0 0 calc(33.333% - 1.334rem); /* 3 cards per row */
  }
}

@media (max-width: 768px) {
  .podcast-card {
    flex: 0 0 calc(50% - 1rem); /* 2 cards per row */
  }
}

@media (max-width: 480px) {
  .podcast-card {
    flex: 0 0 100%; /* 1 card per row */
    max-width: 300px;
    margin: 0 auto;
  }

  .podcasts-grid {
    padding: 1rem;
    gap: 1.5rem;
  }
}

.container {
  background-color: #11171e;
}

/* Play button hover effect */
.play-button-hov {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -70%);
  background-color: #ffcc08cc;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.podcast-card:hover .play-button-hov {
  opacity: 1;
}

/* Ensure the podcast image container has position relative */
.podcast-card .podcast-image {
  position: relative;
  width: 100%;
  padding-top: 100%;
}

/* Responsive styles for podcast player */
@media (max-width: 768px) {
  .podcast-player {
    padding: 20px 15px;
    margin: 0 15px 30px;
  }

  .podcast-artwork {
    width: 180px;
    height: 180px;
  }

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

  .podcast-meta {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .favorite-btn,
  .download-btn {
    width: 100%;
    justify-content: center;
  }

  .player-controls {
    flex-wrap: wrap;
    gap: 15px;
  }

  .volume-control {
    width: 100%;
    order: 3;
  }

  .play-button {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  .podcast-artwork {
    width: 140px;
    height: 140px;
  }

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

  .podcast-category {
    font-size: 14px;
  }

  .podcast-description {
    padding: 15px;
  }

  .podcast-description h3 {
    font-size: 16px;
  }

  .time-display {
    font-size: 11px;
  }

  .player-button svg {
    width: 20px;
    height: 20px;
  }

  .play-button {
    width: 48px;
    height: 48px;
  }

  .play-button svg {
    width: 32px;
    height: 32px;
  }
}

/* Make the container responsive */
.container {
  padding: 15px;
  max-width: 100%;
  box-sizing: border-box;
}

/* Adjust related podcasts section for mobile */
@media (max-width: 768px) {
  .related-podcasts {
    width: 95%;
  }

  .section-title {
    font-size: 20px;
    padding: 0 15px;
  }

  .podcasts-grid {
    padding: 1rem;
    gap: 1rem;
  }
}
