<style>
/* Container */
.podcast-audio-player-container {
  width: 100%;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  transform: translateY(100%);
}

.podcast-audio-player-container.active {
  opacity: 1;
  max-height: 200px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: white;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(0);
  transition: opacity 0.4s ease, max-height 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Player shows normally on mobile when active (after "Listen in Browser" chosen) */
@media (max-width: 768px) {
  /* Player works normally on mobile */
}
  }
}

.podcast-audio-player {
  background: white;
  border-top: 1px solid #E5E7EB;
}

/* Main Content Grid */
.podcast-player-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 12px 32px 8px 32px;
}

/* Left Section - Episode Info */
.podcast-player-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.podcast-mini-artwork {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #00416E, #0067A6);
}

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

.podcast-mini-info {
  min-width: 0;
  flex: 1;
}

.podcast-mini-title {
  font-family: 'Raleway', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1F2937;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.podcast-mini-meta {
  font-family: 'Raleway', sans-serif;
  font-size: 0.8125rem;
  color: #6B7280;
  margin: 0;
  line-height: 1.3;
}

.podcast-mini-favorite {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #9CA3AF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.podcast-mini-favorite:hover {
  background: #F3F4F6;
  color: #E31E24;
}

/* Center Section - Playback Controls */
.podcast-player-center {
  display: flex;
  align-items: center;
  gap: 4px;
}

.podcast-mini-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #6B7280;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.podcast-mini-btn:hover {
  background: #F3F4F6;
  color: #1F2937;
}

.podcast-play-btn {
  width: 48px;
  height: 48px;
  border: none;
  background: #00416E;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 4px;
}

.podcast-play-btn:hover {
  background: #003557;
  transform: scale(1.05);
}

/* Right Section - Time & Volume */
.podcast-player-right {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.podcast-time {
  font-family: 'Raleway', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6B7280;
  white-space: nowrap;
}

.podcast-volume-slider-wrapper {
  width: 80px;
}

.podcast-volume-slider-wrapper input[type="range"] {
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: #E5E7EB;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.podcast-volume-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00416E;
  cursor: pointer;
}

.podcast-volume-slider-wrapper input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00416E;
  border: none;
  cursor: pointer;
}

.podcast-speed-text {
  font-family: 'Raleway', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6B7280;
}

/* Queue Button Badge */
.podcast-queue-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #E31E24;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 2px 5px;
  min-width: 16px;
  text-align: center;
  display: none;
}

.podcast-queue-count.visible {
  display: block;
}

#podcastQueueBtn {
  position: relative;
}

/* Queue Panel */
/* Queue Backdrop */
.podcast-queue-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.podcast-queue-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

/* Queue Panel */
.podcast-queue-panel {
  position: fixed;
  bottom: -100vh;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 500px;
  height: calc(100vh - 120px);
  margin: 0 auto;
  background: white;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-radius: 16px 16px 0 0;
}

.podcast-queue-panel.open {
  bottom: 88px;
}

.podcast-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #E5E7EB;
}

.podcast-queue-header h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1F2937;
  margin: 0;
}

.podcast-queue-close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #6B7280;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.podcast-queue-close:hover {
  background: #F3F4F6;
  color: #1F2937;
}

.podcast-queue-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
  flex: 1;
}

.podcast-queue-empty svg {
  margin-bottom: 16px;
}

.podcast-queue-empty p {
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #1F2937;
  margin: 0 0 8px 0;
}

.podcast-queue-empty span {
  font-family: 'Raleway', sans-serif;
  font-size: 0.875rem;
  color: #6B7280;
}

.podcast-queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.podcast-queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

.podcast-queue-item:hover {
  background: #F9FAFB;
}

.podcast-queue-item.playing {
  background: #EEF2FF;
}

.podcast-queue-item-artwork {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #00416E, #0067A6);
}

.podcast-queue-item-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podcast-queue-item-info {
  flex: 1;
  min-width: 0;
}

