/* === Global Podcast Player — fixed bottom bar === */
.gp {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1a1a1a;
  color: #fff;
  font-family: -apple-system, "Noto Sans TC", sans-serif;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  -webkit-user-select: none;
  user-select: none;
}
.gp--hidden {
  transform: translateY(100%);
  pointer-events: none;
}

/* Progress bar — top edge */
.gp-progress {
  height: 4px;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  position: relative;
  /* Enlarge touch target */
  padding: 8px 0;
  margin: -8px 0;
  background-clip: content-box;
}
.gp-progress-fill {
  height: 4px;
  background: #95d5b2;
  width: 0%;
  border-radius: 2px;
  pointer-events: none;
  transition: width 0.2s linear;
}

/* Body */
.gp-body {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Controls cluster */
.gp-controls {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

/* Buttons */
.gp-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  transition: color 0.15s, background 0.15s;
}
.gp-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.gp-btn--play {
  min-width: 44px;
  min-height: 44px;
  background: var(--green, #2d6a4f);
  color: #fff;
  border-radius: 50%;
}
.gp-btn--play:hover {
  background: #3a8963;
}

/* Language toggle */
.gp-btn--lang {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 32px;
  min-height: 32px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 4px;
  padding: 2px 6px;
}
.gp-btn--lang:hover {
  border-color: #95d5b2;
  color: #95d5b2;
}

/* Close */
.gp-btn--close {
  font-size: 1.2rem;
  opacity: 0.5;
}
.gp-btn--close:hover {
  opacity: 1;
}

/* Info */
.gp-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.gp-title {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.gp-title:hover {
  text-decoration: underline;
  color: #95d5b2;
}
.gp-time {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  font-variant-numeric: tabular-nums;
}

/* Right cluster */
.gp-right {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* Speed select */
.gp-speed {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  font-size: 0.75rem;
  padding: 2px 4px;
  cursor: pointer;
}
.gp-speed option {
  background: #1a1a1a;
  color: #fff;
}

/* Body padding when player visible */
body.gp-active {
  padding-bottom: 68px;
}

/* === Mobile === */
@media (max-width: 600px) {
  .gp-body {
    padding: 0.4rem 0.6rem;
    gap: 0.4rem;
  }
  .gp-title {
    font-size: 0.78rem;
  }
  .gp-speed {
    display: none; /* hide on small mobile, use lang + close only */
  }
}

/* === Resume banner (shown when user returns) === */
.gp-resume {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--green, #2d6a4f);
  color: #fff;
  text-align: center;
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}
.gp-resume:hover {
  background: #3a8963;
}
.gp-resume--hidden {
  transform: translateY(100%);
}
