/* ── TGBF Shared Audio Player ── */

/* FAB listen button */
#tgbf-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #2A2020;
  color: #fff;
  border: none;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(42,32,32,0.25);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}
#tgbf-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(42,32,32,0.32);
}
#tgbf-fab.playing {
  background: #5E3A7A;
}
#tgbf-fab.hidden {
  display: none;
}
#tgbf-fab .fab-icon {
  font-size: 16px;
  line-height: 1;
}
@media (max-width: 600px) {
  #tgbf-fab {
    bottom: 88px; /* above player */
    right: 16px;
    padding: 11px 16px;
    font-size: 12.5px;
  }
}

/* Mini player */
#tgbf-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(42,32,32,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  z-index: 2000;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
#tgbf-player.visible {
  transform: translateY(0);
}

/* Progress bar */
.tgbf-progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  position: relative;
}
.tgbf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B6E9E, #5E3A7A);
  transition: width 0.4s linear;
  pointer-events: none;
}

/* Player body */
.tgbf-player-body {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 32px;
  height: 72px;
}
.tgbf-art {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(139,110,158,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.tgbf-info {
  flex: 1;
  min-width: 0;
}
.tgbf-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.tgbf-sub {
  font-size: 11px;
  font-weight: 300;
  opacity: 0.55;
}
.tgbf-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.tgbf-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.15s;
  font-size: 18px;
  opacity: 0.75;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tgbf-btn:hover { background: rgba(255,255,255,0.1); opacity: 1; }
.tgbf-playpause {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12) !important;
  font-size: 20px;
  opacity: 1 !important;
}
.tgbf-playpause:hover { background: rgba(255,255,255,0.22) !important; }
.tgbf-speed {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}
.tgbf-speed:hover { background: rgba(255,255,255,0.2); }
.tgbf-voice-select {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  padding: 4px 6px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  max-width: 130px;
}
.tgbf-time {
  font-size: 11px;
  opacity: 0.45;
  white-space: nowrap;
  font-weight: 300;
}
.tgbf-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  opacity: 0.45;
  font-size: 18px;
  transition: opacity 0.15s;
}
.tgbf-close:hover { opacity: 1; }

/* Wave animation */
@keyframes tgbf-wave {
  0%,100% { height: 3px; }
  50%      { height: 13px; }
}
.tgbf-wave {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 16px;
  vertical-align: middle;
  margin-right: 5px;
}
.tgbf-wave span {
  width: 3px;
  background: #8B6E9E;
  border-radius: 2px;
  animation: tgbf-wave 0.9s ease-in-out infinite;
}
.tgbf-wave span:nth-child(2) { animation-delay: 0.15s; }
.tgbf-wave span:nth-child(3) { animation-delay: 0.3s; }
.tgbf-wave span:nth-child(4) { animation-delay: 0.45s; }
.tgbf-wave span:nth-child(5) { animation-delay: 0.6s; }

@media (max-width: 600px) {
  .tgbf-player-body { padding: 12px 16px; gap: 10px; }
  .tgbf-time        { display: none; }
  .tgbf-btn[data-skip] { display: none; }
  .tgbf-voice-select   { display: none; }
}

/* ── Spotify player bar ── */
#tgbf-spotify {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(18, 18, 18, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  z-index: 2000;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  border-top: 1px solid rgba(255,255,255,0.08);
}
#tgbf-spotify.visible {
  transform: translateY(0);
}
.tgbf-sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px 10px;
}
.tgbf-sp-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.tgbf-sp-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.tgbf-sp-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
  font-family: 'DM Sans', sans-serif;
}
.tgbf-sp-sub {
  font-size: 11px;
  opacity: 0.45;
  font-weight: 300;
  font-family: 'DM Sans', sans-serif;
  margin-top: 2px;
}
.tgbf-sp-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0.45;
  font-size: 18px;
  padding: 6px 8px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.tgbf-sp-close:hover { opacity: 1; }
.tgbf-sp-embed {
  padding: 0 24px;
}
.tgbf-sp-embed iframe {
  display: block;
  border-radius: 10px;
}
.tgbf-sp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px 16px;
}
.tgbf-sp-open {
  font-size: 12px;
  color: #1DB954;
  text-decoration: none;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  transition: opacity 0.15s;
}
.tgbf-sp-open:hover { opacity: 0.8; }
.tgbf-sp-badge {
  font-size: 11px;
  opacity: 0.4;
  font-weight: 300;
  font-family: 'DM Sans', sans-serif;
}
@media (max-width: 600px) {
  .tgbf-sp-header { padding: 12px 16px 8px; }
  .tgbf-sp-embed  { padding: 0 16px; }
  .tgbf-sp-footer { padding: 8px 16px 14px; }
  .tgbf-sp-title  { max-width: 220px; }
  .tgbf-sp-badge  { display: none; }
}