.podcast-queue-item-title {
  font-family: 'Raleway', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1F2937;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podcast-queue-item-meta {
  font-family: 'Raleway', sans-serif;
  font-size: 0.8125rem;
  color: #6B7280;
  margin: 0;
}

.podcast-queue-item-remove {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #9CA3AF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  opacity: 0;
}

.podcast-queue-item:hover .podcast-queue-item-remove {
  opacity: 1;
}

.podcast-queue-item-remove:hover {
  background: #FEE2E2;
  color: #DC2626;
}

.podcast-queue-item-playing {
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  color: #00416E;
}

.podcast-queue-item.playing .podcast-queue-item-playing {
  display: flex;
}

.podcast-queue-item.playing .podcast-queue-item-remove {
  display: none;
}

/* Platform Selector Modal */
.podcast-platform-modal {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  z-index: 10001;
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0s 0.4s;
  display: none; /* Hidden by default on desktop */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.podcast-platform-modal.open {
  bottom: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0s;
}

/* Only enable platform modal on mobile */
@media (max-width: 768px) {
  .podcast-platform-modal {
    display: block;
  }
}

.podcast-platform-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.podcast-platform-modal.open .podcast-platform-overlay {
  opacity: 1;
  pointer-events: all;
}

.podcast-platform-content {
  position: relative;
  background: linear-gradient(180deg, #1a2332 0%, #0f1419 100%);
  border-radius: 24px 24px 0 0;
  padding: 16px 24px 24px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
}

.podcast-platform-handle {
  width: 48px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  margin: 8px auto 24px;
  cursor: grab;
  touch-action: none;
}

.podcast-platform-handle:active {
  cursor: grabbing;
}

.podcast-platform-title {
  font-family: 'Raleway', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-align: center;
  margin: 0 0 8px 0;
}

.podcast-platform-subtitle {
  font-family: 'Raleway', sans-serif;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin: 0 0 32px 0;
}

.podcast-platform-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.podcast-platform-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #2a3c52;
  border: none;
  border-radius: 16px;
  color: white;
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.podcast-platform-option:hover {
  background: #354b68;
  transform: translateX(4px);
}

.podcast-platform-option:active {
  transform: translateX(2px);
}

.podcast-platform-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spotify-icon {
  background: #1DB954;
}

.apple-icon {
  background: linear-gradient(135deg, #FA243C 0%, #FF6B7A 100%);
}

.youtube-icon {
  background: #FFFFFF;
}

.google-icon {
  background: #FFFFFF;
}

.browser-icon {
  background: #E31E24;
}

.podcast-platform-browser {
  background: #C41A1E;
}

.podcast-platform-browser:hover {
  background: #A01519;
}

.podcast-platform-cancel {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.podcast-platform-cancel:hover {
  color: white;
}

/* Hide Listen On button on desktop, show on mobile */
.podcast-listen-on-btn {
  display: none;
}

/* Close button - mobile only */
.podcast-close-btn {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #6B7280;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.podcast-close-btn:hover {
  background: #FEE2E2;
  color: #DC2626;
}

@media (max-width: 768px) {
  .podcast-listen-on-btn {
    display: flex;
  }
  
  .podcast-close-btn {
    display: flex;
  }
  
  .podcast-queue-panel {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
  }
  
  .podcast-queue-panel.open {
    bottom: 88px;
  }
}

/* Progress Bar */
.podcast-progress-wrapper {
  padding: 0 32px 12px 32px;
}

.podcast-progress-wrapper input[type="range"] {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #00416E 0%, #00416E var(--progress, 0%), #E5E7EB var(--progress, 0%), #E5E7EB 100%);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.podcast-progress-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00416E;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.podcast-progress-wrapper input[type="range"]:hover::-webkit-slider-thumb {
  opacity: 1;
}

.podcast-progress-wrapper input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00416E;
  border: none;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
  .podcast-player-content {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 24px 8px 24px;
  }
  
  .podcast-player-center {
    order: -1;
    justify-content: center;
  }
  
  .podcast-player-right {
    justify-content: center;
  }
  
  .podcast-volume-slider-wrapper {
    display: none;
  }
}

@media (max-width: 768px) {
  .podcast-player-content {
    padding: 12px 16px 8px 16px;
  }
  
  .podcast-progress-wrapper {
    padding: 0 16px 12px 16px;
  }
  
  .podcast-mini-artwork {
    width: 50px;
    height: 50px;
  }
  
  .podcast-mini-title {
    font-size: 0.875rem;
  }
  
  .podcast-mini-meta {
    font-size: 0.75rem;
  }
  
  .podcast-time {
    font-size: 0.75rem;
  }
}

/* Animations for notification */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes slideDown {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
}
</style>