/* Force stacked, full-width episode layout */
#pennod-list {
  display: block !important;
}

#pennod-list li.pennod-card {
  display: block !important;
  width: 100% !important;
  margin-bottom: 24px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  box-sizing: border-box;
}

/* Updated episode art to 200x200px */
.pennod-card .episode-art {
  float: left;
  width: 200px !important;
  height: 200px !important;
  margin-right: 20px;
}

.pennod-card .episode-art img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* keeps aspect ratio, crops nicely */
  border-radius: 10px;
  display: block;
}

/* Text and buttons stay aligned next to the image */
.pennod-card .episode-info {
  overflow: hidden;
  min-height: 200px; /* matches image height */
}

.pennod-card h3 {
  margin: 0 0 6px 0;
  font-size: 1.15rem;
}

.pennod-card .date {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 6px;
}

.pennod-card .snippet,
.pennod-card .full-desc {
  font-size: 0.95rem;
  line-height: 1.5;
}

.pennod-card .episode-actions {
  margin-top: 10px;
}

.pennod-card .btn {
  background: #1db954;
  color: white;
  border: none;
  padding: 6px 10px;
  margin-right: 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
}

.pennod-card .btn:hover {
  background: #17a74a;
}

/* Clear floats so cards stack properly */
#pennod-list::after {
  content: "";
  display: table;
  clear: both;
}

/* Optional: responsive behavior for small screens */
@media (max-width: 600px) {
  .pennod-card .episode-art {
    float: none;
    width: 100% !important;
    height: auto !important;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .pennod-card .episode-info {
    min-height: auto;
  }
}

.card { background:white; border-radius:10px; padding:16px; box-shadow:0 1px 4px rgba(0,0,0,0.08); margin-bottom:16px; }


/* ---------- PODCAST HEADER ---------- */
#podcast-header { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 12px; }
#podcast-image { width: 200px; height: 200px; object-fit: cover; border-radius: 12px; background: #eee; }
#podcast-meta h1 { margin: 0 0 8px 0; font-size: 24px; }
#podcast-meta p { margin: 0; color: #666; }
#add-fav-btn { margin-top: 10px; padding: 8px 12px; background: #0077cc; color: #ffffff; border: none; border-radius: 6px; cursor: pointer; }
#add-fav-btn.active { background: #28a745; }

/* ---------- GLOBAL PLAYER ---------- */
#player-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0; }
#player-controls audio { flex: 1; width: 100%; max-width: 100%; }
#player-controls button { padding: 6px 12px; border-radius: 6px; border: none; cursor: pointer; background: #0077cc; color: #fff; font-size: 13px; }
#player-controls input[type=number] { width: 60px; padding: 4px 6px; border-radius: 4px; border: 1px solid #ccc; }

/* ---------- EPISODES ---------- */
#episode-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.episode-card { display: flex; gap: 14px; align-items: flex-start; border: 1px solid #eee; border-radius: 10px; padding: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.episode-card.playing { border-color: #0077cc; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.episode-art { width: 120px; height: 120px; flex: 0 0 120px; border-radius: 8px; overflow: hidden; background: #f3f3f3; cursor: pointer; }
.episode-art img { width: 100%; height: 100%; object-fit: cover; }
.episode-info { flex: 1; }
.episode-info h3 { margin: 0 0 6px 0; font-size: 16px; }
.episode-info .date { color: #666; font-size: 13px; margin-bottom: 8px; }
.episode-info .snippet { color: #333; font-size: 14px; margin-bottom: 8px; }
.episode-info .full-desc { display: none; margin-top: 8px; color: #222; font-size: 14px; }
.episode-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn { padding: 6px 10px; border-radius: 6px; border: none; cursor: pointer; font-size: 13px; }
.btn.play { background: #0077cc; color: #fff; }
.btn.more { background: #eee; color: #333; }
.btn.download { background: #28a745; color: #fff; text-decoration: none; line-height: 1.6; }

/* ---------- RESPONSIVE ---------- */
@media(max-width:640px){
  #podcast-header{flex-direction: column; align-items: center; text-align: center;}
  #podcast-image{width: 75%;height: 75%;}
  .episode-card{flex-direction: column;}
  .episode-art{width: 100%;height: 220px;}
  #player-controls { flex-direction: column; align-items: stretch; gap: 8px; }
}


  /* --- ADVANCED PLAYER --- */
  #player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #181818;
    color: #fff;
    display: none; /* 🔹 hidden on load */
    opacity: 0;
    align-items: center;
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: opacity 0.4s ease-in-out;
  }
  #player-container.show {
    display: flex;
    opacity: 1;
  }
  #player-art img { width: 64px; height: 64px; border-radius: 8px; }
  #player-details {
    flex: 1;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  #player-title { font-size: 1rem; margin: 0; }
  #player-progress { display: flex; align-items: center; gap: 6px; }
  #seek-bar { flex: 1; }
  #player-buttons button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px 8px;
  }
  #player-buttons button:hover { color: #1db954; }
  #player-settings { font-size: 0.85em; }

  /* --- RESUME BANNER --- */
  #resume-banner {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    font-size: 0.9rem;
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }
  #resume-banner.show { opacity: 1; }
  #resume-banner button {
    background: none;
    border: none;
    color: #1db954;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
  }
  #resume-banner button#dismiss-btn { color: #aaa; }
  #resume-banner button:hover { text-decoration: underline; }